@fungi.computer/agar 0.3.1 → 0.5.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.
@@ -24,6 +24,11 @@ export declare const FungiDelegationReplySchema: z.ZodLazy<z.ZodObject<{
24
24
  outcome_unknown: "outcome_unknown";
25
25
  }>;
26
26
  diagnostic: z.ZodOptional<z.ZodString>;
27
+ waitingOnYou: z.ZodOptional<z.ZodArray<z.ZodObject<{
28
+ itemId: z.ZodLazy<z.ZodString>;
29
+ kind: z.ZodString;
30
+ summary: z.ZodString;
31
+ }, z.core.$strict>>>;
27
32
  }, z.core.$strict>>;
28
33
  /** A delegated Agent's reply as the admitting host authenticated it. */
29
34
  export type FungiDelegationReply = z.infer<typeof FungiDelegationReplySchema>;
@@ -41,6 +46,7 @@ export declare const FungiMessageMetaSchema: z.ZodObject<{
41
46
  delegation: z.ZodOptional<z.ZodObject<{
42
47
  ancestors: z.ZodArray<z.ZodLazy<z.ZodString>>;
43
48
  maxDepth: z.ZodNumber;
49
+ steer: z.ZodOptional<z.ZodLiteral<true>>;
44
50
  reply: z.ZodOptional<z.ZodLazy<z.ZodObject<{
45
51
  agentId: z.ZodLazy<z.ZodString>;
46
52
  sessionId: z.ZodLazy<z.ZodString>;
@@ -53,6 +59,11 @@ export declare const FungiMessageMetaSchema: z.ZodObject<{
53
59
  outcome_unknown: "outcome_unknown";
54
60
  }>;
55
61
  diagnostic: z.ZodOptional<z.ZodString>;
62
+ waitingOnYou: z.ZodOptional<z.ZodArray<z.ZodObject<{
63
+ itemId: z.ZodLazy<z.ZodString>;
64
+ kind: z.ZodString;
65
+ summary: z.ZodString;
66
+ }, z.core.$strict>>>;
56
67
  }, z.core.$strict>>>;
57
68
  }, z.core.$strict>>;
58
69
  }, z.core.$strict>;
@@ -5,8 +5,8 @@ export const FungiAuthorSchema = z.lazy(() => z.strictObject({
5
5
  name: z.string().min(1).max(128),
6
6
  /**
7
7
  * Present only when the author is another Agent the host admitted a
8
- * delegated send or reply from; a line's text never sets it. Human
9
- * authors carry no kind.
8
+ * delegated send or reply from; a line's text never sets it. Human and
9
+ * host/system authors carry no kind.
10
10
  */
11
11
  kind: z.literal("agent").optional(),
12
12
  }));
@@ -30,6 +30,16 @@ export const FungiDelegationReplySchema = z.lazy(() => z.strictObject({
30
30
  ]),
31
31
  /** Bounded, single-line terminal diagnostic for work that did not complete. */
32
32
  diagnostic: z.string().min(1).max(200).optional(),
33
+ /** Open items of the replying Session that now wait on the recipient. */
34
+ waitingOnYou: z
35
+ .array(z.strictObject({
36
+ itemId: identifier,
37
+ kind: z.string().min(1).max(64),
38
+ summary: z.string().min(1).max(200),
39
+ }))
40
+ .min(1)
41
+ .max(8)
42
+ .optional(),
33
43
  }));
