@funnelsgrove/cli 0.1.355 → 0.1.358

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.
@@ -104,6 +104,7 @@ export type BrandKitContent = {
104
104
  fonts: Record<string, {
105
105
  family: string;
106
106
  weights: number[];
107
+ source?: 'google' | 'workspace';
107
108
  }>;
108
109
  radii: Record<string, number>;
109
110
  logo: {
@@ -141,6 +142,16 @@ export type Brief = {
141
142
  };
142
143
  /** A kit file is either the output of `brand-kits show` or its `content`; only editable fields are sent. */
143
144
  export declare const brandKitPatchFromFile: (json: unknown) => Record<string, unknown>;
145
+ /**
146
+ * A Brand Kit font flag, `Family` or `Family:400,700` (CRE-BR-029). Without weights the role keeps its current weights.
147
+ * The API takes a Workspace Font when the workspace has the family, else the Google family.
148
+ */
149
+ export declare const parseFontFlag: (value: string, currentWeights: number[]) => {
150
+ family: string;
151
+ weights: number[];
152
+ };
153
+ /** The font type a file really has, from its first bytes (CRE-BR-028); the API checks it again after the upload. */
154
+ export declare const fontContentType: (body: Buffer) => string | null;
144
155
  export declare const findBrandKit: (kits: BrandKit[], brand: string) => BrandKit;
145
156
  /** A local scene file becomes a file:// URL so the HTML opens in a browser; http(s) and file URLs are kept. */
146
157
  export declare const sceneUrl: (scene: string) => string;
@@ -243,7 +254,115 @@ type GenerateOptions = {
243
254
  autoApprove?: boolean;
244
255
  wait?: boolean;
245
256
  estimate?: boolean;
257
+ flow?: string;
258
+ layout?: string;
259
+ texts?: string;
260
+ swap?: string;
261
+ pack?: string;
262
+ };
263
+ export type RemixSlot = {
264
+ id: string;
265
+ role: string;
266
+ kind: 'text' | 'button';
267
+ text: string;
268
+ box: unknown;
269
+ labelBox: unknown;
270
+ style: Record<string, unknown>;
271
+ hidden?: boolean;
272
+ added?: boolean;
246
273
  };
274
+ export type ReferenceLayout = {
275
+ id: string;
276
+ name: string;
277
+ status: 'analyzing' | 'ready' | 'failed';
278
+ size: string;
279
+ error: string | null;
280
+ credits: number;
281
+ source_url: string;
282
+ plate_url: string | null;
283
+ source_variation_name: string | null;
284
+ slots: RemixSlot[];
285
+ [key: string]: unknown;
286
+ };
287
+ /** `remix show`: the layout an agent edits, with a text set of the words it draws to copy into a texts file. */
288
+ export declare const summarizeLayout: (layout: ReferenceLayout) => {
289
+ id: string;
290
+ name: string;
291
+ status: "failed" | "ready" | "analyzing";
292
+ size: string;
293
+ error: string | null;
294
+ credits: number;
295
+ sourceVariation: string | null;
296
+ sourceUrl: string;
297
+ plateUrl: string | null;
298
+ slots: {
299
+ hidden: boolean;
300
+ added: boolean;
301
+ id: string;
302
+ role: string;
303
+ kind: "text" | "button";
304
+ text: string;
305
+ box: unknown;
306
+ labelBox: unknown;
307
+ style: Record<string, unknown>;
308
+ }[];
309
+ textSet: {
310
+ [k: string]: string;
311
+ };
312
+ editing: {
313
+ command: string;
314
+ editable: string[];
315
+ fixed: string[];
316
+ boxes: string;
317
+ add: {
318
+ add: boolean;
319
+ role: string;
320
+ text: string;
321
+ box: {
322
+ x: number;
323
+ y: number;
324
+ width: number;
325
+ height: number;
326
+ };
327
+ style: {
328
+ family: string;
329
+ weight: number;
330
+ color: string;
331
+ };
332
+ };
333
+ remove: {
334
+ id: string;
335
+ remove: boolean;
336
+ };
337
+ preview: string;
338
+ };
339
+ };
340
+ /** A texts file: one text set (slot id to words) per output, or a single text set. */
341
+ export declare const parseTextSets: (json: unknown) => Record<string, string>[];
342
+ /**
343
+ * A slots file (CRE-BR-033): slot edits, added slots and removals, or the output of `remix show`. Edits send what a
344
+ * member may change (words, style, boxes, hidden) and leave out the role, kind and `added` flag the API keeps; an added
345
+ * slot sends its role (and kind, which the API accepts only as text).
346
+ */
347
+ export declare const slotEditsFromFile: (json: unknown) => ({
348
+ add: boolean;
349
+ id?: undefined;
350
+ remove?: undefined;
351
+ } | {
352
+ id: unknown;
353
+ remove: boolean;
354
+ } | {
355
+ id: unknown;
356
+ remove?: undefined;
357
+ })[];
358
+ /** The `startGeneration` input of a Remix: a ready layout, the Angle and brand of its Variations, the text sets and a brand swap. */
359
+ export declare const remixRequest: (options: GenerateOptions, angles: Angle[], textSets: Record<string, string>[]) => Record<string, unknown>;
360
+ export declare const LAYOUT_WAIT_STOP: string[];
361
+ export declare const waitForLayout: (scope: CreativeScope, layoutId: string, options?: {
362
+ intervalMs?: number;
363
+ timeoutMs?: number;
364
+ sleep?: (ms: number) => Promise<void>;
365
+ }) => Promise<ReferenceLayout>;
247
366
  /** Builds the `startGeneration` input: a Brief id, or an inline Brief from the quick-create flags. */
248
367
  export declare const generationRequest: (options: GenerateOptions, angles: Angle[]) => Record<string, unknown>;
249
368
  /** `fgrove creatives …`: angles, creatives, variations, dictionaries and files of one project. */
@@ -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'];
@@ -249,6 +249,22 @@ export const brandKitPatchFromFile = (json) => {
249
249
  }
250
250
  return Object.fromEntries(BRAND_KIT_EDITABLE.filter((key) => value[key] !== undefined).map((key) => [key, value[key]]));
251
251
  };
252
+ /**
253
+ * A Brand Kit font flag, `Family` or `Family:400,700` (CRE-BR-029). Without weights the role keeps its current weights.
254
+ * The API takes a Workspace Font when the workspace has the family, else the Google family.
255
+ */
256
+ export const parseFontFlag = (value, currentWeights) => {
257
+ const [family = '', weights] = value.split(':');
258
+ if (!family.trim()) {
259
+ throw new Error(`Use a font such as "Gilroy" or "Inter:400,600", got "${value}"`);
260
+ }
261
+ return { family: family.trim(), weights: weights === undefined ? currentWeights : weights.split(',').map((weight) => parseNumber(weight.trim())) };
262
+ };
263
+ const FONT_SIGNATURES = [
264
+ ['774f4632', 'font/woff2'], ['774f4646', 'font/woff'], ['00010000', 'font/ttf'], ['74727565', 'font/ttf'], ['4f54544f', 'font/otf'],
265
+ ];
266
+ /** The font type a file really has, from its first bytes (CRE-BR-028); the API checks it again after the upload. */
267
+ export const fontContentType = (body) => FONT_SIGNATURES.find(([magic]) => body.subarray(0, 4).toString('hex') === magic)?.[1] ?? null;
252
268
  export const findBrandKit = (kits, brand) => {
253
269
  const kit = kits.find((item) => item.id === brand || item.brand.toLowerCase() === brand.trim().toLowerCase());
254
270
  if (!kit) {
@@ -306,6 +322,100 @@ export const waitForGeneration = async (scope, generationId, options = {}) => {
306
322
  await sleep(options.intervalMs ?? 5000);
307
323
  }
308
324
  };
325
+ /** What `remix show` says about editing a layout (CRE-BR-033), so an agent sees the editable fields next to the slots. */
326
+ const editingGuide = (layout) => ({
327
+ command: `fgrove creatives remix update ${layout.id} --slots slots.json`,
328
+ editable: [
329
+ 'text', 'style.family', 'style.source', 'style.weight', 'style.italic', 'style.uppercase', 'style.color', 'style.accentColor', 'style.align',
330
+ 'box', 'labelBox (buttons)', 'hidden',
331
+ ],
332
+ fixed: ['id', 'role', 'kind'],
333
+ 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 `
334
+ + '(the button is drawn on the plate)',
335
+ add: { add: true, role: 'badge', text: 'NEW', box: { x: 40, y: 40, width: 200, height: 72 }, style: { family: 'Montserrat', weight: 800, color: '#ffffff' } },
336
+ remove: { id: '<an added slot>', remove: true },
337
+ preview: `fgrove creatives remix preview ${layout.id} --texts texts.json (free)`,
338
+ });
339
+ /** `remix show`: the layout an agent edits, with a text set of the words it draws to copy into a texts file. */
340
+ export const summarizeLayout = (layout) => ({
341
+ id: layout.id,
342
+ name: layout.name,
343
+ status: layout.status,
344
+ size: layout.size,
345
+ error: layout.error,
346
+ credits: layout.credits,
347
+ sourceVariation: layout.source_variation_name,
348
+ sourceUrl: layout.source_url,
349
+ plateUrl: layout.plate_url,
350
+ slots: layout.slots.map((slot) => ({ ...slot, hidden: slot.hidden ?? false, added: slot.added ?? false })),
351
+ textSet: Object.fromEntries(layout.slots.filter((slot) => !slot.hidden).map((slot) => [slot.id, slot.text])),
352
+ editing: editingGuide(layout),
353
+ });
354
+ const TEXTS_HINT = 'a JSON array of text sets such as [{"headline": "Last week to file", "cta": "See if you qualify"}] '
355
+ + '(slot ids from "fgrove creatives remix show <id>"; a slot left out keeps its words, a hidden one is not drawn)';
356
+ /** A texts file: one text set (slot id to words) per output, or a single text set. */
357
+ export const parseTextSets = (json) => {
358
+ const sets = Array.isArray(json) ? json : [json];
359
+ if (sets.length === 0 || !sets.every((set) => set && typeof set === 'object' && !Array.isArray(set)
360
+ && Object.values(set).every((value) => typeof value === 'string'))) {
361
+ throw new Error(`The texts file must be ${TEXTS_HINT}`);
362
+ }
363
+ return sets;
364
+ };
365
+ 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", '
366
+ + '"hidden"}, new slots {"add": true, "role", "text", "box", "style"} and removals {"id", "remove": true}';
367
+ const isObject = (value) => Boolean(value) && typeof value === 'object' && !Array.isArray(value);
368
+ const pick = (slot, keys, check) => Object.fromEntries(keys.filter((key) => check(slot[key])).map((key) => [key, slot[key]]));
369
+ /**
370
+ * A slots file (CRE-BR-033): slot edits, added slots and removals, or the output of `remix show`. Edits send what a
371
+ * member may change (words, style, boxes, hidden) and leave out the role, kind and `added` flag the API keeps; an added
372
+ * slot sends its role (and kind, which the API accepts only as text).
373
+ */
374
+ export const slotEditsFromFile = (json) => {
375
+ const slots = (isObject(json) && 'slots' in json ? json.slots : json);
376
+ if (!Array.isArray(slots) || !slots.every((slot) => isObject(slot) && (typeof slot.id === 'string' || slot.add === true))) {
377
+ throw new Error(SLOTS_HINT);
378
+ }
379
+ return slots.map((slot) => {
380
+ if (slot.add === true) {
381
+ return { add: true, ...pick(slot, ['id', 'role', 'kind', 'text'], (value) => typeof value === 'string'), ...pick(slot, ['box', 'style'], isObject),
382
+ ...pick(slot, ['hidden'], (value) => typeof value === 'boolean') };
383
+ }
384
+ if (slot.remove === true) {
385
+ return { id: slot.id, remove: true };
386
+ }
387
+ return {
388
+ id: slot.id, ...pick(slot, ['text'], (value) => typeof value === 'string'), ...pick(slot, ['style', 'box', 'labelBox'], isObject),
389
+ ...pick(slot, ['hidden'], (value) => typeof value === 'boolean'),
390
+ };
391
+ });
392
+ };
393
+ /** The `startGeneration` input of a Remix: a ready layout, the Angle and brand of its Variations, the text sets and a brand swap. */
394
+ export const remixRequest = (options, angles, textSets) => {
395
+ const missing = ['layout', 'angle', 'brand', 'texts'].filter((key) => !options[key]);
396
+ if (missing.length > 0) {
397
+ throw new Error(`A Remix needs --${missing.join(', --')} (--texts: ${TEXTS_HINT})`);
398
+ }
399
+ return {
400
+ remix: {
401
+ layoutId: options.layout, angleId: findAngle(angles, options.angle).id, brand: options.brand, textSets,
402
+ ...(options.swap?.trim() ? { swap: options.swap.trim() } : {}),
403
+ },
404
+ };
405
+ };
406
+ export const LAYOUT_WAIT_STOP = ['ready', 'failed'];
407
+ export const waitForLayout = async (scope, layoutId, options = {}) => {
408
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve) => { setTimeout(resolve, ms); }));
409
+ const deadline = Date.now() + (options.timeoutMs ?? 10 * 60_000);
410
+ for (;;) {
411
+ const layout = await api(scope, 'referenceLayout', 'query', { layoutId });
412
+ if (LAYOUT_WAIT_STOP.includes(layout.status) || Date.now() >= deadline) {
413
+ return layout;
414
+ }
415
+ await sleep(options.intervalMs ?? 5000);
416
+ }
417
+ };
418
+ const IMAGE_TYPES = { '.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.webp': 'image/webp' };
309
419
  /** Builds the `startGeneration` input: a Brief id, or an inline Brief from the quick-create flags. */
310
420
  export const generationRequest = (options, angles) => {
311
421
  const settings = {
@@ -351,15 +461,21 @@ const parseScene = (value) => {
351
461
  /** `fgrove creatives generate` and `fgrove creatives generations …`. */
352
462
  const registerGenerationRunCommands = (root, input) => {
353
463
  const { scoped, run } = input;
354
- scoped(root.command('generate').description('Start a Generation from a Brief or a quick-create Brief; reserves Creative Credits')
464
+ /** `generate` and `generations start`: a Brief, a quick-create Brief, or a Remix (`--flow remix`). */
465
+ const startCommand = (command) => scoped(command
466
+ .option('--flow <flow>', 'image | video | remix (default: --kind, else image)')
355
467
  .option('--brief <id>', 'Brief id')
356
- .option('--angle <angle>', 'Quick-create: angle code or slug').option('--brand <brand>', 'Quick-create: brand with a Brand Kit')
468
+ .option('--angle <angle>', 'Quick-create and Remix: angle code or slug').option('--brand <brand>', 'Quick-create and Remix: brand with a Brand Kit')
357
469
  .option('--prompt <text>', 'Quick-create: scene to generate').option('--headline <text>', 'Quick-create: headline')
358
470
  .option('--cta <text>', 'Quick-create: call to action').option('--supporting <text>', 'Quick-create: supporting line')
359
471
  .option('--template <id>', `Quick-create: ${LAYOUT_TEMPLATE_IDS.join(' | ')}`).option('--format <format>', 'Quick-create: format (st or vid)')
360
472
  .option('--scenes <json>', 'Quick-create video: [{"description":"…","duration_seconds":5}, …] (3-5 scenes, 15-30 s)')
361
473
  .option('--voiceover <text>', 'Quick-create video: voiceover script')
362
474
  .option('--kind <kind>', 'Quick-create: image | video', 'image')
475
+ .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('--swap <instruction>', 'Remix: brand swap made once on the clean plate, such as "Replace the PayPal wordmark with the Venmo wordmark"')
478
+ .option('--pack <creative>', 'Approve outputs into this existing Creative, such as st003 (default: one new Creative per batch)')
363
479
  .option('--model <model>', 'nano-banana-2.1 | gpt-image-2 (image); seedance-2-mini | seedance-2.5 (video)')
364
480
  .option('--quality <quality>', 'low | medium | high (image scenes and keyframes)')
365
481
  .option('--resolution <resolution>', 'Video clips: 480p | 720p | 1080p (default 720p)')
@@ -369,14 +485,25 @@ const registerGenerationRunCommands = (root, input) => {
369
485
  .option('--wait', 'Poll until finished or awaiting approval, then print output URLs')
370
486
  .option('--estimate', 'Print the credits per step and the balance; start nothing'))
371
487
  .action(run(async (scope, options) => {
372
- const request = generationRequest(options, options.brief ? [] : await input.angles(scope));
488
+ const flow = options.flow ?? options.kind;
489
+ if (!['image', 'video', 'remix'].includes(flow)) {
490
+ throw new Error('--flow is image, video or remix');
491
+ }
492
+ const request = {
493
+ ...(flow === 'remix'
494
+ ? remixRequest(options, await input.angles(scope), options.texts ? parseTextSets(JSON.parse(await readFile(options.texts, 'utf8'))) : [])
495
+ : generationRequest({ ...options, kind: flow }, options.brief ? [] : await input.angles(scope))),
496
+ ...(options.pack ? { packCreativeId: findCreative(await input.creatives(scope), options.pack).id } : {}),
497
+ };
373
498
  if (options.estimate) {
374
499
  return api(scope, 'estimateGeneration', 'query', request);
375
500
  }
376
501
  const started = await api(scope, 'startGeneration', 'mutation', request);
377
502
  return summarizeGeneration(options.wait ? await waitForGeneration(scope, started.generation.id) : started);
378
503
  }));
504
+ startCommand(root.command('generate').description('Start a Generation from a Brief, a quick-create Brief or a Remix; reserves Creative Credits'));
379
505
  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'));
380
507
  scoped(generations.command('list').description('List Generations, newest first')
381
508
  .option('--angle <angle>', 'Only this angle').option('--brand <brand>', 'Only this brand').option('--kind <kind>', 'image | video')
382
509
  .option('--status <status>', 'queued | running | awaiting_approval | assembling | succeeded | partially_succeeded | failed | canceled')
@@ -424,8 +551,95 @@ const registerGenerationRunCommands = (root, input) => {
424
551
  })));
425
552
  scoped(generations.command('reject <outputIds...>').description('Reject delivered outputs; they leave the gallery and stay charged (an approved output cannot be rejected)'))
426
553
  .action(run(async (scope, _options, ...positional) => api(scope, 'rejectOutputs', 'mutation', { outputIds: positional.flat() })));
554
+ const remix = root.command('remix').description('Remix: Reference Layouts read from existing ads (words, fonts, a clean plate), rewritten with new words');
555
+ scoped(remix.command('create').description('Make a Reference Layout from a Variation\'s image or a local image; reserves its credits (analysis and clean plate)')
556
+ .option('--variation <variation>', 'Variation id, full name (its utm_content) or st003_02')
557
+ .option('--size <size>', 'The Variation file to use, such as 1080x1350 (default: 4:5, then 9:16, 1:1, 16:9)')
558
+ .option('--file <image>', 'A png, jpg or webp ad at 1:1, 4:5, 9:16 or 16:9')
559
+ .option('--name <name>', 'Layout name (default: the Variation name and size, or the file name)')
560
+ .option('--estimate', 'Print the price and the balance; create nothing')
561
+ .option('--wait', 'Poll until the layout is ready or failed'))
562
+ .action(run(async (scope, options) => {
563
+ if (options.estimate) {
564
+ return api(scope, 'estimateReferenceLayout', 'query');
565
+ }
566
+ if (Boolean(options.variation) === Boolean(options.file)) {
567
+ throw new Error('Pass either --variation or --file');
568
+ }
569
+ let created;
570
+ if (options.variation) {
571
+ const variation = findVariation(await api(scope, 'variations', 'query'), options.variation);
572
+ created = await api(scope, 'createReferenceLayout', 'mutation', {
573
+ variationId: variation.id, ...(options.size ? { size: options.size } : {}), ...(options.name ? { name: options.name } : {}),
574
+ });
575
+ }
576
+ else {
577
+ const contentType = IMAGE_TYPES[path.extname(options.file).toLowerCase()];
578
+ if (!contentType) {
579
+ throw new Error('Use a png, jpg or webp image');
580
+ }
581
+ const body = await readFile(options.file);
582
+ const hash = sha256(body);
583
+ const prepared = await api(scope, 'prepareReferenceLayoutUpload', 'mutation', {
584
+ contentType, sizeBytes: body.byteLength, sha256: hash,
585
+ });
586
+ const response = await fetch(prepared.uploadUrl, { method: 'PUT', headers: prepared.headers, body: new Uint8Array(body) });
587
+ if (!response.ok) {
588
+ throw new Error(`Upload failed with HTTP ${response.status}`);
589
+ }
590
+ created = await api(scope, 'createReferenceLayout', 'mutation', {
591
+ upload: { key: prepared.key, sha256: hash }, name: options.name ?? path.basename(options.file, path.extname(options.file)),
592
+ });
593
+ }
594
+ return summarizeLayout(options.wait ? await waitForLayout(scope, created.id) : created);
595
+ }));
596
+ scoped(remix.command('list').description('List the project\'s Reference Layouts, newest first')
597
+ .option('--limit <n>', 'Page size (1-100)').option('--cursor <cursor>', 'nextCursor of the previous page'))
598
+ .action(run((scope, options) => api(scope, 'referenceLayouts', 'query', {
599
+ ...(options.limit ? { limit: parseNumber(options.limit) } : {}), ...(options.cursor ? { cursor: options.cursor } : {}),
600
+ })));
601
+ 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')
602
+ .option('--wait', 'Poll until the layout is ready or failed').option('--full', 'Print every stored field, with the analysis'))
603
+ .action(run(async (scope, options, id) => {
604
+ const layout = options.wait ? await waitForLayout(scope, id) : await api(scope, 'referenceLayout', 'query', { layoutId: id });
605
+ return options.full ? layout : summarizeLayout(layout);
606
+ }));
607
+ scoped(remix.command('update <id>').description('Edit slots (words, style, box, a button\'s labelBox, hidden), add text slots over the plate, remove added '
608
+ + 'ones, or rename; free. A family is a Google Fonts family (source "google") or a Workspace Font (source "workspace"); a missing weight '
609
+ + 'becomes the next heavier one. Boxes are pixels of the reference size')
610
+ .option('--slots <file>', 'The output of "remix show" (edited) or an array of slot edits, {"add": true, ...} new slots and {"id", "remove": true}')
611
+ .option('--name <name>', 'New name'))
612
+ .action(run(async (scope, options, id) => {
613
+ if (!options.slots && !options.name) {
614
+ throw new Error('Pass --slots <file> or --name <name>');
615
+ }
616
+ return summarizeLayout(await api(scope, 'updateReferenceLayout', 'mutation', {
617
+ layoutId: id,
618
+ ...(options.slots ? { slots: slotEditsFromFile(JSON.parse(await readFile(options.slots, 'utf8'))) } : {}),
619
+ ...(options.name ? { name: options.name } : {}),
620
+ }));
621
+ }));
622
+ scoped(remix.command('preview <id>').description('Render text sets over the clean plate for free, as a Remix would (no credits, no brand swap), '
623
+ + 'and save one PNG each with the renderer QA')
624
+ .option('--texts <file>', TEXTS_HINT).option('--out <dir>', 'Directory for the PNGs (default: ./remix-preview-<first 8 of the id>)'))
625
+ .action(run(async (scope, options, id) => {
626
+ if (!options.texts) {
627
+ throw new Error(`Pass --texts <file>: ${TEXTS_HINT}`);
628
+ }
629
+ const textSets = parseTextSets(JSON.parse(await readFile(options.texts, 'utf8')));
630
+ const preview = await api(scope, 'previewReferenceLayout', 'mutation', { layoutId: id, textSets });
631
+ const out = path.resolve(options.out ?? `remix-preview-${id.slice(0, 8)}`);
632
+ await mkdir(out, { recursive: true });
633
+ const images = [];
634
+ for (const image of preview.images) {
635
+ const file = path.join(out, `set-${image.textSet}.png`);
636
+ await writeFile(file, Buffer.from(image.base64, 'base64'));
637
+ images.push({ textSet: image.textSet, path: file, hardFailures: image.qa.hardFailures, softFindings: image.qa.softFindings });
638
+ }
639
+ return { layoutId: preview.layoutId, size: preview.size, ok: preview.ok, note: preview.note, images };
640
+ }));
427
641
  };
428
- /** `fgrove creatives brand-kits|briefs|render`. */
642
+ /** `fgrove creatives brand-kits|fonts|briefs|render`. */
429
643
  const registerGenerationCommands = (root, input) => {
430
644
  const { scoped, run } = input;
431
645
  const kits = (scope) => api(scope, 'brandKits', 'query');
@@ -439,15 +653,30 @@ const registerGenerationCommands = (root, input) => {
439
653
  .action(run((scope, options) => api(scope, 'seedBrandKit', 'mutation', {
440
654
  brand: options.brand, funnelId: options.funnel,
441
655
  })));
442
- scoped(brandKit.command('update').description('Create or edit a brand\'s kit from a JSON file (output of show, or its content); a new version')
443
- .requiredOption('--file <kit.json>', 'Kit JSON').option('--brand <brand>', 'Brand (defaults to the file\'s brand)'))
656
+ scoped(brandKit.command('update').description('Create or edit a brand\'s kit from a JSON file (output of show, or its content) '
657
+ + 'or font flags; a new version. A font is a Workspace Font when the workspace has the family, else a Google family')
658
+ .option('--file <kit.json>', 'Kit JSON').option('--brand <brand>', 'Brand (defaults to the file\'s brand)')
659
+ .option('--display-font <family[:weights]>', 'Headline and CTA font, such as "Gilroy:700" (see fonts list and fonts search)')
660
+ .option('--body-font <family[:weights]>', 'Body font, such as "Inter:400,600"'))
444
661
  .action(run(async (scope, options) => {
445
- const json = JSON.parse(await readFile(options.file, 'utf8'));
662
+ if (!options.file && !options.displayFont && !options.bodyFont) {
663
+ throw new Error('Pass --file, --display-font or --body-font');
664
+ }
665
+ const json = (options.file ? JSON.parse(await readFile(options.file, 'utf8')) : {});
446
666
  const brand = options.brand ?? (typeof json.brand === 'string' ? json.brand : undefined);
447
667
  if (!brand) {
448
668
  throw new Error('--brand is required when the file has no "brand"');
449
669
  }
450
- return api(scope, 'updateBrandKit', 'mutation', { brand, patch: brandKitPatchFromFile(json) });
670
+ const patch = brandKitPatchFromFile(json);
671
+ if (options.displayFont || options.bodyFont) {
672
+ const current = (await kits(scope)).find((kit) => kit.brand.toLowerCase() === brand.trim().toLowerCase())?.content.fonts;
673
+ patch.fonts = {
674
+ ...patch.fonts,
675
+ ...(options.displayFont ? { display: parseFontFlag(options.displayFont, current?.display?.weights ?? [700]) } : {}),
676
+ ...(options.bodyFont ? { body: parseFontFlag(options.bodyFont, current?.body?.weights ?? [400]) } : {}),
677
+ };
678
+ }
679
+ return api(scope, 'updateBrandKit', 'mutation', { brand, patch });
451
680
  }));
452
681
  scoped(brandKit.command('logo <file>').description('Upload a logo (png, webp, svg, jpg) to a brand\'s kit; a new version')
453
682
  .requiredOption('--brand <brand>', 'Brand'))
@@ -468,6 +697,42 @@ const registerGenerationCommands = (root, input) => {
468
697
  }
469
698
  return api(scope, 'finalizeBrandKitLogoUpload', 'mutation', { brandKitId: kit.id, key: prepared.key, sha256: hash });
470
699
  }));
700
+ const fonts = root.command('fonts').description('Workspace Fonts, shared by every project of the workspace, and the Google Fonts catalog');
701
+ scoped(fonts.command('list').description('List the workspace\'s fonts by family, with their weights and files'))
702
+ .action(run((scope) => api(scope, 'workspaceFonts', 'query')));
703
+ scoped(fonts.command('search <query>').description('Search Google Fonts by family name, most popular first')
704
+ .option('--category <category>', 'sans | serif | display | handwriting | mono').option('--cyrillic', 'Only families with Cyrillic')
705
+ .option('--limit <n>', 'How many (1-100, default 20)'))
706
+ .action(run((scope, options, query) => api(scope, 'googleFonts', 'query', {
707
+ query, ...(options.category ? { category: options.category } : {}), ...(options.cyrillic ? { subset: 'cyrillic' } : {}),
708
+ ...(options.limit ? { limit: parseNumber(options.limit) } : {}),
709
+ })));
710
+ scoped(fonts.command('upload <file>').description('Upload a woff2, woff, ttf or otf font (up to 10 MB) as a Workspace Font; '
711
+ + 'family, weight and style default to what the file name says, such as Gilroy-BoldItalic.woff2')
712
+ .option('--family <family>', 'Family name').option('--weight <weight>', '100 to 900').option('--style <style>', 'normal | italic'))
713
+ .action(run(async (scope, options, file) => {
714
+ const body = await readFile(file);
715
+ const contentType = fontContentType(body);
716
+ if (!contentType) {
717
+ throw new Error(`${file} is not a woff2, woff, ttf or otf font`);
718
+ }
719
+ const hash = sha256(body);
720
+ const prepared = await api(scope, 'prepareWorkspaceFontUpload', 'mutation', {
721
+ fileName: path.basename(file), contentType, sizeBytes: body.byteLength, sha256: hash,
722
+ ...(options.family ? { family: options.family } : {}),
723
+ ...(options.weight ? { weight: parseNumber(options.weight) } : {}),
724
+ ...(options.style ? { style: options.style } : {}),
725
+ });
726
+ const response = await fetch(prepared.uploadUrl, { method: 'PUT', headers: prepared.headers, body: new Uint8Array(body) });
727
+ if (!response.ok) {
728
+ throw new Error(`Font upload failed with HTTP ${response.status}`);
729
+ }
730
+ return api(scope, 'finalizeWorkspaceFontUpload', 'mutation', {
731
+ key: prepared.key, sha256: hash, family: prepared.family, weight: prepared.weight, style: prepared.style,
732
+ });
733
+ }));
734
+ scoped(fonts.command('archive <id>').description('Archive a font file: it leaves the picker, and Brand Kits and Generations that use it keep rendering'))
735
+ .action(run((scope, _options, id) => api(scope, 'archiveWorkspaceFont', 'mutation', { fontId: id })));
471
736
  const brief = root.command('briefs').description('Creative Briefs: the words, scene and layout of a future variation, proposed from Angles');
472
737
  scoped(brief.command('list').description('List Briefs, newest first, one page at a time').option('--angle <angle>', 'Only this angle')
473
738
  .option('--status <status>', 'proposed | accepted | archived').option('--kind <kind>', 'image | video')
@@ -556,6 +821,9 @@ Examples:
556
821
  fgrove creatives credits --project claimbee
557
822
  fgrove creatives credits buy 50 --project claimbee
558
823
  fgrove creatives brand-kits seed --brand Amazon --funnel <funnel id> --project claimbee
824
+ fgrove creatives fonts upload ./Gilroy-Bold.woff2 --project claimbee
825
+ fgrove creatives fonts search "dm sans" --project claimbee
826
+ fgrove creatives brand-kits update --brand Amazon --display-font "Gilroy:700" --body-font "DM Sans:400,500" --project claimbee
559
827
  fgrove creatives briefs propose --angles C004,C007 --brand Amazon --format st --kind image --count 6 --project claimbee
560
828
  fgrove creatives render --brief <brief id> --size 1080x1350 --scene ./scene.png --out brief.html --project claimbee
561
829
  fgrove creatives generate --brief <brief id> --count 4 --sizes 1080x1350,1080x1920 --estimate --project claimbee
@@ -563,7 +831,11 @@ Examples:
563
831
  fgrove creatives generate --brief <video brief id> --auto-approve --wait --project claimbee
564
832
  fgrove creatives generations approve <output id> <output id> --project claimbee
565
833
  fgrove creatives generations approve <output id> --creative st003 --project claimbee
566
- fgrove creatives generations reject <output id> --project claimbee`);
834
+ fgrove creatives generations reject <output id> --project claimbee
835
+ fgrove creatives remix create --variation CLMB_st027_03_deadline --wait --project claimbee
836
+ fgrove creatives remix show <layout id> --project claimbee > layout.json
837
+ 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`);
567
839
  const settings = root.command('settings').description('Project creative settings');
568
840
  scoped(settings.command('show').description('Show the name prefix and dictionaries'))
569
841
  .action(run((scope) => api(scope, 'settings', 'query')));
@@ -4,10 +4,10 @@
4
4
  "minimumCliVersion": "0.1.20",
5
5
  "entries": [
6
6
  {
7
- "repositoryCliVersion": "0.1.355",
7
+ "repositoryCliVersion": "0.1.358",
8
8
  "manifest": {
9
9
  "schemaVersion": 1,
10
- "bundleVersion": "2.0.348",
10
+ "bundleVersion": "2.0.351",
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": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee"
48
+ "sha256": "f4296760cadbdb0c0c30fb6ef609dacb21a8ea9624f16851962e25b7612673b4"
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": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99"
148
+ "sha256": "4ee7ede9c30a033dde7c0616792f0218f7eaeddb6bca22c70caa3ba67d04c65d"
149
149
  }
150
150
  ]
151
151
  }
152
152
  },
153
153
  {
154
- "repositoryCliVersion": "0.1.354",
154
+ "repositoryCliVersion": "0.1.357",
155
155
  "manifest": {
156
156
  "schemaVersion": 1,
157
- "bundleVersion": "2.0.347",
157
+ "bundleVersion": "2.0.350",
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": "f1c2098061ec0f53fc655c29079ee6cb45889b24d86fa620ab1e406017facc50"
195
+ "sha256": "d7849f21c005bcac20c8e8e6caca4e90eff1c19add790e6e19904129714f4fc5"
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": "a970838c18d563327669a681196c48b83bd3e00d9658c60d9402ccb226057428"
295
+ "sha256": "ad07c811a7a8ac21e7aa01c324a2d7b764e8dc5af03ebcd8b36617859ea8bb42"
296
296
  }
297
297
  ]
298
298
  }
299
299
  },
300
300
  {
301
- "repositoryCliVersion": "0.1.353",
301
+ "repositoryCliVersion": "0.1.356",
302
302
  "manifest": {
303
303
  "schemaVersion": 1,
304
- "bundleVersion": "2.0.346",
304
+ "bundleVersion": "2.0.349",
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": "7aeda8d18a85667010396e754ff77338acd30494b09819a23fdf257401ff7f15"
342
+ "sha256": "7cf7ffb707ef0d534ad4c9b3377c1d192cb304a16ca30f5f014ce0a8a0be065e"
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": "7dacbe5ea0b190e1e6604033cfa5d933ff0da2aacd5c1035fcf0616601da4367"
442
+ "sha256": "7c4dc24661a335b885b43d7ed8a53abc288344ea81efc9250908a4ac0cce0991"
443
443
  }
444
444
  ]
445
445
  }
446
446
  },
447
447
  {
448
- "repositoryCliVersion": "0.1.352",
448
+ "repositoryCliVersion": "0.1.355",
449
449
  "manifest": {
450
450
  "schemaVersion": 1,
451
- "bundleVersion": "2.0.345",
451
+ "bundleVersion": "2.0.348",
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": "a66ccac6a2aa87361d491759c06c87c718755552f04250ca51768679fbade4ac"
489
+ "sha256": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee"
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": "853f573a6667f1ec5ff4da9075ca8df488f82d984723c44bc947e60f020c6b51"
589
+ "sha256": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99"
590
590
  }
591
591
  ]
592
592
  }
593
593
  },
594
594
  {
595
- "repositoryCliVersion": "0.1.351",
595
+ "repositoryCliVersion": "0.1.354",
596
596
  "manifest": {
597
597
  "schemaVersion": 1,
598
- "bundleVersion": "2.0.344",
598
+ "bundleVersion": "2.0.347",
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": "5db03d9f8f9adf0542dc4bd4008a5cf42073cc3eb99909892efaffe49b751e5c"
636
+ "sha256": "f1c2098061ec0f53fc655c29079ee6cb45889b24d86fa620ab1e406017facc50"
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": "8b3a1d3859156a55c0125093d720aefc84a9eda7153a58211eba2460fc23316b"
736
+ "sha256": "a970838c18d563327669a681196c48b83bd3e00d9658c60d9402ccb226057428"
737
737
  }
738
738
  ]
739
739
  }
740
740
  },
741
741
  {
742
- "repositoryCliVersion": "0.1.350",
742
+ "repositoryCliVersion": "0.1.353",
743
743
  "manifest": {
744
744
  "schemaVersion": 1,
745
- "bundleVersion": "2.0.343",
745
+ "bundleVersion": "2.0.346",
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": "642abb9ad362188cefdc4b756c3fcfeb78c2aba54b552ab606996cae32285a25"
783
+ "sha256": "7aeda8d18a85667010396e754ff77338acd30494b09819a23fdf257401ff7f15"
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": "b7421e4fbee50ef16e21c4863c256cdf1acbb146356d093d6c234b6bc209eff0"
883
+ "sha256": "7dacbe5ea0b190e1e6604033cfa5d933ff0da2aacd5c1035fcf0616601da4367"
884
884
  }
885
885
  ]
886
886
  }
887
887
  },
888
888
  {
889
- "repositoryCliVersion": "0.1.349",
889
+ "repositoryCliVersion": "0.1.352",
890
890
  "manifest": {
891
891
  "schemaVersion": 1,
892
- "bundleVersion": "2.0.342",
892
+ "bundleVersion": "2.0.345",
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": "7feb445afac29d0bdde1c88a9c1a067c9f7b7582030ae9d74f4794a1a9096653"
930
+ "sha256": "a66ccac6a2aa87361d491759c06c87c718755552f04250ca51768679fbade4ac"
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": "0527f742251b4a66cff004a686a5e700ec25f8bafd0e58e61ccd1ede0dcf307f"
1030
+ "sha256": "853f573a6667f1ec5ff4da9075ca8df488f82d984723c44bc947e60f020c6b51"
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.355",
3
+ "version": "0.1.358",
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.348",
3
+ "bundleVersion": "2.0.351",
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": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee"
41
+ "sha256": "f4296760cadbdb0c0c30fb6ef609dacb21a8ea9624f16851962e25b7612673b4"
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": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99"
141
+ "sha256": "4ee7ede9c30a033dde7c0616792f0218f7eaeddb6bca22c70caa3ba67d04c65d"
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.355`, 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.358`, 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.348",
3
+ "bundleVersion": "2.0.351",
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.348",
3
+ "bundleVersion": "2.0.351",
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": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee"
41
+ "sha256": "f4296760cadbdb0c0c30fb6ef609dacb21a8ea9624f16851962e25b7612673b4"
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": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99"
141
+ "sha256": "4ee7ede9c30a033dde7c0616792f0218f7eaeddb6bca22c70caa3ba67d04c65d"
142
142
  }
143
143
  ]
144
144
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sourceTreeHash": "9c40a3ca4c344278a489bf5d864899af08a21c550d5769a766ab9a4c4f8edf1f",
3
+ "sourceTreeHash": "bed457af5e3fc049907daa462d3c1ceb41b1071247025948ae1100deb92ec524",
4
4
  "stepContractVersion": 3,
5
- "docsBundleVersion": "2.0.348",
5
+ "docsBundleVersion": "2.0.351",
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": "732511b8ba2314a4080d53c296d32eb2aa89f3c3fd47f73fb89fb5f4a42f61f7",
19
+ "sha256": "8311756ede498bbafdb61cee290915b7b899ff2a770e47c887b3cb91966148f9",
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": "c72e184744cef59f40141bc950e40027c15c00032db03893bf0868c76feb85ee",
79
+ "sha256": "f4296760cadbdb0c0c30fb6ef609dacb21a8ea9624f16851962e25b7612673b4",
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": "ed74a5d6792358e6f3475efb1af19506da635b4a7d5723c34bee4187a2f28b99",
209
+ "sha256": "4ee7ede9c30a033dde7c0616792f0218f7eaeddb6bca22c70caa3ba67d04c65d",
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.355`, 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.358`, 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.348",
3
+ "bundleVersion": "2.0.351",
4
4
  "contractSource": "funnelsgrove-repository://apps/funnel-runtime/contracts/step-contract-v2.json",
5
5
  "fullyGenerated": [
6
6
  ".funnelsgrove-docs.json",