@fungi.computer/agar 0.1.0 → 0.3.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 (73) hide show
  1. package/README.md +34 -18
  2. package/dist/agent-message-meta.d.ts +21 -16
  3. package/dist/agent-message-meta.js +17 -6
  4. package/dist/agents.d.ts +86 -13
  5. package/dist/agents.js +48 -25
  6. package/dist/approvals.d.ts +5 -0
  7. package/dist/approvals.js +36 -0
  8. package/dist/apps.js +4 -4
  9. package/dist/backend-definition.d.ts +41 -4
  10. package/dist/backend-definition.js +70 -10
  11. package/dist/backend-refusal.d.ts +1 -0
  12. package/dist/backend-refusal.js +1 -0
  13. package/dist/backend.js +4 -4
  14. package/dist/channels.js +4 -4
  15. package/dist/computer-contracts.d.ts +11 -28
  16. package/dist/computer-contracts.js +10 -29
  17. package/dist/computer.js +16 -16
  18. package/dist/connect.d.ts +3 -3
  19. package/dist/connect.js +7 -17
  20. package/dist/errors.d.ts +39 -1
  21. package/dist/errors.js +62 -5
  22. package/dist/game-servers.js +2 -2
  23. package/dist/git-rpc.d.ts +23 -23
  24. package/dist/git-rpc.js +14 -16
  25. package/dist/git.d.ts +9 -9
  26. package/dist/git.js +8 -8
  27. package/dist/host.d.ts +3 -1
  28. package/dist/host.js +5 -1
  29. package/dist/index.d.ts +8 -4
  30. package/dist/index.js +5 -2
  31. package/dist/inference.js +2 -1
  32. package/dist/internal/app-session.js +37 -1
  33. package/dist/internal/media-diagnostic.d.ts +11 -0
  34. package/dist/internal/media-diagnostic.js +21 -0
  35. package/dist/internal/protocol.d.ts +4 -4
  36. package/dist/internal/schemas.d.ts +40 -7
  37. package/dist/internal/schemas.js +122 -35
  38. package/dist/marketplace.js +7 -5
  39. package/dist/media-json.d.ts +14 -0
  40. package/dist/media-json.js +1 -0
  41. package/dist/media-request-id.d.ts +1 -1
  42. package/dist/media-request-id.js +2 -2
  43. package/dist/media.d.ts +11 -0
  44. package/dist/media.js +8 -2
  45. package/dist/method-presentation.d.ts +7 -0
  46. package/dist/method-presentation.js +14 -0
  47. package/dist/method-refusal.d.ts +5 -5
  48. package/dist/method-refusal.js +4 -4
  49. package/dist/query.d.ts +2 -2
  50. package/dist/react-mount.d.ts +7 -1
  51. package/dist/react-mount.js +28 -8
  52. package/dist/react.d.ts +14 -2
  53. package/dist/react.js +40 -4
  54. package/dist/read-copy.d.ts +1 -1
  55. package/dist/read-copy.js +3 -6
  56. package/dist/storage.js +1 -1
  57. package/dist/test-kit/git.js +19 -2
  58. package/dist/window.d.ts +68 -0
  59. package/dist/window.js +31 -0
  60. package/docs/api/README.md +15 -15
  61. package/docs/api/backend-definition.md +83 -9
  62. package/docs/api/backend.md +45 -38
  63. package/docs/api/errors.md +104 -0
  64. package/docs/api/git-rpc.md +35 -35
  65. package/docs/api/git.md +66 -80
  66. package/docs/api/index.md +851 -143
  67. package/docs/api/media-json.md +32 -59
  68. package/docs/api/media-request-id.md +1 -1
  69. package/docs/api/method-presentation.md +21 -0
  70. package/docs/api/modules.md +1 -0
  71. package/docs/api/query.md +1 -1
  72. package/docs/api/react.md +23 -10
  73. package/package.json +16 -6
package/docs/api/index.md CHANGED
@@ -62,7 +62,9 @@ Any JSON value, as Shiitake returns a message's metadata.
62
62
 
63
63
  ```ts
64
64
  type AuthorMeta = Readonly<{
65
- author: Readonly<FungiAuthor>;
65
+ author: Readonly<{
66
+ [K in keyof FungiAuthor]: Exclude<FungiAuthor[K], undefined>;
67
+ }>;
66
68
  }>;
67
69
  ```
68
70
 
@@ -90,7 +92,8 @@ type AppAgentCreateInput = Readonly<
90
92
  ```
91
93
 
92
94
  Input for creating a new Agent: its name, a caller-chosen request id for
93
- idempotency, and whether to provision a new Computer for it.
95
+ idempotency, whether to provision a new Computer for it, and the avatar it wears
96
+ (omitted, it wears its seeded avatar).
94
97
 
95
98
  ---
96
99
 
@@ -188,6 +191,26 @@ Capability handle for creating a new Agent in a directory.
188
191
  create(input): Promise<{
189
192
  agentId: string;
190
193
  name: string;
194
+ avatar: {
195
+ v: z.ZodLiteral<1>;
196
+ character: z.ZodEnum<{
197
+ mushroom: "mushroom";
198
+ cat: "cat";
199
+ burger: "burger";
200
+ }>;
201
+ appearance: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
202
+ expression: z.ZodString;
203
+ renderStyle: z.ZodEnum<{
204
+ plain: "plain";
205
+ pencil: "pencil";
206
+ manga: "manga";
207
+ riso: "riso";
208
+ halftone: "halftone";
209
+ blueprint: "blueprint";
210
+ crt: "crt";
211
+ watercolor: "watercolor";
212
+ }>;
213
+ };
191
214
  sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
192
215
  }>;
193
216
  ```
@@ -202,8 +225,15 @@ Create a new Agent with the given name and request id.
202
225
 
203
226
  ###### Returns
204
227
 
