@aicopycoders/exodus 2026.11.1200-beta.3 → 2026.11.1200-beta.5
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.
|
@@ -708,7 +708,17 @@ not that yes: set it with `exodus video swipe sheet set <swipeId>
|
|
|
708
708
|
notes="<words>"` (free; `<row>=` clears a row), say the change in one line,
|
|
709
709
|
and ask the yes again. Say a row marked "no step reads it yet" as saved, not
|
|
710
710
|
used. The start copies the saved sheet into the video; a change after it is
|
|
711
|
-
for the next video.
|
|
711
|
+
for the next video. `who` picks the person filmed, in the row's own form, as
|
|
712
|
+
`who="a white woman in her 30s, grey hoodie"`; unset, the script decides.
|
|
713
|
+
`filmed`, `pose`, `prop`, `moves`, `place`, `look`, `time`, `placeNote`: how
|
|
714
|
+
and where it is filmed, each with its default's reason; set one only when the
|
|
715
|
+
member asks (`time=dusk`). `notes` end every take's prompt.
|
|
716
|
+
`hook` is take 1's opening action, `off` or a level from 1 to 5 (2 is the
|
|
717
|
+
usual), and `hookKind` its kind (`any`, or one the row lists), each with
|
|
718
|
+
its default's reason; set one only when the member asks (`hook=3`,
|
|
719
|
+
`hook=off`). With the hook on, the board asks the hook director for the
|
|
720
|
+
opening: one text call on the member's model key, which the price names among
|
|
721
|
+
what it leaves out.
|
|
712
722
|
With each sheet, show its price: `exodus video swipe sheet price <swipeId>`
|
|
713
723
|
(free) prints it at the sheet's rows, with the most it can cost and one line
|
|
714
724
|
of what it leaves out. A 480p draft or the first take only is a row the
|
|
@@ -718,6 +728,18 @@ and the size, not of the final person: the whole video after it is a second
|
|
|
718
728
|
start, paid on its own (`takes=all`, then `swipe start <swipeId> --again`),
|
|
719
729
|
and it casts the person and draws the pictures again. Say so before that yes.
|
|
720
730
|
|
|
731
|
+
Offer people or voices to pick from only when the member asks for options.
|
|
732
|
+
People are paid on the member's keys: run `exodus video swipe sheet people
|
|
733
|
+
<swipeId> --count <n>` first (no `--yes`), show the price it prints word for
|
|
734
|
+
word, and after their yes run the line it prints (`--yes --max-usd <n>`, the
|
|
735
|
+
most the price said). Do not add `--wait`: it can wait up to 45 minutes. Read
|
|
736
|
+
the sheet a few minutes later (`exodus video swipe sheet <swipeId>`) and show
|
|
737
|
+
each person's name and picture address. Voices are free: `exodus video swipe
|
|
738
|
+
sheet voices <swipeId>` lists them, each with a sample to hear. A pick is a set
|
|
739
|
+
(`who=<n>`, `voice=<n>`), and the video is filmed with that person, their face
|
|
740
|
+
and that voice. If the server says these choices are not switched on yet, say
|
|
741
|
+
so and go on with the sheet as it is.
|
|
742
|
+
|
|
721
743
|
For each video, in the listed order, run steps 1 and 2; step 3 comes once
|
|
722
744
|
every video has started:
|
|
723
745
|
|
|
@@ -1021,6 +1043,11 @@ exodus video swipe sheet <swipeId> the saved sheet the se
|
|
|
1021
1043
|
no dashboard page shows it yet
|
|
1022
1044
|
exodus video swipe sheet set <swipeId> <row>=<value> ... change rows of the saved sheet, all or none; <row>= clears one (free)
|
|
1023
1045
|
exodus video swipe sheet price <swipeId> the video's price at the saved sheet's rows and at each size and takes (free)
|
|
1046
|
+
exodus video swipe sheet people <swipeId> [--count <n>] [--yes --max-usd <n>]
|
|
1047
|
+
new people to pick from (paid on the member's keys: the
|
|
1048
|
+
price first, --yes with its most makes them); who=<n> picks one
|
|
1049
|
+
exodus video swipe sheet voices <swipeId> the account's voices that fit the person, then the member's
|
|
1050
|
+
own, each with a sample (free); voice=<n> picks one
|
|
1024
1051
|
exodus video swipe run --sheet <file> [--status] [--persona <name>] [--yes] [--retry-refused] [--wait] every video of a sheet saved as a JSON file
|
|
1025
1052
|
```
|
|
1026
1053
|
|
|
@@ -6793,7 +6793,7 @@ export function firstCut({ dir, out: outOpt, skip = new Set(), music: musicOn =
|
|
|
6793
6793
|
if (finish && (finish.captions || finish.cards || endLayers) && !stagedText) {
|
|
6794
6794
|
if (hasFilter("subtitles")) {
|
|
6795
6795
|
ass = "edit.ass";
|
|
6796
|
-
const cap = sourceAd?.captions ?? null;
|
|
6796
|
+
const cap = sourceAd?.captions ?? manifest.sheetCaptions ?? null;
|
|
6797
6797
|
const screens = captionsBeforeEndCard(!finish.captions
|
|
6798
6798
|
? []
|
|
6799
6799
|
: finish.captionsByLine
|
|
@@ -9,6 +9,7 @@ export declare const SWIPES_PATH = "/api/v2/video/swipes";
|
|
|
9
9
|
export declare const SWIPE_RUNS_PATH = "/api/v2/video/swipe-runs";
|
|
10
10
|
export declare const SWIPE_SHEET_PATH = "/api/v2/video/swipe-sheet";
|
|
11
11
|
export declare const SWIPE_SHEET_PRICE_PATH = "/api/v2/video/swipe-sheet-price";
|
|
12
|
+
export declare const SWIPE_SHEET_OPTIONS_PATH = "/api/v2/video/swipe-sheet/options";
|
|
12
13
|
export declare const SWIPE_LIBRARY_PATH = "/api/v2/swipe-library";
|
|
13
14
|
export interface SwipeBreakdown {
|
|
14
15
|
_id: string;
|
|
@@ -216,10 +217,20 @@ export interface SavedSheetRow {
|
|
|
216
217
|
options: Array<{
|
|
217
218
|
id: string;
|
|
218
219
|
label: string;
|
|
220
|
+
pictureUrl?: string;
|
|
221
|
+
sampleUrl?: string;
|
|
219
222
|
}> | null;
|
|
220
223
|
optionsCostUsd: number | null;
|
|
221
224
|
usedBy: string | null;
|
|
222
225
|
readOnly: boolean;
|
|
226
|
+
optionsStatus?: {
|
|
227
|
+
making: boolean;
|
|
228
|
+
sentence: string;
|
|
229
|
+
spentUsd?: number;
|
|
230
|
+
asksLeft?: number;
|
|
231
|
+
failed?: boolean;
|
|
232
|
+
noneYet?: boolean;
|
|
233
|
+
};
|
|
223
234
|
}
|
|
224
235
|
export interface SavedSheet {
|
|
225
236
|
swipeId: string;
|
|
@@ -236,6 +247,7 @@ export interface SavedSheet {
|
|
|
236
247
|
rows: SavedSheetRow[];
|
|
237
248
|
}>;
|
|
238
249
|
startRefusal?: string;
|
|
250
|
+
notice?: string;
|
|
239
251
|
}
|
|
240
252
|
export type SwipePriceRow = {
|
|
241
253
|
size: string;
|
|
@@ -386,6 +398,16 @@ export type SwipePlan = {
|
|
|
386
398
|
kind: "sheet-price";
|
|
387
399
|
swipeId: string;
|
|
388
400
|
opts: SwipeOpts;
|
|
401
|
+
} | {
|
|
402
|
+
kind: "sheet-people";
|
|
403
|
+
swipeId: string;
|
|
404
|
+
count: number | null;
|
|
405
|
+
maxUsd: number | null;
|
|
406
|
+
opts: SwipeOpts;
|
|
407
|
+
} | {
|
|
408
|
+
kind: "sheet-voices";
|
|
409
|
+
swipeId: string;
|
|
410
|
+
opts: SwipeOpts;
|
|
389
411
|
} | {
|
|
390
412
|
kind: "run";
|
|
391
413
|
sheetFile: string;
|
|
@@ -398,6 +420,7 @@ export declare function parseSwipeMode(value: string): ServerMode | null;
|
|
|
398
420
|
export declare function parseCloseness(value: string): number | null;
|
|
399
421
|
export declare function planSwipeCommand(rest: string[], occurrences: FlagOccurrence[]): SwipePlan;
|
|
400
422
|
export declare const SHEET_ROW_ID: RegExp;
|
|
423
|
+
export declare const SHEET_PEOPLE_MOST = 8;
|
|
401
424
|
export interface ChoiceWords {
|
|
402
425
|
who: string;
|
|
403
426
|
flag: (name: string) => string;
|
|
@@ -483,6 +506,8 @@ export declare function swipeSheetReadFlow(swipeId: string, opts: SwipeOpts, dep
|
|
|
483
506
|
export declare function swipeSheetSetFlow(swipeId: string, picks: Record<string, string | null>, opts: SwipeOpts, deps: VideoDeps): Promise<FlowResult>;
|
|
484
507
|
export declare function priceLines(price: SwipePrice, dashboardUrl: string): string[];
|
|
485
508
|
export declare function swipeSheetPriceFlow(swipeId: string, opts: SwipeOpts, deps: VideoDeps): Promise<FlowResult>;
|
|
509
|
+
export declare function swipeSheetPeopleFlow(swipeId: string, count: number | null, maxUsd: number | null, opts: SwipeRunOptions, deps: VideoDeps): Promise<FlowResult>;
|
|
510
|
+
export declare function swipeSheetVoicesFlow(swipeId: string, opts: SwipeOpts, deps: VideoDeps): Promise<FlowResult>;
|
|
486
511
|
export declare const SWIPE_ALREADY_STARTED_CODE = "SWIPE_ALREADY_STARTED";
|
|
487
512
|
export declare function alreadyStartedOf(res: ApiResponse<unknown>): {
|
|
488
513
|
runId: string;
|
|
@@ -14,6 +14,7 @@ export const SWIPES_PATH = "/api/v2/video/swipes";
|
|
|
14
14
|
export const SWIPE_RUNS_PATH = "/api/v2/video/swipe-runs";
|
|
15
15
|
export const SWIPE_SHEET_PATH = "/api/v2/video/swipe-sheet";
|
|
16
16
|
export const SWIPE_SHEET_PRICE_PATH = "/api/v2/video/swipe-sheet-price";
|
|
17
|
+
export const SWIPE_SHEET_OPTIONS_PATH = "/api/v2/video/swipe-sheet/options";
|
|
17
18
|
export const SWIPE_LIBRARY_PATH = "/api/v2/swipe-library";
|
|
18
19
|
export const SWIPE_MODES = [
|
|
19
20
|
{ flag: "whole-ad", mode: "whole", label: "Whole ad", helper: "Every part of their ad, rewritten for your brand." },
|
|
@@ -241,17 +242,61 @@ export function planSwipeCommand(rest, occurrences) {
|
|
|
241
242
|
export const SHEET_ROW_ID = /^[A-Za-z][A-Za-z0-9-]{0,63}$/;
|
|
242
243
|
const SHEET_SET_LINE = 'exodus video swipe sheet set <swipeId> <row>=<value> [<row>=<value> ...]';
|
|
243
244
|
const SHEET_PRICE_LINE = "exodus video swipe sheet price <swipeId>";
|
|
245
|
+
const SHEET_PEOPLE_LINE = "exodus video swipe sheet people <swipeId> [--count <n>] [--yes --max-usd <n>] [--wait] [--json]";
|
|
246
|
+
export const SHEET_PEOPLE_MOST = 8;
|
|
244
247
|
function planSheet(words, occurrences, opts) {
|
|
245
248
|
const usage = (line) => ({ kind: "usage", line });
|
|
246
249
|
const typedFlag = (names) => occurrences.find((o) => names.some((name) => o.flag === name || o.flag === `no-${name}`))?.flag;
|
|
250
|
+
const switchWords = new Set(occurrences.filter((o) => ["json", "yes", "wait"].includes(o.flag) && o.value !== undefined).map((o) => o.value));
|
|
251
|
+
const given = words.filter((word) => !(switchWords.has(word) && (ON_WORDS.has(word.toLowerCase()) || OFF_WORDS.has(word.toLowerCase()))));
|
|
252
|
+
if (given[0] === "people") {
|
|
253
|
+
const other = typedFlag([
|
|
254
|
+
...FIND_PAID_FLAGS.filter((flag) => flag !== "yes" && flag !== "wait"),
|
|
255
|
+
...FIND_OTHER_FLAGS.filter((flag) => flag !== "max-usd"),
|
|
256
|
+
"brand",
|
|
257
|
+
"limit",
|
|
258
|
+
]);
|
|
259
|
+
if (other)
|
|
260
|
+
return usage(`video swipe sheet people takes no --${other}. Its flags: --count, --yes, --max-usd, --wait, --json.`);
|
|
261
|
+
const [, swipeId, ...extra] = given;
|
|
262
|
+
if (!swipeId)
|
|
263
|
+
return usage(`video swipe sheet people needs a swipe id: ${SHEET_PEOPLE_LINE}`);
|
|
264
|
+
if (extra.length > 0)
|
|
265
|
+
return usage(`video swipe sheet people takes one swipe id (got "${extra[0]}"): ${SHEET_PEOPLE_LINE}`);
|
|
266
|
+
const typed = occurrences.filter((o) => o.flag === "count").at(-1);
|
|
267
|
+
let count = null;
|
|
268
|
+
if (typed) {
|
|
269
|
+
const n = typed.value !== undefined && /^\d+$/.test(typed.value.trim()) ? Number(typed.value.trim()) : Number.NaN;
|
|
270
|
+
if (!(n >= 1 && n <= SHEET_PEOPLE_MOST))
|
|
271
|
+
return usage(`video swipe sheet people --count takes 1 to ${SHEET_PEOPLE_MOST} (got "${typed.value ?? ""}").`);
|
|
272
|
+
count = n;
|
|
273
|
+
}
|
|
274
|
+
if (opts.wait && !opts.yes)
|
|
275
|
+
return usage("video swipe sheet people --wait waits for people being made: give it with --yes, after the price.");
|
|
276
|
+
const most = occurrences.filter((o) => o.flag === "max-usd").at(-1);
|
|
277
|
+
let maxUsd = null;
|
|
278
|
+
if (most) {
|
|
279
|
+
const n = most.value !== undefined && /^\d+(\.\d+)?$/.test(most.value.trim()) ? Number(most.value.trim()) : Number.NaN;
|
|
280
|
+
if (!Number.isFinite(n))
|
|
281
|
+
return usage(`video swipe sheet people --max-usd takes the price's most in dollars, such as 0.95 (got "${most.value ?? ""}").`);
|
|
282
|
+
maxUsd = n;
|
|
283
|
+
}
|
|
284
|
+
if (opts.yes && maxUsd === null) {
|
|
285
|
+
return usage("video swipe sheet people --yes needs --max-usd <n>, the most the price said. Run it without --yes first to read the price.");
|
|
286
|
+
}
|
|
287
|
+
if (maxUsd !== null && !opts.yes)
|
|
288
|
+
return usage("video swipe sheet people --max-usd goes with --yes, after the price.");
|
|
289
|
+
return { kind: "sheet-people", swipeId, count, maxUsd, opts };
|
|
290
|
+
}
|
|
291
|
+
const peopleOnly = typedFlag(["count"]);
|
|
292
|
+
if (peopleOnly)
|
|
293
|
+
return usage(`Only video swipe sheet people takes --${peopleOnly}.`);
|
|
247
294
|
const paid = typedFlag(FIND_PAID_FLAGS);
|
|
248
295
|
if (paid)
|
|
249
296
|
return usage(`video swipe sheet is free and buys nothing, so it takes no --${paid}. Its only flag is --json.`);
|
|
250
297
|
const other = typedFlag([...FIND_OTHER_FLAGS, "brand", "limit"]);
|
|
251
298
|
if (other)
|
|
252
299
|
return usage(`video swipe sheet takes no --${other}. Its only flag is --json.`);
|
|
253
|
-
const switchWords = new Set(occurrences.filter((o) => o.flag === "json" && o.value !== undefined).map((o) => o.value));
|
|
254
|
-
const given = words.filter((word) => !(switchWords.has(word) && (ON_WORDS.has(word.toLowerCase()) || OFF_WORDS.has(word.toLowerCase()))));
|
|
255
300
|
if (given[0] === "price") {
|
|
256
301
|
const [, swipeId, ...extra] = given;
|
|
257
302
|
if (!swipeId)
|
|
@@ -260,6 +305,14 @@ function planSheet(words, occurrences, opts) {
|
|
|
260
305
|
return usage(`video swipe sheet price takes one swipe id (got "${extra[0]}"): ${SHEET_PRICE_LINE}`);
|
|
261
306
|
return { kind: "sheet-price", swipeId, opts };
|
|
262
307
|
}
|
|
308
|
+
if (given[0] === "voices") {
|
|
309
|
+
const [, swipeId, ...extra] = given;
|
|
310
|
+
if (!swipeId)
|
|
311
|
+
return usage("video swipe sheet voices needs a swipe id: exodus video swipe sheet voices <swipeId> [--json]");
|
|
312
|
+
if (extra.length > 0)
|
|
313
|
+
return usage(`video swipe sheet voices takes one swipe id (got "${extra[0]}").`);
|
|
314
|
+
return { kind: "sheet-voices", swipeId, opts };
|
|
315
|
+
}
|
|
263
316
|
if (given[0] !== "set") {
|
|
264
317
|
const [swipeId, ...extra] = given;
|
|
265
318
|
if (!swipeId)
|
|
@@ -1132,6 +1185,30 @@ function sheetOf(data) {
|
|
|
1132
1185
|
return null;
|
|
1133
1186
|
return { sheet: data.sheet, dashboardUrl: typeof data.dashboardUrl === "string" ? data.dashboardUrl : "" };
|
|
1134
1187
|
}
|
|
1188
|
+
function optionLines(row, above, swipeId) {
|
|
1189
|
+
const lines = [];
|
|
1190
|
+
if (row.options === null)
|
|
1191
|
+
return lines;
|
|
1192
|
+
const options = row.options;
|
|
1193
|
+
const addressed = options.some((option) => option.pictureUrl || option.sampleUrl);
|
|
1194
|
+
if (addressed) {
|
|
1195
|
+
for (const option of options) {
|
|
1196
|
+
const address = option.pictureUrl ? `picture: ${option.pictureUrl}` : option.sampleUrl ? `sample: ${option.sampleUrl}` : "";
|
|
1197
|
+
lines.push(` ${option.id}: ${option.label}${address ? ` ${address}` : ""}`);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
else if (options.length > 0 || !row.optionsStatus) {
|
|
1201
|
+
const cost = row.optionsCostUsd ? ` (showing them costs ${usd(row.optionsCostUsd)})` : "";
|
|
1202
|
+
const none = above ? `none until ${above.label.toLowerCase().replace(/^the /, "a ")} is set` : "none";
|
|
1203
|
+
const shown = options.length > 0 ? options.map((option) => `${option.id} (${option.label})`).join(", ") : none;
|
|
1204
|
+
lines.push(` options${cost}: ${shown}`);
|
|
1205
|
+
}
|
|
1206
|
+
if (row.optionsStatus?.sentence)
|
|
1207
|
+
lines.push(` ${row.optionsStatus.sentence}`);
|
|
1208
|
+
if (row.id === "who" && row.optionsStatus?.noneYet)
|
|
1209
|
+
lines.push(` See the price (free): exodus video swipe sheet people ${swipeId}`);
|
|
1210
|
+
return lines;
|
|
1211
|
+
}
|
|
1135
1212
|
export function sheetLines(sheet, dashboardUrl) {
|
|
1136
1213
|
const { swipeId } = sheet;
|
|
1137
1214
|
const page = dashboardUrl ? [`The swipe on the dashboard: ${dashboardUrl}`] : [];
|
|
@@ -1147,14 +1224,14 @@ export function sheetLines(sheet, dashboardUrl) {
|
|
|
1147
1224
|
for (const section of sheet.sections) {
|
|
1148
1225
|
lines.push("", section.label);
|
|
1149
1226
|
for (const row of section.rows) {
|
|
1150
|
-
const
|
|
1227
|
+
const picked = typeof row.value === "number" ? row.options?.find((option) => option.id === String(row.value)) : undefined;
|
|
1228
|
+
const value = row.value === null ? "not set" : picked ? `${row.value} (${picked.label})` : String(row.value);
|
|
1151
1229
|
lines.push(` ${row.id}${row.readOnly ? ", read only" : ""}: ${value}`);
|
|
1152
1230
|
if (row.from)
|
|
1153
1231
|
lines.push(` ${FROM_WORDS[row.from]}${row.why ? `: ${row.why}` : ""}`);
|
|
1154
|
-
if (row.
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
}
|
|
1232
|
+
else if (row.why)
|
|
1233
|
+
lines.push(` ${row.why}`);
|
|
1234
|
+
lines.push(...optionLines(row, section.rows[section.rows.indexOf(row) - 1], swipeId));
|
|
1158
1235
|
lines.push(` ${row.usedBy ? `read by: ${row.usedBy}` : "no step reads it yet"}`);
|
|
1159
1236
|
}
|
|
1160
1237
|
}
|
|
@@ -1208,6 +1285,8 @@ export async function swipeSheetSetFlow(swipeId, picks, opts, deps) {
|
|
|
1208
1285
|
const set = Object.keys(picks).filter((row) => picks[row] !== null);
|
|
1209
1286
|
const cleared = Object.keys(picks).filter((row) => picks[row] === null);
|
|
1210
1287
|
const said = [...(set.length > 0 ? [`Saved ${set.join(", ")}.`] : []), ...(cleared.length > 0 ? [`Cleared ${cleared.join(", ")}.`] : [])];
|
|
1288
|
+
if (read.sheet.notice)
|
|
1289
|
+
said.push(read.sheet.notice);
|
|
1211
1290
|
return { code: 0, lines: [said.join(" "), "", ...sheetLines(read.sheet, read.dashboardUrl)] };
|
|
1212
1291
|
}
|
|
1213
1292
|
function priceOf(data) {
|
|
@@ -1320,6 +1399,96 @@ async function startNeedsYes(swipeId, step, json, again, choice, deps) {
|
|
|
1320
1399
|
],
|
|
1321
1400
|
};
|
|
1322
1401
|
}
|
|
1402
|
+
function optionsAnswerOf(data) {
|
|
1403
|
+
const read = sheetOf(data);
|
|
1404
|
+
if (!read || !isRecord(data) || (data.row !== "who" && data.row !== "voice"))
|
|
1405
|
+
return null;
|
|
1406
|
+
return { ...data, sheet: read.sheet, dashboardUrl: read.dashboardUrl };
|
|
1407
|
+
}
|
|
1408
|
+
const rowOfSheet = (sheet, id) => sheet.sections.flatMap((section) => section.rows).find((row) => row.id === id);
|
|
1409
|
+
function peopleLines(sheet) {
|
|
1410
|
+
const row = rowOfSheet(sheet, "who");
|
|
1411
|
+
return (row?.options ?? []).map((option) => ` ${option.id}: ${option.label}${option.pictureUrl ? ` picture: ${option.pictureUrl}` : ""}`);
|
|
1412
|
+
}
|
|
1413
|
+
const PEOPLE_WAIT_POLLS = (45 * 60_000) / POLL_MS;
|
|
1414
|
+
const mostShown = (mostUsd) => (Math.ceil(Math.round(mostUsd * 100_000) / 1000) / 100).toFixed(2);
|
|
1415
|
+
export async function swipeSheetPeopleFlow(swipeId, count, maxUsd, opts, deps) {
|
|
1416
|
+
const again = `exodus video swipe sheet people ${swipeId}${count !== null ? ` --count ${count}` : ""}`;
|
|
1417
|
+
let res;
|
|
1418
|
+
try {
|
|
1419
|
+
res = await deps.post(SWIPE_SHEET_OPTIONS_PATH, {
|
|
1420
|
+
swipeId,
|
|
1421
|
+
row: "who",
|
|
1422
|
+
...(count !== null ? { count } : {}),
|
|
1423
|
+
...(opts.yes ? { yes: true } : {}),
|
|
1424
|
+
...(maxUsd !== null ? { mostUsd: maxUsd } : {}),
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
catch (err) {
|
|
1428
|
+
const error = `The server could not be reached: ${describeFetchFailure(err)}.`;
|
|
1429
|
+
const look = opts.yes ? `Whether they are being made is not known. Read the sheet before asking again: exodus video swipe sheet ${swipeId}` : "Nothing was made.";
|
|
1430
|
+
return { code: 1, lines: opts.json ? [JSON.stringify({ ok: false, error, started: opts.yes ? "unknown" : false })] : [error, look] };
|
|
1431
|
+
}
|
|
1432
|
+
if (!res.ok) {
|
|
1433
|
+
if (res.status === 404)
|
|
1434
|
+
return swipeError(res, opts.json);
|
|
1435
|
+
const error = swipeErrorLine(res);
|
|
1436
|
+
const refused = res.status >= 400 && res.status < 500;
|
|
1437
|
+
const look = refused ? "Nothing was made." : `Whether they are being made is not known. Read the sheet before asking again: exodus video swipe sheet ${swipeId}`;
|
|
1438
|
+
return { code: 1, lines: opts.json ? [JSON.stringify({ ok: false, status: res.status, error, started: refused ? false : "unknown" })] : [error, look] };
|
|
1439
|
+
}
|
|
1440
|
+
const answer = optionsAnswerOf(res.data);
|
|
1441
|
+
if (!answer?.price)
|
|
1442
|
+
return failed(`The server's answer about these people could not be read. Read the sheet: exodus video swipe sheet ${swipeId}`, opts.json);
|
|
1443
|
+
if (!answer.started) {
|
|
1444
|
+
if (opts.json)
|
|
1445
|
+
return { code: 0, lines: [JSON.stringify({ ok: true, started: false, price: answer.price, refusal: answer.refusal ?? null })] };
|
|
1446
|
+
const most = mostShown(answer.price.mostUsd);
|
|
1447
|
+
const next = answer.refusal
|
|
1448
|
+
? [answer.refusal]
|
|
1449
|
+
: [`Make them (paid, on your keys, at most $${most}): ${again} --yes --max-usd ${most}`];
|
|
1450
|
+
return { code: 0, lines: [...answer.price.lines, "Nothing was made or paid yet.", ...next] };
|
|
1451
|
+
}
|
|
1452
|
+
const ids = answer.ids ?? [];
|
|
1453
|
+
const head = [
|
|
1454
|
+
`Making ${ids.length === 1 ? "1 new person" : `${ids.length} new people`}, numbers ${ids.join(", ")}, at most $${mostShown(answer.price.mostUsd)} on your keys.`,
|
|
1455
|
+
];
|
|
1456
|
+
if (!opts.wait) {
|
|
1457
|
+
const lines = [...head, `See them as they are made: exodus video swipe sheet ${swipeId}`, `Pick one: exodus video swipe sheet set ${swipeId} who=<n>`];
|
|
1458
|
+
return { code: 0, lines: opts.json ? [JSON.stringify({ ok: true, started: true, ids, price: answer.price, sheet: answer.sheet, dashboardUrl: answer.dashboardUrl })] : lines };
|
|
1459
|
+
}
|
|
1460
|
+
const out = progress(opts);
|
|
1461
|
+
for (const line of head)
|
|
1462
|
+
out.say(line);
|
|
1463
|
+
const ended = await poll(() => deps.get(`${SWIPE_SHEET_PATH}?id=${encodeURIComponent(swipeId)}`), (read) => {
|
|
1464
|
+
if (!read.ok)
|
|
1465
|
+
return { done: { refused: read } };
|
|
1466
|
+
const sheet = sheetOf(read.data);
|
|
1467
|
+
if (!sheet)
|
|
1468
|
+
return null;
|
|
1469
|
+
return rowOfSheet(sheet.sheet, "who")?.optionsStatus?.making === true ? null : { done: sheet };
|
|
1470
|
+
}, PEOPLE_WAIT_POLLS, deps);
|
|
1471
|
+
const stillGoing = `They may still be made: exodus video swipe sheet ${swipeId}`;
|
|
1472
|
+
if ("lost" in ended)
|
|
1473
|
+
return failed(`${LOST} ${stillGoing}`, opts.json);
|
|
1474
|
+
if ("timedOut" in ended)
|
|
1475
|
+
return failed(`The people are still being made. ${stillGoing}`, opts.json);
|
|
1476
|
+
if ("refused" in ended.done)
|
|
1477
|
+
return waitRefused(ended.done.refused, stillGoing, opts.json);
|
|
1478
|
+
const { sheet, dashboardUrl } = ended.done;
|
|
1479
|
+
const status = rowOfSheet(sheet, "who")?.optionsStatus;
|
|
1480
|
+
if (opts.json)
|
|
1481
|
+
return { code: 0, lines: [JSON.stringify({ ok: true, started: true, ids, status: status ?? null, sheet, dashboardUrl })] };
|
|
1482
|
+
const people = peopleLines(sheet);
|
|
1483
|
+
return {
|
|
1484
|
+
code: status?.failed ? 1 : 0,
|
|
1485
|
+
lines: [
|
|
1486
|
+
...out.kept,
|
|
1487
|
+
...(status?.sentence ? [status.sentence] : []),
|
|
1488
|
+
...(people.length > 0 ? ["People to pick from:", ...people, `Pick one: exodus video swipe sheet set ${swipeId} who=<n>`] : []),
|
|
1489
|
+
],
|
|
1490
|
+
};
|
|
1491
|
+
}
|
|
1323
1492
|
async function maxUsdUnsupported(swipeId, maxUsd, deps) {
|
|
1324
1493
|
const cannot = `so it can't hold this start to ${usd(maxUsd)}, and nothing was started.`;
|
|
1325
1494
|
try {
|
|
@@ -1330,6 +1499,26 @@ async function maxUsdUnsupported(swipeId, maxUsd, deps) {
|
|
|
1330
1499
|
return `The server could not be asked whether it holds a start to a price, ${cannot}`;
|
|
1331
1500
|
}
|
|
1332
1501
|
}
|
|
1502
|
+
export async function swipeSheetVoicesFlow(swipeId, opts, deps) {
|
|
1503
|
+
const res = await deps.post(SWIPE_SHEET_OPTIONS_PATH, { swipeId, row: "voice" });
|
|
1504
|
+
if (!res.ok)
|
|
1505
|
+
return swipeError(res, opts.json);
|
|
1506
|
+
const answer = optionsAnswerOf(res.data);
|
|
1507
|
+
if (!answer)
|
|
1508
|
+
return failed(`The server's answer about the voices could not be read. Read the sheet: exodus video swipe sheet ${swipeId}`, opts.json);
|
|
1509
|
+
const row = rowOfSheet(answer.sheet, "voice");
|
|
1510
|
+
if (opts.json)
|
|
1511
|
+
return { code: 0, lines: [JSON.stringify({ ok: true, voices: row?.options ?? [], status: row?.optionsStatus ?? null, sheet: answer.sheet, dashboardUrl: answer.dashboardUrl })] };
|
|
1512
|
+
const voices = (row?.options ?? []).map((option) => ` ${option.id}: ${option.label}${option.sampleUrl ? ` sample: ${option.sampleUrl}` : ""}`);
|
|
1513
|
+
return {
|
|
1514
|
+
code: 0,
|
|
1515
|
+
lines: [
|
|
1516
|
+
...(row?.optionsStatus?.sentence ? [row.optionsStatus.sentence] : []),
|
|
1517
|
+
...voices,
|
|
1518
|
+
...(voices.length > 0 ? [`Pick one (free): exodus video swipe sheet set ${swipeId} voice=<n>. The video is then filmed in that voice.`] : []),
|
|
1519
|
+
],
|
|
1520
|
+
};
|
|
1521
|
+
}
|
|
1333
1522
|
export const SWIPE_ALREADY_STARTED_CODE = "SWIPE_ALREADY_STARTED";
|
|
1334
1523
|
export function alreadyStartedOf(res) {
|
|
1335
1524
|
if (res.ok || res.status !== 409 || !isRecord(res.data) || !isRecord(res.data.error))
|
|
@@ -3126,6 +3315,10 @@ export async function runSwipePlan(plan, deps, onProgressLine) {
|
|
|
3126
3315
|
return swipeSheetSetFlow(plan.swipeId, plan.picks, opts, deps);
|
|
3127
3316
|
case "sheet-price":
|
|
3128
3317
|
return swipeSheetPriceFlow(plan.swipeId, opts, deps);
|
|
3318
|
+
case "sheet-people":
|
|
3319
|
+
return swipeSheetPeopleFlow(plan.swipeId, plan.count, plan.maxUsd, opts, deps);
|
|
3320
|
+
case "sheet-voices":
|
|
3321
|
+
return swipeSheetVoicesFlow(plan.swipeId, opts, deps);
|
|
3129
3322
|
case "run":
|
|
3130
3323
|
return swipeSheetFlow(plan.sheetFile, { ...opts, retryRefused: plan.retryRefused, status: plan.status, persona: plan.persona }, deps);
|
|
3131
3324
|
}
|
package/dist/commands/video.js
CHANGED
|
@@ -210,6 +210,8 @@ Usage:
|
|
|
210
210
|
exodus video swipe sheet <swipeId> [--json]
|
|
211
211
|
exodus video swipe sheet set <swipeId> <row>=<value> [<row>=<value> ...] [--json]
|
|
212
212
|
exodus video swipe sheet price <swipeId> [--json]
|
|
213
|
+
exodus video swipe sheet people <swipeId> [--count <n>] [--yes --max-usd <n>] [--wait] [--json]
|
|
214
|
+
exodus video swipe sheet voices <swipeId> [--json]
|
|
213
215
|
|
|
214
216
|
Options:
|
|
215
217
|
--out <dir> Folder to write the pulled pieces into (pull)
|
|
@@ -535,6 +537,15 @@ to set. swipe sheet price <swipeId> is free: the price of the video at the
|
|
|
535
537
|
sheet's rows and at each size and takes, with the most it can cost. swipe
|
|
536
538
|
start --max-usd <n> holds the start to the most a price showed: a start that
|
|
537
539
|
can now cost more is refused, and nothing is started.
|
|
540
|
+
swipe sheet people is paid, on the member's own keys: new people to pick from
|
|
541
|
+
for the person row, each one or two short text calls on their model key and one
|
|
542
|
+
face picture on their Kie key. Without --yes it says the price and what it buys
|
|
543
|
+
and makes nothing; --yes --max-usd <the price's most> makes them (--count 1 to
|
|
544
|
+
8, 4 by default), --wait waits for them. Each is shown with their picture's
|
|
545
|
+
address; who=<n> picks one, and the video is then filmed with that person and
|
|
546
|
+
that face. swipe sheet voices is free: the catalog voices on the member's
|
|
547
|
+
ElevenLabs account that fit the person, then their own voices, each with its
|
|
548
|
+
sample's address; voice=<n> picks one, and the video is filmed in it.
|
|
538
549
|
The template picks the kind of ad: swipe template prints it and its look, so
|
|
539
550
|
ask the member before the write. A swipe run has no picks stop and no pilot
|
|
540
551
|
clip; it stops at the storyboard unless --one-shot. --wait on swipe and swipe
|
|
@@ -6108,6 +6119,7 @@ const VALUE_FLAGS = new Set([
|
|
|
6108
6119
|
const FIND_VALUE_FLAGS = new Set(["brand", "limit"]);
|
|
6109
6120
|
const WRITE_VALUE_FLAGS = new Set(["kind"]);
|
|
6110
6121
|
const START_VALUE_FLAGS = new Set(["max-usd"]);
|
|
6122
|
+
const SHEET_PEOPLE_VALUE_FLAGS = new Set(["count", "max-usd"]);
|
|
6111
6123
|
export function parsePositional(args = process.argv.slice(3)) {
|
|
6112
6124
|
const read = (valueFlags) => {
|
|
6113
6125
|
const out = [];
|
|
@@ -6136,6 +6148,9 @@ export function parsePositional(args = process.argv.slice(3)) {
|
|
|
6136
6148
|
const asStart = read(START_VALUE_FLAGS);
|
|
6137
6149
|
if (asStart[0] === "swipe" && asStart[1] === "start")
|
|
6138
6150
|
return asStart;
|
|
6151
|
+
const asPeople = read(SHEET_PEOPLE_VALUE_FLAGS);
|
|
6152
|
+
if (asPeople[0] === "swipe" && asPeople[1] === "sheet" && asPeople[2] === "people")
|
|
6153
|
+
return asPeople;
|
|
6139
6154
|
return read(new Set());
|
|
6140
6155
|
}
|
|
6141
6156
|
function flagString(flags, name) {
|