@funnelsgrove/cli 0.1.357 → 0.1.360

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.
@@ -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 and every output's URLs. */
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: number;
225
+ softFindings: {
226
+ [k: string]: unknown;
227
+ }[];
226
228
  error: string | null;
227
229
  keptVariationId: string | null;
228
230
  }[];
@@ -259,6 +261,10 @@ type GenerateOptions = {
259
261
  texts?: string;
260
262
  swap?: string;
261
263
  pack?: string;
264
+ formats?: string;
265
+ variants?: string;
266
+ persuasionAngle?: string;
267
+ pain?: string;
262
268
  };
263
269
  export type RemixSlot = {
264
270
  id: string;
@@ -268,6 +274,8 @@ export type RemixSlot = {
268
274
  box: unknown;
269
275
  labelBox: unknown;
270
276
  style: Record<string, unknown>;
277
+ hidden?: boolean;
278
+ added?: boolean;
271
279
  };
272
280
  export type ReferenceLayout = {
273
281
  id: string;
@@ -280,9 +288,15 @@ export type ReferenceLayout = {
280
288
  plate_url: string | null;
281
289
  source_variation_name: string | null;
282
290
  slots: RemixSlot[];
291
+ plate_warnings?: {
292
+ code: string;
293
+ message: string;
294
+ slotId?: string;
295
+ text?: string;
296
+ }[];
283
297
  [key: string]: unknown;
284
298
  };
285
- /** `remix show`: the layout an agent edits, with a text set of the reference's own words to copy into a texts file. */
299
+ /** `remix show`: the layout an agent edits, with a text set of the words it draws to copy into a texts file. */
286
300
  export declare const summarizeLayout: (layout: ReferenceLayout) => {
287
301
  id: string;
288
302
  name: string;
@@ -293,19 +307,72 @@ export declare const summarizeLayout: (layout: ReferenceLayout) => {
293
307
  sourceVariation: string | null;
294
308
  sourceUrl: string;
295
309
  plateUrl: string | null;
296
- slots: RemixSlot[];
310
+ plateWarnings: {
311
+ code: string;
312
+ message: string;
313
+ slotId?: string;
314
+ text?: string;
315
+ }[];
316
+ slots: {
317
+ hidden: boolean;
318
+ added: boolean;
319
+ id: string;
320
+ role: string;
321
+ kind: "text" | "button";
322
+ text: string;
323
+ box: unknown;
324
+ labelBox: unknown;
325
+ style: Record<string, unknown>;
326
+ }[];
297
327
  textSet: {
298
328
  [k: string]: string;
299
329
  };
330
+ editing: {
331
+ command: string;
332
+ editable: string[];
333
+ fixed: string[];
334
+ boxes: string;
335
+ add: {
336
+ add: boolean;
337
+ role: string;
338
+ text: string;
339
+ box: {
340
+ x: number;
341
+ y: number;
342
+ width: number;
343
+ height: number;
344
+ };
345
+ style: {
346
+ family: string;
347
+ weight: number;
348
+ color: string;
349
+ };
350
+ };
351
+ remove: {
352
+ id: string;
353
+ remove: boolean;
354
+ };
355
+ preview: string;
356
+ };
300
357
  };
301
358
  /** A texts file: one text set (slot id to words) per output, or a single text set. */
302
359
  export declare const parseTextSets: (json: unknown) => Record<string, string>[];
303
- /** A slots file: slot edits (id, text, style), or the output of `remix show`; only words and style are sent. */
304
- export declare const slotEditsFromFile: (json: unknown) => {
305
- style?: object | undefined;
306
- text?: string | undefined;
307
- id: string;
308
- }[];
360
+ /**
361
+ * A slots file (CRE-BR-033): slot edits, added slots and removals, or the output of `remix show`. Edits send what a
362
+ * member may change (words, style, boxes, hidden) and leave out the role, kind and `added` flag the API keeps; an added
363
+ * slot sends its role (and kind, which the API accepts only as text).
364
+ */
365
+ export declare const slotEditsFromFile: (json: unknown) => ({
366
+ add: boolean;
367
+ id?: undefined;
368
+ remove?: undefined;
369
+ } | {
370
+ id: unknown;
371
+ remove: boolean;
372
+ } | {
373
+ id: unknown;
374
+ remove?: undefined;
375
+ })[];
309
376
  /** The `startGeneration` input of a Remix: a ready layout, the Angle and brand of its Variations, the text sets and a brand swap. */
310
377
  export declare const remixRequest: (options: GenerateOptions, angles: Angle[], textSets: Record<string, string>[]) => Record<string, unknown>;
311
378
  export declare const LAYOUT_WAIT_STOP: string[];
@@ -316,6 +383,177 @@ export declare const waitForLayout: (scope: CreativeScope, layoutId: string, opt
316
383
  }) => Promise<ReferenceLayout>;
317
384
  /** Builds the `startGeneration` input: a Brief id, or an inline Brief from the quick-create flags. */
318
385
  export declare const generationRequest: (options: GenerateOptions, angles: Angle[]) => Record<string, unknown>;
386
+ export type FormatSlot = {
387
+ id: string;
388
+ label: string;
389
+ purpose: string;
390
+ maxLength: number;
391
+ required: boolean;
392
+ kind?: string;
393
+ items?: {
394
+ min: number;
395
+ max: number;
396
+ };
397
+ };
398
+ export type FormatLayout = {
399
+ id: string;
400
+ name: string;
401
+ visual: string;
402
+ scenePrompt: string | null;
403
+ logo: boolean;
404
+ };
405
+ export type AdFormat = {
406
+ id: string;
407
+ name: string;
408
+ description: string;
409
+ whenToUse: string;
410
+ angles: string[];
411
+ slots: FormatSlot[];
412
+ layouts: FormatLayout[];
413
+ guardrails: string[];
414
+ sample: Record<string, unknown>;
415
+ sampleScene?: string;
416
+ };
417
+ /** One cell of a copy file: an Angle × a Format layout and its copy sets (the output of `formats copy`, edited). */
418
+ export type CopyFileCell = {
419
+ angle?: string;
420
+ angleId?: string;
421
+ format: string;
422
+ layout?: string | null;
423
+ persuasionAngle?: string | null;
424
+ textHook?: string | null;
425
+ visualHook?: string | null;
426
+ variants: {
427
+ copy: Record<string, unknown>;
428
+ scene?: string | null;
429
+ }[];
430
+ };
431
+ export type CopyFile = {
432
+ brand?: string;
433
+ sizes?: string[];
434
+ cells: CopyFileCell[];
435
+ };
436
+ /** `T4`, `T4:post-it` → a Format id and layout. */
437
+ export declare const parseFormatRefs: (value: string) => {
438
+ layoutId?: string | undefined;
439
+ formatId: string;
440
+ }[];
441
+ export declare const parseCopyFile: (json: unknown) => CopyFile;
442
+ /** The `startFormatBatch` input of a copy file: brand, sizes and pack from the flags or the file, cells with their copy and scenes only. */
443
+ export declare const formatBatchRequest: (file: CopyFile, angles: Angle[], options: {
444
+ brand?: string;
445
+ sizes?: string;
446
+ model?: string;
447
+ quality?: string;
448
+ }) => {
449
+ cells: {
450
+ persuasionAngle: string | null;
451
+ textHook: string | null;
452
+ visualHook: string | null;
453
+ variants: {
454
+ copy: Record<string, unknown>;
455
+ scene: string | null;
456
+ }[];
457
+ layoutId?: string | undefined;
458
+ angleId: string;
459
+ formatId: string;
460
+ }[];
461
+ quality?: string | undefined;
462
+ model?: string | undefined;
463
+ sizes?: string[] | undefined;
464
+ brand: string;
465
+ };
466
+ type CopyAnswer = {
467
+ cells: {
468
+ angleId: string;
469
+ angleCode: string;
470
+ angleName: string;
471
+ formatId: string;
472
+ layoutId: string;
473
+ visual: string;
474
+ persuasionAngle: string;
475
+ textHook: string | null;
476
+ visualHook: string | null;
477
+ variants: {
478
+ copy: Record<string, unknown>;
479
+ scene: string | null;
480
+ issues: string[];
481
+ warnings: string[];
482
+ }[];
483
+ }[];
484
+ failed: unknown[];
485
+ credits: unknown;
486
+ };
487
+ /** The copy file `formats copy` writes: cells keyed by Angle code and Format, with each set's issues and warnings to fix before starting. */
488
+ export declare const copyFileOf: (answer: CopyAnswer, input: {
489
+ brand: string;
490
+ sizes?: string[];
491
+ }) => {
492
+ cells: {
493
+ angle: string;
494
+ angleId: string;
495
+ angleName: string;
496
+ format: string;
497
+ layout: string;
498
+ visual: string;
499
+ persuasionAngle: string;
500
+ textHook: string | null;
501
+ visualHook: string | null;
502
+ variants: {
503
+ copy: Record<string, unknown>;
504
+ scene: string | null;
505
+ issues: string[];
506
+ warnings: string[];
507
+ }[];
508
+ }[];
509
+ failed: unknown[];
510
+ credits: unknown;
511
+ ok: boolean;
512
+ sizes?: string[] | undefined;
513
+ brand: string;
514
+ };
515
+ /** A Format Generation as an agent judges it: its Format, Persuasion Angle and each image with its QA findings named. */
516
+ export declare const summarizeFormatGeneration: (detail: GenerationDetail & {
517
+ generation: {
518
+ format_id?: string | null;
519
+ persuasion_angle?: string | null;
520
+ angle_code?: string;
521
+ };
522
+ }) => {
523
+ angle: string | undefined;
524
+ format: string | null;
525
+ persuasionAngle: string | null;
526
+ id: string;
527
+ status: string;
528
+ kind: string;
529
+ model: string;
530
+ provider: string;
531
+ credits: {
532
+ reserved: number;
533
+ settled: number;
534
+ released: number;
535
+ };
536
+ coverUrl: string | null;
537
+ videoUrl: string | null;
538
+ error: string | null;
539
+ outputs: {
540
+ id: string;
541
+ role: string;
542
+ sceneIndex: number | null;
543
+ status: string;
544
+ urls: {
545
+ size: string;
546
+ url: string;
547
+ }[] | {
548
+ url: string;
549
+ }[];
550
+ softFindings: {
551
+ [k: string]: unknown;
552
+ }[];
553
+ error: string | null;
554
+ keptVariationId: string | null;
555
+ }[];
556
+ };
319
557
  /** `fgrove creatives …`: angles, creatives, variations, dictionaries and files of one project. */
320
558
  export declare const registerCreativeCommands: (program: Command, deps: {
321
559
  resolveScope: (options: {
@@ -1,5 +1,5 @@
1
1
  import { createHash } from 'node:crypto';
2
- import { readdir, readFile, stat, writeFile } from 'node:fs/promises';
2
+ import { mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import { pathToFileURL } from 'node:url';
5
5
  const ANGLE_STATUSES = ['working', 'burned_out', 'no_data', 'under_review', 'idea', 'failed'];
@@ -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
- /** The agent-facing view of a Generation: status, credits and every output's URLs. */
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.length,
314
+ softFindings: output.qa.softFindings.map(qaFinding),
310
315
  error: output.error?.message ?? null,
311
316
  keptVariationId: output.kept_variation_id,
312
317
  })),
@@ -322,7 +327,21 @@ export const waitForGeneration = async (scope, generationId, options = {}) => {
322
327
  await sleep(options.intervalMs ?? 5000);
323
328
  }
324
329
  };
325
- /** `remix show`: the layout an agent edits, with a text set of the reference's own words to copy into a texts file. */
330
+ /** What `remix show` says about editing a layout (CRE-BR-033), so an agent sees the editable fields next to the slots. */
331
+ const editingGuide = (layout) => ({
332
+ command: `fgrove creatives remix update ${layout.id} --slots slots.json`,
333
+ editable: [
334
+ 'text', 'style.family', 'style.source', 'style.weight', 'style.italic', 'style.uppercase', 'style.color', 'style.accentColor', 'style.align',
335
+ 'box', 'labelBox (buttons)', 'hidden',
336
+ ],
337
+ fixed: ['id', 'role', 'kind'],
338
+ boxes: `{x, y, width, height} in pixels of the ${layout.size} reference, inside it and at least 24x16; a button's labelBox stays inside its box `
339
+ + '(the button is drawn on the plate)',
340
+ add: { add: true, role: 'badge', text: 'NEW', box: { x: 40, y: 40, width: 200, height: 72 }, style: { family: 'Montserrat', weight: 800, color: '#ffffff' } },
341
+ remove: { id: '<an added slot>', remove: true },
342
+ preview: `fgrove creatives remix preview ${layout.id} --texts texts.json (free)`,
343
+ });
344
+ /** `remix show`: the layout an agent edits, with a text set of the words it draws to copy into a texts file. */
326
345
  export const summarizeLayout = (layout) => ({
327
346
  id: layout.id,
328
347
  name: layout.name,
@@ -333,11 +352,13 @@ export const summarizeLayout = (layout) => ({
333
352
  sourceVariation: layout.source_variation_name,
334
353
  sourceUrl: layout.source_url,
335
354
  plateUrl: layout.plate_url,
336
- slots: layout.slots,
337
- textSet: Object.fromEntries(layout.slots.map((slot) => [slot.id, slot.text])),
355
+ plateWarnings: layout.plate_warnings ?? [],
356
+ slots: layout.slots.map((slot) => ({ ...slot, hidden: slot.hidden ?? false, added: slot.added ?? false })),
357
+ textSet: Object.fromEntries(layout.slots.filter((slot) => !slot.hidden).map((slot) => [slot.id, slot.text])),
358
+ editing: editingGuide(layout),
338
359
  });
339
360
  const TEXTS_HINT = 'a JSON array of text sets such as [{"headline": "Last week to file", "cta": "See if you qualify"}] '
340
- + '(slot ids from "fgrove creatives remix show <id>"; a slot left out keeps its words)';
361
+ + '(slot ids from "fgrove creatives remix show <id>"; a slot left out keeps its words, a hidden one is not drawn)';
341
362
  /** A texts file: one text set (slot id to words) per output, or a single text set. */
342
363
  export const parseTextSets = (json) => {
343
364
  const sets = Array.isArray(json) ? json : [json];
@@ -347,15 +368,33 @@ export const parseTextSets = (json) => {
347
368
  }
348
369
  return sets;
349
370
  };
350
- /** A slots file: slot edits (id, text, style), or the output of `remix show`; only words and style are sent. */
371
+ const SLOTS_HINT = 'The slots file must be the output of "remix show" (edited) or an array of slot edits {"id", "text", "style", "box", "labelBox", '
372
+ + '"hidden"}, new slots {"add": true, "role", "text", "box", "style"} and removals {"id", "remove": true}';
373
+ const isObject = (value) => Boolean(value) && typeof value === 'object' && !Array.isArray(value);
374
+ const pick = (slot, keys, check) => Object.fromEntries(keys.filter((key) => check(slot[key])).map((key) => [key, slot[key]]));
375
+ /**
376
+ * A slots file (CRE-BR-033): slot edits, added slots and removals, or the output of `remix show`. Edits send what a
377
+ * member may change (words, style, boxes, hidden) and leave out the role, kind and `added` flag the API keeps; an added
378
+ * slot sends its role (and kind, which the API accepts only as text).
379
+ */
351
380
  export const slotEditsFromFile = (json) => {
352
- const slots = (json && typeof json === 'object' && !Array.isArray(json) && 'slots' in json ? json.slots : json);
353
- if (!Array.isArray(slots) || !slots.every((slot) => slot && typeof slot === 'object' && typeof slot.id === 'string')) {
354
- throw new Error('The slots file must be the output of "remix show" or an array of {"id", "text", "style"}');
381
+ const slots = (isObject(json) && 'slots' in json ? json.slots : json);
382
+ if (!Array.isArray(slots) || !slots.every((slot) => isObject(slot) && (typeof slot.id === 'string' || slot.add === true))) {
383
+ throw new Error(SLOTS_HINT);
355
384
  }
356
- return slots.map((slot) => ({
357
- id: slot.id, ...(typeof slot.text === 'string' ? { text: slot.text } : {}), ...(slot.style && typeof slot.style === 'object' ? { style: slot.style } : {}),
358
- }));
385
+ return slots.map((slot) => {
386
+ if (slot.add === true) {
387
+ return { add: true, ...pick(slot, ['id', 'role', 'kind', 'text'], (value) => typeof value === 'string'), ...pick(slot, ['box', 'style'], isObject),
388
+ ...pick(slot, ['hidden'], (value) => typeof value === 'boolean') };
389
+ }
390
+ if (slot.remove === true) {
391
+ return { id: slot.id, remove: true };
392
+ }
393
+ return {
394
+ id: slot.id, ...pick(slot, ['text'], (value) => typeof value === 'string'), ...pick(slot, ['style', 'box', 'labelBox'], isObject),
395
+ ...pick(slot, ['hidden'], (value) => typeof value === 'boolean'),
396
+ };
397
+ });
359
398
  };
360
399
  /** The `startGeneration` input of a Remix: a ready layout, the Angle and brand of its Variations, the text sets and a brand swap. */
361
400
  export const remixRequest = (options, angles, textSets) => {
@@ -428,9 +467,57 @@ const parseScene = (value) => {
428
467
  /** `fgrove creatives generate` and `fgrove creatives generations …`. */
429
468
  const registerGenerationRunCommands = (root, input) => {
430
469
  const { scoped, run } = input;
431
- /** `generate` and `generations start`: a Brief, a quick-create Brief, or a Remix (`--flow remix`). */
470
+ /**
471
+ * `generations start --flow format`: a copy file (reviewed) or, without one, copy written for `--angle × --formats` and started at
472
+ * once. One Generation per cell, in one batch; `--estimate` prices the whole matrix.
473
+ */
474
+ const startFormat = async (scope, options) => {
475
+ let file;
476
+ let written = null;
477
+ const all = await input.angles(scope);
478
+ if (options.texts) {
479
+ file = parseCopyFile(JSON.parse(await readFile(options.texts, 'utf8')));
480
+ }
481
+ else {
482
+ if (!options.angle || !options.formats || !options.brand) {
483
+ throw new Error(`A Format Generation needs --texts <file> (${COPY_FILE_HINT}), or --angle, --formats and --brand`);
484
+ }
485
+ if (options.estimate) {
486
+ // Priced before any copy is written, for free: the words do not change the price, so each Format's sample copy stands in.
487
+ const library = await api(scope, 'formats', 'query');
488
+ file = { brand: options.brand, cells: parseSizes(options.angle).flatMap((angle) => parseFormatRefs(options.formats).map((ref) => {
489
+ const format = library.formats.find((item) => item.id === ref.formatId);
490
+ const layout = format.layouts.find((item) => item.id === ref.layoutId) ?? format.layouts[0];
491
+ return {
492
+ angle, format: format.id, layout: layout.id, variants: Array.from({ length: parseNumber(options.variants ?? '1') }, () => ({
493
+ copy: format.sample, scene: layout.visual === 'brand' ? null : format.sampleScene ?? format.name,
494
+ })),
495
+ };
496
+ })) };
497
+ return api(scope, 'estimateFormatBatch', 'query', formatBatchRequest(file, all, options));
498
+ }
499
+ const answer = await api(scope, 'writeFormatCopy', 'mutation', formatCopyRequest(all, {
500
+ ...options, angle: options.angle, formats: options.formats, brand: options.brand,
501
+ }));
502
+ file = copyFileOf(answer, { brand: options.brand });
503
+ written = file;
504
+ }
505
+ const request = {
506
+ ...formatBatchRequest(file, all, options),
507
+ ...(options.pack ? { packCreativeId: findCreative(await input.creatives(scope), options.pack).id } : {}),
508
+ };
509
+ if (options.estimate) {
510
+ return { ...(await api(scope, 'estimateFormatBatch', 'query', request)), ...(written ? { copy: written } : {}) };
511
+ }
512
+ const started = await api(scope, 'startFormatBatch', 'mutation', request);
513
+ const generations = options.wait
514
+ ? await Promise.all(started.generations.map((detail) => waitForGeneration(scope, detail.generation.id)))
515
+ : started.generations;
516
+ return { batchId: started.batchId, stopped: started.stopped, generations: generations.map((detail) => summarizeFormatGeneration(detail)) };
517
+ };
518
+ /** `generate` and `generations start`: a Brief, a quick-create Brief, a Remix (`--flow remix`) or Formats (`--flow format`). */
432
519
  const startCommand = (command) => scoped(command
433
- .option('--flow <flow>', 'image | video | remix (default: --kind, else image)')
520
+ .option('--flow <flow>', 'image | video | remix | format (default: --kind, else image)')
434
521
  .option('--brief <id>', 'Brief id')
435
522
  .option('--angle <angle>', 'Quick-create and Remix: angle code or slug').option('--brand <brand>', 'Quick-create and Remix: brand with a Brand Kit')
436
523
  .option('--prompt <text>', 'Quick-create: scene to generate').option('--headline <text>', 'Quick-create: headline')
@@ -440,8 +527,12 @@ const registerGenerationRunCommands = (root, input) => {
440
527
  .option('--voiceover <text>', 'Quick-create video: voiceover script')
441
528
  .option('--kind <kind>', 'Quick-create: image | video', 'image')
442
529
  .option('--layout <id>', 'Remix: Reference Layout id (fgrove creatives remix list)')
443
- .option('--texts <file>', `Remix: ${TEXTS_HINT}; one image each, 1-5`)
444
- .option('--swap <instruction>', 'Remix: brand swap made once on the clean plate, such as "Replace the PayPal wordmark with the Venmo wordmark"')
530
+ .option('--texts <file>', `Remix: ${TEXTS_HINT}; one image each, 1-5. Format: a copy file from "formats copy" (edited)`)
531
+ .option('--formats <formats>', 'Format without --texts: Formats to write copy for and start at once, such as T4,T8 (with --angle C001,C002 --brand)')
532
+ .option('--variants <n>', 'Format without --texts: copy sets per Format (1-4)', '1')
533
+ .option('--persuasion-angle <id>', 'Format without --texts: one Persuasion Angle for every cell')
534
+ .option('--pain <moment>', 'Format without --texts: the pain moment the copy opens with')
535
+ .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"')
445
536
  .option('--pack <creative>', 'Approve outputs into this existing Creative, such as st003 (default: one new Creative per batch)')
446
537
  .option('--model <model>', 'nano-banana-2.1 | gpt-image-2 (image); seedance-2-mini | seedance-2.5 (video)')
447
538
  .option('--quality <quality>', 'low | medium | high (image scenes and keyframes)')
@@ -453,8 +544,11 @@ const registerGenerationRunCommands = (root, input) => {
453
544
  .option('--estimate', 'Print the credits per step and the balance; start nothing'))
454
545
  .action(run(async (scope, options) => {
455
546
  const flow = options.flow ?? options.kind;
456
- if (!['image', 'video', 'remix'].includes(flow)) {
457
- throw new Error('--flow is image, video or remix');
547
+ if (!['image', 'video', 'remix', 'format'].includes(flow)) {
548
+ throw new Error('--flow is image, video, remix or format');
549
+ }
550
+ if (flow === 'format') {
551
+ return startFormat(scope, options);
458
552
  }
459
553
  const request = {
460
554
  ...(flow === 'remix'
@@ -470,7 +564,7 @@ const registerGenerationRunCommands = (root, input) => {
470
564
  }));
471
565
  startCommand(root.command('generate').description('Start a Generation from a Brief, a quick-create Brief or a Remix; reserves Creative Credits'));
472
566
  const generations = root.command('generations').description('Generations: the gallery of AI runs, their outputs, approval and keeping');
473
- startCommand(generations.command('start').description('Start a Generation (same as "generate"): --flow image | video | remix'));
567
+ startCommand(generations.command('start').description('Start a Generation (same as "generate"): --flow image | video | remix | format'));
474
568
  scoped(generations.command('list').description('List Generations, newest first')
475
569
  .option('--angle <angle>', 'Only this angle').option('--brand <brand>', 'Only this brand').option('--kind <kind>', 'image | video')
476
570
  .option('--status <status>', 'queued | running | awaiting_approval | assembling | succeeded | partially_succeeded | failed | canceled')
@@ -565,15 +659,17 @@ const registerGenerationRunCommands = (root, input) => {
565
659
  .action(run((scope, options) => api(scope, 'referenceLayouts', 'query', {
566
660
  ...(options.limit ? { limit: parseNumber(options.limit) } : {}), ...(options.cursor ? { cursor: options.cursor } : {}),
567
661
  })));
568
- scoped(remix.command('show <id>').description('Show a layout with its slots (ids, words, boxes, style) and a text set of its own words')
662
+ scoped(remix.command('show <id>').description('Show a layout with its slots (ids, words, boxes, style, hidden, added), a text set of the words it draws and what an edit may change')
569
663
  .option('--wait', 'Poll until the layout is ready or failed').option('--full', 'Print every stored field, with the analysis'))
570
664
  .action(run(async (scope, options, id) => {
571
665
  const layout = options.wait ? await waitForLayout(scope, id) : await api(scope, 'referenceLayout', 'query', { layoutId: id });
572
666
  return options.full ? layout : summarizeLayout(layout);
573
667
  }));
574
- scoped(remix.command('update <id>').description('Edit slots\' words and style (family, source, weight, italic, uppercase, color, accentColor, align) or rename; free. '
575
- + 'A family is a Google Fonts family (source "google") or a Workspace Font (source "workspace"); a missing weight becomes the next heavier one')
576
- .option('--slots <file>', 'The output of "remix show" (edited) or an array of {"id", "text", "style"}').option('--name <name>', 'New name'))
668
+ scoped(remix.command('update <id>').description('Edit slots (words, style, box, a button\'s labelBox, hidden), add text slots over the plate, remove added '
669
+ + 'ones, or rename; free. A family is a Google Fonts family (source "google") or a Workspace Font (source "workspace"); a missing weight '
670
+ + 'becomes the next heavier one. Boxes are pixels of the reference size')
671
+ .option('--slots <file>', 'The output of "remix show" (edited) or an array of slot edits, {"add": true, ...} new slots and {"id", "remove": true}')
672
+ .option('--name <name>', 'New name'))
577
673
  .action(run(async (scope, options, id) => {
578
674
  if (!options.slots && !options.name) {
579
675
  throw new Error('Pass --slots <file> or --name <name>');
@@ -584,6 +680,212 @@ const registerGenerationRunCommands = (root, input) => {
584
680
  ...(options.name ? { name: options.name } : {}),
585
681
  }));
586
682
  }));
683
+ scoped(remix.command('preview <id>').description('Render text sets over the clean plate for free, as a Remix would (no credits, no brand swap), '
684
+ + 'and save one PNG each with the renderer QA')
685
+ .option('--texts <file>', TEXTS_HINT).option('--out <dir>', 'Directory for the PNGs (default: ./remix-preview-<first 8 of the id>)'))
686
+ .action(run(async (scope, options, id) => {
687
+ if (!options.texts) {
688
+ throw new Error(`Pass --texts <file>: ${TEXTS_HINT}`);
689
+ }
690
+ const textSets = parseTextSets(JSON.parse(await readFile(options.texts, 'utf8')));
691
+ const preview = await api(scope, 'previewReferenceLayout', 'mutation', { layoutId: id, textSets });
692
+ const out = path.resolve(options.out ?? `remix-preview-${id.slice(0, 8)}`);
693
+ await mkdir(out, { recursive: true });
694
+ const images = [];
695
+ for (const image of preview.images) {
696
+ const file = path.join(out, `set-${image.textSet}.png`);
697
+ await writeFile(file, Buffer.from(image.base64, 'base64'));
698
+ images.push({ textSet: image.textSet, path: file, hardFailures: image.qa.hardFailures, softFindings: image.qa.softFindings });
699
+ }
700
+ return { layoutId: preview.layoutId, size: preview.size, ok: preview.ok, note: preview.note, images };
701
+ }));
702
+ };
703
+ const COPY_FILE_HINT = 'The copy file must be the output of "fgrove creatives formats copy" (edited): {"brand", "sizes", "cells": [{"angle", "format", '
704
+ + '"layout", "persuasionAngle", "variants": [{"copy": {slot: words}, "scene": "…"}]}]}';
705
+ /** `T4`, `T4:post-it` → a Format id and layout. */
706
+ export const parseFormatRefs = (value) => value.split(',').map((item) => item.trim()).filter(Boolean).map((item) => {
707
+ const [formatId, layoutId] = item.split(':');
708
+ if (!/^T([1-9]|1\d|2[0-2])$/.test(formatId)) {
709
+ throw new Error(`"${item}" is not a Format; use T1 to T22, optionally with a layout such as T4:post-it`);
710
+ }
711
+ return { formatId: formatId, ...(layoutId ? { layoutId } : {}) };
712
+ });
713
+ export const parseCopyFile = (json) => {
714
+ if (!isObject(json) || !Array.isArray(json.cells) || json.cells.length === 0 || !json.cells.every((cell) => isObject(cell)
715
+ && typeof cell.format === 'string' && (typeof cell.angle === 'string' || typeof cell.angleId === 'string')
716
+ && Array.isArray(cell.variants) && cell.variants.every((variant) => isObject(variant) && isObject(variant.copy)))) {
717
+ throw new Error(COPY_FILE_HINT);
718
+ }
719
+ return json;
720
+ };
721
+ /** The `writeFormatCopy` input of an Angle × Format matrix from the flags. */
722
+ const formatCopyRequest = (angles, options) => ({
723
+ angleIds: parseSizes(options.angle).map((ref) => findAngle(angles, ref).id), brand: options.brand, formats: parseFormatRefs(options.formats),
724
+ variants: parseNumber(options.variants ?? '1'), ...(options.persuasionAngle ? { persuasionAngle: options.persuasionAngle } : {}),
725
+ ...(options.pain ? { painMoment: options.pain } : {}), ...(options.direction ? { direction: options.direction } : {}),
726
+ });
727
+ /** The `startFormatBatch` input of a copy file: brand, sizes and pack from the flags or the file, cells with their copy and scenes only. */
728
+ export const formatBatchRequest = (file, angles, options) => {
729
+ const brand = options.brand ?? file.brand;
730
+ if (!brand) {
731
+ throw new Error('Pass --brand, or keep "brand" in the copy file');
732
+ }
733
+ return {
734
+ brand,
735
+ ...(options.sizes ? { sizes: parseSizes(options.sizes) } : file.sizes ? { sizes: file.sizes } : {}),
736
+ ...(options.model ? { model: options.model } : {}),
737
+ ...(options.quality ? { quality: options.quality } : {}),
738
+ cells: file.cells.map((cell) => ({
739
+ angleId: cell.angleId ?? findAngle(angles, cell.angle).id,
740
+ formatId: cell.format,
741
+ ...(cell.layout ? { layoutId: cell.layout } : {}),
742
+ persuasionAngle: cell.persuasionAngle ?? null,
743
+ textHook: cell.textHook ?? null,
744
+ visualHook: cell.visualHook ?? null,
745
+ variants: cell.variants.map((variant) => ({ copy: variant.copy, scene: variant.scene ?? null })),
746
+ })),
747
+ };
748
+ };
749
+ /** The copy file `formats copy` writes: cells keyed by Angle code and Format, with each set's issues and warnings to fix before starting. */
750
+ export const copyFileOf = (answer, input) => ({
751
+ brand: input.brand,
752
+ ...(input.sizes ? { sizes: input.sizes } : {}),
753
+ cells: answer.cells.map((cell) => ({
754
+ angle: cell.angleCode, angleId: cell.angleId, angleName: cell.angleName, format: cell.formatId, layout: cell.layoutId, visual: cell.visual,
755
+ persuasionAngle: cell.persuasionAngle, textHook: cell.textHook, visualHook: cell.visualHook, variants: cell.variants,
756
+ })),
757
+ failed: answer.failed,
758
+ credits: answer.credits,
759
+ ok: answer.cells.every((cell) => cell.variants.length > 0 && cell.variants.every((variant) => variant.issues.length === 0)),
760
+ });
761
+ /** A Format Generation as an agent judges it: its Format, Persuasion Angle and each image with its QA findings named. */
762
+ export const summarizeFormatGeneration = (detail) => ({
763
+ ...summarizeGeneration(detail),
764
+ angle: detail.generation.angle_code,
765
+ format: detail.generation.format_id ?? null,
766
+ persuasionAngle: detail.generation.persuasion_angle ?? null,
767
+ });
768
+ /** `fgrove creatives formats …` and `variations tag`. */
769
+ const registerFormatCommands = (root, input) => {
770
+ const { scoped, run } = input;
771
+ const library = (scope) => api(scope, 'formats', 'query');
772
+ const formats = root.command('formats').description('The Format library (T1-T22): ad layouts with text slots, shared by every workspace; copy, previews and stats');
773
+ scoped(formats.command('list').description('List the Formats with their layouts (brand = no image model, scene/illustration = a generated picture) and suggested Persuasion Angles')
774
+ .option('--angle <persuasion angle>', 'Only Formats that suit this Persuasion Angle, such as us_vs_them'))
775
+ .action(run(async (scope, options) => (await library(scope)).formats
776
+ .filter((format) => !options.angle || format.angles.includes(options.angle))
777
+ .map((format) => ({
778
+ id: format.id, name: format.name, whenToUse: format.whenToUse, angles: format.angles,
779
+ layouts: format.layouts.map((layout) => `${layout.id} (${layout.visual})`),
780
+ slots: format.slots.map((slot) => `${slot.id}${slot.required ? '' : '?'}:${slot.kind === 'list' ? `${slot.items?.min}-${slot.items?.max}x` : ''}${slot.maxLength}`),
781
+ }))));
782
+ scoped(formats.command('show <id>').description('Show one Format: slots with purpose and limits, layouts with their scene prompt pattern, guardrails and sample copy'))
783
+ .action(run(async (scope, _options, id) => {
784
+ const format = (await library(scope)).formats.find((item) => item.id === id?.toUpperCase());
785
+ if (!format) {
786
+ throw new Error(`No Format "${id}"; run fgrove creatives formats list`);
787
+ }
788
+ return format;
789
+ }));
790
+ scoped(formats.command('angles').description('List the Persuasion Angles: the shared vocabulary of how an ad persuades, with hook shapes'))
791
+ .action(run(async (scope) => (await library(scope)).persuasionAngles));
792
+ scoped(formats.command('copy').description('Write copy sets with an LLM for every Angle × Format cell into a copy file; charged per Angle. '
793
+ + 'Review and edit the file, preview it, then start it with generations start --flow format --texts <file>')
794
+ .requiredOption('--angle <angles>', 'Comma-separated Angle codes or slugs, such as C001,C004')
795
+ .requiredOption('--formats <formats>', 'Comma-separated Formats, optionally with a layout: T4,T8,T4:post-it')
796
+ .requiredOption('--brand <brand>', 'Brand of the Variations (its Brand Kit voice is used)')
797
+ .option('--variants <n>', 'Copy sets per Format (1-4)', '2')
798
+ .option('--persuasion-angle <id>', 'One Persuasion Angle for every cell (default: the best suggested one per Format)')
799
+ .option('--pain <moment>', 'The pain moment: where, when and what the person feels')
800
+ .option('--direction <text>', 'Extra direction for the copywriter')
801
+ .option('--sizes <list>', 'Sizes to keep in the file for the Generation, such as 1080x1350,1080x1920')
802
+ .option('--out <file>', 'Write the copy file here (default: print it)'))
803
+ .action(run(async (scope, options) => {
804
+ const all = await input.angles(scope);
805
+ const answer = await api(scope, 'writeFormatCopy', 'mutation', formatCopyRequest(all, options));
806
+ const file = copyFileOf(answer, { brand: options.brand, ...(options.sizes ? { sizes: parseSizes(options.sizes) } : {}) });
807
+ if (!options.out) {
808
+ return file;
809
+ }
810
+ await writeFile(options.out, `${JSON.stringify(file, null, 2)}\n`);
811
+ return { path: path.resolve(options.out), ok: file.ok, cells: file.cells.length, failed: answer.failed, credits: answer.credits };
812
+ }));
813
+ 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 '
814
+ + 'for a generated picture), and save one PNG per copy set with QA, copy issues and warnings')
815
+ .requiredOption('--texts <file>', 'A copy file (every cell is previewed), or an array of copy sets with --format')
816
+ .option('--format <format>', 'With an array of copy sets: the Format, such as T4 or T4:post-it')
817
+ .option('--brand <brand>', 'Brand whose Brand Kit to use (default: the copy file\'s)')
818
+ .option('--size <size>', '1080x1080 | 1080x1350 | 1080x1920', '1080x1350')
819
+ .option('--cell <n>', 'Only this cell of a copy file (1-based)')
820
+ .option('--out <dir>', 'Directory for the PNGs (default: ./format-preview)'))
821
+ .action(run(async (scope, options) => {
822
+ const json = JSON.parse(await readFile(options.texts, 'utf8'));
823
+ const jobs = [];
824
+ let brand = options.brand;
825
+ if (Array.isArray(json)) {
826
+ if (!options.format) {
827
+ throw new Error('An array of copy sets needs --format, such as --format T4');
828
+ }
829
+ const [ref] = parseFormatRefs(options.format);
830
+ jobs.push({ label: ref.formatId, ...ref, copySets: json });
831
+ }
832
+ else {
833
+ const file = parseCopyFile(json);
834
+ brand ??= file.brand;
835
+ file.cells.forEach((cell, index) => {
836
+ if (options.cell && parseNumber(options.cell) !== index + 1) {
837
+ return;
838
+ }
839
+ jobs.push({
840
+ label: `cell-${index + 1}`, formatId: cell.format, ...(cell.layout ? { layoutId: cell.layout } : {}),
841
+ copySets: cell.variants.map((variant) => variant.copy),
842
+ });
843
+ });
844
+ }
845
+ const out = path.resolve(options.out ?? 'format-preview');
846
+ await mkdir(out, { recursive: true });
847
+ const results = [];
848
+ for (const job of jobs) {
849
+ const preview = await api(scope, 'previewFormat', 'mutation', {
850
+ formatId: job.formatId, ...(job.layoutId ? { layoutId: job.layoutId } : {}), ...(brand ? { brand } : {}), size: options.size, copySets: job.copySets,
851
+ });
852
+ for (const image of preview.images) {
853
+ const file = path.join(out, `${job.label}-set-${image.copySet}-${preview.size}.png`);
854
+ await writeFile(file, Buffer.from(image.base64, 'base64'));
855
+ results.push({
856
+ cell: job.label, format: `${preview.formatId}:${preview.layoutId}`, copySet: image.copySet, path: file, issues: image.issues, warnings: image.warnings,
857
+ hardFailures: image.qa.hardFailures, softFindings: image.qa.softFindings,
858
+ });
859
+ }
860
+ }
861
+ return { ok: results.every((item) => item.issues.length === 0 && item.hardFailures.length === 0), size: options.size, images: results };
862
+ }));
863
+ scoped(formats.command('stats').description('This project\'s Variations by Format and by Persuasion Angle, with launches, Go and winner shares (tagged Variations only)'))
864
+ .action(run((scope) => api(scope, 'formatStats', 'query')));
865
+ const variations = root.commands.find((command) => command.name() === 'variations');
866
+ scoped(variations.command('tag').description('Read Variation images with a vision model into a Format and a Persuasion Angle for formats stats; '
867
+ + 'charged per Variation. Untagged image Variations by default, at most 200 per run')
868
+ .option('--variations <ids>', 'Only these Variations (comma-separated ids)')
869
+ .option('--retag', 'Read tagged Variations again')
870
+ .option('--limit <n>', 'At most this many (1-200)')
871
+ .option('--estimate', 'Print how many would be read and the credits; start nothing')
872
+ .option('--wait', 'Poll until the run finishes'))
873
+ .action(run(async (scope, options) => {
874
+ const request = {
875
+ ...(options.variations ? { variationIds: parseSizes(options.variations) } : {}),
876
+ ...(options.retag ? { retag: true } : {}),
877
+ ...(options.limit ? { limit: parseNumber(options.limit) } : {}),
878
+ };
879
+ if (options.estimate) {
880
+ return api(scope, 'estimateVariationTagging', 'query', request);
881
+ }
882
+ let tagRun = await api(scope, 'startVariationTagging', 'mutation', request);
883
+ while (options.wait && ['queued', 'running'].includes(tagRun.status)) {
884
+ await new Promise((resolve) => { setTimeout(resolve, 5000); });
885
+ tagRun = await api(scope, 'variationTaggingRun', 'query', { runId: tagRun.id });
886
+ }
887
+ return tagRun;
888
+ }));
587
889
  };
588
890
  /** `fgrove creatives brand-kits|fonts|briefs|render`. */
589
891
  const registerGenerationCommands = (root, input) => {
@@ -781,7 +1083,13 @@ Examples:
781
1083
  fgrove creatives remix create --variation CLMB_st027_03_deadline --wait --project claimbee
782
1084
  fgrove creatives remix show <layout id> --project claimbee > layout.json
783
1085
  fgrove creatives remix update <layout id> --slots layout.json --project claimbee
784
- 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`);
1086
+ 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
1087
+ fgrove creatives formats list --angle us_vs_them --project acme
1088
+ 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
1089
+ fgrove creatives formats preview --texts copy.json --size 1080x1920 --project acme
1090
+ fgrove creatives generations start --flow format --texts copy.json --sizes 1080x1350,1080x1920 --estimate --project acme
1091
+ fgrove creatives variations tag --estimate --project acme
1092
+ fgrove creatives formats stats --project acme`);
785
1093
  const settings = root.command('settings').description('Project creative settings');
786
1094
  scoped(settings.command('show').description('Show the name prefix and dictionaries'))
787
1095
  .action(run((scope) => api(scope, 'settings', 'query')));
@@ -928,4 +1236,5 @@ Examples:
928
1236
  })));
929
1237
  registerGenerationCommands(root, { scoped, run, angles });
930
1238
  registerGenerationRunCommands(root, { scoped, run, angles, creatives });
1239
+ registerFormatCommands(root, { scoped, run, angles });
931
1240
  };
@@ -4,10 +4,10 @@
4
4
  "minimumCliVersion": "0.1.20",
5
5
  "entries": [
6
6
  {
7
- "repositoryCliVersion": "0.1.357",
7
+ "repositoryCliVersion": "0.1.360",
8
8
  "manifest": {
9
9
  "schemaVersion": 1,
10
- "bundleVersion": "2.0.350",
10
+ "bundleVersion": "2.0.353",
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": "d7849f21c005bcac20c8e8e6caca4e90eff1c19add790e6e19904129714f4fc5"
48
+ "sha256": "29ebaa7fce53e6025ea19caf347d953866575963f1f5e96df8050788674b56ce"
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": "ad07c811a7a8ac21e7aa01c324a2d7b764e8dc5af03ebcd8b36617859ea8bb42"
148
+ "sha256": "c36088a7c3173139a24d4f425a761dc02618b56e0e5e410e29aab314d06d5942"
149
149
  }
150
150
  ]
151
151
  }
152
152
  },
153
153
  {
154
- "repositoryCliVersion": "0.1.356",
154
+ "repositoryCliVersion": "0.1.359",
155
155
  "manifest": {
156
156
  "schemaVersion": 1,
157
- "bundleVersion": "2.0.349",
157
+ "bundleVersion": "2.0.352",
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": "7cf7ffb707ef0d534ad4c9b3377c1d192cb304a16ca30f5f014ce0a8a0be065e"
195
+ "sha256": "eaf84a1cc28753b4b832831ebb43fedba90330000fff223c4512d79e94500086"
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": "7c4dc24661a335b885b43d7ed8a53abc288344ea81efc9250908a4ac0cce0991"
295
+ "sha256": "23ae803bc80a092a62680147747e0b74b66bd923d23d75606d502815f2946a75"
296
296
  }
297
297
  ]
298
298
  }
299
299
  },
300
300
  {
301
- "repositoryCliVersion": "0.1.355",
301
+ "repositoryCliVersion": "0.1.358",
302
302
  "manifest": {
303
303
  "schemaVersion": 1,
304
- "bundleVersion": "2.0.348",
304
+ "bundleVersion": "2.0.351",
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": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee"
342
+ "sha256": "f4296760cadbdb0c0c30fb6ef609dacb21a8ea9624f16851962e25b7612673b4"
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": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99"
442
+ "sha256": "4ee7ede9c30a033dde7c0616792f0218f7eaeddb6bca22c70caa3ba67d04c65d"
443
443
  }
444
444
  ]
445
445
  }
446
446
  },
447
447
  {
448
- "repositoryCliVersion": "0.1.354",
448
+ "repositoryCliVersion": "0.1.357",
449
449
  "manifest": {
450
450
  "schemaVersion": 1,
451
- "bundleVersion": "2.0.347",
451
+ "bundleVersion": "2.0.350",
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": "f1c2098061ec0f53fc655c29079ee6cb45889b24d86fa620ab1e406017facc50"
489
+ "sha256": "d7849f21c005bcac20c8e8e6caca4e90eff1c19add790e6e19904129714f4fc5"
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": "a970838c18d563327669a681196c48b83bd3e00d9658c60d9402ccb226057428"
589
+ "sha256": "ad07c811a7a8ac21e7aa01c324a2d7b764e8dc5af03ebcd8b36617859ea8bb42"
590
590
  }
591
591
  ]
592
592
  }
593
593
  },
594
594
  {
595
- "repositoryCliVersion": "0.1.353",
595
+ "repositoryCliVersion": "0.1.356",
596
596
  "manifest": {
597
597
  "schemaVersion": 1,
598
- "bundleVersion": "2.0.346",
598
+ "bundleVersion": "2.0.349",
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": "7aeda8d18a85667010396e754ff77338acd30494b09819a23fdf257401ff7f15"
636
+ "sha256": "7cf7ffb707ef0d534ad4c9b3377c1d192cb304a16ca30f5f014ce0a8a0be065e"
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": "7dacbe5ea0b190e1e6604033cfa5d933ff0da2aacd5c1035fcf0616601da4367"
736
+ "sha256": "7c4dc24661a335b885b43d7ed8a53abc288344ea81efc9250908a4ac0cce0991"
737
737
  }
738
738
  ]
739
739
  }
740
740
  },