34
44
  /**
35
45
  * The metadata the host attaches to every prompt and operator line it admits.
@@ -44,6 +54,8 @@ export const FungiMessageMetaSchema = z.strictObject({
44
54
  .strictObject({
45
55
  ancestors: z.array(identifier).max(8),
46
56
  maxDepth: z.number().int().min(1).max(8),
57
+ /** The sender asked to steer the recipient's running turn, not queue behind it. */
58
+ steer: z.literal(true).optional(),
47
59
  /**
48
60
  * Present only on a line the host admitted as an authenticated reply;
49
61
  * a line's text never sets it.
package/dist/approvals.js CHANGED
@@ -1,12 +1,9 @@
1
1
  import * as Schema from "effect/Schema";
2
2
  import * as z from "zod";
3
- import { ApprovalViewSchema, ApprovalRefusalReasonSchema, AutoApproveInputSchema, } from "@fungi.computer/approvals";
3
+ import { ApprovalViewSchema, ApprovalRefusalSchema, AutoApproveInputSchema, } from "@fungi.computer/approvals";
4
4
  import { defineCapability } from "./capabilities.js";
5
5
  import { rpcDataSchema, rpcHandleSchema, rpcMethod, } from "./internal/rpc-contract.js";
6
- const refusal = Schema.Struct({
7
- kind: Schema.Literal("refused"),
8
- reason: ApprovalRefusalReasonSchema,
9
- });
6
+ const refusal = ApprovalRefusalSchema;
10
7
  const page = Schema.Struct({
11
8
  items: Schema.Array(ApprovalViewSchema),
12
9
  nextCursor: Schema.NullOr(Schema.String),
package/dist/errors.d.ts CHANGED
@@ -34,6 +34,7 @@ export declare function decodeMediaProviderErrorCategory(input: string | undefin
34
34
  /** The closed set of reasons an AppError can state; every SDK and
35
35
  * host-reported failure is tagged with exactly one of these codes. */
36
36
  export declare const appErrorCodes: readonly ["CANCELLED", "CAPABILITY_DENIED", "CAPABILITY_REVOKED", "COMMAND_NOT_DECLARED", "CONFLICT", "DELIVERY_PENDING", "DISCONNECTED", "FILE_TOO_LARGE", "HOST_FAILURE", "IDENTITY", "INSUFFICIENT_CREDIT", "INVALID_ARGUMENT", "PROTOCOL", "SAFETY_FILTER_REFUSED", "SELECTION_CHANGED", "TIMEOUT"];
37
+ /** One closed App error code from `appErrorCodes`. */
37
38
  export type AppErrorCode = (typeof appErrorCodes)[number];
38
39
  /** One pending-delivery refusal shared by admission and the shell. */
