@funnelsgrove/cli 0.1.358 → 0.1.361
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/creativeCommands.d.ts +249 -3
- package/dist/creativeCommands.js +441 -10
- package/funnel-contract-compatibility.json +28 -28
- package/package.json +1 -1
- package/template_docs/.funnelsgrove-docs.json +3 -3
- package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_docs/funnel-docs.config.json +1 -1
- package/template_scaffold/.funnelsgrove-docs.json +3 -3
- package/template_scaffold/.funnelsgrove-scaffold.json +5 -5
- package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_scaffold/funnel-docs.config.json +1 -1
|
@@ -196,7 +196,7 @@ export type GenerationDetail = {
|
|
|
196
196
|
};
|
|
197
197
|
/** `--wait` stops at a finished Generation or at the keyframe approval stop. */
|
|
198
198
|
export declare const GENERATION_WAIT_STOP: string[];
|
|
199
|
-
/** The agent-facing view of a Generation: status, credits
|
|
199
|
+
/** The agent-facing view of a Generation: status, credits, every output's URLs and its soft QA findings. */
|
|
200
200
|
export declare const summarizeGeneration: ({ generation, outputs }: GenerationDetail) => {
|
|
201
201
|
id: string;
|
|
202
202
|
status: string;
|
|
@@ -222,7 +222,9 @@ export declare const summarizeGeneration: ({ generation, outputs }: GenerationDe
|
|
|
222
222
|
}[] | {
|
|
223
223
|
url: string;
|
|
224
224
|
}[];
|
|
225
|
-
softFindings:
|
|
225
|
+
softFindings: {
|
|
226
|
+
[k: string]: unknown;
|
|
227
|
+
}[];
|
|
226
228
|
error: string | null;
|
|
227
229
|
keptVariationId: string | null;
|
|
228
230
|
}[];
|
|
@@ -259,6 +261,11 @@ type GenerateOptions = {
|
|
|
259
261
|
texts?: string;
|
|
260
262
|
swap?: string;
|
|
261
263
|
pack?: string;
|
|
264
|
+
captions?: string;
|
|
265
|
+
formats?: string;
|
|
266
|
+
variants?: string;
|
|
267
|
+
persuasionAngle?: string;
|
|
268
|
+
pain?: string;
|
|
262
269
|
};
|
|
263
270
|
export type RemixSlot = {
|
|
264
271
|
id: string;
|
|
@@ -282,6 +289,12 @@ export type ReferenceLayout = {
|
|
|
282
289
|
plate_url: string | null;
|
|
283
290
|
source_variation_name: string | null;
|
|
284
291
|
slots: RemixSlot[];
|
|
292
|
+
plate_warnings?: {
|
|
293
|
+
code: string;
|
|
294
|
+
message: string;
|
|
295
|
+
slotId?: string;
|
|
296
|
+
text?: string;
|
|
297
|
+
}[];
|
|
285
298
|
[key: string]: unknown;
|
|
286
299
|
};
|
|
287
300
|
/** `remix show`: the layout an agent edits, with a text set of the words it draws to copy into a texts file. */
|
|
@@ -295,6 +308,12 @@ export declare const summarizeLayout: (layout: ReferenceLayout) => {
|
|
|
295
308
|
sourceVariation: string | null;
|
|
296
309
|
sourceUrl: string;
|
|
297
310
|
plateUrl: string | null;
|
|
311
|
+
plateWarnings: {
|
|
312
|
+
code: string;
|
|
313
|
+
message: string;
|
|
314
|
+
slotId?: string;
|
|
315
|
+
text?: string;
|
|
316
|
+
}[];
|
|
298
317
|
slots: {
|
|
299
318
|
hidden: boolean;
|
|
300
319
|
added: boolean;
|
|
@@ -365,7 +384,234 @@ export declare const waitForLayout: (scope: CreativeScope, layoutId: string, opt
|
|
|
365
384
|
}) => Promise<ReferenceLayout>;
|
|
366
385
|
/** Builds the `startGeneration` input: a Brief id, or an inline Brief from the quick-create flags. */
|
|
367
386
|
export declare const generationRequest: (options: GenerateOptions, angles: Angle[]) => Record<string, unknown>;
|
|
368
|
-
|
|
387
|
+
export type FormatSlot = {
|
|
388
|
+
id: string;
|
|
389
|
+
label: string;
|
|
390
|
+
purpose: string;
|
|
391
|
+
maxLength: number;
|
|
392
|
+
required: boolean;
|
|
393
|
+
kind?: string;
|
|
394
|
+
items?: {
|
|
395
|
+
min: number;
|
|
396
|
+
max: number;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
export type FormatLayout = {
|
|
400
|
+
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
visual: string;
|
|
403
|
+
scenePrompt: string | null;
|
|
404
|
+
logo: boolean;
|
|
405
|
+
};
|
|
406
|
+
export type AdFormat = {
|
|
407
|
+
id: string;
|
|
408
|
+
name: string;
|
|
409
|
+
description: string;
|
|
410
|
+
whenToUse: string;
|
|
411
|
+
angles: string[];
|
|
412
|
+
slots: FormatSlot[];
|
|
413
|
+
layouts: FormatLayout[];
|
|
414
|
+
guardrails: string[];
|
|
415
|
+
sample: Record<string, unknown>;
|
|
416
|
+
sampleScene?: string;
|
|
417
|
+
};
|
|
418
|
+
/** One cell of a copy file: an Angle × a Format layout and its copy sets (the output of `formats copy`, edited). */
|
|
419
|
+
export type CopyFileCell = {
|
|
420
|
+
angle?: string;
|
|
421
|
+
angleId?: string;
|
|
422
|
+
format: string;
|
|
423
|
+
layout?: string | null;
|
|
424
|
+
persuasionAngle?: string | null;
|
|
425
|
+
textHook?: string | null;
|
|
426
|
+
visualHook?: string | null;
|
|
427
|
+
variants: {
|
|
428
|
+
copy: Record<string, unknown>;
|
|
429
|
+
scene?: string | null;
|
|
430
|
+
}[];
|
|
431
|
+
};
|
|
432
|
+
export type CopyFile = {
|
|
433
|
+
brand?: string;
|
|
434
|
+
sizes?: string[];
|
|
435
|
+
cells: CopyFileCell[];
|
|
436
|
+
};
|
|
437
|
+
/** `T4`, `T4:post-it` → a Format id and layout. */
|
|
438
|
+
export declare const parseFormatRefs: (value: string) => {
|
|
439
|
+
layoutId?: string | undefined;
|
|
440
|
+
formatId: string;
|
|
441
|
+
}[];
|
|
442
|
+
export declare const parseCopyFile: (json: unknown) => CopyFile;
|
|
443
|
+
/** The `startFormatBatch` input of a copy file: brand, sizes and pack from the flags or the file, cells with their copy and scenes only. */
|
|
444
|
+
export declare const formatBatchRequest: (file: CopyFile, angles: Angle[], options: {
|
|
445
|
+
brand?: string;
|
|
446
|
+
sizes?: string;
|
|
447
|
+
model?: string;
|
|
448
|
+
quality?: string;
|
|
449
|
+
}) => {
|
|
450
|
+
cells: {
|
|
451
|
+
persuasionAngle: string | null;
|
|
452
|
+
textHook: string | null;
|
|
453
|
+
visualHook: string | null;
|
|
454
|
+
variants: {
|
|
455
|
+
copy: Record<string, unknown>;
|
|
456
|
+
scene: string | null;
|
|
457
|
+
}[];
|
|
458
|
+
layoutId?: string | undefined;
|
|
459
|
+
angleId: string;
|
|
460
|
+
formatId: string;
|
|
461
|
+
}[];
|
|
462
|
+
quality?: string | undefined;
|
|
463
|
+
model?: string | undefined;
|
|
464
|
+
sizes?: string[] | undefined;
|
|
465
|
+
brand: string;
|
|
466
|
+
};
|
|
467
|
+
type CopyAnswer = {
|
|
468
|
+
cells: {
|
|
469
|
+
angleId: string;
|
|
470
|
+
angleCode: string;
|
|
471
|
+
angleName: string;
|
|
472
|
+
formatId: string;
|
|
473
|
+
layoutId: string;
|
|
474
|
+
visual: string;
|
|
475
|
+
persuasionAngle: string;
|
|
476
|
+
textHook: string | null;
|
|
477
|
+
visualHook: string | null;
|
|
478
|
+
variants: {
|
|
479
|
+
copy: Record<string, unknown>;
|
|
480
|
+
scene: string | null;
|
|
481
|
+
issues: string[];
|
|
482
|
+
warnings: string[];
|
|
483
|
+
}[];
|
|
484
|
+
}[];
|
|
485
|
+
failed: unknown[];
|
|
486
|
+
credits: unknown;
|
|
487
|
+
};
|
|
488
|
+
/** The copy file `formats copy` writes: cells keyed by Angle code and Format, with each set's issues and warnings to fix before starting. */
|
|
489
|
+
export declare const copyFileOf: (answer: CopyAnswer, input: {
|
|
490
|
+
brand: string;
|
|
491
|
+
sizes?: string[];
|
|
492
|
+
}) => {
|
|
493
|
+
cells: {
|
|
494
|
+
angle: string;
|
|
495
|
+
angleId: string;
|
|
496
|
+
angleName: string;
|
|
497
|
+
format: string;
|
|
498
|
+
layout: string;
|
|
499
|
+
visual: string;
|
|
500
|
+
persuasionAngle: string;
|
|
501
|
+
textHook: string | null;
|
|
502
|
+
visualHook: string | null;
|
|
503
|
+
variants: {
|
|
504
|
+
copy: Record<string, unknown>;
|
|
505
|
+
scene: string | null;
|
|
506
|
+
issues: string[];
|
|
507
|
+
warnings: string[];
|
|
508
|
+
}[];
|
|
509
|
+
}[];
|
|
510
|
+
failed: unknown[];
|
|
511
|
+
credits: unknown;
|
|
512
|
+
ok: boolean;
|
|
513
|
+
sizes?: string[] | undefined;
|
|
514
|
+
brand: string;
|
|
515
|
+
};
|
|
516
|
+
/** A Format Generation as an agent judges it: its Format, Persuasion Angle and each image with its QA findings named. */
|
|
517
|
+
export declare const summarizeFormatGeneration: (detail: GenerationDetail & {
|
|
518
|
+
generation: {
|
|
519
|
+
format_id?: string | null;
|
|
520
|
+
persuasion_angle?: string | null;
|
|
521
|
+
angle_code?: string;
|
|
522
|
+
};
|
|
523
|
+
}) => {
|
|
524
|
+
angle: string | undefined;
|
|
525
|
+
format: string | null;
|
|
526
|
+
persuasionAngle: string | null;
|
|
527
|
+
id: string;
|
|
528
|
+
status: string;
|
|
529
|
+
kind: string;
|
|
530
|
+
model: string;
|
|
531
|
+
provider: string;
|
|
532
|
+
credits: {
|
|
533
|
+
reserved: number;
|
|
534
|
+
settled: number;
|
|
535
|
+
released: number;
|
|
536
|
+
};
|
|
537
|
+
coverUrl: string | null;
|
|
538
|
+
videoUrl: string | null;
|
|
539
|
+
error: string | null;
|
|
540
|
+
outputs: {
|
|
541
|
+
id: string;
|
|
542
|
+
role: string;
|
|
543
|
+
sceneIndex: number | null;
|
|
544
|
+
status: string;
|
|
545
|
+
urls: {
|
|
546
|
+
size: string;
|
|
547
|
+
url: string;
|
|
548
|
+
}[] | {
|
|
549
|
+
url: string;
|
|
550
|
+
}[];
|
|
551
|
+
softFindings: {
|
|
552
|
+
[k: string]: unknown;
|
|
553
|
+
}[];
|
|
554
|
+
error: string | null;
|
|
555
|
+
keptVariationId: string | null;
|
|
556
|
+
}[];
|
|
557
|
+
};
|
|
558
|
+
export type CaptionWordInput = {
|
|
559
|
+
text: string;
|
|
560
|
+
start: number;
|
|
561
|
+
end: number;
|
|
562
|
+
emphasis?: boolean;
|
|
563
|
+
emoji?: string | null;
|
|
564
|
+
};
|
|
565
|
+
/** A words file: the track JSON export, or a bare array of words. */
|
|
566
|
+
export declare const parseCaptionWords: (json: unknown) => {
|
|
567
|
+
language: string | null;
|
|
568
|
+
words: CaptionWordInput[];
|
|
569
|
+
};
|
|
570
|
+
/** Uploads a local video to caption and names it for the start request. */
|
|
571
|
+
export declare const uploadCaptionVideo: (scope: CreativeScope, file: string, fetchFn?: typeof fetch) => Promise<{
|
|
572
|
+
key: string;
|
|
573
|
+
sha256: string;
|
|
574
|
+
}>;
|
|
575
|
+
/** The caption document's words of a Generation, as `captions show` prints them: from the video output, else the transcript. */
|
|
576
|
+
export declare const summarizeCaptions: ({ generation, outputs }: GenerationDetail) => {
|
|
577
|
+
captions: {
|
|
578
|
+
styleId: string | null;
|
|
579
|
+
source: string;
|
|
580
|
+
language: string | null;
|
|
581
|
+
words: CaptionWordInput[];
|
|
582
|
+
editing: string;
|
|
583
|
+
} | null;
|
|
584
|
+
id: string;
|
|
585
|
+
status: string;
|
|
586
|
+
kind: string;
|
|
587
|
+
model: string;
|
|
588
|
+
provider: string;
|
|
589
|
+
credits: {
|
|
590
|
+
reserved: number;
|
|
591
|
+
settled: number;
|
|
592
|
+
released: number;
|
|
593
|
+
};
|
|
594
|
+
coverUrl: string | null;
|
|
595
|
+
videoUrl: string | null;
|
|
596
|
+
error: string | null;
|
|
597
|
+
outputs: {
|
|
598
|
+
id: string;
|
|
599
|
+
role: string;
|
|
600
|
+
sceneIndex: number | null;
|
|
601
|
+
status: string;
|
|
602
|
+
urls: {
|
|
603
|
+
size: string;
|
|
604
|
+
url: string;
|
|
605
|
+
}[] | {
|
|
606
|
+
url: string;
|
|
607
|
+
}[];
|
|
608
|
+
softFindings: {
|
|
609
|
+
[k: string]: unknown;
|
|
610
|
+
}[];
|
|
611
|
+
error: string | null;
|
|
612
|
+
keptVariationId: string | null;
|
|
613
|
+
}[];
|
|
614
|
+
};
|
|
369
615
|
export declare const registerCreativeCommands: (program: Command, deps: {
|
|
370
616
|
resolveScope: (options: {
|
|
371
617
|
workspace?: string;
|
package/dist/creativeCommands.js
CHANGED
|
@@ -289,7 +289,12 @@ const BRIEF_OPTIONS = [
|
|
|
289
289
|
const CONTENT_TYPES_LOGO = { '.png': 'image/png', '.webp': 'image/webp', '.svg': 'image/svg+xml', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg' };
|
|
290
290
|
/** `--wait` stops at a finished Generation or at the keyframe approval stop. */
|
|
291
291
|
export const GENERATION_WAIT_STOP = ['awaiting_approval', 'succeeded', 'partially_succeeded', 'failed', 'canceled'];
|
|
292
|
-
/**
|
|
292
|
+
/** One QA finding as an agent reads it: what is wrong (code, message) and where (size, slot). */
|
|
293
|
+
const qaFinding = (finding) => {
|
|
294
|
+
const { code, message, size, slot, check } = (finding ?? {});
|
|
295
|
+
return Object.fromEntries(Object.entries({ code, message, size, slot, check }).filter(([, value]) => value !== undefined));
|
|
296
|
+
};
|
|
297
|
+
/** The agent-facing view of a Generation: status, credits, every output's URLs and its soft QA findings. */
|
|
293
298
|
export const summarizeGeneration = ({ generation, outputs }) => ({
|
|
294
299
|
id: generation.id,
|
|
295
300
|
status: generation.status,
|
|
@@ -306,7 +311,7 @@ export const summarizeGeneration = ({ generation, outputs }) => ({
|
|
|
306
311
|
sceneIndex: output.scene_index,
|
|
307
312
|
status: output.status,
|
|
308
313
|
urls: output.files.length > 0 ? output.files.map((file) => ({ size: file.size, url: file.url })) : output.raw_url ? [{ url: output.raw_url }] : [],
|
|
309
|
-
softFindings: output.qa.softFindings.
|
|
314
|
+
softFindings: output.qa.softFindings.map(qaFinding),
|
|
310
315
|
error: output.error?.message ?? null,
|
|
311
316
|
keptVariationId: output.kept_variation_id,
|
|
312
317
|
})),
|
|
@@ -347,6 +352,7 @@ export const summarizeLayout = (layout) => ({
|
|
|
347
352
|
sourceVariation: layout.source_variation_name,
|
|
348
353
|
sourceUrl: layout.source_url,
|
|
349
354
|
plateUrl: layout.plate_url,
|
|
355
|
+
plateWarnings: layout.plate_warnings ?? [],
|
|
350
356
|
slots: layout.slots.map((slot) => ({ ...slot, hidden: slot.hidden ?? false, added: slot.added ?? false })),
|
|
351
357
|
textSet: Object.fromEntries(layout.slots.filter((slot) => !slot.hidden).map((slot) => [slot.id, slot.text])),
|
|
352
358
|
editing: editingGuide(layout),
|
|
@@ -426,6 +432,8 @@ export const generationRequest = (options, angles) => {
|
|
|
426
432
|
...(options.count ? { count: parseNumber(options.count) } : {}),
|
|
427
433
|
...(options.reference ? { referenceImageUrls: parseSizes(options.reference) } : {}),
|
|
428
434
|
...(options.autoApprove ? { autoApprove: true } : {}),
|
|
435
|
+
// CRE-BR-041: animated captions over the assembled video, in a preset style.
|
|
436
|
+
...(options.captions ? { captions: { styleId: options.captions } } : {}),
|
|
429
437
|
};
|
|
430
438
|
if (options.brief) {
|
|
431
439
|
return { briefId: options.brief, ...settings };
|
|
@@ -461,9 +469,57 @@ const parseScene = (value) => {
|
|
|
461
469
|
/** `fgrove creatives generate` and `fgrove creatives generations …`. */
|
|
462
470
|
const registerGenerationRunCommands = (root, input) => {
|
|
463
471
|
const { scoped, run } = input;
|
|
464
|
-
/**
|
|
472
|
+
/**
|
|
473
|
+
* `generations start --flow format`: a copy file (reviewed) or, without one, copy written for `--angle × --formats` and started at
|
|
474
|
+
* once. One Generation per cell, in one batch; `--estimate` prices the whole matrix.
|
|
475
|
+
*/
|
|
476
|
+
const startFormat = async (scope, options) => {
|
|
477
|
+
let file;
|
|
478
|
+
let written = null;
|
|
479
|
+
const all = await input.angles(scope);
|
|
480
|
+
if (options.texts) {
|
|
481
|
+
file = parseCopyFile(JSON.parse(await readFile(options.texts, 'utf8')));
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
if (!options.angle || !options.formats || !options.brand) {
|
|
485
|
+
throw new Error(`A Format Generation needs --texts <file> (${COPY_FILE_HINT}), or --angle, --formats and --brand`);
|
|
486
|
+
}
|
|
487
|
+
if (options.estimate) {
|
|
488
|
+
// Priced before any copy is written, for free: the words do not change the price, so each Format's sample copy stands in.
|
|
489
|
+
const library = await api(scope, 'formats', 'query');
|
|
490
|
+
file = { brand: options.brand, cells: parseSizes(options.angle).flatMap((angle) => parseFormatRefs(options.formats).map((ref) => {
|
|
491
|
+
const format = library.formats.find((item) => item.id === ref.formatId);
|
|
492
|
+
const layout = format.layouts.find((item) => item.id === ref.layoutId) ?? format.layouts[0];
|
|
493
|
+
return {
|
|
494
|
+
angle, format: format.id, layout: layout.id, variants: Array.from({ length: parseNumber(options.variants ?? '1') }, () => ({
|
|
495
|
+
copy: format.sample, scene: layout.visual === 'brand' ? null : format.sampleScene ?? format.name,
|
|
496
|
+
})),
|
|
497
|
+
};
|
|
498
|
+
})) };
|
|
499
|
+
return api(scope, 'estimateFormatBatch', 'query', formatBatchRequest(file, all, options));
|
|
500
|
+
}
|
|
501
|
+
const answer = await api(scope, 'writeFormatCopy', 'mutation', formatCopyRequest(all, {
|
|
502
|
+
...options, angle: options.angle, formats: options.formats, brand: options.brand,
|
|
503
|
+
}));
|
|
504
|
+
file = copyFileOf(answer, { brand: options.brand });
|
|
505
|
+
written = file;
|
|
506
|
+
}
|
|
507
|
+
const request = {
|
|
508
|
+
...formatBatchRequest(file, all, options),
|
|
509
|
+
...(options.pack ? { packCreativeId: findCreative(await input.creatives(scope), options.pack).id } : {}),
|
|
510
|
+
};
|
|
511
|
+
if (options.estimate) {
|
|
512
|
+
return { ...(await api(scope, 'estimateFormatBatch', 'query', request)), ...(written ? { copy: written } : {}) };
|
|
513
|
+
}
|
|
514
|
+
const started = await api(scope, 'startFormatBatch', 'mutation', request);
|
|
515
|
+
const generations = options.wait
|
|
516
|
+
? await Promise.all(started.generations.map((detail) => waitForGeneration(scope, detail.generation.id)))
|
|
517
|
+
: started.generations;
|
|
518
|
+
return { batchId: started.batchId, stopped: started.stopped, generations: generations.map((detail) => summarizeFormatGeneration(detail)) };
|
|
519
|
+
};
|
|
520
|
+
/** `generate` and `generations start`: a Brief, a quick-create Brief, a Remix (`--flow remix`) or Formats (`--flow format`). */
|
|
465
521
|
const startCommand = (command) => scoped(command
|
|
466
|
-
.option('--flow <flow>', 'image | video | remix (default: --kind, else image)')
|
|
522
|
+
.option('--flow <flow>', 'image | video | remix | format (default: --kind, else image)')
|
|
467
523
|
.option('--brief <id>', 'Brief id')
|
|
468
524
|
.option('--angle <angle>', 'Quick-create and Remix: angle code or slug').option('--brand <brand>', 'Quick-create and Remix: brand with a Brand Kit')
|
|
469
525
|
.option('--prompt <text>', 'Quick-create: scene to generate').option('--headline <text>', 'Quick-create: headline')
|
|
@@ -473,8 +529,12 @@ const registerGenerationRunCommands = (root, input) => {
|
|
|
473
529
|
.option('--voiceover <text>', 'Quick-create video: voiceover script')
|
|
474
530
|
.option('--kind <kind>', 'Quick-create: image | video', 'image')
|
|
475
531
|
.option('--layout <id>', 'Remix: Reference Layout id (fgrove creatives remix list)')
|
|
476
|
-
.option('--texts <file>', `Remix: ${TEXTS_HINT}; one image each, 1-5`)
|
|
477
|
-
.option('--
|
|
532
|
+
.option('--texts <file>', `Remix: ${TEXTS_HINT}; one image each, 1-5. Format: a copy file from "formats copy" (edited)`)
|
|
533
|
+
.option('--formats <formats>', 'Format without --texts: Formats to write copy for and start at once, such as T4,T8 (with --angle C001,C002 --brand)')
|
|
534
|
+
.option('--variants <n>', 'Format without --texts: copy sets per Format (1-4)', '1')
|
|
535
|
+
.option('--persuasion-angle <id>', 'Format without --texts: one Persuasion Angle for every cell')
|
|
536
|
+
.option('--pain <moment>', 'Format without --texts: the pain moment the copy opens with')
|
|
537
|
+
.option('--swap <instruction>', 'Remix: brand swap made once on the clean plate and shared by every text set, such as "Replace the PayPal wordmark with the Venmo wordmark"')
|
|
478
538
|
.option('--pack <creative>', 'Approve outputs into this existing Creative, such as st003 (default: one new Creative per batch)')
|
|
479
539
|
.option('--model <model>', 'nano-banana-2.1 | gpt-image-2 (image); seedance-2-mini | seedance-2.5 (video)')
|
|
480
540
|
.option('--quality <quality>', 'low | medium | high (image scenes and keyframes)')
|
|
@@ -482,12 +542,16 @@ const registerGenerationRunCommands = (root, input) => {
|
|
|
482
542
|
.option('--sizes <list>', 'Comma-separated sizes, such as 1080x1350,1080x1920').option('--count <n>', 'Images to make (1-4); each is rendered in every size')
|
|
483
543
|
.option('--reference <urls>', 'Comma-separated reference image URLs')
|
|
484
544
|
.option('--auto-approve', 'Video: skip the keyframe approval stop')
|
|
545
|
+
.option('--captions <style>', 'Video: burn animated captions in this style after assembly (fgrove creatives captions styles)')
|
|
485
546
|
.option('--wait', 'Poll until finished or awaiting approval, then print output URLs')
|
|
486
547
|
.option('--estimate', 'Print the credits per step and the balance; start nothing'))
|
|
487
548
|
.action(run(async (scope, options) => {
|
|
488
549
|
const flow = options.flow ?? options.kind;
|
|
489
|
-
if (!['image', 'video', 'remix'].includes(flow)) {
|
|
490
|
-
throw new Error('--flow is image, video or
|
|
550
|
+
if (!['image', 'video', 'remix', 'format'].includes(flow)) {
|
|
551
|
+
throw new Error('--flow is image, video, remix or format');
|
|
552
|
+
}
|
|
553
|
+
if (flow === 'format') {
|
|
554
|
+
return startFormat(scope, options);
|
|
491
555
|
}
|
|
492
556
|
const request = {
|
|
493
557
|
...(flow === 'remix'
|
|
@@ -503,7 +567,7 @@ const registerGenerationRunCommands = (root, input) => {
|
|
|
503
567
|
}));
|
|
504
568
|
startCommand(root.command('generate').description('Start a Generation from a Brief, a quick-create Brief or a Remix; reserves Creative Credits'));
|
|
505
569
|
const generations = root.command('generations').description('Generations: the gallery of AI runs, their outputs, approval and keeping');
|
|
506
|
-
startCommand(generations.command('start').description('Start a Generation (same as "generate"): --flow image | video | remix'));
|
|
570
|
+
startCommand(generations.command('start').description('Start a Generation (same as "generate"): --flow image | video | remix | format'));
|
|
507
571
|
scoped(generations.command('list').description('List Generations, newest first')
|
|
508
572
|
.option('--angle <angle>', 'Only this angle').option('--brand <brand>', 'Only this brand').option('--kind <kind>', 'image | video')
|
|
509
573
|
.option('--status <status>', 'queued | running | awaiting_approval | assembling | succeeded | partially_succeeded | failed | canceled')
|
|
@@ -639,6 +703,193 @@ const registerGenerationRunCommands = (root, input) => {
|
|
|
639
703
|
return { layoutId: preview.layoutId, size: preview.size, ok: preview.ok, note: preview.note, images };
|
|
640
704
|
}));
|
|
641
705
|
};
|
|
706
|
+
const COPY_FILE_HINT = 'The copy file must be the output of "fgrove creatives formats copy" (edited): {"brand", "sizes", "cells": [{"angle", "format", '
|
|
707
|
+
+ '"layout", "persuasionAngle", "variants": [{"copy": {slot: words}, "scene": "…"}]}]}';
|
|
708
|
+
/** `T4`, `T4:post-it` → a Format id and layout. */
|
|
709
|
+
export const parseFormatRefs = (value) => value.split(',').map((item) => item.trim()).filter(Boolean).map((item) => {
|
|
710
|
+
const [formatId, layoutId] = item.split(':');
|
|
711
|
+
if (!/^T([1-9]|1\d|2[0-2])$/.test(formatId)) {
|
|
712
|
+
throw new Error(`"${item}" is not a Format; use T1 to T22, optionally with a layout such as T4:post-it`);
|
|
713
|
+
}
|
|
714
|
+
return { formatId: formatId, ...(layoutId ? { layoutId } : {}) };
|
|
715
|
+
});
|
|
716
|
+
export const parseCopyFile = (json) => {
|
|
717
|
+
if (!isObject(json) || !Array.isArray(json.cells) || json.cells.length === 0 || !json.cells.every((cell) => isObject(cell)
|
|
718
|
+
&& typeof cell.format === 'string' && (typeof cell.angle === 'string' || typeof cell.angleId === 'string')
|
|
719
|
+
&& Array.isArray(cell.variants) && cell.variants.every((variant) => isObject(variant) && isObject(variant.copy)))) {
|
|
720
|
+
throw new Error(COPY_FILE_HINT);
|
|
721
|
+
}
|
|
722
|
+
return json;
|
|
723
|
+
};
|
|
724
|
+
/** The `writeFormatCopy` input of an Angle × Format matrix from the flags. */
|
|
725
|
+
const formatCopyRequest = (angles, options) => ({
|
|
726
|
+
angleIds: parseSizes(options.angle).map((ref) => findAngle(angles, ref).id), brand: options.brand, formats: parseFormatRefs(options.formats),
|
|
727
|
+
variants: parseNumber(options.variants ?? '1'), ...(options.persuasionAngle ? { persuasionAngle: options.persuasionAngle } : {}),
|
|
728
|
+
...(options.pain ? { painMoment: options.pain } : {}), ...(options.direction ? { direction: options.direction } : {}),
|
|
729
|
+
});
|
|
730
|
+
/** The `startFormatBatch` input of a copy file: brand, sizes and pack from the flags or the file, cells with their copy and scenes only. */
|
|
731
|
+
export const formatBatchRequest = (file, angles, options) => {
|
|
732
|
+
const brand = options.brand ?? file.brand;
|
|
733
|
+
if (!brand) {
|
|
734
|
+
throw new Error('Pass --brand, or keep "brand" in the copy file');
|
|
735
|
+
}
|
|
736
|
+
return {
|
|
737
|
+
brand,
|
|
738
|
+
...(options.sizes ? { sizes: parseSizes(options.sizes) } : file.sizes ? { sizes: file.sizes } : {}),
|
|
739
|
+
...(options.model ? { model: options.model } : {}),
|
|
740
|
+
...(options.quality ? { quality: options.quality } : {}),
|
|
741
|
+
cells: file.cells.map((cell) => ({
|
|
742
|
+
angleId: cell.angleId ?? findAngle(angles, cell.angle).id,
|
|
743
|
+
formatId: cell.format,
|
|
744
|
+
...(cell.layout ? { layoutId: cell.layout } : {}),
|
|
745
|
+
persuasionAngle: cell.persuasionAngle ?? null,
|
|
746
|
+
textHook: cell.textHook ?? null,
|
|
747
|
+
visualHook: cell.visualHook ?? null,
|
|
748
|
+
variants: cell.variants.map((variant) => ({ copy: variant.copy, scene: variant.scene ?? null })),
|
|
749
|
+
})),
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
/** The copy file `formats copy` writes: cells keyed by Angle code and Format, with each set's issues and warnings to fix before starting. */
|
|
753
|
+
export const copyFileOf = (answer, input) => ({
|
|
754
|
+
brand: input.brand,
|
|
755
|
+
...(input.sizes ? { sizes: input.sizes } : {}),
|
|
756
|
+
cells: answer.cells.map((cell) => ({
|
|
757
|
+
angle: cell.angleCode, angleId: cell.angleId, angleName: cell.angleName, format: cell.formatId, layout: cell.layoutId, visual: cell.visual,
|
|
758
|
+
persuasionAngle: cell.persuasionAngle, textHook: cell.textHook, visualHook: cell.visualHook, variants: cell.variants,
|
|
759
|
+
})),
|
|
760
|
+
failed: answer.failed,
|
|
761
|
+
credits: answer.credits,
|
|
762
|
+
ok: answer.cells.every((cell) => cell.variants.length > 0 && cell.variants.every((variant) => variant.issues.length === 0)),
|
|
763
|
+
});
|
|
764
|
+
/** A Format Generation as an agent judges it: its Format, Persuasion Angle and each image with its QA findings named. */
|
|
765
|
+
export const summarizeFormatGeneration = (detail) => ({
|
|
766
|
+
...summarizeGeneration(detail),
|
|
767
|
+
angle: detail.generation.angle_code,
|
|
768
|
+
format: detail.generation.format_id ?? null,
|
|
769
|
+
persuasionAngle: detail.generation.persuasion_angle ?? null,
|
|
770
|
+
});
|
|
771
|
+
/** `fgrove creatives formats …` and `variations tag`. */
|
|
772
|
+
const registerFormatCommands = (root, input) => {
|
|
773
|
+
const { scoped, run } = input;
|
|
774
|
+
const library = (scope) => api(scope, 'formats', 'query');
|
|
775
|
+
const formats = root.command('formats').description('The Format library (T1-T22): ad layouts with text slots, shared by every workspace; copy, previews and stats');
|
|
776
|
+
scoped(formats.command('list').description('List the Formats with their layouts (brand = no image model, scene/illustration = a generated picture) and suggested Persuasion Angles')
|
|
777
|
+
.option('--angle <persuasion angle>', 'Only Formats that suit this Persuasion Angle, such as us_vs_them'))
|
|
778
|
+
.action(run(async (scope, options) => (await library(scope)).formats
|
|
779
|
+
.filter((format) => !options.angle || format.angles.includes(options.angle))
|
|
780
|
+
.map((format) => ({
|
|
781
|
+
id: format.id, name: format.name, whenToUse: format.whenToUse, angles: format.angles,
|
|
782
|
+
layouts: format.layouts.map((layout) => `${layout.id} (${layout.visual})`),
|
|
783
|
+
slots: format.slots.map((slot) => `${slot.id}${slot.required ? '' : '?'}:${slot.kind === 'list' ? `${slot.items?.min}-${slot.items?.max}x` : ''}${slot.maxLength}`),
|
|
784
|
+
}))));
|
|
785
|
+
scoped(formats.command('show <id>').description('Show one Format: slots with purpose and limits, layouts with their scene prompt pattern, guardrails and sample copy'))
|
|
786
|
+
.action(run(async (scope, _options, id) => {
|
|
787
|
+
const format = (await library(scope)).formats.find((item) => item.id === id?.toUpperCase());
|
|
788
|
+
if (!format) {
|
|
789
|
+
throw new Error(`No Format "${id}"; run fgrove creatives formats list`);
|
|
790
|
+
}
|
|
791
|
+
return format;
|
|
792
|
+
}));
|
|
793
|
+
scoped(formats.command('angles').description('List the Persuasion Angles: the shared vocabulary of how an ad persuades, with hook shapes'))
|
|
794
|
+
.action(run(async (scope) => (await library(scope)).persuasionAngles));
|
|
795
|
+
scoped(formats.command('copy').description('Write copy sets with an LLM for every Angle × Format cell into a copy file; charged per Angle. '
|
|
796
|
+
+ 'Review and edit the file, preview it, then start it with generations start --flow format --texts <file>')
|
|
797
|
+
.requiredOption('--angle <angles>', 'Comma-separated Angle codes or slugs, such as C001,C004')
|
|
798
|
+
.requiredOption('--formats <formats>', 'Comma-separated Formats, optionally with a layout: T4,T8,T4:post-it')
|
|
799
|
+
.requiredOption('--brand <brand>', 'Brand of the Variations (its Brand Kit voice is used)')
|
|
800
|
+
.option('--variants <n>', 'Copy sets per Format (1-4)', '2')
|
|
801
|
+
.option('--persuasion-angle <id>', 'One Persuasion Angle for every cell (default: the best suggested one per Format)')
|
|
802
|
+
.option('--pain <moment>', 'The pain moment: where, when and what the person feels')
|
|
803
|
+
.option('--direction <text>', 'Extra direction for the copywriter')
|
|
804
|
+
.option('--sizes <list>', 'Sizes to keep in the file for the Generation, such as 1080x1350,1080x1920')
|
|
805
|
+
.option('--out <file>', 'Write the copy file here (default: print it)'))
|
|
806
|
+
.action(run(async (scope, options) => {
|
|
807
|
+
const all = await input.angles(scope);
|
|
808
|
+
const answer = await api(scope, 'writeFormatCopy', 'mutation', formatCopyRequest(all, options));
|
|
809
|
+
const file = copyFileOf(answer, { brand: options.brand, ...(options.sizes ? { sizes: parseSizes(options.sizes) } : {}) });
|
|
810
|
+
if (!options.out) {
|
|
811
|
+
return file;
|
|
812
|
+
}
|
|
813
|
+
await writeFile(options.out, `${JSON.stringify(file, null, 2)}\n`);
|
|
814
|
+
return { path: path.resolve(options.out), ok: file.ok, cells: file.cells.length, failed: answer.failed, credits: answer.credits };
|
|
815
|
+
}));
|
|
816
|
+
scoped(formats.command('preview').description('Render copy for free in its Format layout with the brand\'s kit, as a Generation would (a placeholder stands in '
|
|
817
|
+
+ 'for a generated picture), and save one PNG per copy set with QA, copy issues and warnings')
|
|
818
|
+
.requiredOption('--texts <file>', 'A copy file (every cell is previewed), or an array of copy sets with --format')
|
|
819
|
+
.option('--format <format>', 'With an array of copy sets: the Format, such as T4 or T4:post-it')
|
|
820
|
+
.option('--brand <brand>', 'Brand whose Brand Kit to use (default: the copy file\'s)')
|
|
821
|
+
.option('--size <size>', '1080x1080 | 1080x1350 | 1080x1920', '1080x1350')
|
|
822
|
+
.option('--cell <n>', 'Only this cell of a copy file (1-based)')
|
|
823
|
+
.option('--out <dir>', 'Directory for the PNGs (default: ./format-preview)'))
|
|
824
|
+
.action(run(async (scope, options) => {
|
|
825
|
+
const json = JSON.parse(await readFile(options.texts, 'utf8'));
|
|
826
|
+
const jobs = [];
|
|
827
|
+
let brand = options.brand;
|
|
828
|
+
if (Array.isArray(json)) {
|
|
829
|
+
if (!options.format) {
|
|
830
|
+
throw new Error('An array of copy sets needs --format, such as --format T4');
|
|
831
|
+
}
|
|
832
|
+
const [ref] = parseFormatRefs(options.format);
|
|
833
|
+
jobs.push({ label: ref.formatId, ...ref, copySets: json });
|
|
834
|
+
}
|
|
835
|
+
else {
|
|
836
|
+
const file = parseCopyFile(json);
|
|
837
|
+
brand ??= file.brand;
|
|
838
|
+
file.cells.forEach((cell, index) => {
|
|
839
|
+
if (options.cell && parseNumber(options.cell) !== index + 1) {
|
|
840
|
+
return;
|
|
841
|
+
}
|
|
842
|
+
jobs.push({
|
|
843
|
+
label: `cell-${index + 1}`, formatId: cell.format, ...(cell.layout ? { layoutId: cell.layout } : {}),
|
|
844
|
+
copySets: cell.variants.map((variant) => variant.copy),
|
|
845
|
+
});
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
const out = path.resolve(options.out ?? 'format-preview');
|
|
849
|
+
await mkdir(out, { recursive: true });
|
|
850
|
+
const results = [];
|
|
851
|
+
for (const job of jobs) {
|
|
852
|
+
const preview = await api(scope, 'previewFormat', 'mutation', {
|
|
853
|
+
formatId: job.formatId, ...(job.layoutId ? { layoutId: job.layoutId } : {}), ...(brand ? { brand } : {}), size: options.size, copySets: job.copySets,
|
|
854
|
+
});
|
|
855
|
+
for (const image of preview.images) {
|
|
856
|
+
const file = path.join(out, `${job.label}-set-${image.copySet}-${preview.size}.png`);
|
|
857
|
+
await writeFile(file, Buffer.from(image.base64, 'base64'));
|
|
858
|
+
results.push({
|
|
859
|
+
cell: job.label, format: `${preview.formatId}:${preview.layoutId}`, copySet: image.copySet, path: file, issues: image.issues, warnings: image.warnings,
|
|
860
|
+
hardFailures: image.qa.hardFailures, softFindings: image.qa.softFindings,
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
return { ok: results.every((item) => item.issues.length === 0 && item.hardFailures.length === 0), size: options.size, images: results };
|
|
865
|
+
}));
|
|
866
|
+
scoped(formats.command('stats').description('This project\'s Variations by Format and by Persuasion Angle, with launches, Go and winner shares (tagged Variations only)'))
|
|
867
|
+
.action(run((scope) => api(scope, 'formatStats', 'query')));
|
|
868
|
+
const variations = root.commands.find((command) => command.name() === 'variations');
|
|
869
|
+
scoped(variations.command('tag').description('Read Variation images with a vision model into a Format and a Persuasion Angle for formats stats; '
|
|
870
|
+
+ 'charged per Variation. Untagged image Variations by default, at most 200 per run')
|
|
871
|
+
.option('--variations <ids>', 'Only these Variations (comma-separated ids)')
|
|
872
|
+
.option('--retag', 'Read tagged Variations again')
|
|
873
|
+
.option('--limit <n>', 'At most this many (1-200)')
|
|
874
|
+
.option('--estimate', 'Print how many would be read and the credits; start nothing')
|
|
875
|
+
.option('--wait', 'Poll until the run finishes'))
|
|
876
|
+
.action(run(async (scope, options) => {
|
|
877
|
+
const request = {
|
|
878
|
+
...(options.variations ? { variationIds: parseSizes(options.variations) } : {}),
|
|
879
|
+
...(options.retag ? { retag: true } : {}),
|
|
880
|
+
...(options.limit ? { limit: parseNumber(options.limit) } : {}),
|
|
881
|
+
};
|
|
882
|
+
if (options.estimate) {
|
|
883
|
+
return api(scope, 'estimateVariationTagging', 'query', request);
|
|
884
|
+
}
|
|
885
|
+
let tagRun = await api(scope, 'startVariationTagging', 'mutation', request);
|
|
886
|
+
while (options.wait && ['queued', 'running'].includes(tagRun.status)) {
|
|
887
|
+
await new Promise((resolve) => { setTimeout(resolve, 5000); });
|
|
888
|
+
tagRun = await api(scope, 'variationTaggingRun', 'query', { runId: tagRun.id });
|
|
889
|
+
}
|
|
890
|
+
return tagRun;
|
|
891
|
+
}));
|
|
892
|
+
};
|
|
642
893
|
/** `fgrove creatives brand-kits|fonts|briefs|render`. */
|
|
643
894
|
const registerGenerationCommands = (root, input) => {
|
|
644
895
|
const { scoped, run } = input;
|
|
@@ -790,6 +1041,172 @@ const registerGenerationCommands = (root, input) => {
|
|
|
790
1041
|
}));
|
|
791
1042
|
};
|
|
792
1043
|
/** `fgrove creatives …`: angles, creatives, variations, dictionaries and files of one project. */
|
|
1044
|
+
// --- Animated captions (CRE-BR-040 to CRE-BR-043) ---
|
|
1045
|
+
const VIDEO_TYPES = { '.mp4': 'video/mp4', '.mov': 'video/quicktime', '.webm': 'video/webm' };
|
|
1046
|
+
const WORDS_HINT = 'a JSON file with { "language": "en", "words": [{ "text": "Stop", "start": 0.1, "end": 0.4, "emphasis": true, "emoji": "🔥" }, …] } '
|
|
1047
|
+
+ 'or just the words array (the output of "captions export --format json")';
|
|
1048
|
+
/** A words file: the track JSON export, or a bare array of words. */
|
|
1049
|
+
export const parseCaptionWords = (json) => {
|
|
1050
|
+
const words = Array.isArray(json) ? json : isObject(json) && Array.isArray(json.words) ? json.words : null;
|
|
1051
|
+
if (!words || words.length === 0 || !words.every((word) => isObject(word) && typeof word.text === 'string' && typeof word.start === 'number' && typeof word.end === 'number')) {
|
|
1052
|
+
throw new Error(`The words file must be ${WORDS_HINT}`);
|
|
1053
|
+
}
|
|
1054
|
+
return {
|
|
1055
|
+
language: isObject(json) && typeof json.language === 'string' ? json.language : null,
|
|
1056
|
+
words: words.map((word) => ({
|
|
1057
|
+
text: word.text, start: word.start, end: word.end,
|
|
1058
|
+
...(word.emphasis === true ? { emphasis: true } : {}), ...(typeof word.emoji === 'string' && word.emoji ? { emoji: word.emoji } : {}),
|
|
1059
|
+
})),
|
|
1060
|
+
};
|
|
1061
|
+
};
|
|
1062
|
+
/** Uploads a local video to caption and names it for the start request. */
|
|
1063
|
+
export const uploadCaptionVideo = async (scope, file, fetchFn = fetch) => {
|
|
1064
|
+
const contentType = VIDEO_TYPES[path.extname(file).toLowerCase()];
|
|
1065
|
+
if (!contentType) {
|
|
1066
|
+
throw new Error('Use an mp4, mov or webm video');
|
|
1067
|
+
}
|
|
1068
|
+
const body = await readFile(file);
|
|
1069
|
+
const hash = sha256(body);
|
|
1070
|
+
const prepared = await api(scope, 'prepareCaptionVideoUpload', 'mutation', {
|
|
1071
|
+
contentType, sizeBytes: body.byteLength, sha256: hash,
|
|
1072
|
+
});
|
|
1073
|
+
const response = await fetchFn(prepared.uploadUrl, { method: 'PUT', headers: prepared.headers, body: new Uint8Array(body) });
|
|
1074
|
+
if (!response.ok) {
|
|
1075
|
+
throw new Error(`Upload failed with HTTP ${response.status}`);
|
|
1076
|
+
}
|
|
1077
|
+
return { key: prepared.key, sha256: hash };
|
|
1078
|
+
};
|
|
1079
|
+
/** The `captionVideo` part of a start: an uploaded file or a Variation's video. */
|
|
1080
|
+
const captionSource = async (scope, options, variations) => {
|
|
1081
|
+
if (Boolean(options.video) === Boolean(options.variation)) {
|
|
1082
|
+
throw new Error('Pass either a video file or --variation');
|
|
1083
|
+
}
|
|
1084
|
+
if (options.video) {
|
|
1085
|
+
return { upload: await uploadCaptionVideo(scope, options.video) };
|
|
1086
|
+
}
|
|
1087
|
+
const variation = findVariation(await variations(), options.variation);
|
|
1088
|
+
return { variationId: variation.id, ...(options.size ? { size: options.size } : {}) };
|
|
1089
|
+
};
|
|
1090
|
+
/** The caption document's words of a Generation, as `captions show` prints them: from the video output, else the transcript. */
|
|
1091
|
+
export const summarizeCaptions = ({ generation, outputs }) => {
|
|
1092
|
+
const holder = outputs.find((output) => output.role === 'video');
|
|
1093
|
+
const transcript = outputs.find((output) => output.role === 'transcript');
|
|
1094
|
+
const document = holder?.captions ?? null;
|
|
1095
|
+
const track = document?.track ?? transcript?.words ?? null;
|
|
1096
|
+
return {
|
|
1097
|
+
...summarizeGeneration({ generation, outputs }),
|
|
1098
|
+
captions: track ? {
|
|
1099
|
+
styleId: document?.styleId ?? null, source: document?.source ?? 'transcription', language: track.language, words: track.words,
|
|
1100
|
+
editing: `Edit the words, then: fgrove creatives captions approve ${generation.id} --words words.json (or captions rerender once rendered)`,
|
|
1101
|
+
} : null,
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
/** `fgrove creatives captions …` */
|
|
1105
|
+
const registerCaptionCommands = (root, input) => {
|
|
1106
|
+
const { scoped, run } = input;
|
|
1107
|
+
const captions = root.command('captions').description('Animated captions: styles, transcription and burning captions into a video (CRE-BR-040 to CRE-BR-043)');
|
|
1108
|
+
scoped(captions.command('styles').description('List the caption style presets as data, with the default and the JSON Schema they are checked against'))
|
|
1109
|
+
.action(run((scope) => api(scope, 'captionStyles', 'query')));
|
|
1110
|
+
const sourceOptions = (command) => command
|
|
1111
|
+
.option('--variation <variation>', 'Caption a Variation\'s video file instead of a local file (id, full name or st003_02)')
|
|
1112
|
+
.option('--size <size>', 'The Variation file to use, such as 1080x1920')
|
|
1113
|
+
.option('--angle <angle>', 'Angle code or slug of the Variations an approved output makes').option('--brand <brand>', 'Brand with a Brand Kit')
|
|
1114
|
+
.option('--pack <creative>', 'Approve outputs into this existing Creative, such as vid003 (default: one new Creative per batch)');
|
|
1115
|
+
const startCaptions = async (scope, options, video) => {
|
|
1116
|
+
const missing = ['angle', 'brand'].filter((key) => !options[key]);
|
|
1117
|
+
if (missing.length > 0) {
|
|
1118
|
+
throw new Error(`Captions need --${missing.join(', --')}`);
|
|
1119
|
+
}
|
|
1120
|
+
const words = options.words ? parseCaptionWords(JSON.parse(await readFile(options.words, 'utf8'))) : null;
|
|
1121
|
+
const request = {
|
|
1122
|
+
captionVideo: {
|
|
1123
|
+
...await captionSource(scope, { ...options, video }, () => input.variations(scope)),
|
|
1124
|
+
angleId: findAngle(await input.angles(scope), options.angle).id, brand: options.brand, styleId: options.style ?? 'bold-pop',
|
|
1125
|
+
...(options.language ? { language: options.language } : words?.language ? { language: words.language } : {}),
|
|
1126
|
+
...(words ? { words: words.words } : {}),
|
|
1127
|
+
},
|
|
1128
|
+
...(options.autoApprove ? { autoApprove: true } : {}),
|
|
1129
|
+
...(options.pack ? { packCreativeId: findCreative(await input.creatives(scope), options.pack).id } : {}),
|
|
1130
|
+
};
|
|
1131
|
+
if (options.estimate) {
|
|
1132
|
+
return api(scope, 'estimateGeneration', 'query', request);
|
|
1133
|
+
}
|
|
1134
|
+
return api(scope, 'startGeneration', 'mutation', request);
|
|
1135
|
+
};
|
|
1136
|
+
scoped(sourceOptions(captions.command('transcribe [video]').description('Transcribe a video word by word and propose emphasis and emoji; '
|
|
1137
|
+
+ 'the Generation then waits for "captions approve". Reserves the transcription credits'))
|
|
1138
|
+
.option('--style <id>', 'Caption style preset (default bold-pop); changed later with approve --style')
|
|
1139
|
+
.option('--language <code>', 'Spoken language, such as en or ru (default: detected)')
|
|
1140
|
+
.option('--estimate', 'Print the credits per step and the balance; start nothing')
|
|
1141
|
+
.option('--wait', 'Poll until the words are ready for review'))
|
|
1142
|
+
.action(run(async (scope, options, video) => {
|
|
1143
|
+
const started = await startCaptions(scope, options, video);
|
|
1144
|
+
if (options.estimate) {
|
|
1145
|
+
return started;
|
|
1146
|
+
}
|
|
1147
|
+
const detail = started;
|
|
1148
|
+
return summarizeCaptions(options.wait ? await waitForGeneration(scope, detail.generation.id) : detail);
|
|
1149
|
+
}));
|
|
1150
|
+
scoped(sourceOptions(captions.command('render [video]').description('Caption a video in a style: transcribe (or take --words), pick emphasis and emoji, burn the captions in; '
|
|
1151
|
+
+ 'runs without a review stop and prints the captioned video URL with --wait'))
|
|
1152
|
+
.requiredOption('--style <id>', 'Caption style preset (fgrove creatives captions styles)')
|
|
1153
|
+
.option('--words <file>', `Skip the transcription: ${WORDS_HINT}`)
|
|
1154
|
+
.option('--language <code>', 'Spoken language, such as en or ru (default: detected, or the words file\'s)')
|
|
1155
|
+
.option('--estimate', 'Print the credits per step and the balance; start nothing')
|
|
1156
|
+
.option('--wait', 'Poll until the captioned video is ready'))
|
|
1157
|
+
.action(run(async (scope, options, video) => {
|
|
1158
|
+
const started = await startCaptions(scope, { ...options, autoApprove: true }, video);
|
|
1159
|
+
if (options.estimate) {
|
|
1160
|
+
return started;
|
|
1161
|
+
}
|
|
1162
|
+
const detail = started;
|
|
1163
|
+
return summarizeCaptions(options.wait ? await waitForGeneration(scope, detail.generation.id) : detail);
|
|
1164
|
+
}));
|
|
1165
|
+
scoped(captions.command('show <generationId>').description('Show a caption Generation with its words, timing, emphasis and emoji'))
|
|
1166
|
+
.action(run(async (scope, _options, generationId) => summarizeCaptions(await api(scope, 'generation', 'query', { generationId }))));
|
|
1167
|
+
scoped(captions.command('approve <generationId>').description('Approve the reviewed words of a transcribed video (optionally replacing them and the style first) and render the captions; reserves the render credits')
|
|
1168
|
+
.option('--words <file>', `Replace the words first: ${WORDS_HINT}`)
|
|
1169
|
+
.option('--style <id>', 'Change the caption style first')
|
|
1170
|
+
.option('--wait', 'Poll until the captioned video is ready'))
|
|
1171
|
+
.action(run(async (scope, options, generationId) => {
|
|
1172
|
+
if (options.words || options.style) {
|
|
1173
|
+
const words = options.words ? parseCaptionWords(JSON.parse(await readFile(options.words, 'utf8'))) : null;
|
|
1174
|
+
await api(scope, 'updateCaptions', 'mutation', {
|
|
1175
|
+
generationId, ...(words ? { words: words.words, ...(words.language ? { language: words.language } : {}) } : {}), ...(options.style ? { styleId: options.style } : {}),
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
const detail = await api(scope, 'approveCaptions', 'mutation', { generationId });
|
|
1179
|
+
return summarizeCaptions(options.wait ? await waitForGeneration(scope, generationId) : detail);
|
|
1180
|
+
}));
|
|
1181
|
+
scoped(captions.command('rerender <generationId>').description('Render the captions of a finished Generation again, after editing its words (--words) or style (--style); costs the caption price')
|
|
1182
|
+
.option('--words <file>', `Replace the words first: ${WORDS_HINT}`)
|
|
1183
|
+
.option('--style <id>', 'Change the caption style first')
|
|
1184
|
+
.option('--wait', 'Poll until the captioned video is ready'))
|
|
1185
|
+
.action(run(async (scope, options, generationId) => {
|
|
1186
|
+
if (options.words || options.style) {
|
|
1187
|
+
const words = options.words ? parseCaptionWords(JSON.parse(await readFile(options.words, 'utf8'))) : null;
|
|
1188
|
+
await api(scope, 'updateCaptions', 'mutation', {
|
|
1189
|
+
generationId, ...(words ? { words: words.words, ...(words.language ? { language: words.language } : {}) } : {}), ...(options.style ? { styleId: options.style } : {}),
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
const detail = await api(scope, 'rerenderCaptions', 'mutation', { generationId });
|
|
1193
|
+
return summarizeCaptions(options.wait ? await waitForGeneration(scope, generationId) : detail);
|
|
1194
|
+
}));
|
|
1195
|
+
scoped(captions.command('export <generationId>').description('Export the captions as srt, vtt or the words json; prints the text, or writes --out')
|
|
1196
|
+
.option('--format <format>', 'srt | vtt | json', 'srt')
|
|
1197
|
+
.option('--out <file>', 'Write the export to this file instead of printing it'))
|
|
1198
|
+
.action(run(async (scope, options, generationId) => {
|
|
1199
|
+
if (!['srt', 'vtt', 'json'].includes(options.format)) {
|
|
1200
|
+
throw new Error('--format is srt, vtt or json');
|
|
1201
|
+
}
|
|
1202
|
+
const exported = await api(scope, 'captionsExport', 'query', { generationId, format: options.format });
|
|
1203
|
+
if (options.out) {
|
|
1204
|
+
await writeFile(options.out, exported.content, 'utf8');
|
|
1205
|
+
return { written: options.out, fileName: exported.fileName, contentType: exported.contentType };
|
|
1206
|
+
}
|
|
1207
|
+
return { fileName: exported.fileName, contentType: exported.contentType, content: exported.content };
|
|
1208
|
+
}));
|
|
1209
|
+
};
|
|
793
1210
|
export const registerCreativeCommands = (program, deps) => {
|
|
794
1211
|
const run = (work) => (async (...args) => {
|
|
795
1212
|
const command = args[args.length - 1];
|
|
@@ -835,7 +1252,19 @@ Examples:
|
|
|
835
1252
|
fgrove creatives remix create --variation CLMB_st027_03_deadline --wait --project claimbee
|
|
836
1253
|
fgrove creatives remix show <layout id> --project claimbee > layout.json
|
|
837
1254
|
fgrove creatives remix update <layout id> --slots layout.json --project claimbee
|
|
838
|
-
fgrove creatives generations start --flow remix --layout <layout id> --angle C004 --brand Venmo --texts texts.json --swap "Replace the PayPal wordmark with the Venmo wordmark" --estimate --project claimbee
|
|
1255
|
+
fgrove creatives generations start --flow remix --layout <layout id> --angle C004 --brand Venmo --texts texts.json --swap "Replace the PayPal wordmark with the Venmo wordmark" --estimate --project claimbee
|
|
1256
|
+
fgrove creatives formats list --angle us_vs_them --project acme
|
|
1257
|
+
fgrove creatives formats copy --angle C001,C002 --formats T4,T8,T4:post-it --brand "Acme Claims" --variants 2 --pain "Sorting mail at the kitchen table at 11 p.m." --out copy.json --project acme
|
|
1258
|
+
fgrove creatives formats preview --texts copy.json --size 1080x1920 --project acme
|
|
1259
|
+
fgrove creatives generations start --flow format --texts copy.json --sizes 1080x1350,1080x1920 --estimate --project acme
|
|
1260
|
+
fgrove creatives variations tag --estimate --project acme
|
|
1261
|
+
fgrove creatives formats stats --project acme
|
|
1262
|
+
fgrove creatives captions styles --project claimbee
|
|
1263
|
+
fgrove creatives generate --brief <video brief id> --captions bold-pop --auto-approve --wait --project claimbee
|
|
1264
|
+
fgrove creatives captions render ./talk.mp4 --style highlight-box --angle C004 --brand Amazon --wait --project claimbee
|
|
1265
|
+
fgrove creatives captions transcribe ./talk.mp4 --angle C004 --brand Amazon --wait --project claimbee > words.json
|
|
1266
|
+
fgrove creatives captions approve <generation id> --words words.json --style neon-glow --wait --project claimbee
|
|
1267
|
+
fgrove creatives captions export <generation id> --format srt --out talk.srt --project claimbee`);
|
|
839
1268
|
const settings = root.command('settings').description('Project creative settings');
|
|
840
1269
|
scoped(settings.command('show').description('Show the name prefix and dictionaries'))
|
|
841
1270
|
.action(run((scope) => api(scope, 'settings', 'query')));
|
|
@@ -982,4 +1411,6 @@ Examples:
|
|
|
982
1411
|
})));
|
|
983
1412
|
registerGenerationCommands(root, { scoped, run, angles });
|
|
984
1413
|
registerGenerationRunCommands(root, { scoped, run, angles, creatives });
|
|
1414
|
+
registerFormatCommands(root, { scoped, run, angles });
|
|
1415
|
+
registerCaptionCommands(root, { scoped, run, angles, creatives, variations });
|
|
985
1416
|
};
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"minimumCliVersion": "0.1.20",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
|
-
"repositoryCliVersion": "0.1.
|
|
7
|
+
"repositoryCliVersion": "0.1.361",
|
|
8
8
|
"manifest": {
|
|
9
9
|
"schemaVersion": 1,
|
|
10
|
-
"bundleVersion": "2.0.
|
|
10
|
+
"bundleVersion": "2.0.354",
|
|
11
11
|
"stepContractVersion": 3,
|
|
12
12
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
13
13
|
"managedFiles": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
48
|
-
"sha256": "
|
|
48
|
+
"sha256": "743837afa746bd63ffb9fbd2caa0ee6d64137f017802ab43fb746549cf57affa"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -145,16 +145,16 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"path": "funnel-docs.config.json",
|
|
148
|
-
"sha256": "
|
|
148
|
+
"sha256": "9a17d1b37d62b21a7306cde0affe58f9563af24a34ff2b1024f29dc0c10617c9"
|
|
149
149
|
}
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"repositoryCliVersion": "0.1.
|
|
154
|
+
"repositoryCliVersion": "0.1.360",
|
|
155
155
|
"manifest": {
|
|
156
156
|
"schemaVersion": 1,
|
|
157
|
-
"bundleVersion": "2.0.
|
|
157
|
+
"bundleVersion": "2.0.353",
|
|
158
158
|
"stepContractVersion": 3,
|
|
159
159
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
160
160
|
"managedFiles": [
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
195
|
-
"sha256": "
|
|
195
|
+
"sha256": "29ebaa7fce53e6025ea19caf347d953866575963f1f5e96df8050788674b56ce"
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -292,16 +292,16 @@
|
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
"path": "funnel-docs.config.json",
|
|
295
|
-
"sha256": "
|
|
295
|
+
"sha256": "c36088a7c3173139a24d4f425a761dc02618b56e0e5e410e29aab314d06d5942"
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
"repositoryCliVersion": "0.1.
|
|
301
|
+
"repositoryCliVersion": "0.1.359",
|
|
302
302
|
"manifest": {
|
|
303
303
|
"schemaVersion": 1,
|
|
304
|
-
"bundleVersion": "2.0.
|
|
304
|
+
"bundleVersion": "2.0.352",
|
|
305
305
|
"stepContractVersion": 3,
|
|
306
306
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
307
307
|
"managedFiles": [
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
342
|
-
"sha256": "
|
|
342
|
+
"sha256": "eaf84a1cc28753b4b832831ebb43fedba90330000fff223c4512d79e94500086"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -439,16 +439,16 @@
|
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
"path": "funnel-docs.config.json",
|
|
442
|
-
"sha256": "
|
|
442
|
+
"sha256": "23ae803bc80a092a62680147747e0b74b66bd923d23d75606d502815f2946a75"
|
|
443
443
|
}
|
|
444
444
|
]
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
|
-
"repositoryCliVersion": "0.1.
|
|
448
|
+
"repositoryCliVersion": "0.1.358",
|
|
449
449
|
"manifest": {
|
|
450
450
|
"schemaVersion": 1,
|
|
451
|
-
"bundleVersion": "2.0.
|
|
451
|
+
"bundleVersion": "2.0.351",
|
|
452
452
|
"stepContractVersion": 3,
|
|
453
453
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
454
454
|
"managedFiles": [
|
|
@@ -486,7 +486,7 @@
|
|
|
486
486
|
},
|
|
487
487
|
{
|
|
488
488
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
489
|
-
"sha256": "
|
|
489
|
+
"sha256": "f4296760cadbdb0c0c30fb6ef609dacb21a8ea9624f16851962e25b7612673b4"
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -586,16 +586,16 @@
|
|
|
586
586
|
},
|
|
587
587
|
{
|
|
588
588
|
"path": "funnel-docs.config.json",
|
|
589
|
-
"sha256": "
|
|
589
|
+
"sha256": "4ee7ede9c30a033dde7c0616792f0218f7eaeddb6bca22c70caa3ba67d04c65d"
|
|
590
590
|
}
|
|
591
591
|
]
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
594
|
{
|
|
595
|
-
"repositoryCliVersion": "0.1.
|
|
595
|
+
"repositoryCliVersion": "0.1.357",
|
|
596
596
|
"manifest": {
|
|
597
597
|
"schemaVersion": 1,
|
|
598
|
-
"bundleVersion": "2.0.
|
|
598
|
+
"bundleVersion": "2.0.350",
|
|
599
599
|
"stepContractVersion": 3,
|
|
600
600
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
601
601
|
"managedFiles": [
|
|
@@ -633,7 +633,7 @@
|
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
636
|
-
"sha256": "
|
|
636
|
+
"sha256": "d7849f21c005bcac20c8e8e6caca4e90eff1c19add790e6e19904129714f4fc5"
|
|
637
637
|
},
|
|
638
638
|
{
|
|
639
639
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -733,16 +733,16 @@
|
|
|
733
733
|
},
|
|
734
734
|
{
|
|
735
735
|
"path": "funnel-docs.config.json",
|
|
736
|
-
"sha256": "
|
|
736
|
+
"sha256": "ad07c811a7a8ac21e7aa01c324a2d7b764e8dc5af03ebcd8b36617859ea8bb42"
|
|
737
737
|
}
|
|
738
738
|
]
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
741
|
{
|
|
742
|
-
"repositoryCliVersion": "0.1.
|
|
742
|
+
"repositoryCliVersion": "0.1.356",
|
|
743
743
|
"manifest": {
|
|
744
744
|
"schemaVersion": 1,
|
|
745
|
-
"bundleVersion": "2.0.
|
|
745
|
+
"bundleVersion": "2.0.349",
|
|
746
746
|
"stepContractVersion": 3,
|
|
747
747
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
748
748
|
"managedFiles": [
|
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
},
|
|
781
781
|
{
|
|
782
782
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
783
|
-
"sha256": "
|
|
783
|
+
"sha256": "7cf7ffb707ef0d534ad4c9b3377c1d192cb304a16ca30f5f014ce0a8a0be065e"
|
|
784
784
|
},
|
|
785
785
|
{
|
|
786
786
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -880,16 +880,16 @@
|
|
|
880
880
|
},
|
|
881
881
|
{
|
|
882
882
|
"path": "funnel-docs.config.json",
|
|
883
|
-
"sha256": "
|
|
883
|
+
"sha256": "7c4dc24661a335b885b43d7ed8a53abc288344ea81efc9250908a4ac0cce0991"
|
|
884
884
|
}
|
|
885
885
|
]
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
{
|
|
889
|
-
"repositoryCliVersion": "0.1.
|
|
889
|
+
"repositoryCliVersion": "0.1.355",
|
|
890
890
|
"manifest": {
|
|
891
891
|
"schemaVersion": 1,
|
|
892
|
-
"bundleVersion": "2.0.
|
|
892
|
+
"bundleVersion": "2.0.348",
|
|
893
893
|
"stepContractVersion": 3,
|
|
894
894
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
895
895
|
"managedFiles": [
|
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
},
|
|
928
928
|
{
|
|
929
929
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
930
|
-
"sha256": "
|
|
930
|
+
"sha256": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee"
|
|
931
931
|
},
|
|
932
932
|
{
|
|
933
933
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -1027,7 +1027,7 @@
|
|
|
1027
1027
|
},
|
|
1028
1028
|
{
|
|
1029
1029
|
"path": "funnel-docs.config.json",
|
|
1030
|
-
"sha256": "
|
|
1030
|
+
"sha256": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99"
|
|
1031
1031
|
}
|
|
1032
1032
|
]
|
|
1033
1033
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.354",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "743837afa746bd63ffb9fbd2caa0ee6d64137f017802ab43fb746549cf57affa"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "9a17d1b37d62b21a7306cde0affe58f9563af24a34ff2b1024f29dc0c10617c9"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -17,7 +17,7 @@ Supported read versions: `1`, `2`, `3`. Authoring and publish target version `3`
|
|
|
17
17
|
|
|
18
18
|
### Package release order
|
|
19
19
|
|
|
20
|
-
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.44.0`, then `@funnelsgrove/analytics` `0.27.0`, then `@funnelsgrove/payments` `0.71.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.44.0`, then `@funnelsgrove/analytics` `0.27.0`, then `@funnelsgrove/payments` `0.71.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.361`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
|
|
21
21
|
<!-- funnelsgrove:generated:end contract-v3/migration/step-contract-v3 -->
|
|
22
22
|
|
|
23
23
|
## Version-last policy
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.354",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "743837afa746bd63ffb9fbd2caa0ee6d64137f017802ab43fb746549cf57affa"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "9a17d1b37d62b21a7306cde0affe58f9563af24a34ff2b1024f29dc0c10617c9"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sourceTreeHash": "
|
|
3
|
+
"sourceTreeHash": "d7fd829de7da51533a57683dc37fd647e1d553468fca262e7c4c7f4504faa5a5",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
|
-
"docsBundleVersion": "2.0.
|
|
5
|
+
"docsBundleVersion": "2.0.354",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": ".env.example",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": ".funnelsgrove-docs.json",
|
|
19
|
-
"sha256": "
|
|
19
|
+
"sha256": "729f8ed96762eaac8d0b3404903d4fb6fe61db19c755da29f313e43f4678f09e",
|
|
20
20
|
"mode": "100644"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
79
|
-
"sha256": "
|
|
79
|
+
"sha256": "743837afa746bd63ffb9fbd2caa0ee6d64137f017802ab43fb746549cf57affa",
|
|
80
80
|
"mode": "100644"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
"path": "funnel-docs.config.json",
|
|
209
|
-
"sha256": "
|
|
209
|
+
"sha256": "9a17d1b37d62b21a7306cde0affe58f9563af24a34ff2b1024f29dc0c10617c9",
|
|
210
210
|
"mode": "100644"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
@@ -17,7 +17,7 @@ Supported read versions: `1`, `2`, `3`. Authoring and publish target version `3`
|
|
|
17
17
|
|
|
18
18
|
### Package release order
|
|
19
19
|
|
|
20
|
-
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.44.0`, then `@funnelsgrove/analytics` `0.27.0`, then `@funnelsgrove/payments` `0.71.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.44.0`, then `@funnelsgrove/analytics` `0.27.0`, then `@funnelsgrove/payments` `0.71.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.361`, and only then promotes the candidate to production traffic. The serving API must never advertise an unpublished preferred CLI. Publishing packages and deploying production remain separately approved operational actions.
|
|
21
21
|
<!-- funnelsgrove:generated:end contract-v3/migration/step-contract-v3 -->
|
|
22
22
|
|
|
23
23
|
## Version-last policy
|