741
741
  {
742
- "repositoryCliVersion": "0.1.352",
742
+ "repositoryCliVersion": "0.1.355",
743
743
  "manifest": {
744
744
  "schemaVersion": 1,
745
- "bundleVersion": "2.0.345",
745
+ "bundleVersion": "2.0.348",
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": "a66ccac6a2aa87361d491759c06c87c718755552f04250ca51768679fbade4ac"
783
+ "sha256": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee"
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": "853f573a6667f1ec5ff4da9075ca8df488f82d984723c44bc947e60f020c6b51"
883
+ "sha256": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99"
884
884
  }
885
885
  ]
886
886
  }
887
887
  },
888
888
  {
889
- "repositoryCliVersion": "0.1.351",
889
+ "repositoryCliVersion": "0.1.354",
890
890
  "manifest": {
891
891
  "schemaVersion": 1,
892
- "bundleVersion": "2.0.344",
892
+ "bundleVersion": "2.0.347",
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": "5db03d9f8f9adf0542dc4bd4008a5cf42073cc3eb99909892efaffe49b751e5c"
930
+ "sha256": "f1c2098061ec0f53fc655c29079ee6cb45889b24d86fa620ab1e406017facc50"
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": "8b3a1d3859156a55c0125093d720aefc84a9eda7153a58211eba2460fc23316b"
1030
+ "sha256": "a970838c18d563327669a681196c48b83bd3e00d9658c60d9402ccb226057428"
1031
1031
  }
1032
1032
  ]