205
- `Promise`\<\{ `agentId`: `string`; `name`: `string`; `sessionOperations`:
206
- readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
228
+ `Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`:
229
+ `z.ZodLiteral`\<`1`\>; `character`: `z.ZodEnum`\<\{ `mushroom`: `"mushroom"`;
230
+ `cat`: `"cat"`; `burger`: `"burger"`; \}\>; `appearance`:
231
+ `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
232
+ `z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `z.ZodString`; `renderStyle`:
233
+ `z.ZodEnum`\<\{ `plain`: `"plain"`; `pencil`: `"pencil"`; `manga`: `"manga"`;
234
+ `riso`: `"riso"`; `halftone`: `"halftone"`; `blueprint`: `"blueprint"`; `crt`:
235
+ `"crt"`; `watercolor`: `"watercolor"`; \}\>; \}; `sessionOperations`: readonly
236
+ (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
207
237
 
208
238
  ---
209
239
 
@@ -256,6 +286,26 @@ Capability handle for renaming an Agent the owner already created.
256
286
  rename(input): Promise<{
257
287
  agentId: string;
258
288
  name: string;
289
+ avatar: {
290
+ v: z.ZodLiteral<1>;
291
+ character: z.ZodEnum<{
292
+ mushroom: "mushroom";
293
+ cat: "cat";
294
+ burger: "burger";
295
+ }>;
296
+ appearance: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
297
+ expression: z.ZodString;
298
+ renderStyle: z.ZodEnum<{
299
+ plain: "plain";
300
+ pencil: "pencil";
301
+ manga: "manga";
302
+ riso: "riso";
303
+ halftone: "halftone";
304
+ blueprint: "blueprint";
305
+ crt: "crt";
306
+ watercolor: "watercolor";
307
+ }>;
308
+ };
259
309
  sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
260
310
  }>;
261
311
  ```
@@ -270,8 +320,89 @@ Rename an existing Agent and return its updated record.
270
320
 
271
321
  ###### Returns
272
322
 
273
- `Promise`\<\{ `agentId`: `string`; `name`: `string`; `sessionOperations`:
274
- readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
323
+ `Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`:
324
+ `z.ZodLiteral`\<`1`\>; `character`: `z.ZodEnum`\<\{ `mushroom`: `"mushroom"`;
325
+ `cat`: `"cat"`; `burger`: `"burger"`; \}\>; `appearance`:
326
+ `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
327
+ `z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `z.ZodString`; `renderStyle`:
328
+ `z.ZodEnum`\<\{ `plain`: `"plain"`; `pencil`: `"pencil"`; `manga`: `"manga"`;
329
+ `riso`: `"riso"`; `halftone`: `"halftone"`; `blueprint`: `"blueprint"`; `crt`:
330
+ `"crt"`; `watercolor`: `"watercolor"`; \}\>; \}; `sessionOperations`: readonly
331
+ (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
332
+
333
+ ---
334
+
335
+ ### AppAgentAvatarInput
336
+
337
+ ```ts
338
+ type AppAgentAvatarInput = Readonly<
339
+ Schema.Schema.Type<typeof appAgentAvatarInputSchema>
340
+ >;
341
+ ```
342
+
343
+ Input for changing an existing Agent's avatar.
344
+
345
+ ---
346
+
347
+ ### AppAgentAvatarHandle
348
+
349
+ ```ts
350
+ type AppAgentAvatarHandle = object;
351
+ ```
352
+
353
+ Capability handle for changing an Agent's avatar.
354
+
355
+ #### Methods
356
+
357
+ ##### setAvatar()
358
+
359
+ ```ts
360
+ setAvatar(input): Promise<{
361
+ agentId: string;
362
+ name: string;
363
+ avatar: {
364
+ v: z.ZodLiteral<1>;
365
+ character: z.ZodEnum<{
366
+ mushroom: "mushroom";
367
+ cat: "cat";
368
+ burger: "burger";
369
+ }>;
370
+ appearance: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
371
+ expression: z.ZodString;
372
+ renderStyle: z.ZodEnum<{
373
+ plain: "plain";
374
+ pencil: "pencil";
375
+ manga: "manga";
376
+ riso: "riso";
377
+ halftone: "halftone";
378
+ blueprint: "blueprint";
379
+ crt: "crt";
380
+ watercolor: "watercolor";
381
+ }>;
382
+ };
383
+ sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
384
+ }>;
385
+ ```
386
+
387
+ Set an existing Agent's avatar and return its updated record.
388
+
389
+ ###### Parameters
390
+
391
+ | Parameter | Type |
392
+ | --------- | --------------------------------------------- |
393
+ | `input` | [`AppAgentAvatarInput`](#appagentavatarinput) |
394
+
395
+ ###### Returns
396
+
397
+ `Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`:
398
+ `z.ZodLiteral`\<`1`\>; `character`: `z.ZodEnum`\<\{ `mushroom`: `"mushroom"`;
399
+ `cat`: `"cat"`; `burger`: `"burger"`; \}\>; `appearance`:
400
+ `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
401
+ `z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `z.ZodString`; `renderStyle`:
402
+ `z.ZodEnum`\<\{ `plain`: `"plain"`; `pencil`: `"pencil"`; `manga`: `"manga"`;
403
+ `riso`: `"riso"`; `halftone`: `"halftone"`; `blueprint`: `"blueprint"`; `crt`:
404
+ `"crt"`; `watercolor`: `"watercolor"`; \}\>; \}; `sessionOperations`: readonly
405
+ (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
275
406
 
276
407
  ---
277
408
 
@@ -605,17 +736,17 @@ accepts it. Call the returned Disposer to unregister.
605
736
 
606
737
  ###### Parameters
607
738
 
608
- | Parameter | Type |
609
- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
610
- | `command` | \{ `id`: `z.ZodString`; `title`: `z.ZodString`; `category`: `z.ZodString`; `description?`: `z.ZodOptional`\<`z.ZodString`\>; `projections?`: `z.ZodOptional`\<`z.ZodObject`\<\{ `bindings`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; `values`: `z.ZodArray`\<`z.ZodString`\>; \}, `z.core.$strict`\>\>; `agent`: `z.ZodOptional`\<`z.ZodObject`\<\{ `keybind`: `z.ZodOptional`\<`z.ZodString`\>; `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `help`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `menu`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `palette`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `slash`: `z.ZodOptional`\<`z.ZodObject`\<\{ `aliases`: `z.ZodArray`\<`z.ZodString`\>; `order`: `z.ZodOptional`\<`z.ZodNumber`\>; `arguments`: `z.ZodOptional`\<`z.ZodObject`\<\{ `hint`: ...; `words`: ...; `text`: ...; \}, `z.core.$strict`\>\>; \}, `z.core.$strict`\>\>; \}, `z.core.$strict`\>\>; `action?`: `z.ZodOptional`\<`z.ZodObject`\<\{ `inputSchema`: `z.ZodOptional`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>; `outputSchema`: `z.ZodOptional`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>; `presentation`: `z.ZodOptional`\<`z.ZodUnion`\<readonly \[`z.ZodObject`\<\{ `type`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `data`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `options`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `submitLabel`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `message`: ...; `confirmLabel`: ...; `cancelLabel`: ...; \}, `z.core.$strict`\>\]\>\>; \}, `z.core.$strict`\>\>; `availability?`: `z.ZodOptional`\<`z.ZodDiscriminatedUnion`\<\[`z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"available"`\>; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"unavailable"`\>; `reason`: `z.ZodString`; \}, `z.core.$strict`\>\], `"status"`\>\>; \} |
611
- | `command.id` | `z.ZodString` |
612
- | `command.title` | `z.ZodString` |
613
- | `command.category` | `z.ZodString` |
614
- | `command.description?` | `z.ZodOptional`\<`z.ZodString`\> |
615
- | `command.projections?` | `z.ZodOptional`\<`z.ZodObject`\<\{ `bindings`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; `values`: `z.ZodArray`\<`z.ZodString`\>; \}, `z.core.$strict`\>\>; `agent`: `z.ZodOptional`\<`z.ZodObject`\<\{ `keybind`: `z.ZodOptional`\<`z.ZodString`\>; `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `help`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `menu`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `palette`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodNumber`\>; \}, `z.core.$strict`\>\>; `slash`: `z.ZodOptional`\<`z.ZodObject`\<\{ `aliases`: `z.ZodArray`\<`z.ZodString`\>; `order`: `z.ZodOptional`\<`z.ZodNumber`\>; `arguments`: `z.ZodOptional`\<`z.ZodObject`\<\{ `hint`: ...; `words`: ...; `text`: ...; \}, `z.core.$strict`\>\>; \}, `z.core.$strict`\>\>; \}, `z.core.$strict`\>\> |
616
- | `command.action?` | `z.ZodOptional`\<`z.ZodObject`\<\{ `inputSchema`: `z.ZodOptional`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>; `outputSchema`: `z.ZodOptional`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>; `presentation`: `z.ZodOptional`\<`z.ZodUnion`\<readonly \[`z.ZodObject`\<\{ `type`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `data`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `options`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `submitLabel`: ...; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `type`: ...; `message`: ...; `confirmLabel`: ...; `cancelLabel`: ...; \}, `z.core.$strict`\>\]\>\>; \}, `z.core.$strict`\>\> |
617
- | `command.availability?` | `z.ZodOptional`\<`z.ZodDiscriminatedUnion`\<\[`z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"available"`\>; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"unavailable"`\>; `reason`: `z.ZodString`; \}, `z.core.$strict`\>\], `"status"`\>\> |
618
- | `handler` | [`AppCommandHandler`](#appcommandhandler) |
739
+ | Parameter | Type |
740
+ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
741
+ | `command` | \{ `id`: `z.ZodLazy`\<`z.ZodString`\>; `title`: `z.ZodLazy`\<`z.ZodString`\>; `category`: `z.ZodLazy`\<`z.ZodString`\>; `description?`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodString`\>\>; `projections?`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `bindings`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; `values`: `z.ZodArray`\<`z.ZodLazy`\<...\>\>; \}, `z.core.$strict`\>\>; `agent`: `z.ZodOptional`\<`z.ZodObject`\<\{ `keybind`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; `order`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; \}, `z.core.$strict`\>\>; `help`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<...\>; \}, `z.core.$strict`\>\>\>; `menu`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<...\>; \}, `z.core.$strict`\>\>\>; `palette`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<...\>; \}, `z.core.$strict`\>\>\>; `slash`: `z.ZodOptional`\<`z.ZodObject`\<\{ `aliases`: `z.ZodArray`\<`z.ZodLazy`\<...\>\>; `consumesDraft`: `z.ZodOptional`\<`z.ZodBoolean`\>; `order`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; `arguments`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; \}, `z.core.$strict`\>\>; \}, `z.core.$strict`\>\>\>; `action?`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `inputSchema`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>\>; `outputSchema`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>\>; `presentation`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodUnion`\<readonly \[..., ..., ..., ..., ...\]\>\>\>; \}, `z.core.$strict`\>\>\>; `availability?`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodDiscriminatedUnion`\<\[`z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"available"`\>; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"unavailable"`\>; `reason`: `z.ZodString`; \}, `z.core.$strict`\>\], `"status"`\>\>\>; \} |
742
+ | `command.id` | `z.ZodLazy`\<`z.ZodString`\> |
743
+ | `command.title` | `z.ZodLazy`\<`z.ZodString`\> |
744
+ | `command.category` | `z.ZodLazy`\<`z.ZodString`\> |
745
+ | `command.description?` | `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodString`\>\> |
746
+ | `command.projections?` | `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `bindings`: `z.ZodOptional`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; `values`: `z.ZodArray`\<`z.ZodLazy`\<...\>\>; \}, `z.core.$strict`\>\>; `agent`: `z.ZodOptional`\<`z.ZodObject`\<\{ `keybind`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; `order`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; \}, `z.core.$strict`\>\>; `help`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<...\>; \}, `z.core.$strict`\>\>\>; `menu`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<...\>; \}, `z.core.$strict`\>\>\>; `palette`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `order`: `z.ZodOptional`\<...\>; \}, `z.core.$strict`\>\>\>; `slash`: `z.ZodOptional`\<`z.ZodObject`\<\{ `aliases`: `z.ZodArray`\<`z.ZodLazy`\<...\>\>; `consumesDraft`: `z.ZodOptional`\<`z.ZodBoolean`\>; `order`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; `arguments`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; \}, `z.core.$strict`\>\>; \}, `z.core.$strict`\>\>\> |
747
+ | `command.action?` | `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodObject`\<\{ `inputSchema`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>\>; `outputSchema`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema`\>\>\>; `presentation`: `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodUnion`\<readonly \[..., ..., ..., ..., ...\]\>\>\>; \}, `z.core.$strict`\>\>\> |
748
+ | `command.availability?` | `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodDiscriminatedUnion`\<\[`z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"available"`\>; \}, `z.core.$strict`\>, `z.ZodObject`\<\{ `status`: `z.ZodLiteral`\<`"unavailable"`\>; `reason`: `z.ZodString`; \}, `z.core.$strict`\>\], `"status"`\>\>\> |
749
+ | `handler` | [`AppCommandHandler`](#appcommandhandler) |
619
750
 
620
751
  ###### Returns
621
752
 
@@ -633,14 +764,14 @@ Options for connecting this iframe page to its authenticated host.
633
764
 
634
765
  #### Properties
635
766
 
636
- ##### expectedHostOrigin
767
+ ##### host
637
768
 
638
769
  ```ts
639
- readonly expectedHostOrigin: string;
770
+ readonly host: "parent";
640
771
  ```
641
772
 
642
- The origin the host handshake message must come from; the connection is refused
643
- when it comes from anywhere else.
773
+ The parent is the host. Serve the App with CSP `frame-ancestors` pinned to its
774
+ allowed host so an unrelated site cannot become its parent.
644
775
 
645
776
  ##### signal?
646
777
 
@@ -1745,12 +1876,106 @@ to allow the close.
1745
1876
 
1746
1877
  ---
1747
1878
 
1879
+ ### AppCrumb
1880
+
1881
+ ```ts
1882
+ type AppCrumb = Readonly<{
1883
+ id: string;
1884
+ label: string;
1885
+ siblings?: readonly Readonly<{
1886
+ id: string;
1887
+ label: string;
1888
+ }>[];
1889
+ }>;
1890
+ ```
1891
+
1892
+ One place in the App's path; `siblings` makes it a switcher.
1893
+
1894
+ ---
1895
+
1896
+ ### AppHeaderCommand
1897
+
1898
+ ```ts
1899
+ type AppHeaderCommand = Readonly<{
1900
+ id: string;
1901
+ label: string;
1902
+ icon?: "play";
1903
+ variant?: "primary" | "outline" | "ghost";
1904
+ tone?: "destructive";
1905
+ disabled?: boolean;
1906
+ }>;
1907
+ ```
1908
+
1909
+ A command the App offers in its window header; the App owns its effect.
1910
+
1911
+ ---
1912
+
1913
+ ### AppHeaderStatus
1914
+
1915
+ ```ts
1916
+ type AppHeaderStatus = Readonly<{
1917
+ id: string;
1918
+ label: string;
1919
+ presentation?: "bead";
1920
+ tone?: "neutral" | "info" | "warning" | "success" | "error";
1921
+ }>;
1922
+ ```
1923
+
1924
+ A quiet fact about the view, shown as muted text with a status bead.
1925
+
1926
+ ---
1927
+
1928
+ ### AppNavigationActivation
1929
+
1930
+ ```ts
1931
+ type AppNavigationActivation =
1932
+ | Readonly<{
1933
+ kind: "crumb";
1934
+ crumbId: string;
1935
+ siblingId?: string;
1936
+ }>
1937
+ | Readonly<{
1938
+ kind: "action";
1939
+ actionId: string;
1940
+ }>;
1941
+ ```
1942
+
1943
+ The person used a crumb (or a switcher's sibling) or a header command.
1944
+
1945
+ ---
1946
+
1947
+ ### AppNavigationActivationHandler
1948
+
1949
+ ```ts
1950
+ type AppNavigationActivationHandler = (
1951
+ activation,
1952
+ ) => boolean | Promise<boolean>;
1953
+ ```
1954
+
1955
+ Handles one activation; `true` when the App acted on it.
1956
+
1957
+ #### Parameters
1958
+
1959
+ | Parameter | Type |
1960
+ | ------------ | ----------------------------------------------------- |
1961
+ | `activation` | [`AppNavigationActivation`](#appnavigationactivation) |
1962
+
1963
+ #### Returns
1964
+
1965
+ `boolean` \| `Promise`\<`boolean`\>
1966
+
1967
+ ---
1968
+
1748
1969
  ### AppNavigationState
1749
1970
 
1750
1971
  ```ts
1751
1972
  type AppNavigationState = Readonly<{
1752
1973
  canGoBack: boolean;
1753
1974
  title?: string;
1975
+ crumbs?: readonly AppCrumb[];
1976
+ primary?: readonly AppHeaderCommand[];
1977
+ menu?: readonly AppHeaderCommand[];
1978
+ status?: readonly AppHeaderStatus[];
1754
1979
  }>;
1755
1980
  ```
1756
1981
 
@@ -1779,6 +2004,7 @@ Go back one step in the App's own history; `true` when it moved.
1779
2004
  type HostNavigation = Readonly<{
1780
2005
  publish: Promise<void>;
1781
2006
  onBack: Disposer;
2007
+ onActivate: Disposer;
1782
2008
  }>;
1783
2009
  ```
1784
2010
 
@@ -1797,17 +2023,30 @@ type AppWindow = Readonly<{
1797
2023
 
1798
2024
  App-owned presentation policy consulted before a user closes its window.
1799
2025
 
2026
+ ---
2027
+
2028
+ ### ResultRow
2029
+
2030
+ ```ts
2031
+ type ResultRow = Schema.Schema.Type<typeof resultRowSchemaV1>;
2032
+ ```
2033
+
2034
+ One shared result row; navigation and previews stay host-authorized.
2035
+
1800
2036
  ## Variables
1801
2037
 
1802
2038
  ### FungiAuthorSchema
1803
2039
 
1804
2040
  ```ts
1805
- const FungiAuthorSchema: ZodObject<
1806
- {
1807
- id: ZodString;
1808
- name: ZodString;
1809
- },
1810
- $strict
2041
+ const FungiAuthorSchema: ZodLazy<
2042
+ ZodObject<
2043
+ {
2044
+ id: ZodString;
2045
+ name: ZodString;
2046
+ kind: ZodOptional<ZodLiteral<"agent">>;
2047
+ },
2048
+ $strict
2049
+ >
1811
2050
  >;
1812
2051
  ```
1813
2052
 
@@ -1818,21 +2057,23 @@ Who a Session line came from, as the admitting host authenticated them.
1818
2057
  ### FungiDelegationReplySchema
1819
2058
 
1820
2059
  ```ts
1821
- const FungiDelegationReplySchema: ZodObject<
1822
- {
1823
- agentId: ZodString;
1824
- sessionId: ZodString;
1825
- commandId: ZodString;
1826
- outcome: ZodEnum<{
1827
- completed: "completed";
1828
- failed: "failed";
1829
- interrupted: "interrupted";
1830
- cancelled: "cancelled";
1831
- outcome_unknown: "outcome_unknown";
1832
- }>;
1833
- diagnostic: ZodOptional<ZodString>;
1834
- },
1835
- $strict
2060
+ const FungiDelegationReplySchema: ZodLazy<
2061
+ ZodObject<
2062
+ {
2063
+ agentId: ZodLazy<ZodString>;
2064
+ sessionId: ZodLazy<ZodString>;
2065
+ commandId: ZodLazy<ZodString>;
2066
+ outcome: ZodEnum<{
2067
+ completed: "completed";
2068
+ failed: "failed";
2069
+ interrupted: "interrupted";
2070
+ cancelled: "cancelled";
2071
+ outcome_unknown: "outcome_unknown";
2072
+ }>;
2073
+ diagnostic: ZodOptional<ZodString>;
2074
+ },
2075
+ $strict
2076
+ >
1836
2077
  >;
1837
2078
  ```
1838
2079
 
@@ -1845,51 +2086,83 @@ id as the sender's `agents.send` receipt.
1845
2086
  ### FungiMessageMetaSchema
1846
2087
 
1847
2088
  ```ts
1848
- const FungiMessageMetaSchema: ZodObject<
2089
+ const FungiMessageMetaSchema: ZodObject<{
2090
+ author: ZodOptional<ZodLazy<ZodObject<{
2091
+ id: ZodString;
2092
+ name: ZodString;
2093
+ kind: ZodOptional<ZodLiteral<"agent">>;
2094
+ }, $strict>>>;
2095
+ sourceRequestId: ZodOptional<ZodLazy<ZodString>>;
2096
+ delegation: ZodOptional<ZodObject<{
2097
+ ancestors: ZodArray<ZodLazy<ZodString>>;
2098
+ maxDepth: ZodNumber;
2099
+ reply: ZodOptional<ZodLazy<ZodObject<{
2100
+ agentId: ZodLazy<ZodString>;
2101
+ sessionId: ZodLazy<ZodString>;
2102
+ commandId: ZodLazy<ZodString>;
2103
+ outcome: ZodEnum<{
2104
+ completed: ...;
2105
+ failed: ...;
2106
+ interrupted: ...;
2107
+ cancelled: ...;
2108
+ outcome_unknown: ...;
2109
+ }>;
2110
+ diagnostic: ZodOptional<ZodString>;
2111
+ }, $strict>>>;
2112
+ }, $strict>>;
2113
+ }, $strict>;
2114
+ ```
2115
+
2116
+ The metadata the host attaches to every prompt and operator line it admits.
2117
+ Shiitake stores it opaquely; the host writes it and Apps read it.
2118
+
2119
+ ---
2120
+
2121
+ ### appAgentAvatarSchema
2122
+
2123
+ ```ts
2124
+ const appAgentAvatarSchema: declare<
1849
2125
  {
1850
- author: ZodOptional<
1851
- ZodObject<
1852
- {
1853
- id: ZodString;
1854
- name: ZodString;
1855
- },
1856
- $strict
1857
- >
1858
- >;
1859
- delegation: ZodOptional<
1860
- ZodObject<
1861
- {
1862
- ancestors: ZodArray<ZodString>;
1863
- maxDepth: ZodNumber;
1864
- reply: ZodOptional<
1865
- ZodObject<
1866
- {
1867
- agentId: ZodString;
1868
- sessionId: ZodString;
1869
- commandId: ZodString;
1870
- outcome: ZodEnum<{
1871
- completed: "completed";
1872
- failed: "failed";
1873
- interrupted: "interrupted";
1874
- cancelled: "cancelled";
1875
- outcome_unknown: "outcome_unknown";
1876
- }>;
1877
- diagnostic: ZodOptional<ZodString>;
1878
- },
1879
- $strict
1880
- >
1881
- >;
1882
- },
1883
- $strict
1884
- >
2126
+ v: 1;
2127
+ character: "mushroom" | "cat" | "burger";
2128
+ appearance: z.ZodRecord<
2129
+ z.ZodString,
2130
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
1885
2131
  >;
2132
+ expression: string;
2133
+ renderStyle:
2134
+ | "plain"
2135
+ | "pencil"
2136
+ | "manga"
2137
+ | "riso"
2138
+ | "halftone"
2139
+ | "blueprint"
2140
+ | "crt"
2141
+ | "watercolor";
1886
2142
  },
1887
- $strict
2143
+ {
2144
+ v: 1;
2145
+ character: "mushroom" | "cat" | "burger";
2146
+ appearance: z.ZodRecord<
2147
+ z.ZodString,
2148
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
2149
+ >;
2150
+ expression: string;
2151
+ renderStyle:
2152
+ | "plain"
2153
+ | "pencil"
2154
+ | "manga"
2155
+ | "riso"
2156
+ | "halftone"
2157
+ | "blueprint"
2158
+ | "crt"
2159
+ | "watercolor";
2160
+ }
1888
2161
  >;
1889
2162
  ```
1890
2163
 
1891
- The metadata the host attaches to every prompt and operator line it admits.
1892
- Shiitake stores it opaquely; the host writes it and Apps read it.
2164
+ An Agent's avatar: Sprite's Avatar v1 envelope. Apps check its shape; the host
2165
+ owns the character-catalog refinement when it stores one.
1893
2166
 
1894
2167
  ---
1895
2168
 
@@ -1899,14 +2172,54 @@ Shiitake stores it opaquely; the host writes it and Apps read it.
1899
2172
  const appAgentSchema: Struct<{
1900
2173
  agentId: String;
1901
2174
  name: String;
2175
+ avatar: declare<
2176
+ {
2177
+ v: 1;
2178
+ character: "mushroom" | "cat" | "burger";
2179
+ appearance: z.ZodRecord<
2180
+ z.ZodString,
2181
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
2182
+ >;
2183
+ expression: string;
2184
+ renderStyle:
2185
+ | "plain"
2186
+ | "pencil"
2187
+ | "manga"
2188
+ | "riso"
2189
+ | "halftone"
2190
+ | "blueprint"
2191
+ | "crt"
2192
+ | "watercolor";
2193
+ },
2194
+ {
2195
+ v: 1;
2196
+ character: "mushroom" | "cat" | "burger";
2197
+ appearance: z.ZodRecord<
2198
+ z.ZodString,
2199
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
2200
+ >;
2201
+ expression: string;
2202
+ renderStyle:
2203
+ | "plain"
2204
+ | "pencil"
2205
+ | "manga"
2206
+ | "riso"
2207
+ | "halftone"
2208
+ | "blueprint"
2209
+ | "crt"
2210
+ | "watercolor";
2211
+ }
2212
+ >;
1902
2213
  sessionOperations: $Array<
1903
2214
  Literals<readonly ["agent.read", "agent.send", "agent.manage"]>
1904
2215
  >;
1905
2216
  }>;
1906
2217
  ```
1907
2218
 
1908
- Validates the wire shape of an Agent record: its id, display name, and which
1909
- session operations (read, send, manage) this App may perform on it.
2219
+ Validates the wire shape of an Agent record: its id, display name, avatar, and
2220
+ which session operations (read, send, manage) this App may perform on it. Every
2221
+ Agent has an avatar: the one its owner chose, else Sprite's
2222
+ `seededAvatar(agentId)`. Conversations carry none of their own.
1910
2223
 
1911
2224
  ---
1912
2225
 
@@ -1917,11 +2230,51 @@ const appAgentCreateInputSchema: Struct<{
1917
2230
  name: String;
1918
2231
  requestId: String;
1919
2232
  computer: optionalKey<Literals<readonly ["new", "none"]>>;
2233
+ avatar: optionalKey<
2234
+ declare<
2235
+ {
2236
+ v: 1;
2237
+ character: "mushroom" | "cat" | "burger";
2238
+ appearance: z.ZodRecord<
2239
+ z.ZodString,
2240
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
2241
+ >;
2242
+ expression: string;
2243
+ renderStyle:
2244
+ | "plain"
2245
+ | "pencil"
2246
+ | "manga"
2247
+ | "riso"
2248
+ | "halftone"
2249
+ | "blueprint"
2250
+ | "crt"
2251
+ | "watercolor";
2252
+ },
2253
+ {
2254
+ v: 1;
2255
+ character: "mushroom" | "cat" | "burger";
2256
+ appearance: z.ZodRecord<
2257
+ z.ZodString,
2258
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
2259
+ >;
2260
+ expression: string;
2261
+ renderStyle:
2262
+ | "plain"
2263
+ | "pencil"
2264
+ | "manga"
2265
+ | "riso"
2266
+ | "halftone"
2267
+ | "blueprint"
2268
+ | "crt"
2269
+ | "watercolor";
2270
+ }
2271
+ >
2272
+ >;
1920
2273
  }>;
1921
2274
  ```
1922
2275
 
1923
- Validates Agent creation input: a name, a caller-chosen request id and an
1924
- optional Computer provisioning choice.
2276
+ Validates Agent creation input: a name, a caller-chosen request id, an optional
2277
+ Computer provisioning choice and an optional chosen avatar.
1925
2278
 
1926
2279
  ---
1927
2280
 
@@ -1970,26 +2323,89 @@ Owner-only capability to rename an existing Agent; not every host grants it.
1970
2323
 
1971
2324
  ---
1972
2325
 
2326
+ ### appAgentAvatarInputSchema
2327
+
2328
+ ```ts
2329
+ const appAgentAvatarInputSchema: Struct<{
2330
+ agentId: String;
2331
+ avatar: declare<
2332
+ {
2333
+ v: 1;
2334
+ character: "mushroom" | "cat" | "burger";
2335
+ appearance: z.ZodRecord<
2336
+ z.ZodString,
2337
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
2338
+ >;
2339
+ expression: string;
2340
+ renderStyle:
2341
+ | "plain"
2342
+ | "pencil"
2343
+ | "manga"
2344
+ | "riso"
2345
+ | "halftone"
2346
+ | "blueprint"
2347
+ | "crt"
2348
+ | "watercolor";
2349
+ },
2350
+ {
2351
+ v: 1;
2352
+ character: "mushroom" | "cat" | "burger";
2353
+ appearance: z.ZodRecord<
2354
+ z.ZodString,
2355
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
2356
+ >;
2357
+ expression: string;
2358
+ renderStyle:
2359
+ | "plain"
2360
+ | "pencil"
2361
+ | "manga"
2362
+ | "riso"
2363
+ | "halftone"
2364
+ | "blueprint"
2365
+ | "crt"
2366
+ | "watercolor";
2367
+ }
2368
+ >;
2369
+ }>;
2370
+ ```
2371
+
2372
+ Validates avatar input: the target Agent and the avatar it now wears.
2373
+
2374
+ ---
2375
+
2376
+ ### agentAvatar
2377
+
2378
+ ```ts
2379
+ const agentAvatar: CapabilityContract<AppAgentAvatarHandle>;
2380
+ ```
2381
+
2382
+ Owner-only capability to change an existing Agent's avatar; not every host
2383
+ grants it.
2384
+
2385
+ ---
2386
+
1973
2387
  ### appAgentToolPolicyStatusSchema
1974
2388
 
1975
2389
  ```ts
1976
- const appAgentToolPolicyStatusSchema: ZodUnion<
1977
- readonly [
1978
- ZodObject<
1979
- {
1980
- status: ZodLiteral<"pending">;
1981
- revision: ZodString;
1982
- },
1983
- $strip
1984
- >,
1985
- ZodObject<
1986
- {
1987
- status: ZodLiteral<"approved">;
1988
- revision: ZodString;
1989
- },
1990
- $strip
1991
- >,
1992
- ]
2390
+ const appAgentToolPolicyStatusSchema: ZodLazy<
2391
+ ZodUnion<
2392
+ readonly [
2393
+ ZodObject<
2394
+ {
2395
+ status: ZodLiteral<"pending">;
2396
+ revision: ZodString;
2397
+ },
2398
+ $strip
2399
+ >,
2400
+ ZodObject<
2401
+ {
2402
+ status: ZodLiteral<"approved">;
2403
+ revision: ZodString;
2404
+ },
2405
+ $strip
2406
+ >,
2407
+ ]
2408
+ >
1993
2409
  >;
1994
2410
  ```
1995
2411
 
@@ -2000,33 +2416,37 @@ One Agent's App-tool policy, as the owner-only policy capability reports it.
2000
2416
  ### appAgentToolPolicyResultSchema
2001
2417
 
2002
2418
  ```ts
2003
- const appAgentToolPolicyResultSchema: ZodUnion<
2004
- readonly [
2005
- ZodUnion<
2006
- readonly [
2007
- ZodObject<
2008
- {
2009
- status: ZodLiteral<"pending">;
2010
- revision: ZodString;
2011
- },
2012
- $strip
2013
- >,
2014
- ZodObject<
2015
- {
2016
- status: ZodLiteral<"approved">;
2017
- revision: ZodString;
2018
- },
2019
- $strip
2020
- >,
2021
- ]
2022
- >,
2023
- ZodObject<
2024
- {
2025
- error: ZodString;
2026
- },
2027
- $strip
2028
- >,
2029
- ]
2419
+ const appAgentToolPolicyResultSchema: ZodLazy<
2420
+ ZodUnion<
2421
+ readonly [
2422
+ ZodLazy<
2423
+ ZodUnion<
2424
+ readonly [
2425
+ ZodObject<
2426
+ {
2427
+ status: ZodLiteral<"pending">;
2428
+ revision: ZodString;
2429
+ },
2430
+ $strip
2431
+ >,
2432
+ ZodObject<
2433
+ {
2434
+ status: ZodLiteral<"approved">;
2435
+ revision: ZodString;
2436
+ },
2437
+ $strip
2438
+ >,
2439
+ ]
2440
+ >
2441
+ >,
2442
+ ZodObject<
2443
+ {
2444
+ error: ZodString;
2445
+ },
2446
+ $strip
2447
+ >,
2448
+ ]
2449
+ >
2030
2450
  >;
2031
2451
  ```
2032
2452
 
@@ -2070,6 +2490,17 @@ and send to it, including the member's inbox feed.
2070
2490
 
2071
2491
  ---
2072
2492
 
2493
+ ### approvals
2494
+
2495
+ ```ts
2496
+ const approvals: CapabilityContract<Approvals>;
2497
+ ```
2498
+
2499
+ Member-bound approval view. Authentication and current rights belong to the
2500
+ host.
2501
+
2502
+ ---
2503
+
2073
2504
  ### APP\_PROTOCOL\_VERSION
2074
2505
 
2075
2506
  ```ts
@@ -2285,6 +2716,29 @@ const mediaGenerationFailureSchema: Struct<{
2285
2716
  ]
2286
2717
  >
2287
2718
  >;
2719
+ provider: optional<
2720
+ Union<
2721
+ readonly [
2722
+ Struct<{
2723
+ category: Literals<
2724
+ readonly [
2725
+ "InferenceUpstreamError",
2726
+ "AiInternalError",
2727
+ "TypeError",
2728
+ "AbortError",
2729
+ "TimeoutError",
2730
+ "Error",
2731
+ ]
2732
+ >;
2733
+ code: NullOr<Int>;
2734
+ }>,
2735
+ Struct<{
2736
+ category: Literal<"result_download">;
2737
+ status: Int;
2738
+ }>,
2739
+ ]
2740
+ >
2741
+ >;
2288
2742
  code: Literals<
2289
2743
  readonly [
2290
2744
  "CANCELLED",
@@ -2406,6 +2860,66 @@ The longest page title a host shows beside the App's own name.
2406
2860
 
2407
2861
  ---
2408
2862
 
2863
+ ### APP\_NAVIGATION\_CRUMBS\_MAX
2864
+
2865
+ ```ts
2866
+ const APP_NAVIGATION_CRUMBS_MAX: 8 = 8;
2867
+ ```
2868
+
2869
+ The most crumbs one navigation report may carry.
2870
+
2871
+ ---
2872
+
2873
+ ### APP\_NAVIGATION\_SIBLINGS\_MAX
2874
+
2875
+ ```ts
2876
+ const APP_NAVIGATION_SIBLINGS_MAX: 16 = 16;
2877
+ ```
2878
+
2879
+ The most siblings one switcher crumb may offer.
2880
+
2881
+ ---
2882
+
2883
+ ### APP\_NAVIGATION\_PRIMARY\_MAX
2884
+
2885
+ ```ts
2886
+ const APP_NAVIGATION_PRIMARY_MAX: 3 = 3;
2887
+ ```
2888
+
2889
+ The most primary header commands one report may carry.
2890
+
2891
+ ---
2892
+
2893
+ ### APP\_NAVIGATION\_STATUS\_MAX
2894
+
2895
+ ```ts
2896
+ const APP_NAVIGATION_STATUS_MAX: 4 = 4;
2897
+ ```
2898
+
2899
+ The most header status facts one report may carry.
2900
+
2901
+ ---
2902
+
2903
+ ### APP\_NAVIGATION\_MENU\_MAX
2904
+
2905
+ ```ts
2906
+ const APP_NAVIGATION_MENU_MAX: 12 = 12;
2907
+ ```
2908
+
2909
+ The most ⋯ menu commands one report may carry.
2910
+
2911
+ ---
2912
+
2913
+ ### APP\_NAVIGATION\_LABEL\_MAX
2914
+
2915
+ ```ts
2916
+ const APP_NAVIGATION_LABEL_MAX: 80 = 80;
2917
+ ```
2918
+
2919
+ The longest crumb or command label a host shows.
2920
+
2921
+ ---
2922
+
2409
2923
  ### inertHostNavigation
2410
2924
 
2411
2925
  ```ts
@@ -2415,6 +2929,59 @@ const inertHostNavigation: HostNavigation;
2415
2929
  Navigation for a root with no host chrome, such as a workbench fixture: it
2416
2930
  accepts every report and never asks the App to go back.
2417
2931
 
2932
+ ---
2933
+
2934
+ ### resultRowSchemaV1
2935
+
2936
+ ```ts
2937
+ const resultRowSchemaV1: Schema.Struct<{
2938
+ media: Schema.optional<
2939
+ Schema.Struct<{
2940
+ path: Schema.String;
2941
+ format: Schema.Literals<readonly ["fungi:image", "fungi:video"]>;
2942
+ }>
2943
+ >;
2944
+ id: Schema.String;
2945
+ title: Schema.String;
2946
+ detail: Schema.optional<Schema.String>;
2947
+ tone: Schema.optional<
2948
+ Schema.Literals<
2949
+ readonly ["attention", "running", "error", "settled", "muted"]
2950
+ >
2951
+ >;
2952
+ status: Schema.optional<
2953
+ Schema.Struct<{
2954
+ label: Schema.String;
2955
+ tone: Schema.Literals<
2956
+ readonly [
2957
+ "neutral",
2958
+ "primary",
2959
+ "secondary",
2960
+ "accent",
2961
+ "success",
2962
+ "info",
2963
+ "warning",
2964
+ "error",
2965
+ ]
2966
+ >;
2967
+ }>
2968
+ >;
2969
+ open: Schema.optional<
2970
+ Schema.Struct<{
2971
+ params: Schema.$Array<
2972
+ Schema.Struct<{
2973
+ key: Schema.String;
2974
+ value: Schema.String;
2975
+ }>
2976
+ >;
2977
+ }>
2978
+ >;
2979
+ }>;
2980
+ ```
2981
+
2982
+ A finished App call as a person reads it: a shared row plus an optional
2983
+ thumbnail.
2984
+
2418
2985
  ## Functions
2419
2986
 
2420
2987
  ### messageAuthor()
@@ -2424,6 +2991,7 @@ function messageAuthor(meta):
2424
2991
  | {
2425
2992
  id: string;
2426
2993
  name: string;
2994
+ kind?: "agent";
2427
2995
  }
2428
2996
  | undefined;
2429
2997
  ```
@@ -2438,7 +3006,25 @@ The author a message's metadata names; none for anything else.
2438
3006
 
2439
3007
  #### Returns
2440
3008
 
2441
- \| \{ `id`: `string`; `name`: `string`; \} \| `undefined`
3009
+ ##### Type Literal
3010
+
3011
+ ```ts
3012
+ {
3013
+ id: string;
3014
+ name: string;
3015
+ kind?: "agent";
3016
+ }
3017
+ ```
3018
+
3019
+ | Name | Type | Description |
3020
+ | ------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
3021
+ | `id` | `string` | - |
3022
+ | `name` | `string` | - |
3023
+ | `kind?` | `"agent"` | Present only when the author is another Agent the host admitted a delegated send or reply from; a line's text never sets it. Human authors carry no kind. |
3024
+
3025
+ ---
3026
+
3027
+ `undefined`
2442
3028
 
2443
3029
  ---
2444
3030
 
@@ -2508,11 +3094,12 @@ The metadata the host attaches for one authenticated author.
2508
3094
 
2509
3095
  #### Parameters
2510
3096
 
2511
- | Parameter | Type |
2512
- | ------------- | --------------------------------------- |
2513
- | `author` | \{ `id`: `string`; `name`: `string`; \} |
2514
- | `author.id` | `string` |
2515
- | `author.name` | `string` |
3097
+ | Parameter | Type | Description |
3098
+ | -------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
3099
+ | `author` | \{ `id`: `string`; `name`: `string`; `kind?`: `"agent"`; \} | - |
3100
+ | `author.id` | `string` | - |
3101
+ | `author.name` | `string` | - |
3102
+ | `author.kind?` | `"agent"` | Present only when the author is another Agent the host admitted a delegated send or reply from; a line's text never sets it. Human authors carry no kind. |
2516
3103
 
2517
3104
  #### Returns
2518
3105
 
@@ -2529,6 +3116,24 @@ function renameAppAgent(
2529
3116
  ): Promise<{
2530
3117
  agentId: string;
2531
3118
  name: string;
3119
+ avatar: {
3120
+ v: 1;
3121
+ character: "mushroom" | "cat" | "burger";
3122
+ appearance: z.ZodRecord<
3123
+ z.ZodString,
3124
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
3125
+ >;
3126
+ expression: string;
3127
+ renderStyle:
3128
+ | "plain"
3129
+ | "pencil"
3130
+ | "manga"
3131
+ | "riso"
3132
+ | "halftone"
3133
+ | "blueprint"
3134
+ | "crt"
3135
+ | "watercolor";
3136
+ };
2532
3137
  sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
2533
3138
  }>;
2534
3139
  ```
@@ -2544,8 +3149,65 @@ Rename an Agent through the host-granted owner-only capability.
2544
3149
 
2545
3150
  #### Returns
2546
3151
 
2547
- `Promise`\<\{ `agentId`: `string`; `name`: `string`; `sessionOperations`:
2548
- readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
3152
+ `Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`;
3153
+ `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`:
3154
+ `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
3155
+ `z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `string`; `renderStyle`: \|
3156
+ `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \|
3157
+ `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly
3158
+ (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
3159
+
3160
+ ---
3161
+
3162
+ ### setAppAgentAvatar()
3163
+
3164
+ ```ts
3165
+ function setAppAgentAvatar(
3166
+ capabilities,
3167
+ input,
3168
+ ): Promise<{
3169
+ agentId: string;
3170
+ name: string;
3171
+ avatar: {
3172
+ v: 1;
3173
+ character: "mushroom" | "cat" | "burger";
3174
+ appearance: z.ZodRecord<
3175
+ z.ZodString,
3176
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
3177
+ >;
3178
+ expression: string;
3179
+ renderStyle:
3180
+ | "plain"
3181
+ | "pencil"
3182
+ | "manga"
3183
+ | "riso"
3184
+ | "halftone"
3185
+ | "blueprint"
3186
+ | "crt"
3187
+ | "watercolor";
3188
+ };
3189
+ sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
3190
+ }>;
3191
+ ```
3192
+
3193
+ Change an Agent's avatar through the host-granted owner-only capability.
3194
+
3195
+ #### Parameters
3196
+
3197
+ | Parameter | Type |
3198
+ | -------------- | --------------------------------------------- |
3199
+ | `capabilities` | [`CapabilityDirectory`](#capabilitydirectory) |
3200
+ | `input` | [`AppAgentAvatarInput`](#appagentavatarinput) |
3201
+
3202
+ #### Returns
3203
+
3204
+ `Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`;
3205
+ `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`:
3206
+ `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
3207
+ `z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `string`; `renderStyle`: \|
3208
+ `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \|
3209
+ `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly
3210
+ (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
2549
3211
 
2550
3212
  ---
2551
3213
 
@@ -2578,6 +3240,24 @@ function createAppAgent(
2578
3240
  ): Promise<{
2579
3241
  agentId: string;
2580
3242
  name: string;
3243
+ avatar: {
3244
+ v: 1;
3245
+ character: "mushroom" | "cat" | "burger";
3246
+ appearance: z.ZodRecord<
3247
+ z.ZodString,
3248
+ z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
3249
+ >;
3250
+ expression: string;
3251
+ renderStyle:
3252
+ | "plain"
3253
+ | "pencil"
3254
+ | "manga"
3255
+ | "riso"
3256
+ | "halftone"
3257
+ | "blueprint"
3258
+ | "crt"
3259
+ | "watercolor";
3260
+ };
2581
3261
  sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
2582
3262
  }>;
2583
3263
  ```
@@ -2593,8 +3273,13 @@ Create an Agent through the Team directory selected by the host.
2593
3273
 
2594
3274
  #### Returns
2595
3275
 
2596
- `Promise`\<\{ `agentId`: `string`; `name`: `string`; `sessionOperations`:
2597
- readonly (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
3276
+ `Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`;
3277
+ `character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`:
3278
+ `z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
3279
+ `z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `string`; `renderStyle`: \|
3280
+ `"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \|
3281
+ `"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly
3282
+ (`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
2598
3283
 
2599
3284
  ---
2600
3285
 
@@ -2691,10 +3376,10 @@ register again to publish a change.
2691
3376
 
2692
3377
  #### Parameters
2693
3378
 
2694
- | Parameter | Type | Description |
2695
- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
2696
- | `commands` | [`AppCommands`](#appcommands) | The App's host command door, `app.commands`. |
2697
- | `catalog` | readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `projections?`: \{ `bindings?`: \{ `order?`: `number`; `values`: readonly `string`[]; \}; `agent?`: \{ `keybind?`: `string`; `order?`: `number`; \}; `help?`: \{ `order?`: `number`; \}; `menu?`: \{ `order?`: `number`; \}; `palette?`: \{ `order?`: `number`; \}; `slash?`: \{ `aliases`: readonly `string`[]; `order?`: `number`; `arguments?`: \{ `hint`: `string`; `words?`: readonly ...[]; `text?`: \{ `field`: ...; `arguments`: ...; `requestIdField?`: ...; \}; \}; \}; \}; `action?`: \{ `inputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `outputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `presentation?`: \| \{ `type`: `"action"`; \} \| \{ `type`: `"custom"`; `data`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \} \| \{ `type`: `"choice"`; `options`: readonly `object`[]; \} \| \{ `type`: `"form"`; `submitLabel?`: `string`; \} \| \{ `type`: `"confirmation"`; `message`: `string`; `confirmLabel?`: `string`; `cancelLabel?`: `string`; \}; \}; `availability?`: () => `WhistleAvailability`; `handler`: (`input`) => `unknown`; \}\>[] | The App's Whistle commands, handlers included. |
3379
+ | Parameter | Type | Description |
3380
+ | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
3381
+ | `commands` | [`AppCommands`](#appcommands) | The App's host command door, `app.commands`. |
3382
+ | `catalog` | readonly `Readonly`\<\{ `id`: `string`; `title`: `string`; `category`: `string`; `description?`: `string`; `projections?`: \{ `bindings?`: \{ `order?`: `number`; `values`: readonly `string`[]; \}; `agent?`: \{ `keybind?`: `string`; `order?`: `number`; \}; `help?`: \{ `order?`: `number`; \}; `menu?`: \{ `order?`: `number`; \}; `palette?`: \{ `order?`: `number`; \}; `slash?`: \{ `aliases`: readonly `string`[]; `consumesDraft?`: `boolean`; `order?`: `number`; `arguments?`: \{ `hint`: `string`; `words?`: readonly ...[]; `text?`: \{ `field`: ...; `arguments`: ...; `requestIdField?`: ...; \}; \}; \}; \}; `action?`: \{ `inputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `outputSchema?`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `presentation?`: \| \{ `type`: `"action"`; \} \| \{ `type`: `"custom"`; `data`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; \} \| \{ `type`: `"choice"`; `options`: readonly `object`[]; \} \| \{ `type`: `"form"`; `submitLabel?`: `string`; \} \| \{ `type`: `"confirmation"`; `message`: `string`; `confirmLabel?`: `string`; `cancelLabel?`: `string`; \}; \}; `availability?`: () => `WhistleAvailability`; `handler`: (`input`) => `unknown`; \}\>[] | The App's Whistle commands, handlers included. |
2698
3383
 
2699
3384
  #### Returns
2700
3385
 
@@ -2819,6 +3504,29 @@ this rule against its own latest copy of the items.
2819
3504
 
2820
3505
  `boolean`
2821
3506
 
3507
+ ---
3508
+
3509
+ ### navigationActivationAllowed()
3510
+
3511
+ ```ts
3512
+ function navigationActivationAllowed(state, activation): boolean;
3513
+ ```
3514
+
3515
+ Whether an activation names something the App published now: a crumb (and its
3516
+ sibling), or an enabled command. Every hop applies this rule against its own
3517
+ latest copy of the report, so a stale shell cannot reach the App.
3518
+
3519
+ #### Parameters
3520
+
3521
+ | Parameter | Type |
3522
+ | ------------ | ----------------------------------------------------- |
3523
+ | `state` | [`AppNavigationState`](#appnavigationstate) |
3524
+ | `activation` | [`AppNavigationActivation`](#appnavigationactivation) |
3525
+
3526
+ #### Returns
3527
+
3528
+ `boolean`
3529
+
2822
3530
  ## References
2823
3531
 
2824
3532
  ### AppError