39
40
  export type AppDeliveryPending = Readonly<{
@@ -123,6 +123,8 @@ const statusItemsSchema = Schema.Array(Schema.Union([
123
123
  kind: Schema.Literal("button"),
124
124
  icon: Schema.optionalKey(Schema.Literals(["folder", "ports", "processes", "access"])),
125
125
  count: statusCount,
126
+ tone: Schema.optionalKey(Schema.Literals(["neutral", "success", "warning", "error"])),
127
+ busy: Schema.optionalKey(Schema.Boolean),
126
128
  title: Schema.optionalKey(statusText(1_024)),
127
129
  disabled: Schema.optionalKey(Schema.Boolean),
128
130
  opens: Schema.optionalKey(Schema.Literal("dialog")),
@@ -21,6 +21,7 @@ export declare const mediaGenerationDescriptionSchema: Schema.Struct<{
21
21
  readonly defaultWidth: Schema.Number;
22
22
  readonly dimensions: Schema.Literals<readonly ["none", "own"]>;
23
23
  readonly maxDimension: Schema.NullOr<Schema.Number>;
24
+ readonly maxDimensionDocumented: Schema.Boolean;
24
25
  readonly maxReferences: Schema.Number;
25
26
  readonly maxSteps: Schema.NullOr<Schema.Number>;
26
27
  readonly referenceField: Schema.NullOr<Schema.String>;
@@ -29,6 +30,7 @@ export declare const mediaGenerationDescriptionSchema: Schema.Struct<{
29
30
  }>;
30
31
  readonly kind: Schema.Literals<readonly ["image", "video"]>;
31
32
  readonly label: Schema.String;
33
+ readonly maxPromptLength: Schema.Number;
32
34
  readonly tier: Schema.Literals<readonly ["draft", "balanced", "premium", "max"]>;
33
35
  readonly outputFormats: Schema.$Array<Schema.Literals<readonly ["png", "jpeg", "webp"]>>;
34
36
  readonly sizes: Schema.NullOr<Schema.$Array<Schema.String>>;
@@ -46,8 +48,8 @@ export declare const mediaGenerationDescriptionSchema: Schema.Struct<{
46
48
  }>>;
47
49
  readonly defaultResolution: Schema.Literals<readonly ["480p", "720p", "768p", "1080p", "4k"]>;
48
50
  readonly defaultAspectRatio: Schema.Literals<readonly ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]>;
51
+ readonly supportsAudio: Schema.Boolean;
49
52
  readonly defaultGenerateAudio: Schema.NullOr<Schema.Boolean>;
50
- readonly maxPromptLength: Schema.Number;
51
53
  readonly referenceRoles: Schema.$Array<Schema.Literals<readonly ["first-frame", "last-frame", "reference"]>>;
52
54
  readonly maxReferenceImages: Schema.Number;
53
55
  readonly referenceResolutions: Schema.$Array<Schema.Literals<readonly ["480p", "720p", "768p", "1080p", "4k"]>>;
package/dist/media.d.ts CHANGED
@@ -159,10 +159,10 @@ export declare const mediaVideoModelSchema: Schema.Struct<{
159
159
  readonly defaultResolution: Schema.Literals<readonly ["480p", "720p", "768p", "1080p", "4k"]>;
160
160
  /** Default requested aspect. */
161
161
  readonly defaultAspectRatio: Schema.Literals<readonly ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]>;
162
+ /** Whether the model documents an audio on/off choice. */
163
+ readonly supportsAudio: Schema.Boolean;
162
164
  /** Audio default, or null when the provider default is undocumented. */
163
165
  readonly defaultGenerateAudio: Schema.NullOr<Schema.Boolean>;
164
- /** Host/provider prompt bound. */
165
- readonly maxPromptLength: Schema.Number;
166
166
  /** Roles admitted by this model. */
167
167
  readonly referenceRoles: Schema.$Array<Schema.Literals<readonly ["first-frame", "last-frame", "reference"]>>;
168
168
  /** Maximum images in reference-image mode. */
@@ -190,6 +190,7 @@ export declare const mediaModelSchema: Schema.Struct<{
190
190
  readonly defaultWidth: Schema.Number;
191
191
  readonly dimensions: Schema.Literals<readonly ["none", "own"]>;
192
192
  readonly maxDimension: Schema.NullOr<Schema.Number>;
193
+ readonly maxDimensionDocumented: Schema.Boolean;
193
194
  readonly maxReferences: Schema.Number;
194
195
  readonly maxSteps: Schema.NullOr<Schema.Number>;
195
196
  readonly referenceField: Schema.NullOr<Schema.String>;
@@ -198,6 +199,8 @@ export declare const mediaModelSchema: Schema.Struct<{
198
199
  }>;
199
200
  readonly kind: Schema.Literals<readonly ["image", "video"]>;
200
201
  readonly label: Schema.String;
202
+ /** Maximum prompt length in characters for this model. */
203
+ readonly maxPromptLength: Schema.Number;
201
204
  readonly tier: Schema.Literals<readonly ["draft", "balanced", "premium", "max"]>;
202
205
  readonly outputFormats: Schema.$Array<Schema.Literals<readonly ["png", "jpeg", "webp"]>>;
203
206
  readonly sizes: Schema.NullOr<Schema.$Array<Schema.String>>;
@@ -227,10 +230,10 @@ export declare const mediaModelSchema: Schema.Struct<{
227
230
  readonly defaultResolution: Schema.Literals<readonly ["480p", "720p", "768p", "1080p", "4k"]>;
228
231
  /** Default requested aspect. */
229
232
  readonly defaultAspectRatio: Schema.Literals<readonly ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]>;
233
+ /** Whether the model documents an audio on/off choice. */
234
+ readonly supportsAudio: Schema.Boolean;
230
235
  /** Audio default, or null when the provider default is undocumented. */
231
236
  readonly defaultGenerateAudio: Schema.NullOr<Schema.Boolean>;
232
- /** Host/provider prompt bound. */
233
- readonly maxPromptLength: Schema.Number;
234
237
  /** Roles admitted by this model. */
235
238
  readonly referenceRoles: Schema.$Array<Schema.Literals<readonly ["first-frame", "last-frame", "reference"]>>;
236
239
  /** Maximum images in reference-image mode. */
@@ -251,8 +254,14 @@ export declare const mediaModelSchema: Schema.Struct<{
251
254
  /** One generation model as the host describes it: identity, tier, input
252
255
  * limits and supported output formats. The host owns the catalog. */
253
256
  export type MediaModel = Schema.Schema.Type<typeof mediaModelSchema>;
254
- /** The most reference images one generation request may name. */
255
- export declare const MAX_MEDIA_REFERENCES = 4;
257
+ /**
258
+ * Schema ceiling for reference images in one request: the largest per-model
259
+ * limit (GPT Image 2 takes 16). The host's catalog `maxReferences` is the
260
+ * authoritative per-model limit and is enforced after this parse.
261
+ */
262
+ export declare const MAX_MEDIA_REFERENCES = 16;
263
+ /** Video reference images: every verified video model's catalog value is 4. */
264
+ export declare const MAX_VIDEO_REFERENCES = 4;
256
265
  /**
257
266
  * Validates the shape of an App's generation settings. Model-specific limits
258
267
  * (sizes, steps, durations, reference counts) and defaults are the host's:
package/dist/media.js CHANGED
@@ -129,6 +129,7 @@ const modelInputSchema = Schema.Struct({
129
129
  defaultWidth: positiveInteger,
130
130
  dimensions: Schema.Literals(["none", "own"]),
131
131
  maxDimension: Schema.NullOr(positiveInteger),
132
+ maxDimensionDocumented: Schema.Boolean,
132
133
  maxReferences: nonNegativeInteger,
133
134
  maxSteps: Schema.NullOr(positiveInteger),
134
135
  referenceField: Schema.NullOr(text(256)),
@@ -162,10 +163,10 @@ export const mediaVideoModelSchema = Schema.Struct({
162
163
  defaultResolution: mediaVideoResolutionSchema,
163
164
  /** Default requested aspect. */
164
165
  defaultAspectRatio: mediaVideoAspectRatioSchema,
166
+ /** Whether the model documents an audio on/off choice. */
167
+ supportsAudio: Schema.Boolean,
165
168
  /** Audio default, or null when the provider default is undocumented. */
166
169
  defaultGenerateAudio: Schema.NullOr(Schema.Boolean),
167
- /** Host/provider prompt bound. */
168
- maxPromptLength: positiveInteger,
169
170
  /** Roles admitted by this model. */
170
171
  referenceRoles: Schema.Array(mediaVideoReferenceRoleSchema),
171
172
  /** Maximum images in reference-image mode. */
@@ -188,6 +189,8 @@ export const mediaModelSchema = Schema.Struct({
188
189
  input: modelInputSchema,
189
190
  kind: Schema.Literals(["image", "video"]),
190
191
  label: text(512),
192
+ /** Maximum prompt length in characters for this model. */
193
+ maxPromptLength: positiveInteger,
191
194
  tier: Schema.Literals(["draft", "balanced", "premium", "max"]),
192
195
  outputFormats: Schema.Array(Schema.Literals(["png", "jpeg", "webp"])).pipe(Schema.check(Schema.isMaxLength(3))),
193
196
  sizes: Schema.NullOr(Schema.Array(Schema.String.pipe(Schema.check(Schema.isPattern(/^\d+x\d+$/u))))),
@@ -200,8 +203,14 @@ const descriptionSchema = Schema.Struct({
200
203
  models: modelsSchema,
201
204
  canGenerate: Schema.Boolean,
202
205
  });
203
- /** The most reference images one generation request may name. */
204
- export const MAX_MEDIA_REFERENCES = 4;
206
+ /**
207
+ * Schema ceiling for reference images in one request: the largest per-model
208
+ * limit (GPT Image 2 takes 16). The host's catalog `maxReferences` is the
209
+ * authoritative per-model limit and is enforced after this parse.
210
+ */
211
+ export const MAX_MEDIA_REFERENCES = 16;
212
+ /** Video reference images: every verified video model's catalog value is 4. */
213
+ export const MAX_VIDEO_REFERENCES = 4;
205
214
  /**
206
215
  * Validates the shape of an App's generation settings. Model-specific limits
207
216
  * (sizes, steps, durations, reference counts) and defaults are the host's:
@@ -234,7 +243,7 @@ export const mediaVideoSelectionSchema = Schema.Struct({
234
243
  /** Explicit audio choice. The host owns omitted defaults. */
235
244
  generateAudio: Schema.optional(Schema.Boolean),
236
245
  /** At most four paths with explicit frame/reference roles. */
237
- references: Schema.optional(Schema.Array(mediaVideoReferenceSchema).pipe(Schema.check(Schema.isMaxLength(MAX_MEDIA_REFERENCES)))),
246
+ references: Schema.optional(Schema.Array(mediaVideoReferenceSchema).pipe(Schema.check(Schema.isMaxLength(MAX_VIDEO_REFERENCES)))),
238
247
  });
239
248
  /** Public diagnostic stages a host may name when a generation fails. */
240
249
  export const mediaFailureStages = [
package/dist/ui.d.ts CHANGED
@@ -74,6 +74,10 @@ export type AppStatusItem = Readonly<{
74
74
  icon?: AppStatusIcon;
75
75
  /** A positive count after the label; zero is hidden. */
76
76
  count?: number;
77
+ /** A small status light before the label; omitted draws none. */
78
+ tone?: AppStatusTone;
79
+ /** Work is under way: the light pulses (neutral tone when none is set). */
80
+ busy?: boolean;
77
81
  /** A longer description, such as a full folder path. */
78
82
  title?: string;
79
83
  disabled?: boolean;
@@ -50,7 +50,23 @@ Error.constructor;
50
50
  ##### code
51
51
 
52
52
  ```ts
53
- readonly code: AppErrorCode;
53
+ readonly code:
54
+ | "CANCELLED"
55
+ | "CAPABILITY_DENIED"
56
+ | "CAPABILITY_REVOKED"
57
+ | "COMMAND_NOT_DECLARED"
58
+ | "CONFLICT"
59
+ | "DELIVERY_PENDING"
60
+ | "DISCONNECTED"
61
+ | "FILE_TOO_LARGE"
62
+ | "HOST_FAILURE"
63
+ | "IDENTITY"
64
+ | "INSUFFICIENT_CREDIT"
65
+ | "INVALID_ARGUMENT"
66
+ | "PROTOCOL"
67
+ | "SAFETY_FILTER_REFUSED"
68
+ | "SELECTION_CHANGED"
69
+ | "TIMEOUT";
54
70
  ```
55
71
 
56
72
  ##### retryable
@@ -88,26 +104,22 @@ Declaration-safe projection of the canonical Media diagnostic grammar.
88
104
  ### AppErrorCode
89
105
 
90
106
  ```ts
91
- type AppErrorCode =
92
- | "CANCELLED"
93
- | "CAPABILITY_DENIED"
94
- | "CAPABILITY_REVOKED"
95
- | "COMMAND_NOT_DECLARED"
96
- | "CONFLICT"
97
- | "DISCONNECTED"
98
- | "FILE_TOO_LARGE"
99
- | "HOST_FAILURE"
100
- | "IDENTITY"
101
- | "INSUFFICIENT_CREDIT"
102
- | "INVALID_ARGUMENT"
103
- | "PROTOCOL"
104
- | "SAFETY_FILTER_REFUSED"
105
- | "SELECTION_CHANGED"
106
- | "TIMEOUT";
107
+ type AppErrorCode = (typeof appErrorCodes)[number];
107
108
  ```
108
109
 
109
- The closed set of reasons an AppError can state; every SDK and host-reported
110
- failure is tagged with exactly one of these codes.
110
+ One closed App error code from `appErrorCodes`.
111
+
112
+ ---
113
+
114
+ ### AppDeliveryPending
115
+
116
+ ```ts
117
+ type AppDeliveryPending = Readonly<{
118
+ code: Extract<AppErrorCode, "DELIVERY_PENDING">;
119
+ }>;
120
+ ```
121
+
122
+ One pending-delivery refusal shared by admission and the shell.
111
123
 
112
124
  ---
113
125
 
@@ -200,6 +212,34 @@ Documentable wire projection of the canonical diagnostic grammar. Maintained
200
212
  converters preserve its closed objects and numeric bounds; decoding still
201
213
  returns the declaration-safe public diagnostic type.
202
214
 
215
+ ---
216
+
217
+ ### appErrorCodes
218
+
219
+ ```ts
220
+ const appErrorCodes: readonly [
221
+ "CANCELLED",
222
+ "CAPABILITY_DENIED",
223
+ "CAPABILITY_REVOKED",
224
+ "COMMAND_NOT_DECLARED",
225
+ "CONFLICT",
226
+ "DELIVERY_PENDING",
227
+ "DISCONNECTED",
228
+ "FILE_TOO_LARGE",
229
+ "HOST_FAILURE",
230
+ "IDENTITY",
231
+ "INSUFFICIENT_CREDIT",
232
+ "INVALID_ARGUMENT",
233
+ "PROTOCOL",
234
+ "SAFETY_FILTER_REFUSED",
235
+ "SELECTION_CHANGED",
236
+ "TIMEOUT",
237
+ ];
238
+ ```
239
+
240
+ The closed set of reasons an AppError can state; every SDK and host-reported
241
+ failure is tagged with exactly one of these codes.
242
+
203
243
  ## Functions
204
244
 
205
245
  ### decodeMediaProviderDiagnostic()
@@ -263,10 +303,10 @@ prerequisites, so they can accompany a non-retryable operation.
263
303
 
264
304
  #### Parameters
265
305
 
266
- | Parameter | Type |
267
- | ------------ | --------------------------------------------------------------------------------------------------------------------- |
268
- | `cause` | `unknown` |
269
- | `overrides?` | `Partial`\<`Record`\<[`AppErrorCode`](#apperrorcode), `Readonly`\<\{ `title`: `string`; `message`: `string`; \}\>\>\> |
306
+ | Parameter | Type |
307
+ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
308
+ | `cause` | `unknown` |
309
+ | `overrides?` | `Partial`\<`Record`\< \| `"CANCELLED"` \| `"CAPABILITY_DENIED"` \| `"CAPABILITY_REVOKED"` \| `"COMMAND_NOT_DECLARED"` \| `"CONFLICT"` \| `"DELIVERY_PENDING"` \| `"DISCONNECTED"` \| `"FILE_TOO_LARGE"` \| `"HOST_FAILURE"` \| `"IDENTITY"` \| `"INSUFFICIENT_CREDIT"` \| `"INVALID_ARGUMENT"` \| `"PROTOCOL"` \| `"SAFETY_FILTER_REFUSED"` \| `"SELECTION_CHANGED"` \| `"TIMEOUT"`, `Readonly`\<\{ `title`: `string`; `message`: `string`; \}\>\>\> |
270
310
 
271
311
  #### Returns
272
312
 
package/docs/api/index.md CHANGED
@@ -1627,6 +1627,8 @@ type AppStatusItem =
1627
1627
  kind: "button";
1628
1628
  icon?: AppStatusIcon;
1629
1629
  count?: number;
1630
+ tone?: AppStatusTone;
1631
+ busy?: boolean;
1630
1632
  title?: string;
1631
1633
  disabled?: boolean;
1632
1634
  opens?: "dialog";
@@ -2071,6 +2073,18 @@ const FungiDelegationReplySchema: ZodLazy<
2071
2073
  outcome_unknown: "outcome_unknown";
2072
2074
  }>;
2073
2075
  diagnostic: ZodOptional<ZodString>;
2076
+ waitingOnYou: ZodOptional<
2077
+ ZodArray<
2078
+ ZodObject<
2079
+ {
2080
+ itemId: ZodLazy<ZodString>;
2081
+ kind: ZodString;
2082
+ summary: ZodString;
2083
+ },
2084
+ $strict
2085
+ >
2086
+ >
2087
+ >;
2074
2088
  },
2075
2089
  $strict
2076
2090
  >
@@ -2096,6 +2110,7 @@ const FungiMessageMetaSchema: ZodObject<{
2096
2110
  delegation: ZodOptional<ZodObject<{
2097
2111
  ancestors: ZodArray<ZodLazy<ZodString>>;
2098
2112
  maxDepth: ZodNumber;
2113
+ steer: ZodOptional<ZodLiteral<true>>;
2099
2114
  reply: ZodOptional<ZodLazy<ZodObject<{
2100
2115
  agentId: ZodLazy<ZodString>;
2101
2116
  sessionId: ZodLazy<ZodString>;
@@ -2108,6 +2123,7 @@ const FungiMessageMetaSchema: ZodObject<{
2108
2123
  outcome_unknown: ...;
2109
2124
  }>;
2110
2125
  diagnostic: ZodOptional<ZodString>;
2126
+ waitingOnYou: ZodOptional<ZodArray<...>>;
2111
2127
  }, $strict>>>;
2112
2128
  }, $strict>>;
2113
2129
  }, $strict>;
@@ -2531,6 +2547,18 @@ Message type the host posts to hand the App its RPC MessagePort.
2531
2547
 
2532
2548
  ---
2533
2549
 
2550
+ ### appDeliveryPendingSchema
2551
+
2552
+ ```ts
2553
+ const appDeliveryPendingSchema: Struct<{
2554
+ code: Literals<readonly ["DELIVERY_PENDING"]>;
2555
+ }>;
2556
+ ```
2557
+
2558
+ Effect projection of the error owner's declaration-safe pending refusal.
2559
+
2560
+ ---
2561
+
2534
2562
  ### parseAppStatusItems
2535
2563
 
2536
2564
  ```ts
@@ -2595,6 +2623,7 @@ const mediaModelSchema: Struct<{
2595
2623
  defaultWidth: Number;
2596
2624
  dimensions: Literals<readonly ["none", "own"]>;
2597
2625
  maxDimension: NullOr<Number>;
2626
+ maxDimensionDocumented: Boolean;
2598
2627
  maxReferences: Number;
2599
2628
  maxSteps: NullOr<Number>;
2600
2629
  referenceField: NullOr<String>;
@@ -2603,6 +2632,7 @@ const mediaModelSchema: Struct<{
2603
2632
  }>;
2604
2633
  kind: Literals<readonly ["image", "video"]>;
2605
2634
  label: String;
2635
+ maxPromptLength: Number;
2606
2636
  tier: Literals<readonly ["draft", "balanced", "premium", "max"]>;
2607
2637
  outputFormats: $Array<Literals<readonly ["png", "jpeg", "webp"]>>;
2608
2638
  sizes: NullOr<$Array<String>>;
@@ -2631,8 +2661,8 @@ const mediaModelSchema: Struct<{
2631
2661
  defaultAspectRatio: Literals<
2632
2662
  readonly ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]
2633
2663
  >;
2664
+ supportsAudio: Boolean;
2634
2665
  defaultGenerateAudio: NullOr<Boolean>;
2635
- maxPromptLength: Number;
2636
2666
  referenceRoles: $Array<
2637
2667
  Literals<readonly ["first-frame", "last-frame", "reference"]>
2638
2668
  >;
@@ -3016,11 +3046,11 @@ The author a message's metadata names; none for anything else.
3016
3046
  }
3017
3047
  ```
3018
3048
 
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. |
3049
+ | Name | Type | Description |
3050
+ | ------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3051
+ | `id` | `string` | - |
3052
+ | `name` | `string` | - |
3053
+ | `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 and host/system authors carry no kind. |
3024
3054
 
3025
3055
  ---
3026
3056
 
@@ -3043,6 +3073,7 @@ function messageDelegationReply(meta):
3043
3073
  | "cancelled"
3044
3074
  | "outcome_unknown";
3045
3075
  diagnostic?: string;
3076
+ waitingOnYou?: object[];
3046
3077
  }
3047
3078
  | undefined;
3048
3079
  ```
@@ -3067,16 +3098,18 @@ other line, including text that merely looks like a reply.
3067
3098
  commandId: string;
3068
3099
  outcome: "completed" | "failed" | "interrupted" | "cancelled" | "outcome_unknown";
3069
3100
  diagnostic?: string;
3101
+ waitingOnYou?: object[];
3070
3102
  }
3071
3103
  ```
3072
3104
 
3073
- | Name | Type | Default value | Description |
3074
- | ------------- | -------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------ |
3075
- | `agentId` | `string` | `identifier` | - |
3076
- | `sessionId` | `string` | `identifier` | - |
3077
- | `commandId` | `string` | `identifier` | - |
3078
- | `outcome` | `"completed"` \| `"failed"` \| `"interrupted"` \| `"cancelled"` \| `"outcome_unknown"` | - | The exact settlement outcome; failures are never collapsed. |
3079
- | `diagnostic?` | `string` | - | Bounded, single-line terminal diagnostic for work that did not complete. |
3105
+ | Name | Type | Default value | Description |
3106
+ | --------------- | -------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------ |
3107
+ | `agentId` | `string` | `identifier` | - |
3108
+ | `sessionId` | `string` | `identifier` | - |
3109
+ | `commandId` | `string` | `identifier` | - |
3110
+ | `outcome` | `"completed"` \| `"failed"` \| `"interrupted"` \| `"cancelled"` \| `"outcome_unknown"` | - | The exact settlement outcome; failures are never collapsed. |
3111
+ | `diagnostic?` | `string` | - | Bounded, single-line terminal diagnostic for work that did not complete. |
3112
+ | `waitingOnYou?` | `object`[] | - | Open items of the replying Session that now wait on the recipient. |
3080
3113
 
3081
3114
  ---
3082
3115
 
@@ -3094,12 +3127,12 @@ The metadata the host attaches for one authenticated author.
3094
3127
 
3095
3128
  #### Parameters
3096
3129
 
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. |
3130
+ | Parameter | Type | Description |
3131
+ | -------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3132
+ | `author` | \{ `id`: `string`; `name`: `string`; `kind?`: `"agent"`; \} | - |
3133
+ | `author.id` | `string` | - |
3134
+ | `author.name` | `string` | - |
3135
+ | `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 and host/system authors carry no kind. |
3103
3136
 
3104
3137
  #### Returns
3105
3138
 
@@ -3535,6 +3568,12 @@ Re-exports [AppError](errors.md#apperror)
3535
3568
 
3536
3569
  ---
3537
3570
 
3571
+ ### AppDeliveryPending
3572
+
3573
+ Re-exports [AppDeliveryPending](errors.md#appdeliverypending)
3574
+
3575
+ ---
3576
+
3538
3577
  ### AppErrorCode
3539
3578
 
3540
3579
  Re-exports [AppErrorCode](errors.md#apperrorcode)
@@ -323,6 +323,7 @@ const mediaGenerationDescriptionSchema: Struct<{
323
323
  defaultWidth: Number;
324
324
  dimensions: Literals<readonly ["none", "own"]>;
325
325
  maxDimension: NullOr<Number>;
326
+ maxDimensionDocumented: Boolean;
326
327
  maxReferences: Number;
327
328
  maxSteps: NullOr<Number>;
328
329
  referenceField: NullOr<String>;
@@ -331,6 +332,7 @@ const mediaGenerationDescriptionSchema: Struct<{
331
332
  }>;
332
333
  kind: Literals<readonly ["image", "video"]>;
333
334
  label: String;
335
+ maxPromptLength: Number;
334
336
  tier: Literals<readonly ["draft", "balanced", "premium", "max"]>;
335
337
  outputFormats: $Array<Literals<readonly ["png", "jpeg", "webp"]>>;
336
338
  sizes: NullOr<$Array<String>>;
@@ -348,8 +350,8 @@ const mediaGenerationDescriptionSchema: Struct<{
348
350
  }>>;
349
351
  defaultResolution: Literals<readonly ["480p", "720p", "768p", "1080p", "4k"]>;
350
352
  defaultAspectRatio: Literals<readonly ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]>;
353
+ supportsAudio: Boolean;
351
354
  defaultGenerateAudio: NullOr<Boolean>;
352
- maxPromptLength: Number;
353
355
  referenceRoles: $Array<Literals<readonly [..., ..., ...]>>;
354
356
  maxReferenceImages: Number;
355
357
  referenceResolutions: $Array<Literals<readonly [..., ..., ..., ..., ...]>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/agar",
3
- "version": "0.3.1",
3
+ "version": "0.5.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "App contract for fungi.computer: typed backend methods, host capabilities and the App frontend connection",
6
6
  "type": "module",
@@ -169,7 +169,7 @@
169
169
  },
170
170
  "dependencies": {
171
171
  "@fungi.computer/puffball": "0.2.0",
172
- "@fungi.computer/whistle": "0.1.0",
172
+ "@fungi.computer/whistle": "0.3.0",
173
173
  "@opentui/keymap": "0.5.10",
174
174
  "@fungi.computer/capnweb": "0.12.0",
175
175
  "effect": "4.0.2",
@@ -181,7 +181,7 @@
181
181
  "@fungi.computer/gills": "0.2.0",
182
182
  "@fungi.computer/cairn": "0.1.0",
183
183
  "@fungi.computer/sprite": "0.2.0",
184
- "@fungi.computer/approvals": "0.1.0"
184
+ "@fungi.computer/approvals": "0.2.0"
185
185
  },
186
186
  "peerDependencies": {
187
187
  "react": "^18.3.1 || ^19.2.0",