@fungi.computer/oyster 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +13 -0
  2. package/dist/agents.d.ts +16 -1
  3. package/dist/agents.js +60 -3
  4. package/dist/computer-control-port.d.ts +20 -1
  5. package/dist/mcp.d.ts +128 -0
  6. package/dist/mcp.js +63 -1
  7. package/dist/standalone/agent-computers.d.ts +12 -1
  8. package/dist/standalone/agent-computers.js +35 -0
  9. package/dist/standalone/agent-connections.d.ts +47 -0
  10. package/dist/standalone/agent-connections.js +170 -0
  11. package/dist/standalone/agent-model-choice.d.ts +7 -3
  12. package/dist/standalone/agent-model-choice.js +33 -4
  13. package/dist/standalone/agents.d.ts +70 -9
  14. package/dist/standalone/agents.js +187 -110
  15. package/dist/standalone/browser.d.ts +4 -3
  16. package/dist/standalone/browser.js +4 -3
  17. package/dist/standalone/computer-control.js +55 -1
  18. package/dist/standalone/computer-fleet.d.ts +21 -0
  19. package/dist/standalone/computer-fleet.js +30 -6
  20. package/dist/standalone/computer.d.ts +20 -1
  21. package/dist/standalone/computer.js +63 -1
  22. package/dist/standalone/model-key-vault.d.ts +50 -0
  23. package/dist/standalone/model-key-vault.js +147 -0
  24. package/dist/standalone/registry.d.ts +23 -0
  25. package/dist/standalone/registry.js +30 -0
  26. package/dist/standalone/web.d.ts +10 -0
  27. package/dist/standalone/web.js +34 -0
  28. package/dist/standalone/worker-routes.d.ts +3 -1
  29. package/dist/standalone/worker-routes.js +1 -0
  30. package/dist/standalone/worker.js +9 -1
  31. package/dist/web/index.d.ts +3 -0
  32. package/dist/web/index.js +3 -0
  33. package/dist/web/search-contract.d.ts +19 -0
  34. package/dist/web/search-contract.js +14 -0
  35. package/dist/web/search.d.ts +25 -0
  36. package/dist/web/search.js +123 -0
  37. package/dist/web/source.d.ts +46 -0
  38. package/dist/web/source.js +335 -0
  39. package/dist/workers-git.js +2 -1
  40. package/docs/api/agents.md +81 -3
  41. package/docs/api/apps.md +129 -111
  42. package/docs/api/build-contract.md +27 -21
  43. package/docs/api/build.md +55 -54
  44. package/docs/api/git.md +3 -3
  45. package/docs/api/host.md +69 -60
  46. package/docs/api/mcp.md +81 -44
  47. package/docs/api/workers-git.md +6 -6
  48. package/docs/api/workers.md +53 -47
  49. package/package.json +27 -22
package/docs/api/mcp.md CHANGED
@@ -125,6 +125,25 @@ type ComputerControlPort = Readonly<{
125
125
  kind: "uncertain" | "denied" | "conflict" | "invalid";
126
126
  }
127
127
  >;
128
+ backends: Promise<object[]>;
129
+ attachLocal: Promise<
130
+ | {
131
+ kind: "attached";
132
+ backendId: string;
133
+ }
134
+ | {
135
+ kind: "uncertain" | "denied" | "conflict" | "invalid";
136
+ }
137
+ >;
138
+ detachLocal: Promise<
139
+ | {
140
+ kind: "detached";
141
+ detached: boolean;
142
+ }
143
+ | {
144
+ kind: "denied" | "uncertain" | "invalid";
145
+ }
146
+ >;
128
147
  }>;