1033
1033
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelsgrove/cli",
3
- "version": "0.1.357",
3
+ "version": "0.1.360",
4
4
  "description": "FunnelsGrove command-line tools for editing, syncing, and publishing funnels",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.350",
3
+ "bundleVersion": "2.0.353",
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": "d7849f21c005bcac20c8e8e6caca4e90eff1c19add790e6e19904129714f4fc5"
41
+ "sha256": "29ebaa7fce53e6025ea19caf347d953866575963f1f5e96df8050788674b56ce"
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": "ad07c811a7a8ac21e7aa01c324a2d7b764e8dc5af03ebcd8b36617859ea8bb42"
141
+ "sha256": "c36088a7c3173139a24d4f425a761dc02618b56e0e5e410e29aab314d06d5942"
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.357`, 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.
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.360`, 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.350",
3
+ "bundleVersion": "2.0.353",
4
4
  "contractSource": "funnelsgrove-repository://apps/funnel-runtime/contracts/step-contract-v2.json",
5
5
  "fullyGenerated": [
6
6
  ".funnelsgrove-docs.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.350",
3
+ "bundleVersion": "2.0.353",
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": "d7849f21c005bcac20c8e8e6caca4e90eff1c19add790e6e19904129714f4fc5"
41
+ "sha256": "29ebaa7fce53e6025ea19caf347d953866575963f1f5e96df8050788674b56ce"
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": "ad07c811a7a8ac21e7aa01c324a2d7b764e8dc5af03ebcd8b36617859ea8bb42"
141
+ "sha256": "c36088a7c3173139a24d4f425a761dc02618b56e0e5e410e29aab314d06d5942"
142
142
  }
