@howells/motif-sdk 6.0.0 → 7.1.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/README.md +5 -5
- package/dist/image.d.ts +17 -22
- package/dist/image.js +24 -639
- package/dist/index.cjs +50 -810
- package/dist/index.d.cts +20 -29
- package/dist/index.d.ts +20 -29
- package/dist/index.js +50 -810
- package/dist/registry.d.ts +1750 -0
- package/dist/registry.js +2705 -0
- package/package.json +5 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motif SDK: task-first image work over fal.ai.
|
|
3
|
+
*
|
|
4
|
+
* Callers name a task and a tier; Motif picks the model. The per-model registry
|
|
5
|
+
* and the fal client stay internal.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { createMotif } from "@howells/motif-sdk";
|
|
10
|
+
*
|
|
11
|
+
* const motif = createMotif();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
1
14
|
import { Result, Result as Result$1, ResultAsync, err, ok } from "neverthrow";
|
|
2
15
|
import { z } from "zod";
|
|
3
|
-
//#region src/creative.d.ts
|
|
4
16
|
/**
|
|
5
17
|
* Creative direction fields applied to prompts in Motif's canonical order.
|
|
6
18
|
*
|
|
@@ -117,7 +129,7 @@ export declare const CREATIVE_TAXONOMY: {
|
|
|
117
129
|
readonly description: "Natural, unposed documentary portraits of people. Pair with a mood for the light.";
|
|
118
130
|
readonly id: "portrait";
|
|
119
131
|
readonly label: "Documentary portrait";
|
|
120
|
-
readonly model: "
|
|
132
|
+
readonly model: "seedream5";
|
|
121
133
|
}, {
|
|
122
134
|
readonly acceptsMood: false;
|
|
123
135
|
readonly aspect: "1:1";
|
|
@@ -241,8 +253,6 @@ export declare function validateCreativeDirection(creative: CreativeDirection |
|
|
|
241
253
|
* are joined with `". "` and closed with a period. With no clauses the sanitized prompt is returned unchanged.
|
|
242
254
|
*/
|
|
243
255
|
export declare function enrichPrompt(options: EnrichPromptOptions): CreativePromptResult;
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/types.d.ts
|
|
246
256
|
/** ─── Model Types ─────────────────────────────────────────────── */
|
|
247
257
|
type AspectRatio = "auto" | "8:1" | "4:1" | "21:9" | "16:9" | "3:2" | "4:3" | "5:4" | "1:1" | "4:5" | "3:4" | "2:3" | "9:16" | "1:4" | "1:8";
|
|
248
258
|
type Resolution = "0.5K" | "1K" | "2K" | "4K";
|
|
@@ -275,8 +285,6 @@ interface JobStatus {
|
|
|
275
285
|
/** ─── Configuration ──────────────────────────────────────────── */
|
|
276
286
|
/** The network seam: a `fetch`-shaped function. */
|
|
277
287
|
type FalFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region src/aspects.d.ts
|
|
280
288
|
/** Ordered by popularity: square first, then common ratios */
|
|
281
289
|
export declare const ASPECT_RATIOS: AspectRatio[];
|
|
282
290
|
export declare const RESOLUTIONS: Resolution[];
|
|
@@ -296,8 +304,6 @@ export declare const FORMAT_PRESETS: Record<string, {
|
|
|
296
304
|
aspect: AspectRatio;
|
|
297
305
|
resolution?: Resolution;
|
|
298
306
|
}>;
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region src/errors.d.ts
|
|
301
307
|
/**
|
|
302
308
|
* `MotifError` and its coercion helper.
|
|
303
309
|
*
|
|
@@ -325,8 +331,6 @@ export declare const ACCOUNT_LOCKED = "ACCOUNT_LOCKED";
|
|
|
325
331
|
* account has run out of credit. Retrying cannot help, and the key is valid.
|
|
326
332
|
*/
|
|
327
333
|
export declare function isFalAccountLocked(status: number, body: string): boolean;
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region src/image-benchmarks.d.ts
|
|
330
334
|
/**
|
|
331
335
|
* Arena image scores captured for MOT-72 on October 29, 2026. Flare and
|
|
332
336
|
* Sunburst route to GPT Image 2.6 but keep 2.5's scores until 2.6 is
|
|
@@ -340,6 +344,8 @@ interface ArenaScore {
|
|
|
340
344
|
readonly uncertainty: number;
|
|
341
345
|
/** Exact leaderboard label, including a setting where one was reported. */
|
|
342
346
|
readonly evaluatedModel: string;
|
|
347
|
+
/** Set when the score was measured on a different version than Motif runs. */
|
|
348
|
+
readonly note?: string;
|
|
343
349
|
readonly preliminary?: true;
|
|
344
350
|
readonly votes?: number;
|
|
345
351
|
}
|
|
@@ -349,8 +355,6 @@ interface ImageModelBenchmark extends ArenaScore {
|
|
|
349
355
|
readonly snapshotDate: string;
|
|
350
356
|
readonly task: ImageBenchmarkTask;
|
|
351
357
|
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region src/tasks.d.ts
|
|
354
358
|
export declare const TIERS: readonly ["fast", "balanced", "quality"];
|
|
355
359
|
/** How far a Task trades cost and speed for quality. */
|
|
356
360
|
type Tier = (typeof TIERS)[number];
|
|
@@ -533,7 +537,7 @@ export declare const TASKS: {
|
|
|
533
537
|
readonly summary: "Remove an object, person, text or clutter from an image and fill the gap.";
|
|
534
538
|
};
|
|
535
539
|
readonly generate: {
|
|
536
|
-
readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29
|
|
540
|
+
readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29. Sunburst and Flare lead quality at the benchmarked max setting. Balanced starts with Nano Banana 2.1 on preliminary Arena evidence, then Grok Image 2 and Muse Image. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Fast keeps Nano Banana 2 Lite, budget Grok and Seedream 5 Lite, and FLUX.2 Turbo. Design, transparency and tuned Look routes are capability exceptions. Generation with References uses the separate editing ranking. Older routes are explicit/pin/Look-only.";
|
|
537
541
|
readonly models: readonly RankedModel[];
|
|
538
542
|
readonly notFor: "Variations of an image you already have (vary), or a consistent set of images (series run).";
|
|
539
543
|
readonly rankedAt: "2026-10-29";
|
|
@@ -946,7 +950,7 @@ export declare const TASKS: {
|
|
|
946
950
|
readonly summary: "Trace a raster image to a clean SVG.";
|
|
947
951
|
};
|
|
948
952
|
readonly vary: {
|
|
949
|
-
readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29
|
|
953
|
+
readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29. Editing order differs from generation: Grok Image 2 leads balanced, ahead of Nano Banana 2.1, and Seedream 5 Pro outranks GPT Image 1.5. Arena scores Krea 3 only at its Ultra setting, which costs $0.27 to $0.35 an edit and ignores the requested size, so krea3, which runs fal's default setting, is ranked as unscored. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Sunburst and Flare use max quality. vary reuses a previously chosen Model when explicitly supplied, including retained legacy routes.";
|
|
950
954
|
readonly models: readonly RankedModel[];
|
|
951
955
|
readonly notFor: "A specific change to an image described in words (generate with a reference), or a set of different scenes in one style (series run).";
|
|
952
956
|
readonly rankedAt: "2026-10-29";
|
|
@@ -958,8 +962,6 @@ export declare const TASKS: {
|
|
|
958
962
|
type TaskId = keyof typeof TASKS;
|
|
959
963
|
export declare const TASK_IDS: readonly TaskId[];
|
|
960
964
|
export declare function isTaskId(value: string): value is TaskId;
|
|
961
|
-
//#endregion
|
|
962
|
-
//#region src/resolve.d.ts
|
|
963
965
|
/** What the request needs. Only the fields that narrow the choice. */
|
|
964
966
|
interface TaskRequest {
|
|
965
967
|
/** Explicit Model id, e.g. from `--model`. Overrides everything. */
|
|
@@ -1029,6 +1031,8 @@ interface TaskUnresolved {
|
|
|
1029
1031
|
}
|
|
1030
1032
|
type TaskResolution = TaskResolved | TaskUnresolved;
|
|
1031
1033
|
interface ModelProfile {
|
|
1034
|
+
/** The Model's display name, e.g. "GPT Image 2.6 Sunburst". */
|
|
1035
|
+
readonly name: string;
|
|
1032
1036
|
readonly capabilities: ReadonlySet<Capability>;
|
|
1033
1037
|
/** Key variables the Model needs for any request. */
|
|
1034
1038
|
readonly keys: readonly string[];
|
|
@@ -1059,8 +1063,6 @@ export declare function resolveTask(task: TaskId, request: TaskRequest, environm
|
|
|
1059
1063
|
* nothing there.
|
|
1060
1064
|
*/
|
|
1061
1065
|
export declare function tierChangesChoice(task: TaskId, request: Omit<TaskRequest, "tier">, environment: TaskEnvironment): boolean;
|
|
1062
|
-
//#endregion
|
|
1063
|
-
//#region src/task-stream.d.ts
|
|
1064
1066
|
interface TaskStreamOptions {
|
|
1065
1067
|
signal?: AbortSignal;
|
|
1066
1068
|
/** Overall deadline covering connection and consumption, in milliseconds. */
|
|
@@ -1091,8 +1093,6 @@ interface TaskStream {
|
|
|
1091
1093
|
/** Stops local consumption; does not guarantee provider cancellation or refund. */
|
|
1092
1094
|
abort: () => void;
|
|
1093
1095
|
}
|
|
1094
|
-
//#endregion
|
|
1095
|
-
//#region src/tool-cost.d.ts
|
|
1096
1096
|
/** Pixel dimensions of one file an endpoint returned. */
|
|
1097
1097
|
interface OutputDimensions {
|
|
1098
1098
|
height?: number;
|
|
@@ -1133,8 +1133,6 @@ export declare function sumCosts(costs: readonly (number | null)[]): {
|
|
|
1133
1133
|
known: number;
|
|
1134
1134
|
unknown: number;
|
|
1135
1135
|
};
|
|
1136
|
-
//#endregion
|
|
1137
|
-
//#region src/task-client.d.ts
|
|
1138
1136
|
interface MotifClientConfig {
|
|
1139
1137
|
/** Falls back to FAL_KEY. */
|
|
1140
1138
|
falKey?: string;
|
|
@@ -1309,11 +1307,7 @@ interface MotifClient {
|
|
|
1309
1307
|
}
|
|
1310
1308
|
/** Create the Task client. The key falls back to FAL_KEY. */
|
|
1311
1309
|
export declare function createMotif(config?: MotifClientConfig): MotifClient;
|
|
1312
|
-
//#endregion
|
|
1313
|
-
//#region src/task-plan-shared.d.ts
|
|
1314
1310
|
export declare const INVALID_OPTION = "INVALID_OPTION";
|
|
1315
|
-
//#endregion
|
|
1316
|
-
//#region src/prompt-warnings.d.ts
|
|
1317
1311
|
/**
|
|
1318
1312
|
* Advisory checks on a user-written prompt.
|
|
1319
1313
|
*
|
|
@@ -1348,8 +1342,6 @@ interface PromptWarning {
|
|
|
1348
1342
|
export declare function promptWarnings(prompt: string, context?: {
|
|
1349
1343
|
editing?: boolean;
|
|
1350
1344
|
}): PromptWarning[];
|
|
1351
|
-
//#endregion
|
|
1352
|
-
//#region src/env.d.ts
|
|
1353
1345
|
export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
|
|
1354
1346
|
readonly optional: {
|
|
1355
1347
|
FAL_KEY: z.ZodString;
|
|
@@ -1358,5 +1350,4 @@ export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
|
|
|
1358
1350
|
type MotifEnv = ReturnType<typeof motifEnvSchema.parse>;
|
|
1359
1351
|
export declare function parseMotifEnv(input?: Record<string, unknown>): MotifEnv;
|
|
1360
1352
|
export declare function getFalKeyFromEnv(input?: Record<string, unknown>): string | undefined;
|
|
1361
|
-
//#endregion
|
|
1362
1353
|
export { type AspectRatio, type Blocker, type Capability, type ChosenBy, type CreativeDirection, type CreativeField, type CreativeOption, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, type EnrichPromptOptions, type FalFetch, type ImageSizeBounds, type LookId, type LookOption, type ModelProfile, type MoodId, type MotifClient, type MotifClientConfig, type MotifEnv, type OutputDimensions, type PlanOptions, type PromptWarning, type PromptWarningRule, type RankedFrom, type RankedModel, type Resolution, type ResolvedCost, type Result, type ResultAsync, type TaskDefinition, type TaskEnvironment, type TaskFile, type TaskFunction, type TaskId, type TaskInput, type TaskMode, type TaskOutput, type TaskPlan, type TaskRequest, type TaskResolution, type TaskResolved, type TaskStream, type TaskStreamEvent, type TaskStreamOptions, type TaskUnresolved, type Tier, type Unblocker, err, ok };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Motif SDK: task-first image work over fal.ai.
|
|
3
|
+
*
|
|
4
|
+
* Callers name a task and a tier; Motif picks the model. The per-model registry
|
|
5
|
+
* and the fal client stay internal.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { createMotif } from "@howells/motif-sdk";
|
|
10
|
+
*
|
|
11
|
+
* const motif = createMotif();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
1
14
|
import { Result, Result as Result$1, ResultAsync, err, ok } from "neverthrow";
|
|
2
15
|
import { z } from "zod";
|
|
3
|
-
//#region src/creative.d.ts
|
|
4
16
|
/**
|
|
5
17
|
* Creative direction fields applied to prompts in Motif's canonical order.
|
|
6
18
|
*
|
|
@@ -117,7 +129,7 @@ export declare const CREATIVE_TAXONOMY: {
|
|
|
117
129
|
readonly description: "Natural, unposed documentary portraits of people. Pair with a mood for the light.";
|
|
118
130
|
readonly id: "portrait";
|
|
119
131
|
readonly label: "Documentary portrait";
|
|
120
|
-
readonly model: "
|
|
132
|
+
readonly model: "seedream5";
|
|
121
133
|
}, {
|
|
122
134
|
readonly acceptsMood: false;
|
|
123
135
|
readonly aspect: "1:1";
|
|
@@ -241,8 +253,6 @@ export declare function validateCreativeDirection(creative: CreativeDirection |
|
|
|
241
253
|
* are joined with `". "` and closed with a period. With no clauses the sanitized prompt is returned unchanged.
|
|
242
254
|
*/
|
|
243
255
|
export declare function enrichPrompt(options: EnrichPromptOptions): CreativePromptResult;
|
|
244
|
-
//#endregion
|
|
245
|
-
//#region src/types.d.ts
|
|
246
256
|
/** ─── Model Types ─────────────────────────────────────────────── */
|
|
247
257
|
type AspectRatio = "auto" | "8:1" | "4:1" | "21:9" | "16:9" | "3:2" | "4:3" | "5:4" | "1:1" | "4:5" | "3:4" | "2:3" | "9:16" | "1:4" | "1:8";
|
|
248
258
|
type Resolution = "0.5K" | "1K" | "2K" | "4K";
|
|
@@ -275,8 +285,6 @@ interface JobStatus {
|
|
|
275
285
|
/** ─── Configuration ──────────────────────────────────────────── */
|
|
276
286
|
/** The network seam: a `fetch`-shaped function. */
|
|
277
287
|
type FalFetch = (url: string, init: RequestInit) => Promise<Response>;
|
|
278
|
-
//#endregion
|
|
279
|
-
//#region src/aspects.d.ts
|
|
280
288
|
/** Ordered by popularity: square first, then common ratios */
|
|
281
289
|
export declare const ASPECT_RATIOS: AspectRatio[];
|
|
282
290
|
export declare const RESOLUTIONS: Resolution[];
|
|
@@ -296,8 +304,6 @@ export declare const FORMAT_PRESETS: Record<string, {
|
|
|
296
304
|
aspect: AspectRatio;
|
|
297
305
|
resolution?: Resolution;
|
|
298
306
|
}>;
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region src/errors.d.ts
|
|
301
307
|
/**
|
|
302
308
|
* `MotifError` and its coercion helper.
|
|
303
309
|
*
|
|
@@ -325,8 +331,6 @@ export declare const ACCOUNT_LOCKED = "ACCOUNT_LOCKED";
|
|
|
325
331
|
* account has run out of credit. Retrying cannot help, and the key is valid.
|
|
326
332
|
*/
|
|
327
333
|
export declare function isFalAccountLocked(status: number, body: string): boolean;
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region src/image-benchmarks.d.ts
|
|
330
334
|
/**
|
|
331
335
|
* Arena image scores captured for MOT-72 on October 29, 2026. Flare and
|
|
332
336
|
* Sunburst route to GPT Image 2.6 but keep 2.5's scores until 2.6 is
|
|
@@ -340,6 +344,8 @@ interface ArenaScore {
|
|
|
340
344
|
readonly uncertainty: number;
|
|
341
345
|
/** Exact leaderboard label, including a setting where one was reported. */
|
|
342
346
|
readonly evaluatedModel: string;
|
|
347
|
+
/** Set when the score was measured on a different version than Motif runs. */
|
|
348
|
+
readonly note?: string;
|
|
343
349
|
readonly preliminary?: true;
|
|
344
350
|
readonly votes?: number;
|
|
345
351
|
}
|
|
@@ -349,8 +355,6 @@ interface ImageModelBenchmark extends ArenaScore {
|
|
|
349
355
|
readonly snapshotDate: string;
|
|
350
356
|
readonly task: ImageBenchmarkTask;
|
|
351
357
|
}
|
|
352
|
-
//#endregion
|
|
353
|
-
//#region src/tasks.d.ts
|
|
354
358
|
export declare const TIERS: readonly ["fast", "balanced", "quality"];
|
|
355
359
|
/** How far a Task trades cost and speed for quality. */
|
|
356
360
|
type Tier = (typeof TIERS)[number];
|
|
@@ -533,7 +537,7 @@ export declare const TASKS: {
|
|
|
533
537
|
readonly summary: "Remove an object, person, text or clutter from an image and fill the gap.";
|
|
534
538
|
};
|
|
535
539
|
readonly generate: {
|
|
536
|
-
readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29
|
|
540
|
+
readonly basis: "Order follows Arena text-to-image (https://arena.ai/leaderboard/image/text-to-image), read 2026-10-29. Sunburst and Flare lead quality at the benchmarked max setting. Balanced starts with Nano Banana 2.1 on preliminary Arena evidence, then Grok Image 2 and Muse Image. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Fast keeps Nano Banana 2 Lite, budget Grok and Seedream 5 Lite, and FLUX.2 Turbo. Design, transparency and tuned Look routes are capability exceptions. Generation with References uses the separate editing ranking. Older routes are explicit/pin/Look-only.";
|
|
537
541
|
readonly models: readonly RankedModel[];
|
|
538
542
|
readonly notFor: "Variations of an image you already have (vary), or a consistent set of images (series run).";
|
|
539
543
|
readonly rankedAt: "2026-10-29";
|
|
@@ -946,7 +950,7 @@ export declare const TASKS: {
|
|
|
946
950
|
readonly summary: "Trace a raster image to a clean SVG.";
|
|
947
951
|
};
|
|
948
952
|
readonly vary: {
|
|
949
|
-
readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29
|
|
953
|
+
readonly basis: "Order follows Arena image edit, single image (https://arena.ai/leaderboard/image/image-edit/single-image), read 2026-10-29. Editing order differs from generation: Grok Image 2 leads balanced, ahead of Nano Banana 2.1, and Seedream 5 Pro outranks GPT Image 1.5. Arena scores Krea 3 only at its Ultra setting, which costs $0.27 to $0.35 an edit and ignores the requested size, so krea3, which runs fal's default setting, is ranked as unscored. Models not yet on the board follow the ranked ones in their Tier, in their previous order. The Artificial Analysis v2 snapshot of 2026-10-07 stays as recorded benchmark data. Sunburst and Flare use max quality. vary reuses a previously chosen Model when explicitly supplied, including retained legacy routes.";
|
|
950
954
|
readonly models: readonly RankedModel[];
|
|
951
955
|
readonly notFor: "A specific change to an image described in words (generate with a reference), or a set of different scenes in one style (series run).";
|
|
952
956
|
readonly rankedAt: "2026-10-29";
|
|
@@ -958,8 +962,6 @@ export declare const TASKS: {
|
|
|
958
962
|
type TaskId = keyof typeof TASKS;
|
|
959
963
|
export declare const TASK_IDS: readonly TaskId[];
|
|
960
964
|
export declare function isTaskId(value: string): value is TaskId;
|
|
961
|
-
//#endregion
|
|
962
|
-
//#region src/resolve.d.ts
|
|
963
965
|
/** What the request needs. Only the fields that narrow the choice. */
|
|
964
966
|
interface TaskRequest {
|
|
965
967
|
/** Explicit Model id, e.g. from `--model`. Overrides everything. */
|
|
@@ -1029,6 +1031,8 @@ interface TaskUnresolved {
|
|
|
1029
1031
|
}
|
|
1030
1032
|
type TaskResolution = TaskResolved | TaskUnresolved;
|
|
1031
1033
|
interface ModelProfile {
|
|
1034
|
+
/** The Model's display name, e.g. "GPT Image 2.6 Sunburst". */
|
|
1035
|
+
readonly name: string;
|
|
1032
1036
|
readonly capabilities: ReadonlySet<Capability>;
|
|
1033
1037
|
/** Key variables the Model needs for any request. */
|
|
1034
1038
|
readonly keys: readonly string[];
|
|
@@ -1059,8 +1063,6 @@ export declare function resolveTask(task: TaskId, request: TaskRequest, environm
|
|
|
1059
1063
|
* nothing there.
|
|
1060
1064
|
*/
|
|
1061
1065
|
export declare function tierChangesChoice(task: TaskId, request: Omit<TaskRequest, "tier">, environment: TaskEnvironment): boolean;
|
|
1062
|
-
//#endregion
|
|
1063
|
-
//#region src/task-stream.d.ts
|
|
1064
1066
|
interface TaskStreamOptions {
|
|
1065
1067
|
signal?: AbortSignal;
|
|
1066
1068
|
/** Overall deadline covering connection and consumption, in milliseconds. */
|
|
@@ -1091,8 +1093,6 @@ interface TaskStream {
|
|
|
1091
1093
|
/** Stops local consumption; does not guarantee provider cancellation or refund. */
|
|
1092
1094
|
abort: () => void;
|
|
1093
1095
|
}
|
|
1094
|
-
//#endregion
|
|
1095
|
-
//#region src/tool-cost.d.ts
|
|
1096
1096
|
/** Pixel dimensions of one file an endpoint returned. */
|
|
1097
1097
|
interface OutputDimensions {
|
|
1098
1098
|
height?: number;
|
|
@@ -1133,8 +1133,6 @@ export declare function sumCosts(costs: readonly (number | null)[]): {
|
|
|
1133
1133
|
known: number;
|
|
1134
1134
|
unknown: number;
|
|
1135
1135
|
};
|
|
1136
|
-
//#endregion
|
|
1137
|
-
//#region src/task-client.d.ts
|
|
1138
1136
|
interface MotifClientConfig {
|
|
1139
1137
|
/** Falls back to FAL_KEY. */
|
|
1140
1138
|
falKey?: string;
|
|
@@ -1309,11 +1307,7 @@ interface MotifClient {
|
|
|
1309
1307
|
}
|
|
1310
1308
|
/** Create the Task client. The key falls back to FAL_KEY. */
|
|
1311
1309
|
export declare function createMotif(config?: MotifClientConfig): MotifClient;
|
|
1312
|
-
//#endregion
|
|
1313
|
-
//#region src/task-plan-shared.d.ts
|
|
1314
1310
|
export declare const INVALID_OPTION = "INVALID_OPTION";
|
|
1315
|
-
//#endregion
|
|
1316
|
-
//#region src/prompt-warnings.d.ts
|
|
1317
1311
|
/**
|
|
1318
1312
|
* Advisory checks on a user-written prompt.
|
|
1319
1313
|
*
|
|
@@ -1348,8 +1342,6 @@ interface PromptWarning {
|
|
|
1348
1342
|
export declare function promptWarnings(prompt: string, context?: {
|
|
1349
1343
|
editing?: boolean;
|
|
1350
1344
|
}): PromptWarning[];
|
|
1351
|
-
//#endregion
|
|
1352
|
-
//#region src/env.d.ts
|
|
1353
1345
|
export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
|
|
1354
1346
|
readonly optional: {
|
|
1355
1347
|
FAL_KEY: z.ZodString;
|
|
@@ -1358,5 +1350,4 @@ export declare const motifEnvSchema: import("@howells/envy").EnvSchema<{
|
|
|
1358
1350
|
type MotifEnv = ReturnType<typeof motifEnvSchema.parse>;
|
|
1359
1351
|
export declare function parseMotifEnv(input?: Record<string, unknown>): MotifEnv;
|
|
1360
1352
|
export declare function getFalKeyFromEnv(input?: Record<string, unknown>): string | undefined;
|
|
1361
|
-
//#endregion
|
|
1362
1353
|
export { type AspectRatio, type Blocker, type Capability, type ChosenBy, type CreativeDirection, type CreativeField, type CreativeOption, type CreativeOptionErrorDetails, type CreativePromptResult, type CustomImageSize, type EnrichPromptOptions, type FalFetch, type ImageSizeBounds, type LookId, type LookOption, type ModelProfile, type MoodId, type MotifClient, type MotifClientConfig, type MotifEnv, type OutputDimensions, type PlanOptions, type PromptWarning, type PromptWarningRule, type RankedFrom, type RankedModel, type Resolution, type ResolvedCost, type Result, type ResultAsync, type TaskDefinition, type TaskEnvironment, type TaskFile, type TaskFunction, type TaskId, type TaskInput, type TaskMode, type TaskOutput, type TaskPlan, type TaskRequest, type TaskResolution, type TaskResolved, type TaskStream, type TaskStreamEvent, type TaskStreamOptions, type TaskUnresolved, type Tier, type Unblocker, err, ok };
|