@omnichar/contracts 0.0.0-023468c
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/errors.d.ts +39 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +42 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest/index.d.ts +18 -0
- package/dist/manifest/index.d.ts.map +1 -0
- package/dist/manifest/index.js +13 -0
- package/dist/manifest/index.js.map +1 -0
- package/dist/result.d.ts +12 -0
- package/dist/result.d.ts.map +1 -0
- package/dist/result.js +7 -0
- package/dist/result.js.map +1 -0
- package/dist/v1/accessRequests.d.ts +11 -0
- package/dist/v1/accessRequests.d.ts.map +1 -0
- package/dist/v1/accessRequests.js +12 -0
- package/dist/v1/accessRequests.js.map +1 -0
- package/dist/v1/apiKeys.d.ts +38 -0
- package/dist/v1/apiKeys.d.ts.map +1 -0
- package/dist/v1/apiKeys.js +28 -0
- package/dist/v1/apiKeys.js.map +1 -0
- package/dist/v1/assets.d.ts +47 -0
- package/dist/v1/assets.d.ts.map +1 -0
- package/dist/v1/assets.js +24 -0
- package/dist/v1/assets.js.map +1 -0
- package/dist/v1/capacity.d.ts +48 -0
- package/dist/v1/capacity.d.ts.map +1 -0
- package/dist/v1/capacity.js +18 -0
- package/dist/v1/capacity.js.map +1 -0
- package/dist/v1/characterListings.d.ts +75 -0
- package/dist/v1/characterListings.d.ts.map +1 -0
- package/dist/v1/characterListings.js +68 -0
- package/dist/v1/characterListings.js.map +1 -0
- package/dist/v1/characters.d.ts +91 -0
- package/dist/v1/characters.d.ts.map +1 -0
- package/dist/v1/characters.js +64 -0
- package/dist/v1/characters.js.map +1 -0
- package/dist/v1/common.d.ts +13 -0
- package/dist/v1/common.d.ts.map +1 -0
- package/dist/v1/common.js +12 -0
- package/dist/v1/common.js.map +1 -0
- package/dist/v1/credits.d.ts +124 -0
- package/dist/v1/credits.d.ts.map +1 -0
- package/dist/v1/credits.js +82 -0
- package/dist/v1/credits.js.map +1 -0
- package/dist/v1/datasets.d.ts +153 -0
- package/dist/v1/datasets.d.ts.map +1 -0
- package/dist/v1/datasets.js +93 -0
- package/dist/v1/datasets.js.map +1 -0
- package/dist/v1/featureRequests.d.ts +29 -0
- package/dist/v1/featureRequests.d.ts.map +1 -0
- package/dist/v1/featureRequests.js +36 -0
- package/dist/v1/featureRequests.js.map +1 -0
- package/dist/v1/health.d.ts +13 -0
- package/dist/v1/health.d.ts.map +1 -0
- package/dist/v1/health.js +10 -0
- package/dist/v1/health.js.map +1 -0
- package/dist/v1/index.d.ts +23 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +23 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/me.d.ts +30 -0
- package/dist/v1/me.d.ts.map +1 -0
- package/dist/v1/me.js +22 -0
- package/dist/v1/me.js.map +1 -0
- package/dist/v1/plans.d.ts +30 -0
- package/dist/v1/plans.d.ts.map +1 -0
- package/dist/v1/plans.js +19 -0
- package/dist/v1/plans.js.map +1 -0
- package/dist/v1/purchases.d.ts +40 -0
- package/dist/v1/purchases.d.ts.map +1 -0
- package/dist/v1/purchases.js +56 -0
- package/dist/v1/purchases.js.map +1 -0
- package/dist/v1/runs.d.ts +498 -0
- package/dist/v1/runs.d.ts.map +1 -0
- package/dist/v1/runs.js +203 -0
- package/dist/v1/runs.js.map +1 -0
- package/dist/v1/sessions.d.ts +361 -0
- package/dist/v1/sessions.d.ts.map +1 -0
- package/dist/v1/sessions.js +79 -0
- package/dist/v1/sessions.js.map +1 -0
- package/dist/v1/studio.d.ts +124 -0
- package/dist/v1/studio.d.ts.map +1 -0
- package/dist/v1/studio.js +120 -0
- package/dist/v1/studio.js.map +1 -0
- package/dist/v1/terms.d.ts +8 -0
- package/dist/v1/terms.d.ts.map +1 -0
- package/dist/v1/terms.js +15 -0
- package/dist/v1/terms.js.map +1 -0
- package/dist/v1/uploads.d.ts +60 -0
- package/dist/v1/uploads.d.ts.map +1 -0
- package/dist/v1/uploads.js +77 -0
- package/dist/v1/uploads.js.map +1 -0
- package/dist/v1/usernames.d.ts +35 -0
- package/dist/v1/usernames.d.ts.map +1 -0
- package/dist/v1/usernames.js +67 -0
- package/dist/v1/usernames.js.map +1 -0
- package/dist/v1/videoPricing.d.ts +70 -0
- package/dist/v1/videoPricing.d.ts.map +1 -0
- package/dist/v1/videoPricing.js +128 -0
- package/dist/v1/videoPricing.js.map +1 -0
- package/dist/v1/workflows.d.ts +198 -0
- package/dist/v1/workflows.d.ts.map +1 -0
- package/dist/v1/workflows.js +103 -0
- package/dist/v1/workflows.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { MICRO_PER_CREDIT } from './credits.js';
|
|
2
|
+
/**
|
|
3
|
+
* What a reference-to-video run costs, in credits, before it is run.
|
|
4
|
+
*
|
|
5
|
+
* Unlike a GPU run there is nothing to meter: the price follows from the duration, the resolution
|
|
6
|
+
* and the number of references, all of which the caller picks. So the form shows the exact number,
|
|
7
|
+
* the charge equals the quote, and a run that cannot be afforded is refused with the settings that
|
|
8
|
+
* would fit rather than a bare "not enough credits".
|
|
9
|
+
*
|
|
10
|
+
* The rates below are what a caller pays. What the run costs us is server-side
|
|
11
|
+
* (`services/pricing/videoCost.ts`), and a test there recomputes this table so the two cannot drift.
|
|
12
|
+
*/
|
|
13
|
+
export const VIDEO_RESOLUTIONS = ['480p', '768p', '2K', '4K'];
|
|
14
|
+
/** Whole seconds, as the model accepts them. */
|
|
15
|
+
export const MIN_VIDEO_SECONDS = 5;
|
|
16
|
+
export const MAX_VIDEO_SECONDS = 15;
|
|
17
|
+
// Micro-credits per second of output. Integers so nothing rounds until the total, and a 15-second
|
|
18
|
+
// 4K clip is the same arithmetic as a 5-second draft.
|
|
19
|
+
export const VIDEO_MICRO_PER_SECOND = {
|
|
20
|
+
'480p': 10_000_000,
|
|
21
|
+
'768p': 12_000_000,
|
|
22
|
+
'2K': 26_000_000,
|
|
23
|
+
'4K': 32_000_000,
|
|
24
|
+
};
|
|
25
|
+
// References are how a character reaches the model, so the ones a character needs are not a
|
|
26
|
+
// surcharge. Past that the supplier charges per image and so do we.
|
|
27
|
+
export const FREE_VIDEO_REFERENCES = 5;
|
|
28
|
+
export const VIDEO_MICRO_PER_EXTRA_REFERENCE = 16_000_000;
|
|
29
|
+
// `adaptive` lets the model choose, which is what it does when nothing is asked for.
|
|
30
|
+
export const VIDEO_ASPECT_RATIOS = [
|
|
31
|
+
'adaptive',
|
|
32
|
+
'21:9',
|
|
33
|
+
'16:9',
|
|
34
|
+
'4:3',
|
|
35
|
+
'1:1',
|
|
36
|
+
'3:4',
|
|
37
|
+
'9:16',
|
|
38
|
+
];
|
|
39
|
+
// Lines on the short edge, which is what a resolution names. The long edge follows from the ratio.
|
|
40
|
+
export const VIDEO_SHORT_EDGE = {
|
|
41
|
+
'480p': 480,
|
|
42
|
+
'768p': 768,
|
|
43
|
+
'2K': 1440,
|
|
44
|
+
'4K': 2160,
|
|
45
|
+
};
|
|
46
|
+
export class VideoQuoteError extends Error {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* The price of one run, in micro-credits.
|
|
50
|
+
*
|
|
51
|
+
* Throws on anything it cannot price. A quote that fell back to the cheapest tier for an unknown
|
|
52
|
+
* resolution would undercharge silently, which is the one failure nobody would report.
|
|
53
|
+
*/
|
|
54
|
+
export function videoRunMicro(input) {
|
|
55
|
+
const perSecond = VIDEO_MICRO_PER_SECOND[input.resolution];
|
|
56
|
+
if (perSecond === undefined) {
|
|
57
|
+
throw new VideoQuoteError(`Unknown resolution ${String(input.resolution)}.`);
|
|
58
|
+
}
|
|
59
|
+
if (!Number.isInteger(input.seconds)) {
|
|
60
|
+
throw new VideoQuoteError('Duration must be a whole number of seconds.');
|
|
61
|
+
}
|
|
62
|
+
if (input.seconds < MIN_VIDEO_SECONDS || input.seconds > MAX_VIDEO_SECONDS) {
|
|
63
|
+
throw new VideoQuoteError(`Duration must be ${MIN_VIDEO_SECONDS} to ${MAX_VIDEO_SECONDS} seconds.`);
|
|
64
|
+
}
|
|
65
|
+
const references = input.referenceImages ?? 0;
|
|
66
|
+
if (!Number.isInteger(references) || references < 0) {
|
|
67
|
+
throw new VideoQuoteError('Reference count must be zero or more.');
|
|
68
|
+
}
|
|
69
|
+
const extra = Math.max(0, references - FREE_VIDEO_REFERENCES);
|
|
70
|
+
return input.seconds * perSecond + extra * VIDEO_MICRO_PER_EXTRA_REFERENCE;
|
|
71
|
+
}
|
|
72
|
+
/** The same price in whole credits, which is the only form a caller ever sees. */
|
|
73
|
+
export function videoRunCredits(input) {
|
|
74
|
+
return Math.ceil(videoRunMicro(input) / MICRO_PER_CREDIT);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Settings close to the ones asked for that this balance can afford, dearest first.
|
|
78
|
+
*
|
|
79
|
+
* Offered because the two things that move the price are the two things the caller chose, so a
|
|
80
|
+
* refusal can name a way forward instead of only a number. Same resolution at a shorter duration
|
|
81
|
+
* comes first, since length is usually easier to give up than sharpness.
|
|
82
|
+
*/
|
|
83
|
+
export function affordableVideoOptions(balanceMicro, input, limit = 2) {
|
|
84
|
+
const references = input.referenceImages ?? 0;
|
|
85
|
+
const fits = (resolution, seconds) => {
|
|
86
|
+
const micro = videoRunMicro({ resolution, seconds, referenceImages: references });
|
|
87
|
+
if (micro > balanceMicro)
|
|
88
|
+
return null;
|
|
89
|
+
return { resolution, seconds, credits: Math.ceil(micro / MICRO_PER_CREDIT) };
|
|
90
|
+
};
|
|
91
|
+
const shorterSame = [];
|
|
92
|
+
for (let seconds = input.seconds - 1; seconds >= MIN_VIDEO_SECONDS; seconds -= 1) {
|
|
93
|
+
const option = fits(input.resolution, seconds);
|
|
94
|
+
if (option) {
|
|
95
|
+
shorterSame.push(option);
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Cheaper tiers at the duration originally asked for, dearest of them first.
|
|
100
|
+
const cheaperTiers = [];
|
|
101
|
+
const rank = VIDEO_RESOLUTIONS.indexOf(input.resolution);
|
|
102
|
+
for (let i = rank - 1; i >= 0; i -= 1) {
|
|
103
|
+
const option = fits(VIDEO_RESOLUTIONS[i], input.seconds);
|
|
104
|
+
if (option) {
|
|
105
|
+
cheaperTiers.push(option);
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return [...shorterSame, ...cheaperTiers].slice(0, limit);
|
|
110
|
+
}
|
|
111
|
+
/** What the model accepts, and so the most a run can be billed for. */
|
|
112
|
+
export const MAX_VIDEO_REFERENCES = 9;
|
|
113
|
+
/**
|
|
114
|
+
* How many references a run is billed for.
|
|
115
|
+
*
|
|
116
|
+
* A character carries its own references inside the `.char`, so they never appear among the
|
|
117
|
+
* uploads - and the renderer charges for every one it is sent. Billing only the uploads would hand
|
|
118
|
+
* those over free, so a run with a character is billed at the model's cap: the most it can send.
|
|
119
|
+
*
|
|
120
|
+
* Shared rather than restated in a browser: the figure a form shows and the figure a run is charged
|
|
121
|
+
* have to be the same arithmetic, or the price moves between pressing Run and being billed.
|
|
122
|
+
*/
|
|
123
|
+
export function billedVideoReferences(opts) {
|
|
124
|
+
if (opts.hasCharacter)
|
|
125
|
+
return MAX_VIDEO_REFERENCES;
|
|
126
|
+
return Math.min(MAX_VIDEO_REFERENCES, Math.max(0, opts.uploads));
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=videoPricing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoPricing.js","sourceRoot":"","sources":["../../src/v1/videoPricing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAE/C;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAA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1,198 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const workflowSlugSchema: z.ZodString;
|
|
3
|
+
export declare const workflowRuntimeSchema: z.ZodEnum<{
|
|
4
|
+
serverless: "serverless";
|
|
5
|
+
pod: "pod";
|
|
6
|
+
}>;
|
|
7
|
+
export declare const TEMPLATE_FIELD_TYPES: readonly ["string", "text", "int", "float", "bool", "enum", "seed", "image", "image[]", "char_ref", "dataset_ref"];
|
|
8
|
+
export declare const templateFieldTypeSchema: z.ZodEnum<{
|
|
9
|
+
string: "string";
|
|
10
|
+
text: "text";
|
|
11
|
+
int: "int";
|
|
12
|
+
float: "float";
|
|
13
|
+
bool: "bool";
|
|
14
|
+
enum: "enum";
|
|
15
|
+
seed: "seed";
|
|
16
|
+
image: "image";
|
|
17
|
+
"image[]": "image[]";
|
|
18
|
+
char_ref: "char_ref";
|
|
19
|
+
dataset_ref: "dataset_ref";
|
|
20
|
+
}>;
|
|
21
|
+
export declare const TEMPLATE_FIELD_GROUPS: readonly ["inputs", "settings", "models", "advanced"];
|
|
22
|
+
export declare const templateFieldGroupSchema: z.ZodEnum<{
|
|
23
|
+
inputs: "inputs";
|
|
24
|
+
settings: "settings";
|
|
25
|
+
models: "models";
|
|
26
|
+
advanced: "advanced";
|
|
27
|
+
}>;
|
|
28
|
+
export declare const templateFieldSchema: z.ZodObject<{
|
|
29
|
+
key: z.ZodString;
|
|
30
|
+
node: z.ZodString;
|
|
31
|
+
param: z.ZodString;
|
|
32
|
+
label: z.ZodString;
|
|
33
|
+
type: z.ZodEnum<{
|
|
34
|
+
string: "string";
|
|
35
|
+
text: "text";
|
|
36
|
+
int: "int";
|
|
37
|
+
float: "float";
|
|
38
|
+
bool: "bool";
|
|
39
|
+
enum: "enum";
|
|
40
|
+
seed: "seed";
|
|
41
|
+
image: "image";
|
|
42
|
+
"image[]": "image[]";
|
|
43
|
+
char_ref: "char_ref";
|
|
44
|
+
dataset_ref: "dataset_ref";
|
|
45
|
+
}>;
|
|
46
|
+
group: z.ZodEnum<{
|
|
47
|
+
inputs: "inputs";
|
|
48
|
+
settings: "settings";
|
|
49
|
+
models: "models";
|
|
50
|
+
advanced: "advanced";
|
|
51
|
+
}>;
|
|
52
|
+
required: z.ZodBoolean;
|
|
53
|
+
value: z.ZodUnknown;
|
|
54
|
+
help: z.ZodOptional<z.ZodString>;
|
|
55
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
59
|
+
value: z.ZodString;
|
|
60
|
+
label: z.ZodString;
|
|
61
|
+
}, z.core.$strip>>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export declare const compileWarningSchema: z.ZodObject<{
|
|
64
|
+
code: z.ZodString;
|
|
65
|
+
severity: z.ZodEnum<{
|
|
66
|
+
fatal: "fatal";
|
|
67
|
+
info: "info";
|
|
68
|
+
}>;
|
|
69
|
+
message: z.ZodString;
|
|
70
|
+
where: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export declare const workflowPoolSchema: z.ZodEnum<{
|
|
73
|
+
serverless: "serverless";
|
|
74
|
+
generation: "generation";
|
|
75
|
+
training: "training";
|
|
76
|
+
}>;
|
|
77
|
+
export declare const workflowTemplateSchema: z.ZodObject<{
|
|
78
|
+
slug: z.ZodString;
|
|
79
|
+
title: z.ZodString;
|
|
80
|
+
graphHash: z.ZodString;
|
|
81
|
+
runtime: z.ZodEnum<{
|
|
82
|
+
serverless: "serverless";
|
|
83
|
+
pod: "pod";
|
|
84
|
+
}>;
|
|
85
|
+
pool: z.ZodEnum<{
|
|
86
|
+
serverless: "serverless";
|
|
87
|
+
generation: "generation";
|
|
88
|
+
training: "training";
|
|
89
|
+
}>;
|
|
90
|
+
registryVersion: z.ZodString;
|
|
91
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
92
|
+
key: z.ZodString;
|
|
93
|
+
node: z.ZodString;
|
|
94
|
+
param: z.ZodString;
|
|
95
|
+
label: z.ZodString;
|
|
96
|
+
type: z.ZodEnum<{
|
|
97
|
+
string: "string";
|
|
98
|
+
text: "text";
|
|
99
|
+
int: "int";
|
|
100
|
+
float: "float";
|
|
101
|
+
bool: "bool";
|
|
102
|
+
enum: "enum";
|
|
103
|
+
seed: "seed";
|
|
104
|
+
image: "image";
|
|
105
|
+
"image[]": "image[]";
|
|
106
|
+
char_ref: "char_ref";
|
|
107
|
+
dataset_ref: "dataset_ref";
|
|
108
|
+
}>;
|
|
109
|
+
group: z.ZodEnum<{
|
|
110
|
+
inputs: "inputs";
|
|
111
|
+
settings: "settings";
|
|
112
|
+
models: "models";
|
|
113
|
+
advanced: "advanced";
|
|
114
|
+
}>;
|
|
115
|
+
required: z.ZodBoolean;
|
|
116
|
+
value: z.ZodUnknown;
|
|
117
|
+
help: z.ZodOptional<z.ZodString>;
|
|
118
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
120
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
+
value: z.ZodString;
|
|
123
|
+
label: z.ZodString;
|
|
124
|
+
}, z.core.$strip>>>;
|
|
125
|
+
}, z.core.$strip>>;
|
|
126
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
127
|
+
code: z.ZodString;
|
|
128
|
+
severity: z.ZodEnum<{
|
|
129
|
+
fatal: "fatal";
|
|
130
|
+
info: "info";
|
|
131
|
+
}>;
|
|
132
|
+
message: z.ZodString;
|
|
133
|
+
where: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
export declare const workflowSummarySchema: z.ZodObject<{
|
|
137
|
+
slug: z.ZodString;
|
|
138
|
+
title: z.ZodString;
|
|
139
|
+
summary: z.ZodString;
|
|
140
|
+
heroUrl: z.ZodNullable<z.ZodString>;
|
|
141
|
+
heroType: z.ZodNullable<z.ZodString>;
|
|
142
|
+
posterUrl: z.ZodNullable<z.ZodString>;
|
|
143
|
+
tags: z.ZodArray<z.ZodString>;
|
|
144
|
+
runtime: z.ZodNullable<z.ZodEnum<{
|
|
145
|
+
serverless: "serverless";
|
|
146
|
+
pod: "pod";
|
|
147
|
+
}>>;
|
|
148
|
+
}, z.core.$strip>;
|
|
149
|
+
export declare const workflowListSchema: z.ZodObject<{
|
|
150
|
+
items: z.ZodArray<z.ZodObject<{
|
|
151
|
+
slug: z.ZodString;
|
|
152
|
+
title: z.ZodString;
|
|
153
|
+
summary: z.ZodString;
|
|
154
|
+
heroUrl: z.ZodNullable<z.ZodString>;
|
|
155
|
+
heroType: z.ZodNullable<z.ZodString>;
|
|
156
|
+
posterUrl: z.ZodNullable<z.ZodString>;
|
|
157
|
+
tags: z.ZodArray<z.ZodString>;
|
|
158
|
+
runtime: z.ZodNullable<z.ZodEnum<{
|
|
159
|
+
serverless: "serverless";
|
|
160
|
+
pod: "pod";
|
|
161
|
+
}>>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
export declare const defaultModelsSchema: z.ZodObject<{
|
|
165
|
+
models: z.ZodArray<z.ZodObject<{
|
|
166
|
+
slug: z.ZodString;
|
|
167
|
+
label: z.ZodString;
|
|
168
|
+
kind: z.ZodEnum<{
|
|
169
|
+
image: "image";
|
|
170
|
+
video: "video";
|
|
171
|
+
}>;
|
|
172
|
+
characterArch: z.ZodNullable<z.ZodString>;
|
|
173
|
+
available: z.ZodBoolean;
|
|
174
|
+
}, z.core.$strip>>;
|
|
175
|
+
defaultSlug: z.ZodString;
|
|
176
|
+
training: z.ZodObject<{
|
|
177
|
+
models: z.ZodArray<z.ZodObject<{
|
|
178
|
+
slug: z.ZodString;
|
|
179
|
+
label: z.ZodString;
|
|
180
|
+
kind: z.ZodEnum<{
|
|
181
|
+
image: "image";
|
|
182
|
+
video: "video";
|
|
183
|
+
}>;
|
|
184
|
+
available: z.ZodBoolean;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
defaultSlug: z.ZodString;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
export type DefaultModels = z.infer<typeof defaultModelsSchema>;
|
|
190
|
+
export type WorkflowSummary = z.infer<typeof workflowSummarySchema>;
|
|
191
|
+
export type WorkflowList = z.infer<typeof workflowListSchema>;
|
|
192
|
+
export type WorkflowRuntime = z.infer<typeof workflowRuntimeSchema>;
|
|
193
|
+
export type WorkflowPool = z.infer<typeof workflowPoolSchema>;
|
|
194
|
+
export type TemplateFieldType = z.infer<typeof templateFieldTypeSchema>;
|
|
195
|
+
export type TemplateFieldGroup = z.infer<typeof templateFieldGroupSchema>;
|
|
196
|
+
export type TemplateField = z.infer<typeof templateFieldSchema>;
|
|
197
|
+
export type WorkflowTemplate = z.infer<typeof workflowTemplateSchema>;
|
|
198
|
+
//# sourceMappingURL=workflows.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/v1/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,kBAAkB,aAIP,CAAA;AAGxB,eAAO,MAAM,qBAAqB;;;EAAgC,CAAA;AAElE,eAAO,MAAM,oBAAoB,oHAYvB,CAAA;AACV,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAA+B,CAAA;AAInE,eAAO,MAAM,qBAAqB,uDAAwD,CAAA;AAC1F,eAAO,MAAM,wBAAwB;;;;;EAAgC,CAAA;AAGrE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB9B,CAAA;AAEF,eAAO,MAAM,oBAAo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
5
|
+
.min(1)
|
|
6
|
+
.max(200)
|
|
7
|
+
.regex(/^[a-z0-9-]+$/);
|
|
8
|
+
// 'pod' when the graph trains or the author opted out of serverless; the stricter of the two wins.
|
|
9
|
+
export const workflowRuntimeSchema = z.enum(['serverless', 'pod']);
|
|
10
|
+
export const TEMPLATE_FIELD_TYPES = [
|
|
11
|
+
'string',
|
|
12
|
+
'text',
|
|
13
|
+
'int',
|
|
14
|
+
'float',
|
|
15
|
+
'bool',
|
|
16
|
+
'enum',
|
|
17
|
+
'seed',
|
|
18
|
+
'image',
|
|
19
|
+
'image[]',
|
|
20
|
+
'char_ref',
|
|
21
|
+
'dataset_ref',
|
|
22
|
+
];
|
|
23
|
+
export const templateFieldTypeSchema = z.enum(TEMPLATE_FIELD_TYPES);
|
|
24
|
+
// The section of the form a field is shown in, in the order they are shown. `advanced` is the
|
|
25
|
+
// fallback, so a param the compiler does not recognise is still offered rather than hidden.
|
|
26
|
+
export const TEMPLATE_FIELD_GROUPS = ['inputs', 'settings', 'models', 'advanced'];
|
|
27
|
+
export const templateFieldGroupSchema = z.enum(TEMPLATE_FIELD_GROUPS);
|
|
28
|
+
// Key is "<nodeId>:<param>" for a value, "<loaderId>:<slot>" for a file the caller uploads.
|
|
29
|
+
export const templateFieldSchema = z.object({
|
|
30
|
+
// The internal key, "<node uuid>:<param>". Kept because the dashboard patches by it; an API
|
|
31
|
+
// caller addresses `node` and `param` instead and never needs to see this.
|
|
32
|
+
key: z.string(),
|
|
33
|
+
node: z.string(),
|
|
34
|
+
param: z.string(),
|
|
35
|
+
label: z.string(),
|
|
36
|
+
type: templateFieldTypeSchema,
|
|
37
|
+
group: templateFieldGroupSchema,
|
|
38
|
+
required: z.boolean(),
|
|
39
|
+
value: z.unknown(),
|
|
40
|
+
help: z.string().optional(),
|
|
41
|
+
min: z.number().optional(),
|
|
42
|
+
max: z.number().optional(),
|
|
43
|
+
step: z.number().optional(),
|
|
44
|
+
options: z.array(z.object({ value: z.string(), label: z.string() })).optional(),
|
|
45
|
+
});
|
|
46
|
+
export const compileWarningSchema = z.object({
|
|
47
|
+
code: z.string(),
|
|
48
|
+
severity: z.enum(['fatal', 'info']),
|
|
49
|
+
message: z.string(),
|
|
50
|
+
where: z.string().optional(),
|
|
51
|
+
});
|
|
52
|
+
// Which GPU pool a run of this workflow needs, so a caller can ask whether one is free first.
|
|
53
|
+
export const workflowPoolSchema = z.enum(['generation', 'training', 'serverless']);
|
|
54
|
+
export const workflowTemplateSchema = z.object({
|
|
55
|
+
slug: workflowSlugSchema,
|
|
56
|
+
title: z.string(),
|
|
57
|
+
graphHash: z.string(),
|
|
58
|
+
runtime: workflowRuntimeSchema,
|
|
59
|
+
pool: workflowPoolSchema,
|
|
60
|
+
registryVersion: z.string(),
|
|
61
|
+
fields: z.array(templateFieldSchema),
|
|
62
|
+
warnings: z.array(compileWarningSchema),
|
|
63
|
+
});
|
|
64
|
+
// One card in the catalogue. Whether it compiles is only known once its template is requested.
|
|
65
|
+
export const workflowSummarySchema = z.object({
|
|
66
|
+
slug: workflowSlugSchema,
|
|
67
|
+
title: z.string(),
|
|
68
|
+
summary: z.string(),
|
|
69
|
+
heroUrl: z.string().nullable(),
|
|
70
|
+
heroType: z.string().nullable(),
|
|
71
|
+
// The still frame of a video hero, which is the only picture a video card can show.
|
|
72
|
+
posterUrl: z.string().nullable(),
|
|
73
|
+
tags: z.array(z.string()),
|
|
74
|
+
// From the last compile, so null until the workflow has been opened once.
|
|
75
|
+
runtime: workflowRuntimeSchema.nullable(),
|
|
76
|
+
});
|
|
77
|
+
export const workflowListSchema = z.object({ items: z.array(workflowSummarySchema) });
|
|
78
|
+
// Generating without a workflow. Each model is a built-in workflow slug; `available` is false while
|
|
79
|
+
// the worker has no copy of its files, and defaultSlug is the one a new form opens on.
|
|
80
|
+
export const defaultModelsSchema = z.object({
|
|
81
|
+
models: z.array(z.object({
|
|
82
|
+
slug: workflowSlugSchema,
|
|
83
|
+
label: z.string(),
|
|
84
|
+
// So a picker can group stills and clips, which also differ in how long a run takes.
|
|
85
|
+
kind: z.enum(['image', 'video']),
|
|
86
|
+
// The .char payload this model reads, so a built character can open on a model that uses it.
|
|
87
|
+
characterArch: z.string().nullable(),
|
|
88
|
+
available: z.boolean(),
|
|
89
|
+
})),
|
|
90
|
+
defaultSlug: workflowSlugSchema,
|
|
91
|
+
// The "Train LoRA" form: one built-in training workflow per trainable model, the first the default.
|
|
92
|
+
training: z.object({
|
|
93
|
+
models: z.array(z.object({
|
|
94
|
+
slug: workflowSlugSchema,
|
|
95
|
+
label: z.string(),
|
|
96
|
+
kind: z.enum(['image', 'video']),
|
|
97
|
+
// False while the worker is missing a weight the trainer loads for this base.
|
|
98
|
+
available: z.boolean(),
|
|
99
|
+
})),
|
|
100
|
+
defaultSlug: workflowSlugSchema,
|
|
101
|
+
}),
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=workflows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../src/v1/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,uDAAuD;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,cAAc,CAAC,CAAA;AAExB,mGAAmG;AACnG,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAA;AAElE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,QAAQ;IACR,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,SAAS;IACT,UAAU;IACV,aAAa;CACL,CAAA;AACV,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,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CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,CAAC,CAAA;AAErF,oGAAoG;AACpG,uFAAuF;AACvF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;QACjB,qFAAqF;QACrF,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAChC,6FAA6F;QAC7F,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACpC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;KACvB,CAAC,CACH;IACD,WAAW,EAAE,kBAAkB;IAC/B,oGAAoG;IACpG,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACjB,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;YACP,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;YACjB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAChC,8EAA8E;YAC9E,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;SACvB,CAAC,CACH;QACD,WAAW,EAAE,kBAAkB;KAChC,CAAC;CACH,CAAC,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@omnichar/contracts",
|
|
3
|
+
"version": "0.0.0-023468c",
|
|
4
|
+
"description": "The wire contract between Cloud-Studio and Cloud-Control-Plane. Zod schemas and the types inferred from them.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc -p tsconfig.json",
|
|
23
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
24
|
+
"test": "vitest run",
|
|
25
|
+
"clean": "rm -rf dist"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"zod": "4.5.4"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"typescript": "6.0.3",
|
|
32
|
+
"vitest": "5.0.0"
|
|
33
|
+
}
|
|
34
|
+
}
|