@fungi.computer/agar 0.3.1 → 0.4.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.js +2 -2
- package/dist/approvals.js +2 -5
- package/dist/errors.d.ts +1 -0
- package/dist/media-json.d.ts +3 -1
- package/dist/media.d.ts +15 -6
- package/dist/media.js +14 -5
- package/docs/api/errors.md +63 -23
- package/docs/api/index.md +30 -12
- package/docs/api/media-json.md +1 -1
- package/package.json +3 -3
|
@@ -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
|
}));
|
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,
|
|
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 =
|
|
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<{
|
package/dist/media-json.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
255
|
-
|
|
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
|
-
/**
|
|
204
|
-
|
|
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(
|
|
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/docs/api/errors.md
CHANGED
|
@@ -50,7 +50,23 @@ Error.constructor;
|
|
|
50
50
|
##### code
|
|
51
51
|
|
|
52
52
|
```ts
|
|
53
|
-
readonly code:
|
|
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
|
-
|
|
110
|
-
|
|
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`\<
|
|
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
|
@@ -2531,6 +2531,18 @@ Message type the host posts to hand the App its RPC MessagePort.
|
|
|
2531
2531
|
|
|
2532
2532
|
---
|
|
2533
2533
|
|
|
2534
|
+
### appDeliveryPendingSchema
|
|
2535
|
+
|
|
2536
|
+
```ts
|
|
2537
|
+
const appDeliveryPendingSchema: Struct<{
|
|
2538
|
+
code: Literals<readonly ["DELIVERY_PENDING"]>;
|
|
2539
|
+
}>;
|
|
2540
|
+
```
|
|
2541
|
+
|
|
2542
|
+
Effect projection of the error owner's declaration-safe pending refusal.
|
|
2543
|
+
|
|
2544
|
+
---
|
|
2545
|
+
|
|
2534
2546
|
### parseAppStatusItems
|
|
2535
2547
|
|
|
2536
2548
|
```ts
|
|
@@ -2603,6 +2615,7 @@ const mediaModelSchema: Struct<{
|
|
|
2603
2615
|
}>;
|
|
2604
2616
|
kind: Literals<readonly ["image", "video"]>;
|
|
2605
2617
|
label: String;
|
|
2618
|
+
maxPromptLength: Number;
|
|
2606
2619
|
tier: Literals<readonly ["draft", "balanced", "premium", "max"]>;
|
|
2607
2620
|
outputFormats: $Array<Literals<readonly ["png", "jpeg", "webp"]>>;
|
|
2608
2621
|
sizes: NullOr<$Array<String>>;
|
|
@@ -2632,7 +2645,6 @@ const mediaModelSchema: Struct<{
|
|
|
2632
2645
|
readonly ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]
|
|
2633
2646
|
>;
|
|
2634
2647
|
defaultGenerateAudio: NullOr<Boolean>;
|
|
2635
|
-
maxPromptLength: Number;
|
|
2636
2648
|
referenceRoles: $Array<
|
|
2637
2649
|
Literals<readonly ["first-frame", "last-frame", "reference"]>
|
|
2638
2650
|
>;
|
|
@@ -3016,11 +3028,11 @@ The author a message's metadata names; none for anything else.
|
|
|
3016
3028
|
}
|
|
3017
3029
|
```
|
|
3018
3030
|
|
|
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. |
|
|
3031
|
+
| Name | Type | Description |
|
|
3032
|
+
| ------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
3033
|
+
| `id` | `string` | - |
|
|
3034
|
+
| `name` | `string` | - |
|
|
3035
|
+
| `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
3036
|
|
|
3025
3037
|
---
|
|
3026
3038
|
|
|
@@ -3094,12 +3106,12 @@ The metadata the host attaches for one authenticated author.
|
|
|
3094
3106
|
|
|
3095
3107
|
#### Parameters
|
|
3096
3108
|
|
|
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. |
|
|
3109
|
+
| Parameter | Type | Description |
|
|
3110
|
+
| -------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
3111
|
+
| `author` | \{ `id`: `string`; `name`: `string`; `kind?`: `"agent"`; \} | - |
|
|
3112
|
+
| `author.id` | `string` | - |
|
|
3113
|
+
| `author.name` | `string` | - |
|
|
3114
|
+
| `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
3115
|
|
|
3104
3116
|
#### Returns
|
|
3105
3117
|
|
|
@@ -3535,6 +3547,12 @@ Re-exports [AppError](errors.md#apperror)
|
|
|
3535
3547
|
|
|
3536
3548
|
---
|
|
3537
3549
|
|
|
3550
|
+
### AppDeliveryPending
|
|
3551
|
+
|
|
3552
|
+
Re-exports [AppDeliveryPending](errors.md#appdeliverypending)
|
|
3553
|
+
|
|
3554
|
+
---
|
|
3555
|
+
|
|
3538
3556
|
### AppErrorCode
|
|
3539
3557
|
|
|
3540
3558
|
Re-exports [AppErrorCode](errors.md#apperrorcode)
|
package/docs/api/media-json.md
CHANGED
|
@@ -331,6 +331,7 @@ const mediaGenerationDescriptionSchema: Struct<{
|
|
|
331
331
|
}>;
|
|
332
332
|
kind: Literals<readonly ["image", "video"]>;
|
|
333
333
|
label: String;
|
|
334
|
+
maxPromptLength: Number;
|
|
334
335
|
tier: Literals<readonly ["draft", "balanced", "premium", "max"]>;
|
|
335
336
|
outputFormats: $Array<Literals<readonly ["png", "jpeg", "webp"]>>;
|
|
336
337
|
sizes: NullOr<$Array<String>>;
|
|
@@ -349,7 +350,6 @@ const mediaGenerationDescriptionSchema: Struct<{
|
|
|
349
350
|
defaultResolution: Literals<readonly ["480p", "720p", "768p", "1080p", "4k"]>;
|
|
350
351
|
defaultAspectRatio: Literals<readonly ["16:9", "4:3", "1:1", "3:4", "9:16", "21:9", "9:21"]>;
|
|
351
352
|
defaultGenerateAudio: NullOr<Boolean>;
|
|
352
|
-
maxPromptLength: Number;
|
|
353
353
|
referenceRoles: $Array<Literals<readonly [..., ..., ...]>>;
|
|
354
354
|
maxReferenceImages: Number;
|
|
355
355
|
referenceResolutions: $Array<Literals<readonly [..., ..., ..., ..., ...]>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/agar",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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.
|
|
172
|
+
"@fungi.computer/whistle": "0.2.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.
|
|
184
|
+
"@fungi.computer/approvals": "0.2.0"
|
|
185
185
|
},
|
|
186
186
|
"peerDependencies": {
|
|
187
187
|
"react": "^18.3.1 || ^19.2.0",
|