143
143
  ]
144
144
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sourceTreeHash": "1dcd0a6695f74078ded0afda1cf790174863f44284e7b8f985574c78105c8d54",
3
+ "sourceTreeHash": "c70ea8a38ce9b80ce8a03dae7c55e96d6a9a8b7a49a1b74f6a8d9d8d503834cb",
4
4
  "stepContractVersion": 3,
5
- "docsBundleVersion": "2.0.350",
5
+ "docsBundleVersion": "2.0.353",
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": "4bce2804ef8c13fdbc9a3a8427cc3828e3e40802f80b29afccda290693b62cf6",
19
+ "sha256": "3075ab60339b4b909d1eeae657d8a5ce6a9f712b7e685779476cf25c1c9f446e",
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": "d7849f21c005bcac20c8e8e6caca4e90eff1c19add790e6e19904129714f4fc5",
79
+ "sha256": "29ebaa7fce53e6025ea19caf347d953866575963f1f5e96df8050788674b56ce",
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": "ad07c811a7a8ac21e7aa01c324a2d7b764e8dc5af03ebcd8b36617859ea8bb42",
209
+ "sha256": "c36088a7c3173139a24d4f425a761dc02618b56e0e5e410e29aab314d06d5942",
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.357`, 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.
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.360`, 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.350",
3
+ "bundleVersion": "2.0.353",
4
4
  "contractSource": "funnelsgrove-repository://apps/funnel-runtime/contracts/step-contract-v2.json",
5
5
  "fullyGenerated": [
6
6
  ".funnelsgrove-docs.json",