129
148
  ```
130
149
 
@@ -237,34 +256,52 @@ One set of schemas and operations for MCP and direct broker invocation.
237
256
 
238
257
  `object`
239
258
 
240
- | Name | Type | Default value | Description |
241
- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
242
- | `list` | `object` | - | - |
243
- | `list.replay` | `"safe"` | - | - |
244
- | `list.access` | `"read"` | - | - |
245
- | `list.description` | `string` | `"List a page of permitted Computers. Follow nextOffset for another page."` | - |
246
- | `list.input` | `ZodObject`\<\{ `limit`: `ZodDefault`\<`ZodNumber`\>; `offset`: `ZodDefault`\<`ZodNumber`\>; \}, `$strict`\> | `computerPageSchema` | - |
247
- | `list.output` | `ZodObject`\<\{ `computers`: `ZodArray`\<`ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; `createdAt`: `ZodNumber`; `updatedAt`: `ZodNumber`; \}, `$strict`\>\>; `nextOffset`: `ZodNullable`\<`ZodNumber`\>; \}, `$strict`\> | `teamComputerDirectorySchema` | - |
248
- | `list.execute()` | (`input`, `context`) => `Promise`\<\{ `computers`: `object`[]; `nextOffset`: `number` \| `null`; \}\> | - | Return an admitted inventory page to MCP or the retained broker. |
249
- | `state` | `object` | - | - |
250
- | `state.replay` | `"safe"` | - | - |
251
- | `state.access` | `"read"` | - | - |
252
- | `state.description` | `string` | `"Read runtime state without waking a Computer, including its live admission queue position."` | - |
253
- | `state.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
254
- | `state.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; `start_failed`: `"start_failed"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\], `"state"`\> | `computerStateSchema` | - |
255
- | `state.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"` \| `"start_failed"`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Return liveness without waking the runtime. |
256
- | `start` | `object` | - | - |
257
- | `start.replay` | `"unsafe"` | - | - |
258
- | `start.description` | `string` | `"Start a hosted Computer through ordinary admission. Waits until connected; poll computers.state while queued. Safe to retry."` | - |
259
- | `start.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
260
- | `start.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; `start_failed`: `"start_failed"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\], `"state"`\> | `computerStateSchema` | - |
261
- | `start.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"` \| `"start_failed"`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Admit and start this Computer. |
262
- | `create` | `object` | - | - |
263
- | `create.replay` | `"unsafe"` | - | - |
264
- | `create.description` | `string` | `"Create a Computer with an optional friendly name. Request identity is generated automatically. If the outcome is uncertain, retry with its returned requestId and the original name input; do not start a second creation."` | - |
265
- | `create.input` | `ZodObject`\<\{ `name`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; `requestId`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; \}, `$strict`\> | `fleetCreate` | - |
266
- | `create.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"created"`\>; `requestId`: `ZodString`; `computer`: `ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; \}, `$strict`\>; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `conflict`: `"conflict"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; `requestId`: `ZodString`; \}, `$strict`\>\], `"kind"`\> | `fleetCreation` | - |
267
- | `create.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"created"`; `requestId`: `string`; `computer`: \{ `computerId`: `string`; `name`: `string`; \}; \} \| \{ `kind`: `"invalid"` \| `"conflict"` \| `"denied"` \| `"uncertain"`; `requestId`: `string`; \}\> | - | Mint one identity or preserve the requestId for an uncertain retry. |
259
+ | Name | Type | Default value | Description |
260
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
261
+ | `list` | `object` | - | - |
262
+ | `list.replay` | `"safe"` | - | - |
263
+ | `list.access` | `"read"` | - | - |
264
+ | `list.description` | `string` | `"List a page of permitted Computers. Follow nextOffset for another page."` | - |
265
+ | `list.input` | `ZodObject`\<\{ `limit`: `ZodDefault`\<`ZodNumber`\>; `offset`: `ZodDefault`\<`ZodNumber`\>; \}, `$strict`\> | `computerPageSchema` | - |
266
+ | `list.output` | `ZodObject`\<\{ `computers`: `ZodArray`\<`ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; `createdAt`: `ZodNumber`; `updatedAt`: `ZodNumber`; \}, `$strict`\>\>; `nextOffset`: `ZodNullable`\<`ZodNumber`\>; \}, `$strict`\> | `teamComputerDirectorySchema` | - |
267
+ | `list.execute()` | (`input`, `context`) => `Promise`\<\{ `computers`: `object`[]; `nextOffset`: `number` \| `null`; \}\> | - | Return an admitted inventory page to MCP or the retained broker. |
268
+ | `state` | `object` | - | - |
269
+ | `state.replay` | `"safe"` | - | - |
270
+ | `state.access` | `"read"` | - | - |
271
+ | `state.description` | `string` | `"Read runtime state without waking a Computer, including its live admission queue position."` | - |
272
+ | `state.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
273
+ | `state.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; `start_failed`: `"start_failed"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\], `"state"`\> | `computerStateSchema` | - |
274
+ | `state.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"` \| `"start_failed"`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Return liveness without waking the runtime. |
275
+ | `start` | `object` | - | - |
276
+ | `start.replay` | `"unsafe"` | - | - |
277
+ | `start.description` | `string` | `"Start a hosted Computer through ordinary admission. Waits until connected; poll computers.state while queued. Safe to retry."` | - |
278
+ | `start.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
279
+ | `start.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `state`: `ZodEnum`\<\{ `running`: `"running"`; `sleeping`: `"sleeping"`; `starting`: `"starting"`; `start_failed`: `"start_failed"`; \}\>; \}, `$strict`\>, `ZodObject`\<\{ `state`: `ZodLiteral`\<`"queued"`\>; `position`: `ZodNumber`; \}, `$strict`\>\], `"state"`\> | `computerStateSchema` | - |
280
+ | `start.execute()` | (`input`, `context`) => `Promise`\< \| \{ `state`: `"running"` \| `"sleeping"` \| `"starting"` \| `"start_failed"`; \} \| \{ `state`: `"queued"`; `position`: `number`; \}\> | - | Admit and start this Computer. |
281
+ | `create` | `object` | - | - |
282
+ | `create.replay` | `"unsafe"` | - | - |
283
+ | `create.description` | `string` | `"Create a Computer with an optional friendly name. Request identity is generated automatically. If the outcome is uncertain, retry with its returned requestId and the original name input; do not start a second creation."` | - |
284
+ | `create.input` | `ZodObject`\<\{ `name`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; `requestId`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; \}, `$strict`\> | `fleetCreate` | - |
285
+ | `create.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"created"`\>; `requestId`: `ZodString`; `computer`: `ZodObject`\<\{ `computerId`: `ZodString`; `name`: `ZodString`; \}, `$strict`\>; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `conflict`: `"conflict"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; `requestId`: `ZodString`; \}, `$strict`\>\], `"kind"`\> | `fleetCreation` | - |
286
+ | `create.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"created"`; `requestId`: `string`; `computer`: \{ `computerId`: `string`; `name`: `string`; \}; \} \| \{ `kind`: `"invalid"` \| `"conflict"` \| `"denied"` \| `"uncertain"`; `requestId`: `string`; \}\> | - | Mint one identity or preserve the requestId for an uncertain retry. |
287
+ | `backends` | `object` | - | - |
288
+ | `backends.replay` | `"safe"` | - | - |
289
+ | `backends.description` | `string` | `"List one Computer's attached execution backends (platform container, on-box VM, members' machines) with live status."` | - |
290
+ | `backends.input` | `ZodObject`\<\{ `computerId`: `ZodString`; \}, `$strict`\> | `fleetComputerId` | - |
291
+ | `backends.output` | `ZodObject`\<\{ `backends`: `ZodArray`\<`ZodObject`\<\{ `id`: `ZodString`; `kind`: `ZodEnum`\<\{ `platform-container`: `"platform-container"`; `on-box-vm`: `"on-box-vm"`; `local`: `"local"`; \}\>; `status`: `ZodEnum`\<\{ `ready`: `"ready"`; `online`: `"online"`; `offline`: `"offline"`; `queued`: `"queued"`; \}\>; `queuePosition`: `ZodNullable`\<`ZodNumber`\>; `hostId`: `ZodNullable`\<`ZodString`\>; `hostLabel`: `ZodNullable`\<`ZodString`\>; `folderLabel`: `ZodNullable`\<`ZodString`\>; `detachable`: `ZodBoolean`; \}, `$strict`\>\>; \}, `$strict`\> | `fleetBackends` | - |
292
+ | `backends.execute()` | (`input`, `context`) => `Promise`\<\{ `backends`: `object`[]; \}\> | - | Return the attached list without waking any backend. |
293
+ | `attachLocal` | `object` | - | - |
294
+ | `attachLocal.replay` | `"unsafe"` | - | - |
295
+ | `attachLocal.description` | `string` | `"Attach this authenticated member's machine to a Computer as an execution backend. Send only the device public key and labels; the folder path and private key stay on the machine. Retry an uncertain outcome with its returned requestId."` | - |
296
+ | `attachLocal.input` | `ZodObject`\<\{ `computerId`: `ZodString`; `publicKey`: `ZodBase64`; `hostLabel`: `ZodLazy`\<`ZodString`\>; `folderLabel`: `ZodLazy`\<`ZodString`\>; `requestId`: `ZodDefault`\<`ZodNullable`\<`ZodString`\>\>; \}, `$strict`\> | `fleetAttachInput` | - |
297
+ | `attachLocal.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"attached"`\>; `requestId`: `ZodString`; `backendId`: `ZodString`; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `conflict`: `"conflict"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; `requestId`: `ZodString`; \}, `$strict`\>\], `"kind"`\> | `fleetAttachment` | - |
298
+ | `attachLocal.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"attached"`; `requestId`: `string`; `backendId`: `string`; \} \| \{ `kind`: `"invalid"` \| `"conflict"` \| `"denied"` \| `"uncertain"`; `requestId`: `string`; \}\> | - | Mint one identity or preserve the requestId for an uncertain retry. |
299
+ | `detachLocal` | `object` | - | - |
300
+ | `detachLocal.replay` | `"unsafe"` | - | - |
301
+ | `detachLocal.description` | `string` | `"Detach a machine this member attached from a Computer. Its live connection closes and the Computer keeps its files. Safe to retry."` | - |
302
+ | `detachLocal.input` | `ZodLazy`\<`ZodObject`\<\{ `computerId`: `ZodString`; `backendId`: `ZodString`; \}, `$strict`\>\> | `localBackendDetachSchema` | - |
303
+ | `detachLocal.output` | `ZodDiscriminatedUnion`\<\[`ZodObject`\<\{ `kind`: `ZodLiteral`\<`"detached"`\>; `detached`: `ZodBoolean`; \}, `$strict`\>, `ZodObject`\<\{ `kind`: `ZodEnum`\<\{ `invalid`: `"invalid"`; `denied`: `"denied"`; `uncertain`: `"uncertain"`; \}\>; \}, `$strict`\>\], `"kind"`\> | `fleetDetachment` | - |
304
+ | `detachLocal.execute()` | (`input`, `context`) => `Promise`\< \| \{ `kind`: `"detached"`; `detached`: `boolean`; \} \| \{ `kind`: `"invalid"` \| `"denied"` \| `"uncertain"`; \}\> | - | Close the attachment and its live connection; a gone one settles. |
268
305
 
