@fungi.computer/agar 0.0.1 → 0.2.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.
- package/dist/agent-message-meta.d.ts +15 -15
- package/dist/agent-message-meta.js +5 -5
- package/dist/agents.d.ts +86 -13
- package/dist/agents.js +48 -25
- package/dist/apps.js +4 -4
- package/dist/backend-definition.d.ts +41 -4
- package/dist/backend-definition.js +70 -10
- package/dist/backend.js +4 -4
- package/dist/channels.js +4 -4
- package/dist/computer-contracts.d.ts +15 -15
- package/dist/computer-contracts.js +14 -14
- package/dist/computer.js +16 -16
- package/dist/game-servers.js +2 -2
- package/dist/git-rpc.d.ts +23 -23
- package/dist/git-rpc.js +14 -16
- package/dist/git.d.ts +9 -9
- package/dist/git.js +8 -8
- package/dist/host.d.ts +3 -1
- package/dist/host.js +5 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3 -2
- package/dist/inference.js +2 -1
- package/dist/internal/app-session.js +37 -1
- package/dist/internal/protocol.d.ts +4 -4
- package/dist/internal/schemas.d.ts +33 -7
- package/dist/internal/schemas.js +107 -16
- package/dist/marketplace.js +7 -5
- package/dist/media-request-id.d.ts +1 -1
- package/dist/media-request-id.js +2 -2
- package/dist/media.js +2 -2
- package/dist/method-presentation.d.ts +7 -0
- package/dist/method-presentation.js +14 -0
- package/dist/method-refusal.d.ts +5 -5
- package/dist/method-refusal.js +4 -4
- package/dist/react.d.ts +14 -2
- package/dist/react.js +40 -4
- package/dist/read-copy.d.ts +1 -1
- package/dist/read-copy.js +3 -6
- package/dist/storage-wire.d.ts +2 -2
- package/dist/storage-wire.js +2 -2
- package/dist/storage.js +1 -1
- package/dist/test-kit/git.js +19 -2
- package/dist/window.d.ts +64 -0
- package/dist/window.js +31 -0
- package/docs/api/backend-definition.md +83 -9
- package/docs/api/backend.md +44 -38
- package/docs/api/git-rpc.md +35 -35
- package/docs/api/git-wire.md +3 -0
- package/docs/api/git.md +66 -80
- package/docs/api/index.md +775 -128
- package/docs/api/media-request-id.md +1 -1
- package/docs/api/method-presentation.md +21 -0
- package/docs/api/modules.md +1 -0
- package/docs/api/react.md +10 -4
- package/docs/api/storage.md +3 -3
- package/package.json +10 -8
package/docs/api/index.md
CHANGED
|
@@ -90,7 +90,8 @@ type AppAgentCreateInput = Readonly<
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Input for creating a new Agent: its name, a caller-chosen request id for
|
|
93
|
-
idempotency,
|
|
93
|
+
idempotency, whether to provision a new Computer for it, and the avatar it wears
|
|
94
|
+
(omitted, it wears its seeded avatar).
|
|
94
95
|
|
|
95
96
|
---
|
|
96
97
|
|
|
@@ -188,6 +189,26 @@ Capability handle for creating a new Agent in a directory.
|
|
|
188
189
|
create(input): Promise<{
|
|
189
190
|
agentId: string;
|
|
190
191
|
name: string;
|
|
192
|
+
avatar: {
|
|
193
|
+
v: z.ZodLiteral<1>;
|
|
194
|
+
character: z.ZodEnum<{
|
|
195
|
+
mushroom: "mushroom";
|
|
196
|
+
cat: "cat";
|
|
197
|
+
burger: "burger";
|
|
198
|
+
}>;
|
|
199
|
+
appearance: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
200
|
+
expression: z.ZodString;
|
|
201
|
+
renderStyle: z.ZodEnum<{
|
|
202
|
+
plain: "plain";
|
|
203
|
+
pencil: "pencil";
|
|
204
|
+
manga: "manga";
|
|
205
|
+
riso: "riso";
|
|
206
|
+
halftone: "halftone";
|
|
207
|
+
blueprint: "blueprint";
|
|
208
|
+
crt: "crt";
|
|
209
|
+
watercolor: "watercolor";
|
|
210
|
+
}>;
|
|
211
|
+
};
|
|
191
212
|
sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
|
|
192
213
|
}>;
|
|
193
214
|
```
|
|
@@ -202,8 +223,15 @@ Create a new Agent with the given name and request id.
|
|
|
202
223
|
|
|
203
224
|
###### Returns
|
|
204
225
|
|
|
205
|
-
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `
|
|
206
|
-
|
|
226
|
+
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`:
|
|
227
|
+
`z.ZodLiteral`\<`1`\>; `character`: `z.ZodEnum`\<\{ `mushroom`: `"mushroom"`;
|
|
228
|
+
`cat`: `"cat"`; `burger`: `"burger"`; \}\>; `appearance`:
|
|
229
|
+
`z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
|
|
230
|
+
`z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `z.ZodString`; `renderStyle`:
|
|
231
|
+
`z.ZodEnum`\<\{ `plain`: `"plain"`; `pencil`: `"pencil"`; `manga`: `"manga"`;
|
|
232
|
+
`riso`: `"riso"`; `halftone`: `"halftone"`; `blueprint`: `"blueprint"`; `crt`:
|
|
233
|
+
`"crt"`; `watercolor`: `"watercolor"`; \}\>; \}; `sessionOperations`: readonly
|
|
234
|
+
(`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
|
|
207
235
|
|
|
208
236
|
---
|
|
209
237
|
|
|
@@ -256,6 +284,26 @@ Capability handle for renaming an Agent the owner already created.
|
|
|
256
284
|
rename(input): Promise<{
|
|
257
285
|
agentId: string;
|
|
258
286
|
name: string;
|
|
287
|
+
avatar: {
|
|
288
|
+
v: z.ZodLiteral<1>;
|
|
289
|
+
character: z.ZodEnum<{
|
|
290
|
+
mushroom: "mushroom";
|
|
291
|
+
cat: "cat";
|
|
292
|
+
burger: "burger";
|
|
293
|
+
}>;
|
|
294
|
+
appearance: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
295
|
+
expression: z.ZodString;
|
|
296
|
+
renderStyle: z.ZodEnum<{
|
|
297
|
+
plain: "plain";
|
|
298
|
+
pencil: "pencil";
|
|
299
|
+
manga: "manga";
|
|
300
|
+
riso: "riso";
|
|
301
|
+
halftone: "halftone";
|
|
302
|
+
blueprint: "blueprint";
|
|
303
|
+
crt: "crt";
|
|
304
|
+
watercolor: "watercolor";
|
|
305
|
+
}>;
|
|
306
|
+
};
|
|
259
307
|
sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
|
|
260
308
|
}>;
|
|
261
309
|
```
|
|
@@ -270,8 +318,89 @@ Rename an existing Agent and return its updated record.
|
|
|
270
318
|
|
|
271
319
|
###### Returns
|
|
272
320
|
|
|
273
|
-
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `
|
|
274
|
-
|
|
321
|
+
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`:
|
|
322
|
+
`z.ZodLiteral`\<`1`\>; `character`: `z.ZodEnum`\<\{ `mushroom`: `"mushroom"`;
|
|
323
|
+
`cat`: `"cat"`; `burger`: `"burger"`; \}\>; `appearance`:
|
|
324
|
+
`z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
|
|
325
|
+
`z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `z.ZodString`; `renderStyle`:
|
|
326
|
+
`z.ZodEnum`\<\{ `plain`: `"plain"`; `pencil`: `"pencil"`; `manga`: `"manga"`;
|
|
327
|
+
`riso`: `"riso"`; `halftone`: `"halftone"`; `blueprint`: `"blueprint"`; `crt`:
|
|
328
|
+
`"crt"`; `watercolor`: `"watercolor"`; \}\>; \}; `sessionOperations`: readonly
|
|
329
|
+
(`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
### AppAgentAvatarInput
|
|
334
|
+
|
|
335
|
+
```ts
|
|
336
|
+
type AppAgentAvatarInput = Readonly<
|
|
337
|
+
Schema.Schema.Type<typeof appAgentAvatarInputSchema>
|
|
338
|
+
>;
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Input for changing an existing Agent's avatar.
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
### AppAgentAvatarHandle
|
|
346
|
+
|
|
347
|
+
```ts
|
|
348
|
+
type AppAgentAvatarHandle = object;
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Capability handle for changing an Agent's avatar.
|
|
352
|
+
|
|
353
|
+
#### Methods
|
|
354
|
+
|
|
355
|
+
##### setAvatar()
|
|
356
|
+
|
|
357
|
+
```ts
|
|
358
|
+
setAvatar(input): Promise<{
|
|
359
|
+
agentId: string;
|
|
360
|
+
name: string;
|
|
361
|
+
avatar: {
|
|
362
|
+
v: z.ZodLiteral<1>;
|
|
363
|
+
character: z.ZodEnum<{
|
|
364
|
+
mushroom: "mushroom";
|
|
365
|
+
cat: "cat";
|
|
366
|
+
burger: "burger";
|
|
367
|
+
}>;
|
|
368
|
+
appearance: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
369
|
+
expression: z.ZodString;
|
|
370
|
+
renderStyle: z.ZodEnum<{
|
|
371
|
+
plain: "plain";
|
|
372
|
+
pencil: "pencil";
|
|
373
|
+
manga: "manga";
|
|
374
|
+
riso: "riso";
|
|
375
|
+
halftone: "halftone";
|
|
376
|
+
blueprint: "blueprint";
|
|
377
|
+
crt: "crt";
|
|
378
|
+
watercolor: "watercolor";
|
|
379
|
+
}>;
|
|
380
|
+
};
|
|
381
|
+
sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
|
|
382
|
+
}>;
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Set an existing Agent's avatar and return its updated record.
|
|
386
|
+
|
|
387
|
+
###### Parameters
|
|
388
|
+
|
|
389
|
+
| Parameter | Type |
|
|
390
|
+
| --------- | --------------------------------------------- |
|
|
391
|
+
| `input` | [`AppAgentAvatarInput`](#appagentavatarinput) |
|
|
392
|
+
|
|
393
|
+
###### Returns
|
|
394
|
+
|
|
395
|
+
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`:
|
|
396
|
+
`z.ZodLiteral`\<`1`\>; `character`: `z.ZodEnum`\<\{ `mushroom`: `"mushroom"`;
|
|
397
|
+
`cat`: `"cat"`; `burger`: `"burger"`; \}\>; `appearance`:
|
|
398
|
+
`z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
|
|
399
|
+
`z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `z.ZodString`; `renderStyle`:
|
|
400
|
+
`z.ZodEnum`\<\{ `plain`: `"plain"`; `pencil`: `"pencil"`; `manga`: `"manga"`;
|
|
401
|
+
`riso`: `"riso"`; `halftone`: `"halftone"`; `blueprint`: `"blueprint"`; `crt`:
|
|
402
|
+
`"crt"`; `watercolor`: `"watercolor"`; \}\>; \}; `sessionOperations`: readonly
|
|
403
|
+
(`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
|
|
275
404
|
|
|
276
405
|
---
|
|
277
406
|
|
|
@@ -605,17 +734,17 @@ accepts it. Call the returned Disposer to unregister.
|
|
|
605
734
|
|
|
606
735
|
###### Parameters
|
|
607
736
|
|
|
608
|
-
| Parameter | Type
|
|
609
|
-
| ----------------------- |
|
|
610
|
-
| `command` | \{ `id`: `z.ZodString
|
|
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.
|
|
616
|
-
| `command.action?` | `z.ZodOptional`\<`z.ZodObject`\<\{ `inputSchema`: `z.ZodOptional`\<`z.ZodRecord`\<`z.ZodString`, `z.ZodJSONSchema
|
|
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)
|
|
737
|
+
| Parameter | Type |
|
|
738
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
739
|
+
| `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`\<...\>\>; `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"`\>\>\>; \} |
|
|
740
|
+
| `command.id` | `z.ZodLazy`\<`z.ZodString`\> |
|
|
741
|
+
| `command.title` | `z.ZodLazy`\<`z.ZodString`\> |
|
|
742
|
+
| `command.category` | `z.ZodLazy`\<`z.ZodString`\> |
|
|
743
|
+
| `command.description?` | `z.ZodOptional`\<`z.ZodLazy`\<`z.ZodString`\>\> |
|
|
744
|
+
| `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`\<...\>\>; `order`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; `arguments`: `z.ZodOptional`\<`z.ZodLazy`\<...\>\>; \}, `z.core.$strict`\>\>; \}, `z.core.$strict`\>\>\> |
|
|
745
|
+
| `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`\>\>\> |
|
|
746
|
+
| `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"`\>\>\> |
|
|
747
|
+
| `handler` | [`AppCommandHandler`](#appcommandhandler) |
|
|
619
748
|
|
|
620
749
|
###### Returns
|
|
621
750
|
|
|
@@ -1745,12 +1874,104 @@ to allow the close.
|
|
|
1745
1874
|
|
|
1746
1875
|
---
|
|
1747
1876
|
|
|
1877
|
+
### AppCrumb
|
|
1878
|
+
|
|
1879
|
+
```ts
|
|
1880
|
+
type AppCrumb = Readonly<{
|
|
1881
|
+
id: string;
|
|
1882
|
+
label: string;
|
|
1883
|
+
siblings?: readonly Readonly<{
|
|
1884
|
+
id: string;
|
|
1885
|
+
label: string;
|
|
1886
|
+
}>[];
|
|
1887
|
+
}>;
|
|
1888
|
+
```
|
|
1889
|
+
|
|
1890
|
+
One place in the App's path; `siblings` makes it a switcher.
|
|
1891
|
+
|
|
1892
|
+
---
|
|
1893
|
+
|
|
1894
|
+
### AppHeaderCommand
|
|
1895
|
+
|
|
1896
|
+
```ts
|
|
1897
|
+
type AppHeaderCommand = Readonly<{
|
|
1898
|
+
id: string;
|
|
1899
|
+
label: string;
|
|
1900
|
+
variant?: "primary" | "outline" | "ghost";
|
|
1901
|
+
tone?: "destructive";
|
|
1902
|
+
disabled?: boolean;
|
|
1903
|
+
}>;
|
|
1904
|
+
```
|
|
1905
|
+
|
|
1906
|
+
A command the App offers in its window header; the App owns its effect.
|
|
1907
|
+
|
|
1908
|
+
---
|
|
1909
|
+
|
|
1910
|
+
### AppHeaderStatus
|
|
1911
|
+
|
|
1912
|
+
```ts
|
|
1913
|
+
type AppHeaderStatus = Readonly<{
|
|
1914
|
+
id: string;
|
|
1915
|
+
label: string;
|
|
1916
|
+
tone?: "neutral" | "info" | "warning" | "success" | "error";
|
|
1917
|
+
}>;
|
|
1918
|
+
```
|
|
1919
|
+
|
|
1920
|
+
A quiet fact about the view, shown as muted text with a status bead.
|
|
1921
|
+
|
|
1922
|
+
---
|
|
1923
|
+
|
|
1924
|
+
### AppNavigationActivation
|
|
1925
|
+
|
|
1926
|
+
```ts
|
|
1927
|
+
type AppNavigationActivation =
|
|
1928
|
+
| Readonly<{
|
|
1929
|
+
kind: "crumb";
|
|
1930
|
+
crumbId: string;
|
|
1931
|
+
siblingId?: string;
|
|
1932
|
+
}>
|
|
1933
|
+
| Readonly<{
|
|
1934
|
+
kind: "action";
|
|
1935
|
+
actionId: string;
|
|
1936
|
+
}>;
|
|
1937
|
+
```
|
|
1938
|
+
|
|
1939
|
+
The person used a crumb (or a switcher's sibling) or a header command.
|
|
1940
|
+
|
|
1941
|
+
---
|
|
1942
|
+
|
|
1943
|
+
### AppNavigationActivationHandler
|
|
1944
|
+
|
|
1945
|
+
```ts
|
|
1946
|
+
type AppNavigationActivationHandler = (
|
|
1947
|
+
activation,
|
|
1948
|
+
) => boolean | Promise<boolean>;
|
|
1949
|
+
```
|
|
1950
|
+
|
|
1951
|
+
Handles one activation; `true` when the App acted on it.
|
|
1952
|
+
|
|
1953
|
+
#### Parameters
|
|
1954
|
+
|
|
1955
|
+
| Parameter | Type |
|
|
1956
|
+
| ------------ | ----------------------------------------------------- |
|
|
1957
|
+
| `activation` | [`AppNavigationActivation`](#appnavigationactivation) |
|
|
1958
|
+
|
|
1959
|
+
#### Returns
|
|
1960
|
+
|
|
1961
|
+
`boolean` \| `Promise`\<`boolean`\>
|
|
1962
|
+
|
|
1963
|
+
---
|
|
1964
|
+
|
|
1748
1965
|
### AppNavigationState
|
|
1749
1966
|
|
|
1750
1967
|
```ts
|
|
1751
1968
|
type AppNavigationState = Readonly<{
|
|
1752
1969
|
canGoBack: boolean;
|
|
1753
1970
|
title?: string;
|
|
1971
|
+
crumbs?: readonly AppCrumb[];
|
|
1972
|
+
primary?: readonly AppHeaderCommand[];
|
|
1973
|
+
menu?: readonly AppHeaderCommand[];
|
|
1974
|
+
status?: readonly AppHeaderStatus[];
|
|
1754
1975
|
}>;
|
|
1755
1976
|
```
|
|
1756
1977
|
|
|
@@ -1779,6 +2000,7 @@ Go back one step in the App's own history; `true` when it moved.
|
|
|
1779
2000
|
type HostNavigation = Readonly<{
|
|
1780
2001
|
publish: Promise<void>;
|
|
1781
2002
|
onBack: Disposer;
|
|
2003
|
+
onActivate: Disposer;
|
|
1782
2004
|
}>;
|
|
1783
2005
|
```
|
|
1784
2006
|
|
|
@@ -1797,17 +2019,29 @@ type AppWindow = Readonly<{
|
|
|
1797
2019
|
|
|
1798
2020
|
App-owned presentation policy consulted before a user closes its window.
|
|
1799
2021
|
|
|
2022
|
+
---
|
|
2023
|
+
|
|
2024
|
+
### ResultRow
|
|
2025
|
+
|
|
2026
|
+
```ts
|
|
2027
|
+
type ResultRow = Schema.Schema.Type<typeof resultRowSchemaV1>;
|
|
2028
|
+
```
|
|
2029
|
+
|
|
2030
|
+
One shared result row; navigation and previews stay host-authorized.
|
|
2031
|
+
|
|
1800
2032
|
## Variables
|
|
1801
2033
|
|
|
1802
2034
|
### FungiAuthorSchema
|
|
1803
2035
|
|
|
1804
2036
|
```ts
|
|
1805
|
-
const FungiAuthorSchema:
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
2037
|
+
const FungiAuthorSchema: ZodLazy<
|
|
2038
|
+
ZodObject<
|
|
2039
|
+
{
|
|
2040
|
+
id: ZodString;
|
|
2041
|
+
name: ZodString;
|
|
2042
|
+
},
|
|
2043
|
+
$strict
|
|
2044
|
+
>
|
|
1811
2045
|
>;
|
|
1812
2046
|
```
|
|
1813
2047
|
|
|
@@ -1818,21 +2052,23 @@ Who a Session line came from, as the admitting host authenticated them.
|
|
|
1818
2052
|
### FungiDelegationReplySchema
|
|
1819
2053
|
|
|
1820
2054
|
```ts
|
|
1821
|
-
const FungiDelegationReplySchema:
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
2055
|
+
const FungiDelegationReplySchema: ZodLazy<
|
|
2056
|
+
ZodObject<
|
|
2057
|
+
{
|
|
2058
|
+
agentId: ZodLazy<ZodString>;
|
|
2059
|
+
sessionId: ZodLazy<ZodString>;
|
|
2060
|
+
commandId: ZodLazy<ZodString>;
|
|
2061
|
+
outcome: ZodEnum<{
|
|
2062
|
+
completed: "completed";
|
|
2063
|
+
failed: "failed";
|
|
2064
|
+
interrupted: "interrupted";
|
|
2065
|
+
cancelled: "cancelled";
|
|
2066
|
+
outcome_unknown: "outcome_unknown";
|
|
2067
|
+
}>;
|
|
2068
|
+
diagnostic: ZodOptional<ZodString>;
|
|
2069
|
+
},
|
|
2070
|
+
$strict
|
|
2071
|
+
>
|
|
1836
2072
|
>;
|
|
1837
2073
|
```
|
|
1838
2074
|
|
|
@@ -1845,51 +2081,81 @@ id as the sender's `agents.send` receipt.
|
|
|
1845
2081
|
### FungiMessageMetaSchema
|
|
1846
2082
|
|
|
1847
2083
|
```ts
|
|
1848
|
-
const FungiMessageMetaSchema: ZodObject<
|
|
2084
|
+
const FungiMessageMetaSchema: ZodObject<{
|
|
2085
|
+
author: ZodOptional<ZodLazy<ZodObject<{
|
|
2086
|
+
id: ZodString;
|
|
2087
|
+
name: ZodString;
|
|
2088
|
+
}, $strict>>>;
|
|
2089
|
+
delegation: ZodOptional<ZodObject<{
|
|
2090
|
+
ancestors: ZodArray<ZodLazy<ZodString>>;
|
|
2091
|
+
maxDepth: ZodNumber;
|
|
2092
|
+
reply: ZodOptional<ZodLazy<ZodObject<{
|
|
2093
|
+
agentId: ZodLazy<ZodString>;
|
|
2094
|
+
sessionId: ZodLazy<ZodString>;
|
|
2095
|
+
commandId: ZodLazy<ZodString>;
|
|
2096
|
+
outcome: ZodEnum<{
|
|
2097
|
+
completed: ...;
|
|
2098
|
+
failed: ...;
|
|
2099
|
+
interrupted: ...;
|
|
2100
|
+
cancelled: ...;
|
|
2101
|
+
outcome_unknown: ...;
|
|
2102
|
+
}>;
|
|
2103
|
+
diagnostic: ZodOptional<ZodString>;
|
|
2104
|
+
}, $strict>>>;
|
|
2105
|
+
}, $strict>>;
|
|
2106
|
+
}, $strict>;
|
|
2107
|
+
```
|
|
2108
|
+
|
|
2109
|
+
The metadata the host attaches to every prompt and operator line it admits.
|
|
2110
|
+
Shiitake stores it opaquely; the host writes it and Apps read it.
|
|
2111
|
+
|
|
2112
|
+
---
|
|
2113
|
+
|
|
2114
|
+
### appAgentAvatarSchema
|
|
2115
|
+
|
|
2116
|
+
```ts
|
|
2117
|
+
const appAgentAvatarSchema: declare<
|
|
1849
2118
|
{
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
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
|
-
>
|
|
2119
|
+
v: 1;
|
|
2120
|
+
character: "mushroom" | "cat" | "burger";
|
|
2121
|
+
appearance: z.ZodRecord<
|
|
2122
|
+
z.ZodString,
|
|
2123
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
1885
2124
|
>;
|
|
2125
|
+
expression: string;
|
|
2126
|
+
renderStyle:
|
|
2127
|
+
| "plain"
|
|
2128
|
+
| "pencil"
|
|
2129
|
+
| "manga"
|
|
2130
|
+
| "riso"
|
|
2131
|
+
| "halftone"
|
|
2132
|
+
| "blueprint"
|
|
2133
|
+
| "crt"
|
|
2134
|
+
| "watercolor";
|
|
1886
2135
|
},
|
|
1887
|
-
|
|
2136
|
+
{
|
|
2137
|
+
v: 1;
|
|
2138
|
+
character: "mushroom" | "cat" | "burger";
|
|
2139
|
+
appearance: z.ZodRecord<
|
|
2140
|
+
z.ZodString,
|
|
2141
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
2142
|
+
>;
|
|
2143
|
+
expression: string;
|
|
2144
|
+
renderStyle:
|
|
2145
|
+
| "plain"
|
|
2146
|
+
| "pencil"
|
|
2147
|
+
| "manga"
|
|
2148
|
+
| "riso"
|
|
2149
|
+
| "halftone"
|
|
2150
|
+
| "blueprint"
|
|
2151
|
+
| "crt"
|
|
2152
|
+
| "watercolor";
|
|
2153
|
+
}
|
|
1888
2154
|
>;
|
|
1889
2155
|
```
|
|
1890
2156
|
|
|
1891
|
-
|
|
1892
|
-
|
|
2157
|
+
An Agent's avatar: Sprite's Avatar v1 envelope. Apps check its shape; the host
|
|
2158
|
+
owns the character-catalog refinement when it stores one.
|
|
1893
2159
|
|
|
1894
2160
|
---
|
|
1895
2161
|
|
|
@@ -1899,14 +2165,54 @@ Shiitake stores it opaquely; the host writes it and Apps read it.
|
|
|
1899
2165
|
const appAgentSchema: Struct<{
|
|
1900
2166
|
agentId: String;
|
|
1901
2167
|
name: String;
|
|
2168
|
+
avatar: declare<
|
|
2169
|
+
{
|
|
2170
|
+
v: 1;
|
|
2171
|
+
character: "mushroom" | "cat" | "burger";
|
|
2172
|
+
appearance: z.ZodRecord<
|
|
2173
|
+
z.ZodString,
|
|
2174
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
2175
|
+
>;
|
|
2176
|
+
expression: string;
|
|
2177
|
+
renderStyle:
|
|
2178
|
+
| "plain"
|
|
2179
|
+
| "pencil"
|
|
2180
|
+
| "manga"
|
|
2181
|
+
| "riso"
|
|
2182
|
+
| "halftone"
|
|
2183
|
+
| "blueprint"
|
|
2184
|
+
| "crt"
|
|
2185
|
+
| "watercolor";
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
v: 1;
|
|
2189
|
+
character: "mushroom" | "cat" | "burger";
|
|
2190
|
+
appearance: z.ZodRecord<
|
|
2191
|
+
z.ZodString,
|
|
2192
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
2193
|
+
>;
|
|
2194
|
+
expression: string;
|
|
2195
|
+
renderStyle:
|
|
2196
|
+
| "plain"
|
|
2197
|
+
| "pencil"
|
|
2198
|
+
| "manga"
|
|
2199
|
+
| "riso"
|
|
2200
|
+
| "halftone"
|
|
2201
|
+
| "blueprint"
|
|
2202
|
+
| "crt"
|
|
2203
|
+
| "watercolor";
|
|
2204
|
+
}
|
|
2205
|
+
>;
|
|
1902
2206
|
sessionOperations: $Array<
|
|
1903
2207
|
Literals<readonly ["agent.read", "agent.send", "agent.manage"]>
|
|
1904
2208
|
>;
|
|
1905
2209
|
}>;
|
|
1906
2210
|
```
|
|
1907
2211
|
|
|
1908
|
-
Validates the wire shape of an Agent record: its id, display name, and
|
|
1909
|
-
session operations (read, send, manage) this App may perform on it.
|
|
2212
|
+
Validates the wire shape of an Agent record: its id, display name, avatar, and
|
|
2213
|
+
which session operations (read, send, manage) this App may perform on it. Every
|
|
2214
|
+
Agent has an avatar: the one its owner chose, else Sprite's
|
|
2215
|
+
`seededAvatar(agentId)`. Conversations carry none of their own.
|
|
1910
2216
|
|
|
1911
2217
|
---
|
|
1912
2218
|
|
|
@@ -1917,11 +2223,51 @@ const appAgentCreateInputSchema: Struct<{
|
|
|
1917
2223
|
name: String;
|
|
1918
2224
|
requestId: String;
|
|
1919
2225
|
computer: optionalKey<Literals<readonly ["new", "none"]>>;
|
|
2226
|
+
avatar: optionalKey<
|
|
2227
|
+
declare<
|
|
2228
|
+
{
|
|
2229
|
+
v: 1;
|
|
2230
|
+
character: "mushroom" | "cat" | "burger";
|
|
2231
|
+
appearance: z.ZodRecord<
|
|
2232
|
+
z.ZodString,
|
|
2233
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
2234
|
+
>;
|
|
2235
|
+
expression: string;
|
|
2236
|
+
renderStyle:
|
|
2237
|
+
| "plain"
|
|
2238
|
+
| "pencil"
|
|
2239
|
+
| "manga"
|
|
2240
|
+
| "riso"
|
|
2241
|
+
| "halftone"
|
|
2242
|
+
| "blueprint"
|
|
2243
|
+
| "crt"
|
|
2244
|
+
| "watercolor";
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
v: 1;
|
|
2248
|
+
character: "mushroom" | "cat" | "burger";
|
|
2249
|
+
appearance: z.ZodRecord<
|
|
2250
|
+
z.ZodString,
|
|
2251
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
2252
|
+
>;
|
|
2253
|
+
expression: string;
|
|
2254
|
+
renderStyle:
|
|
2255
|
+
| "plain"
|
|
2256
|
+
| "pencil"
|
|
2257
|
+
| "manga"
|
|
2258
|
+
| "riso"
|
|
2259
|
+
| "halftone"
|
|
2260
|
+
| "blueprint"
|
|
2261
|
+
| "crt"
|
|
2262
|
+
| "watercolor";
|
|
2263
|
+
}
|
|
2264
|
+
>
|
|
2265
|
+
>;
|
|
1920
2266
|
}>;
|
|
1921
2267
|
```
|
|
1922
2268
|
|
|
1923
|
-
Validates Agent creation input: a name, a caller-chosen request id
|
|
1924
|
-
|
|
2269
|
+
Validates Agent creation input: a name, a caller-chosen request id, an optional
|
|
2270
|
+
Computer provisioning choice and an optional chosen avatar.
|
|
1925
2271
|
|
|
1926
2272
|
---
|
|
1927
2273
|
|
|
@@ -1970,26 +2316,89 @@ Owner-only capability to rename an existing Agent; not every host grants it.
|
|
|
1970
2316
|
|
|
1971
2317
|
---
|
|
1972
2318
|
|
|
2319
|
+
### appAgentAvatarInputSchema
|
|
2320
|
+
|
|
2321
|
+
```ts
|
|
2322
|
+
const appAgentAvatarInputSchema: Struct<{
|
|
2323
|
+
agentId: String;
|
|
2324
|
+
avatar: declare<
|
|
2325
|
+
{
|
|
2326
|
+
v: 1;
|
|
2327
|
+
character: "mushroom" | "cat" | "burger";
|
|
2328
|
+
appearance: z.ZodRecord<
|
|
2329
|
+
z.ZodString,
|
|
2330
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
2331
|
+
>;
|
|
2332
|
+
expression: string;
|
|
2333
|
+
renderStyle:
|
|
2334
|
+
| "plain"
|
|
2335
|
+
| "pencil"
|
|
2336
|
+
| "manga"
|
|
2337
|
+
| "riso"
|
|
2338
|
+
| "halftone"
|
|
2339
|
+
| "blueprint"
|
|
2340
|
+
| "crt"
|
|
2341
|
+
| "watercolor";
|
|
2342
|
+
},
|
|
2343
|
+
{
|
|
2344
|
+
v: 1;
|
|
2345
|
+
character: "mushroom" | "cat" | "burger";
|
|
2346
|
+
appearance: z.ZodRecord<
|
|
2347
|
+
z.ZodString,
|
|
2348
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
2349
|
+
>;
|
|
2350
|
+
expression: string;
|
|
2351
|
+
renderStyle:
|
|
2352
|
+
| "plain"
|
|
2353
|
+
| "pencil"
|
|
2354
|
+
| "manga"
|
|
2355
|
+
| "riso"
|
|
2356
|
+
| "halftone"
|
|
2357
|
+
| "blueprint"
|
|
2358
|
+
| "crt"
|
|
2359
|
+
| "watercolor";
|
|
2360
|
+
}
|
|
2361
|
+
>;
|
|
2362
|
+
}>;
|
|
2363
|
+
```
|
|
2364
|
+
|
|
2365
|
+
Validates avatar input: the target Agent and the avatar it now wears.
|
|
2366
|
+
|
|
2367
|
+
---
|
|
2368
|
+
|
|
2369
|
+
### agentAvatar
|
|
2370
|
+
|
|
2371
|
+
```ts
|
|
2372
|
+
const agentAvatar: CapabilityContract<AppAgentAvatarHandle>;
|
|
2373
|
+
```
|
|
2374
|
+
|
|
2375
|
+
Owner-only capability to change an existing Agent's avatar; not every host
|
|
2376
|
+
grants it.
|
|
2377
|
+
|
|
2378
|
+
---
|
|
2379
|
+
|
|
1973
2380
|
### appAgentToolPolicyStatusSchema
|
|
1974
2381
|
|
|
1975
2382
|
```ts
|
|
1976
|
-
const appAgentToolPolicyStatusSchema:
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2383
|
+
const appAgentToolPolicyStatusSchema: ZodLazy<
|
|
2384
|
+
ZodUnion<
|
|
2385
|
+
readonly [
|
|
2386
|
+
ZodObject<
|
|
2387
|
+
{
|
|
2388
|
+
status: ZodLiteral<"pending">;
|
|
2389
|
+
revision: ZodString;
|
|
2390
|
+
},
|
|
2391
|
+
$strip
|
|
2392
|
+
>,
|
|
2393
|
+
ZodObject<
|
|
2394
|
+
{
|
|
2395
|
+
status: ZodLiteral<"approved">;
|
|
2396
|
+
revision: ZodString;
|
|
2397
|
+
},
|
|
2398
|
+
$strip
|
|
2399
|
+
>,
|
|
2400
|
+
]
|
|
2401
|
+
>
|
|
1993
2402
|
>;
|
|
1994
2403
|
```
|
|
1995
2404
|
|
|
@@ -2000,33 +2409,37 @@ One Agent's App-tool policy, as the owner-only policy capability reports it.
|
|
|
2000
2409
|
### appAgentToolPolicyResultSchema
|
|
2001
2410
|
|
|
2002
2411
|
```ts
|
|
2003
|
-
const appAgentToolPolicyResultSchema:
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2412
|
+
const appAgentToolPolicyResultSchema: ZodLazy<
|
|
2413
|
+
ZodUnion<
|
|
2414
|
+
readonly [
|
|
2415
|
+
ZodLazy<
|
|
2416
|
+
ZodUnion<
|
|
2417
|
+
readonly [
|
|
2418
|
+
ZodObject<
|
|
2419
|
+
{
|
|
2420
|
+
status: ZodLiteral<"pending">;
|
|
2421
|
+
revision: ZodString;
|
|
2422
|
+
},
|
|
2423
|
+
$strip
|
|
2424
|
+
>,
|
|
2425
|
+
ZodObject<
|
|
2426
|
+
{
|
|
2427
|
+
status: ZodLiteral<"approved">;
|
|
2428
|
+
revision: ZodString;
|
|
2429
|
+
},
|
|
2430
|
+
$strip
|
|
2431
|
+
>,
|
|
2432
|
+
]
|
|
2433
|
+
>
|
|
2434
|
+
>,
|
|
2435
|
+
ZodObject<
|
|
2436
|
+
{
|
|
2437
|
+
error: ZodString;
|
|
2438
|
+
},
|
|
2439
|
+
$strip
|
|
2440
|
+
>,
|
|
2441
|
+
]
|
|
2442
|
+
>
|
|
2030
2443
|
>;
|
|
2031
2444
|
```
|
|
2032
2445
|
|
|
@@ -2406,6 +2819,66 @@ The longest page title a host shows beside the App's own name.
|
|
|
2406
2819
|
|
|
2407
2820
|
---
|
|
2408
2821
|
|
|
2822
|
+
### APP\_NAVIGATION\_CRUMBS\_MAX
|
|
2823
|
+
|
|
2824
|
+
```ts
|
|
2825
|
+
const APP_NAVIGATION_CRUMBS_MAX: 8 = 8;
|
|
2826
|
+
```
|
|
2827
|
+
|
|
2828
|
+
The most crumbs one navigation report may carry.
|
|
2829
|
+
|
|
2830
|
+
---
|
|
2831
|
+
|
|
2832
|
+
### APP\_NAVIGATION\_SIBLINGS\_MAX
|
|
2833
|
+
|
|
2834
|
+
```ts
|
|
2835
|
+
const APP_NAVIGATION_SIBLINGS_MAX: 16 = 16;
|
|
2836
|
+
```
|
|
2837
|
+
|
|
2838
|
+
The most siblings one switcher crumb may offer.
|
|
2839
|
+
|
|
2840
|
+
---
|
|
2841
|
+
|
|
2842
|
+
### APP\_NAVIGATION\_PRIMARY\_MAX
|
|
2843
|
+
|
|
2844
|
+
```ts
|
|
2845
|
+
const APP_NAVIGATION_PRIMARY_MAX: 3 = 3;
|
|
2846
|
+
```
|
|
2847
|
+
|
|
2848
|
+
The most primary header commands one report may carry.
|
|
2849
|
+
|
|
2850
|
+
---
|
|
2851
|
+
|
|
2852
|
+
### APP\_NAVIGATION\_STATUS\_MAX
|
|
2853
|
+
|
|
2854
|
+
```ts
|
|
2855
|
+
const APP_NAVIGATION_STATUS_MAX: 4 = 4;
|
|
2856
|
+
```
|
|
2857
|
+
|
|
2858
|
+
The most header status facts one report may carry.
|
|
2859
|
+
|
|
2860
|
+
---
|
|
2861
|
+
|
|
2862
|
+
### APP\_NAVIGATION\_MENU\_MAX
|
|
2863
|
+
|
|
2864
|
+
```ts
|
|
2865
|
+
const APP_NAVIGATION_MENU_MAX: 12 = 12;
|
|
2866
|
+
```
|
|
2867
|
+
|
|
2868
|
+
The most ⋯ menu commands one report may carry.
|
|
2869
|
+
|
|
2870
|
+
---
|
|
2871
|
+
|
|
2872
|
+
### APP\_NAVIGATION\_LABEL\_MAX
|
|
2873
|
+
|
|
2874
|
+
```ts
|
|
2875
|
+
const APP_NAVIGATION_LABEL_MAX: 80 = 80;
|
|
2876
|
+
```
|
|
2877
|
+
|
|
2878
|
+
The longest crumb or command label a host shows.
|
|
2879
|
+
|
|
2880
|
+
---
|
|
2881
|
+
|
|
2409
2882
|
### inertHostNavigation
|
|
2410
2883
|
|
|
2411
2884
|
```ts
|
|
@@ -2415,6 +2888,59 @@ const inertHostNavigation: HostNavigation;
|
|
|
2415
2888
|
Navigation for a root with no host chrome, such as a workbench fixture: it
|
|
2416
2889
|
accepts every report and never asks the App to go back.
|
|
2417
2890
|
|
|
2891
|
+
---
|
|
2892
|
+
|
|
2893
|
+
### resultRowSchemaV1
|
|
2894
|
+
|
|
2895
|
+
```ts
|
|
2896
|
+
const resultRowSchemaV1: Schema.Struct<{
|
|
2897
|
+
media: Schema.optional<
|
|
2898
|
+
Schema.Struct<{
|
|
2899
|
+
path: Schema.String;
|
|
2900
|
+
format: Schema.Literals<readonly ["fungi:image", "fungi:video"]>;
|
|
2901
|
+
}>
|
|
2902
|
+
>;
|
|
2903
|
+
id: Schema.String;
|
|
2904
|
+
title: Schema.String;
|
|
2905
|
+
detail: Schema.optional<Schema.String>;
|
|
2906
|
+
tone: Schema.optional<
|
|
2907
|
+
Schema.Literals<
|
|
2908
|
+
readonly ["attention", "running", "error", "settled", "muted"]
|
|
2909
|
+
>
|
|
2910
|
+
>;
|
|
2911
|
+
status: Schema.optional<
|
|
2912
|
+
Schema.Struct<{
|
|
2913
|
+
label: Schema.String;
|
|
2914
|
+
tone: Schema.Literals<
|
|
2915
|
+
readonly [
|
|
2916
|
+
"neutral",
|
|
2917
|
+
"primary",
|
|
2918
|
+
"secondary",
|
|
2919
|
+
"accent",
|
|
2920
|
+
"success",
|
|
2921
|
+
"info",
|
|
2922
|
+
"warning",
|
|
2923
|
+
"error",
|
|
2924
|
+
]
|
|
2925
|
+
>;
|
|
2926
|
+
}>
|
|
2927
|
+
>;
|
|
2928
|
+
open: Schema.optional<
|
|
2929
|
+
Schema.Struct<{
|
|
2930
|
+
params: Schema.$Array<
|
|
2931
|
+
Schema.Struct<{
|
|
2932
|
+
key: Schema.String;
|
|
2933
|
+
value: Schema.String;
|
|
2934
|
+
}>
|
|
2935
|
+
>;
|
|
2936
|
+
}>
|
|
2937
|
+
>;
|
|
2938
|
+
}>;
|
|
2939
|
+
```
|
|
2940
|
+
|
|
2941
|
+
A finished App call as a person reads it: a shared row plus an optional
|
|
2942
|
+
thumbnail.
|
|
2943
|
+
|
|
2418
2944
|
## Functions
|
|
2419
2945
|
|
|
2420
2946
|
### messageAuthor()
|
|
@@ -2529,6 +3055,24 @@ function renameAppAgent(
|
|
|
2529
3055
|
): Promise<{
|
|
2530
3056
|
agentId: string;
|
|
2531
3057
|
name: string;
|
|
3058
|
+
avatar: {
|
|
3059
|
+
v: 1;
|
|
3060
|
+
character: "mushroom" | "cat" | "burger";
|
|
3061
|
+
appearance: z.ZodRecord<
|
|
3062
|
+
z.ZodString,
|
|
3063
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
3064
|
+
>;
|
|
3065
|
+
expression: string;
|
|
3066
|
+
renderStyle:
|
|
3067
|
+
| "plain"
|
|
3068
|
+
| "pencil"
|
|
3069
|
+
| "manga"
|
|
3070
|
+
| "riso"
|
|
3071
|
+
| "halftone"
|
|
3072
|
+
| "blueprint"
|
|
3073
|
+
| "crt"
|
|
3074
|
+
| "watercolor";
|
|
3075
|
+
};
|
|
2532
3076
|
sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
|
|
2533
3077
|
}>;
|
|
2534
3078
|
```
|
|
@@ -2544,8 +3088,65 @@ Rename an Agent through the host-granted owner-only capability.
|
|
|
2544
3088
|
|
|
2545
3089
|
#### Returns
|
|
2546
3090
|
|
|
2547
|
-
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `
|
|
2548
|
-
|
|
3091
|
+
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`;
|
|
3092
|
+
`character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`:
|
|
3093
|
+
`z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
|
|
3094
|
+
`z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `string`; `renderStyle`: \|
|
|
3095
|
+
`"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \|
|
|
3096
|
+
`"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly
|
|
3097
|
+
(`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
|
|
3098
|
+
|
|
3099
|
+
---
|
|
3100
|
+
|
|
3101
|
+
### setAppAgentAvatar()
|
|
3102
|
+
|
|
3103
|
+
```ts
|
|
3104
|
+
function setAppAgentAvatar(
|
|
3105
|
+
capabilities,
|
|
3106
|
+
input,
|
|
3107
|
+
): Promise<{
|
|
3108
|
+
agentId: string;
|
|
3109
|
+
name: string;
|
|
3110
|
+
avatar: {
|
|
3111
|
+
v: 1;
|
|
3112
|
+
character: "mushroom" | "cat" | "burger";
|
|
3113
|
+
appearance: z.ZodRecord<
|
|
3114
|
+
z.ZodString,
|
|
3115
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
3116
|
+
>;
|
|
3117
|
+
expression: string;
|
|
3118
|
+
renderStyle:
|
|
3119
|
+
| "plain"
|
|
3120
|
+
| "pencil"
|
|
3121
|
+
| "manga"
|
|
3122
|
+
| "riso"
|
|
3123
|
+
| "halftone"
|
|
3124
|
+
| "blueprint"
|
|
3125
|
+
| "crt"
|
|
3126
|
+
| "watercolor";
|
|
3127
|
+
};
|
|
3128
|
+
sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
|
|
3129
|
+
}>;
|
|
3130
|
+
```
|
|
3131
|
+
|
|
3132
|
+
Change an Agent's avatar through the host-granted owner-only capability.
|
|
3133
|
+
|
|
3134
|
+
#### Parameters
|
|
3135
|
+
|
|
3136
|
+
| Parameter | Type |
|
|
3137
|
+
| -------------- | --------------------------------------------- |
|
|
3138
|
+
| `capabilities` | [`CapabilityDirectory`](#capabilitydirectory) |
|
|
3139
|
+
| `input` | [`AppAgentAvatarInput`](#appagentavatarinput) |
|
|
3140
|
+
|
|
3141
|
+
#### Returns
|
|
3142
|
+
|
|
3143
|
+
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`;
|
|
3144
|
+
`character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`:
|
|
3145
|
+
`z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
|
|
3146
|
+
`z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `string`; `renderStyle`: \|
|
|
3147
|
+
`"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \|
|
|
3148
|
+
`"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly
|
|
3149
|
+
(`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
|
|
2549
3150
|
|
|
2550
3151
|
---
|
|
2551
3152
|
|
|
@@ -2578,6 +3179,24 @@ function createAppAgent(
|
|
|
2578
3179
|
): Promise<{
|
|
2579
3180
|
agentId: string;
|
|
2580
3181
|
name: string;
|
|
3182
|
+
avatar: {
|
|
3183
|
+
v: 1;
|
|
3184
|
+
character: "mushroom" | "cat" | "burger";
|
|
3185
|
+
appearance: z.ZodRecord<
|
|
3186
|
+
z.ZodString,
|
|
3187
|
+
z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>
|
|
3188
|
+
>;
|
|
3189
|
+
expression: string;
|
|
3190
|
+
renderStyle:
|
|
3191
|
+
| "plain"
|
|
3192
|
+
| "pencil"
|
|
3193
|
+
| "manga"
|
|
3194
|
+
| "riso"
|
|
3195
|
+
| "halftone"
|
|
3196
|
+
| "blueprint"
|
|
3197
|
+
| "crt"
|
|
3198
|
+
| "watercolor";
|
|
3199
|
+
};
|
|
2581
3200
|
sessionOperations: readonly ("agent.manage" | "agent.read" | "agent.send")[];
|
|
2582
3201
|
}>;
|
|
2583
3202
|
```
|
|
@@ -2593,8 +3212,13 @@ Create an Agent through the Team directory selected by the host.
|
|
|
2593
3212
|
|
|
2594
3213
|
#### Returns
|
|
2595
3214
|
|
|
2596
|
-
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `
|
|
2597
|
-
|
|
3215
|
+
`Promise`\<\{ `agentId`: `string`; `name`: `string`; `avatar`: \{ `v`: `1`;
|
|
3216
|
+
`character`: `"mushroom"` \| `"cat"` \| `"burger"`; `appearance`:
|
|
3217
|
+
`z.ZodRecord`\<`z.ZodString`, `z.ZodUnion`\<readonly \[`z.ZodString`,
|
|
3218
|
+
`z.ZodNumber`, `z.ZodBoolean`\]\>\>; `expression`: `string`; `renderStyle`: \|
|
|
3219
|
+
`"plain"` \| `"pencil"` \| `"manga"` \| `"riso"` \| `"halftone"` \|
|
|
3220
|
+
`"blueprint"` \| `"crt"` \| `"watercolor"`; \}; `sessionOperations`: readonly
|
|
3221
|
+
(`"agent.manage"` \| `"agent.read"` \| `"agent.send"`)[]; \}\>
|
|
2598
3222
|
|
|
2599
3223
|
---
|
|
2600
3224
|
|
|
@@ -2819,6 +3443,29 @@ this rule against its own latest copy of the items.
|
|
|
2819
3443
|
|
|
2820
3444
|
`boolean`
|
|
2821
3445
|
|
|
3446
|
+
---
|
|
3447
|
+
|
|
3448
|
+
### navigationActivationAllowed()
|
|
3449
|
+
|
|
3450
|
+
```ts
|
|
3451
|
+
function navigationActivationAllowed(state, activation): boolean;
|
|
3452
|
+
```
|
|
3453
|
+
|
|
3454
|
+
Whether an activation names something the App published now: a crumb (and its
|
|
3455
|
+
sibling), or an enabled command. Every hop applies this rule against its own
|
|
3456
|
+
latest copy of the report, so a stale shell cannot reach the App.
|
|
3457
|
+
|
|
3458
|
+
#### Parameters
|
|
3459
|
+
|
|
3460
|
+
| Parameter | Type |
|
|
3461
|
+
| ------------ | ----------------------------------------------------- |
|
|
3462
|
+
| `state` | [`AppNavigationState`](#appnavigationstate) |
|
|
3463
|
+
| `activation` | [`AppNavigationActivation`](#appnavigationactivation) |
|
|
3464
|
+
|
|
3465
|
+
#### Returns
|
|
3466
|
+
|
|
3467
|
+
`boolean`
|
|
3468
|
+
|
|
2822
3469
|
## References
|
|
2823
3470
|
|
|
2824
3471
|
### AppError
|