269
306
  ---
270
307
 
@@ -336,15 +373,15 @@ Derive the current principal's admitted App modules and grants.
336
373
 
337
374
  #### Parameters
338
375
 
339
- | Parameter | Type |
340
- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
341
- | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), \| `"installations"` \| `"instances"` \| `"artifacts"` \| `"guestLimits"` \| `"backgroundOriginKey"` \| `"computerId"` \| `"capabilities"` \| `"appToolPolicy"` \| `"keys"` \| `"approvals"`\> |
342
- | `surfaces` | [`AppSurfaceCache`](#appsurfacecache) |
343
- | `principal` | [`TenantPrincipal`](tenant.md#tenantprincipal) |
344
- | `installations` | readonly `Readonly`\<\{ `installationId`: `string`; `instanceId`: [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{ `releaseId`: `ReleaseId`; `appId`: `AppId`; `artifact`: \{ `artifactRef`: `ArtifactRef`; `artifactDigest`: `Sha256Digest`; `provenance`: \{ `sourceRevision`: `SourceRevision`; `sourceTreeDigest`: `Sha256Digest`; `buildRecipeDigest`: `Sha256Digest`; \}; \}; \}; `releasePin`: `"pinned"` \| `"floating"`; `authority`: \{ `authorityVersion`: `number`; `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly `Readonly`\<\{ `capability`: \| `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \| `"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.avatar"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \| `"channels.personal.manage"`; `capabilityApproved`: `true`; `operations`: readonly `string`[]; `resources`: \| `"tenant-scope"` \| readonly `Readonly`\<\{ `kind`: ...; `id`: ...; \}\>[]; \}\>[]; `approval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; \}; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; \}\>[] |
345
- | `access` | [`OysterCallerAccess`](#oystercalleraccess) |
346
- | `sessionId` | `string` \| `null` |
347
- | `mode` | `"approval"` \| `"direct"` |
376
+ | Parameter | Type |
377
+ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
378
+ | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), \| `"installations"` \| `"instances"` \| `"artifacts"` \| `"guestLimits"` \| `"backgroundOriginKey"` \| `"computerId"` \| `"capabilities"` \| `"appToolPolicy"` \| `"keys"` \| `"approvals"`\> |
379
+ | `surfaces` | [`AppSurfaceCache`](#appsurfacecache) |
380
+ | `principal` | [`TenantPrincipal`](tenant.md#tenantprincipal) |
381
+ | `installations` | readonly `Readonly`\<\{ `installationId`: `string`; `instanceId`: [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{ `releaseId`: `ReleaseId`; `appId`: `AppId`; `artifact`: \{ `artifactRef`: `ArtifactRef`; `artifactDigest`: `Sha256Digest`; `provenance`: \{ `sourceRevision`: `SourceRevision`; `sourceTreeDigest`: `Sha256Digest`; `buildRecipeDigest`: `Sha256Digest`; \}; \}; \}; `releasePin`: `"pinned"` \| `"floating"`; `authority`: \{ `authorityVersion`: `number`; `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly `Readonly`\<\{ `capability`: \| `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \| `"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.avatar"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"` \| `"media.share"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \| `"channels.personal.manage"`; `capabilityApproved`: `true`; `operations`: readonly `string`[]; `resources`: \| `"tenant-scope"` \| readonly `Readonly`\<\{ `kind`: ...; `id`: ...; \}\>[]; \}\>[]; `approval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; \}; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; \}\>[] |
382
+ | `access` | [`OysterCallerAccess`](#oystercalleraccess) |
383
+ | `sessionId` | `string` \| `null` |
384
+ | `mode` | `"approval"` \| `"direct"` |
348
385
 
349
386
  #### Returns
350
387
 
@@ -391,13 +428,13 @@ installation authority or the caller's own grants.
391
428
 
392
429
  #### Parameters
393
430
 
394
- | Parameter | Type |
395
- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
396
- | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), \| `"installations"` \| `"instances"` \| `"artifacts"` \| `"guestLimits"` \| `"backgroundOriginKey"` \| `"computerId"` \| `"capabilities"` \| `"appToolPolicy"` \| `"keys"` \| `"approvals"`\> |
397
- | `principal` | [`TenantPrincipal`](tenant.md#tenantprincipal) |
398
- | `access` | [`OysterCallerAccess`](#oystercalleraccess) |
399
- | `surfaces` | [`AppSurfaceCache`](#appsurfacecache) |
400
- | `preloadedInstallations?` | readonly `Readonly`\<\{ `installationId`: `string`; `instanceId`: [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{ `releaseId`: `ReleaseId`; `appId`: `AppId`; `artifact`: \{ `artifactRef`: `ArtifactRef`; `artifactDigest`: `Sha256Digest`; `provenance`: \{ `sourceRevision`: `SourceRevision`; `sourceTreeDigest`: `Sha256Digest`; `buildRecipeDigest`: `Sha256Digest`; \}; \}; \}; `releasePin`: `"pinned"` \| `"floating"`; `authority`: \{ `authorityVersion`: `number`; `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly `Readonly`\<\{ `capability`: \| `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \| `"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.avatar"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \| `"channels.personal.manage"`; `capabilityApproved`: `true`; `operations`: readonly `string`[]; `resources`: `"tenant-scope"` \| readonly `Readonly`\<...\>[]; \}\>[]; `approval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; \}; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; \}\>[] |
431
+ | Parameter | Type |
432
+ | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
433
+ | `host` | `Pick`\<[`OysterHost`](host.md#oysterhost), \| `"installations"` \| `"instances"` \| `"artifacts"` \| `"guestLimits"` \| `"backgroundOriginKey"` \| `"computerId"` \| `"capabilities"` \| `"appToolPolicy"` \| `"keys"` \| `"approvals"`\> |
434
+ | `principal` | [`TenantPrincipal`](tenant.md#tenantprincipal) |
435
+ | `access` | [`OysterCallerAccess`](#oystercalleraccess) |
436
+ | `surfaces` | [`AppSurfaceCache`](#appsurfacecache) |
437
+ | `preloadedInstallations?` | readonly `Readonly`\<\{ `installationId`: `string`; `instanceId`: [`InstanceId`](index.md#instanceid) \| `null`; `appId`: `AppId`; `release`: \{ `releaseId`: `ReleaseId`; `appId`: `AppId`; `artifact`: \{ `artifactRef`: `ArtifactRef`; `artifactDigest`: `Sha256Digest`; `provenance`: \{ `sourceRevision`: `SourceRevision`; `sourceTreeDigest`: `Sha256Digest`; `buildRecipeDigest`: `Sha256Digest`; \}; \}; \}; `releasePin`: `"pinned"` \| `"floating"`; `authority`: \{ `authorityVersion`: `number`; `declaredOperationsDigest`: `Sha256Digest`; `approvedGrants`: readonly `Readonly`\<\{ `capability`: \| `"computer.list"` \| `"computer.readFile"` \| `"computer.writeFile"` \| `"computer.execute"` \| `"approvals"` \| `"agent.list"` \| `"agent.manage"` \| `"agent.rename"` \| `"agent.avatar"` \| `"agent.toolPolicy"` \| `"agent.read"` \| `"agent.send"` \| `"llm.generation"` \| `"media.generation"` \| `"media.share"` \| `"games:servers"` \| `"git.repository"` \| `"apps.open"` \| `"apps.call"` \| `"app.storage"` \| `"app.events.emit"` \| `"team.workbenchHost"` \| `"marketplace.browse"` \| `"marketplace.purchase"` \| `"workflow.run"` \| `"workflow.publish"` \| `"workflow.arm"` \| `"world"` \| `"channels.read"` \| `"channels.personal.manage"`; `capabilityApproved`: `true`; `operations`: readonly `string`[]; `resources`: `"tenant-scope"` \| readonly `Readonly`\<...\>[]; \}\>[]; `approval`: \| `Readonly`\<\{ `by`: \| \{ `kind`: `"member"`; `memberId`: `string`; \} \| \{ `kind`: `"agent"`; `agentId`: `string`; \} \| \{ `kind`: `"team-key"`; `keyId`: `string`; \}; `at`: `number`; `authorityVersion`: `number`; \}\> \| `null`; \}; `status`: `"enabled"` \| `"disabled"` \| `"deleted"`; \}\>[] |
401
438
 
402
439
  #### Returns
403
440
 
@@ -1722,12 +1722,12 @@ both compose it here.
1722
1722
 
1723
1723
  #### Parameters
1724
1724
 
1725
- | Parameter | Type |
1726
- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1727
- | `env` | [`OysterGitEnv`](#oystergitenv) |
1728
- | `scope` | [`TenantScope`](tenant.md#tenantscope) |
1729
- | `hostOwnerRoutes` | \| [`Routes`](authorization.md#routes)\<[`OysterEnv`](host.md#oysterenv)\> \| `undefined` |
1730
- | `agents` | \| `Readonly`\<\{ `list`: `Promise`\<readonly `Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly ...\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>[]\>; `setArchived`: `Promise`\< \| `Readonly`\<\{ `archived`: `boolean`; `revision`: `number`; \}\> \| `Readonly`\<\{ `error`: \| `"archived"` \| `"pending"` \| `"not_found"` \| `"running"` \| `"not_granted"` \| `"self"` \| `"not_creator"` \| `"unreadable"`; `message?`: `string`; `archived?`: `boolean`; `revision?`: `number`; \}\>\>; `create`: `Promise`\<`Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[..., ..., ...\]\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>\>; `rename`: `Promise`\< \| `Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly ...\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\> \| `Readonly`\<\{ `error`: `"not_found"` \| `"not_granted"` \| `"name_taken"`; \}\>\>; `setAvatar`: `Promise`\< \| `Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly ...\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\> \| `Readonly`\<\{ `error`: `"not_found"` \| `"not_granted"`; \}\>\>; `readModelChoice`: `Promise`\< \| \{ `keySource`: `"workers-ai"` \| `"ai-gateway"` \| `"byok"`; `model`: \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"max"` \| `"low"` \| `"medium"` \| `"high"` \| `"minimal"` \| `"xhigh"`; \}; \} \| `null`\>; `decodeModelChoice`: \| \{ `keySource`: `"workers-ai"` \| `"ai-gateway"` \| `"byok"`; `model`: \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"max"` \| `"low"` \| `"medium"` \| `"high"` \| `"minimal"` \| `"xhigh"`; \}; \} \| `null`; `setModelChoice`: `Promise`\< \| \{ `keySource`: `"workers-ai"` \| `"ai-gateway"` \| `"byok"`; `model`: \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"max"` \| `"low"` \| `"medium"` \| `"high"` \| `"minimal"` \| `"xhigh"`; \}; \} \| `Readonly`\<\{ `error`: \| `"not_found"` \| `"not_granted"` \| [`AgentModelRefusal`](agents.md#agentmodelrefusal); \}\>\>; `policyStatus`: `Promise`\< \| `Readonly`\<\{ `status`: `"pending"` \| `"approved"`; `revision`: `string`; \}\> \| `null`\>; `appToolPolicy`: `Promise`\< \| \{ `level`: `"read"` \| `"write"`; `revision`: `string`; `grantedBy`: `string`; \} \| `null`\>; `policyRevision`: `Promise`\<`string` \| `null`\>; `approveAppToolPolicy`: `Promise`\< \| \{ `level`: `"read"` \| `"write"`; `revision`: `string`; `grantedBy`: `string`; \} \| `Readonly`\<\{ `status`: `"pending"`; `revision`: `string`; \}\> \| `Readonly`\<\{ `error`: `"not_found"` \| `"not_granted"` \| `"revision_conflict"`; \}\>\>; `mcpServers`: `Promise`\< \| readonly `Readonly`\<\{ `serverId`: `string`; `name`: `string`; `url`: `string`; `hasBearer`: `boolean`; \}\>[] \| `null`\>; `addMcpServer`: `Promise`\< \| `Readonly`\<\{ `serverId`: `string`; `name`: `string`; `url`: `string`; `hasBearer`: `boolean`; \}\> \| `Readonly`\<\{ `error`: `"limit"` \| `"not_found"` \| `"duplicate_name"`; \}\>\>; `removeMcpServer`: `Promise`\<`boolean`\>; `fetch`: `Promise`\<`Response` \| `null`\>; `inbox`: `Promise`\<`Readonly`\<\{ `items`: readonly ( \| \{ `agentId`: `string`; `sessionId`: `string`; `title`: `string`; `triggerId?`: `string`; `createdAt`: `number`; `lastActivityAt`: `number`; `settledAt?`: `number`; `visitedAt?`: `number`; `state`: `"running"` \| `"done"` \| `"errored"` \| `"needs_you"`; \} \| \{ `agentId`: `string`; `sessionId`: `string`; `state`: `"unavailable"`; \} \| \{ `kind`: `"workflow-review"`; `key`: \{ `runId`: `string`; `nodeId`: `string`; `iteration`: `string`; \}; `installationId`: `string`; `workflowId`: `string` \| `null`; `workflowTitle`: `string`; `reviewTitle`: `string`; `reviewers`: `"runner"` \| `"owners"`; `show`: readonly `Json`[]; `choices?`: readonly ...[]; `openedAt`: `number`; `expiresAt`: `number`; `state`: `"pending"` \| `"delivered"` \| `"answered"` \| `"timed_out"` \| `"closed"`; \})[]; `revision`: `number`; \}\>\>; `revision`: `Promise`\<`number`\>; `visit`: `Promise`\<`boolean`\>; \}\> \| `undefined` |
1725
+ | Parameter | Type |
1726
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1727
+ | `env` | [`OysterGitEnv`](#oystergitenv) |
1728
+ | `scope` | [`TenantScope`](tenant.md#tenantscope) |
1729
+ | `hostOwnerRoutes` | \| [`Routes`](authorization.md#routes)\<[`OysterEnv`](host.md#oysterenv)\> \| `undefined` |
1730
+ | `agents` | \| `Readonly`\<\{ `list`: `Promise`\<readonly `Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly ...\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>[]\>; `setArchived`: `Promise`\< \| `Readonly`\<\{ `archived`: `boolean`; `revision`: `number`; \}\> \| `Readonly`\<\{ `error`: \| `"archived"` \| `"pending"` \| `"not_found"` \| `"running"` \| `"not_granted"` \| `"self"` \| `"not_creator"` \| `"unreadable"`; `message?`: `string`; `archived?`: `boolean`; `revision?`: `number`; \}\>\>; `create`: `Promise`\<`Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[..., ..., ...\]\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>\>; `rename`: `Promise`\< \| `Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly ...\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\> \| `Readonly`\<\{ `error`: `"not_found"` \| `"not_granted"` \| `"name_taken"`; \}\>\>; `setAvatar`: `Promise`\< \| `Readonly`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`; `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`: `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly ...\>\>; `expression`: `string`; `renderStyle`: \| `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \| `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\> \| `Readonly`\<\{ `error`: `"not_found"` \| `"not_granted"`; \}\>\>; `readModelChoice`: `Promise`\< \| \{ `keySource`: `"workers-ai"` \| `"ai-gateway"` \| `"byok"`; `model`: \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"max"` \| `"low"` \| `"medium"` \| `"high"` \| `"minimal"` \| `"xhigh"`; \}; `keyId?`: `string`; \} \| `null`\>; `decodeModelChoice`: \| \{ `keySource`: `"workers-ai"` \| `"ai-gateway"` \| `"byok"`; `model`: \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"max"` \| `"low"` \| `"medium"` \| `"high"` \| `"minimal"` \| `"xhigh"`; \}; `keyId?`: `string`; \} \| `null`; `setModelChoice`: `Promise`\< \| \{ `keySource`: `"workers-ai"` \| `"ai-gateway"` \| `"byok"`; `model`: \{ `providerId`: `string`; `modelId`: `string`; `reasoning?`: `"max"` \| `"low"` \| `"medium"` \| `"high"` \| `"minimal"` \| `"xhigh"`; \}; `keyId?`: `string`; \} \| `Readonly`\<\{ `error`: \| `"not_found"` \| `"not_granted"` \| [`AgentModelRefusal`](agents.md#agentmodelrefusal); \}\>\>; `policyStatus`: `Promise`\< \| `Readonly`\<\{ `status`: `"pending"` \| `"approved"`; `revision`: `string`; \}\> \| `null`\>; `appToolPolicy`: `Promise`\< \| \{ `level`: `"read"` \| `"write"`; `revision`: `string`; `grantedBy`: `string`; \} \| `null`\>; `policyRevision`: `Promise`\<`string` \| `null`\>; `approveAppToolPolicy`: `Promise`\< \| \{ `level`: `"read"` \| `"write"`; `revision`: `string`; `grantedBy`: `string`; \} \| `Readonly`\<\{ `status`: `"pending"`; `revision`: `string`; \}\> \| `Readonly`\<\{ `error`: `"not_found"` \| `"not_granted"` \| `"revision_conflict"`; \}\>\>; `modelKeys`: `Promise`\<readonly `Readonly`\<\{ `keyId`: `string`; `provider`: `"anthropic"` \| `"openai"` \| `"openrouter"` \| `"openai-compatible"`; `label`: `string`; `createdAt`: `number`; `validatedAt`: `number`; \}\>[]\>; `sealModelKey`: `Promise`\< \| `Readonly`\<\{ `keyId`: `string`; `provider`: `"anthropic"` \| `"openai"` \| `"openrouter"` \| `"openai-compatible"`; `label`: `string`; `createdAt`: `number`; `validatedAt`: `number`; \}\> \| `Readonly`\<\{ `error`: [`ModelKeyRefusal`](agents.md#modelkeyrefusal); \}\>\>; `removeModelKey`: `Promise`\<`"deleted"` \| `"absent"`\>; `mcpServers`: `Promise`\< \| readonly `Readonly`\<\{ `serverId`: `string`; `name`: `string`; `url`: `string`; `hasBearer`: `boolean`; \}\>[] \| `null`\>; `addMcpServer`: `Promise`\< \| `Readonly`\<\{ `serverId`: `string`; `name`: `string`; `url`: `string`; `hasBearer`: `boolean`; \}\> \| `Readonly`\<\{ `error`: `"limit"` \| `"not_found"` \| `"duplicate_name"` \| `"invalid_endpoint"`; \}\>\>; `removeMcpServer`: `Promise`\<`boolean`\>; `fetch`: `Promise`\<`Response` \| `null`\>; `inbox`: `Promise`\<`Readonly`\<\{ `items`: readonly ( \| \{ `agentId`: `string`; `sessionId`: `string`; `title`: `string`; `triggerId?`: `string`; `createdAt`: `number`; `lastActivityAt`: `number`; `settledAt?`: `number`; `visitedAt?`: `number`; `state`: `"running"` \| `"done"` \| `"errored"` \| `"needs_you"`; \} \| \{ `agentId`: `string`; `sessionId`: `string`; `state`: `"unavailable"`; \} \| \{ `kind`: `"workflow-review"`; `key`: \{ `runId`: `string`; `nodeId`: `string`; `iteration`: `string`; \}; `installationId`: `string`; `workflowId`: `string` \| `null`; `workflowTitle`: `string`; `reviewTitle`: `string`; `reviewers`: `"runner"` \| `"owners"`; `show`: readonly `Json`[]; `choices?`: readonly ...[]; `openedAt`: `number`; `expiresAt`: `number`; `state`: `"pending"` \| `"delivered"` \| `"answered"` \| `"timed_out"` \| `"closed"`; \})[]; `revision`: `number`; \}\>\>; `revision`: `Promise`\<`number`\>; `visit`: `Promise`\<`boolean`\>; \}\> \| `undefined` |
1731
1731
 
1732
1732
  #### Returns
1733
1733