@funnelsgrove/cli 0.1.351 → 0.1.353

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -25,6 +25,7 @@ import { buildAlertStatisticsReport, fetchAlertStatistics, fetchPreventSummary,
25
25
  import { cancelUserSubscription, findUser, formatUserCancellation, formatUserFind, formatUserLookup, formatUserRefunds, formatRefundPreview, lookupUser, parseUserSelector, previewRefund, refundUserPayments, } from './userCommands.js';
26
26
  import { buildBugReport, formatBugReportPreview, resolveBugReportContext, submitBugReport, } from './bugReportCommands.js';
27
27
  import { assignSupportTicketProject, cancelSupportSubscription, closeSupportTicket, escalateSupportTicket, formatSupportProjects, formatSupportWorkflowHistory, formatSupportWorkflowLoaded, formatSupportWorkflowPulled, formatSupportWorkflowPushed, getSupportWorkflowEditView, getSupportWorkflowVersionFiles, pullSupportWorkflowForEditing, readSupportWorkflowEdit, recordSupportWorkflowPush, saveSupportWorkflowFiles, formatTicketDetail, formatTicketLine, formatSupportRatings, getSupportRatings, getSupportWorkflow, initSupportFolder, refreshSupportFolder, missingSupportPermissions, listCustomerTickets, listSupportProjects, lookupSupportBilling, openSupportTicket, parseBillingTarget, parseTicketNumber, getSupportCancelLink, refundSupportPayments, replyToSupportTicket, resolveSupportProject, setSupportInstructions, SUPPORT_ROUTINE_PROMPT, takeSupportQueue, writeSupportWorkflow, } from './supportCommands.js';
28
+ import { registerCreativeCommands } from './creativeCommands.js';
28
29
  import { executeOfferSetPrices, executeOfferSetPublish, executeOfferSetPull, formatOfferSetPriceCatalogs, } from './offerSetCommands.js';
29
30
  import { executeEmailPull, executeEmailPush, executeEmailSend, executeEmailUpdateVariables, executeEmailSequenceAddStep, executeEmailSequenceCancel, executeEmailSequenceCreate, executeEmailSequencePublish, executeEmailSequenceSetActive, executeEmailLibraryAdd, executeEmailLibraryList, executeEmailTemplatePublish, executeEmailValidate, parseEmailVariablesJson, } from './emailCommands.js';
30
31
  import { formatGitHubConnectRows, formatGitHubJobRows, formatGitHubStatusRows, } from './githubOutput.js';
@@ -2109,6 +2110,7 @@ addExpenseScopeOptions(expensesCommand
2109
2110
  const result = await executeExpensePublish(scope);
2110
2111
  console.log(`Published expenses: ${result.created} created, ${result.updated} updated.`);
2111
2112
  });
2113
+ registerCreativeCommands(program, { resolveScope: resolveProjectCommandScope });
2112
2114
  const addSetupScopeOptions = (command) => command
2113
2115
  .option('--workspace <id-or-slug-or-name>', 'Workspace id, slug, or name')
2114
2116
  .option('--project <id-or-slug-or-name>', 'Project id, slug, or name')
@@ -0,0 +1,107 @@
1
+ import type { Command } from 'commander';
2
+ type CallApi = <T>(input: {
3
+ path: string;
4
+ type: 'query' | 'mutation';
5
+ data?: unknown;
6
+ token?: string | null;
7
+ }) => Promise<T>;
8
+ export type CreativeScope = {
9
+ callApi: CallApi;
10
+ token: string;
11
+ workspaceId: string;
12
+ projectId: string;
13
+ };
14
+ export type Angle = {
15
+ id: string;
16
+ code: string;
17
+ slug: string;
18
+ name: string;
19
+ status: string;
20
+ description: string;
21
+ key_elements: string;
22
+ parent_angle_id: string | null;
23
+ launched_count: number;
24
+ go_count: number;
25
+ winner_count: number;
26
+ variation_count: number;
27
+ [key: string]: unknown;
28
+ };
29
+ export type Creative = {
30
+ id: string;
31
+ code: string;
32
+ format: string;
33
+ number: number;
34
+ drive_url: string | null;
35
+ };
36
+ export type CreativeFile = {
37
+ size: string;
38
+ key: string;
39
+ url: string;
40
+ contentType: string;
41
+ sizeBytes: number;
42
+ sha256: string;
43
+ };
44
+ export type Variation = {
45
+ id: string;
46
+ name: string;
47
+ creative_id: string;
48
+ creative_code: string;
49
+ number: number;
50
+ angle_slug: string;
51
+ files: CreativeFile[];
52
+ [key: string]: unknown;
53
+ };
54
+ export declare const searchAngles: (angles: Angle[], query: string) => {
55
+ code: string;
56
+ slug: string;
57
+ name: string;
58
+ status: string;
59
+ score: number;
60
+ }[];
61
+ export declare const findAngle: (angles: Angle[], ref: string) => Angle;
62
+ export declare const findCreative: (creatives: Creative[], ref: string) => Creative;
63
+ /** A variation id, its full name, or `st003_02` / `CLMB_st003_02` when only one variation has that number. */
64
+ export declare const findVariation: (variations: Variation[], ref: string) => Variation;
65
+ /**
66
+ * `CLMB_st049_01_receipt-v2_1080x1920.png` belongs to the variation with the longest name that starts the file name,
67
+ * followed by `_`; the size is the first `WIDTHxHEIGHT` part after it.
68
+ */
69
+ export declare const matchCreativeFile: (filePath: string, variations: Variation[]) => {
70
+ kind: "unmatched";
71
+ variation?: undefined;
72
+ size?: undefined;
73
+ contentType?: undefined;
74
+ } | {
75
+ kind: "unknown_variation";
76
+ variation?: undefined;
77
+ size?: undefined;
78
+ contentType?: undefined;
79
+ } | {
80
+ kind: "matched";
81
+ variation: Variation;
82
+ size: string;
83
+ contentType: string;
84
+ };
85
+ /** Uploads every recognised file whose content differs from the stored one; never deletes; reports failures and goes on. */
86
+ export declare const syncCreativeFiles: (scope: CreativeScope, dir: string, options?: {
87
+ dryRun?: boolean;
88
+ fetchFn?: typeof fetch;
89
+ }) => Promise<{
90
+ uploaded: string[];
91
+ unchanged: string[];
92
+ unmatched: string[];
93
+ unknownVariation: string[];
94
+ failed: {
95
+ file: string;
96
+ error: string;
97
+ }[];
98
+ dryRun: boolean;
99
+ }>;
100
+ /** `fgrove creatives …`: angles, creatives, variations, dictionaries and files of one project. */
101
+ export declare const registerCreativeCommands: (program: Command, deps: {
102
+ resolveScope: (options: {
103
+ workspace?: string;
104
+ project?: string;
105
+ }) => Promise<CreativeScope>;
106
+ }) => void;
107
+ export {};
@@ -0,0 +1,397 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { readdir, readFile, stat } from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ const ANGLE_STATUSES = ['working', 'burned_out', 'no_data', 'under_review', 'idea', 'failed'];
5
+ const DICTIONARY_FIELDS = ['format', 'task_type', 'creo_type', 'brand', 'size', 'visual_hook', 'text_hook'];
6
+ const api = (scope, procedure, type, data = {}) => (scope.callApi({
7
+ path: `creatives.${procedure}`, type, token: scope.token,
8
+ data: { workspaceId: scope.workspaceId, projectId: scope.projectId, ...data },
9
+ }));
10
+ const print = (value) => console.log(JSON.stringify(value, null, 2));
11
+ /** Words of an angle used to find likely duplicates before creating a new one. */
12
+ const words = (value) => value.toLowerCase().split(/[^\p{L}\p{N}]+/u).filter((word) => word.length > 2);
13
+ export const searchAngles = (angles, query) => {
14
+ const needle = query.trim().toLowerCase();
15
+ const queryWords = new Set(words(query));
16
+ return angles
17
+ .map((angle) => {
18
+ const haystack = `${angle.slug} ${angle.name} ${angle.description} ${angle.key_elements}`.toLowerCase();
19
+ const exact = angle.slug === needle || angle.code.toLowerCase() === needle || angle.name.toLowerCase() === needle;
20
+ const contains = needle.length > 0 && haystack.includes(needle);
21
+ const shared = words(haystack).filter((word, index, all) => queryWords.has(word) && all.indexOf(word) === index).length;
22
+ return { angle, score: (exact ? 100 : 0) + (contains ? 10 : 0) + shared };
23
+ })
24
+ .filter(({ score }) => score > 0)
25
+ .sort((a, b) => b.score - a.score)
26
+ .slice(0, 10)
27
+ .map(({ angle, score }) => ({ code: angle.code, slug: angle.slug, name: angle.name, status: angle.status, score }));
28
+ };
29
+ export const findAngle = (angles, ref) => {
30
+ const normalized = ref.trim().toLowerCase();
31
+ const angle = angles.find((item) => item.id === ref || item.code.toLowerCase() === normalized || item.slug === normalized);
32
+ if (!angle) {
33
+ throw new Error(`Angle "${ref}" not found. Run: fgrove creatives angles search "${ref}"`);
34
+ }
35
+ return angle;
36
+ };
37
+ /** `st003`, `CLMB_st003` → creative code `st003`. */
38
+ const creativeCodeOf = (ref) => {
39
+ const match = /^(?:[A-Z][A-Z0-9]*_)?([a-z]+)(\d+)$/.exec(ref.trim());
40
+ if (!match) {
41
+ throw new Error(`Creative "${ref}" must look like st003 or CLMB_st003`);
42
+ }
43
+ return `${match[1]}${match[2].padStart(3, '0')}`;
44
+ };
45
+ export const findCreative = (creatives, ref) => {
46
+ const creative = creatives.find((item) => item.id === ref) ?? creatives.find((item) => item.code === creativeCodeOf(ref));
47
+ if (!creative) {
48
+ throw new Error(`Creative "${ref}" not found`);
49
+ }
50
+ return creative;
51
+ };
52
+ /** A variation id, its full name, or `st003_02` / `CLMB_st003_02` when only one variation has that number. */
53
+ export const findVariation = (variations, ref) => {
54
+ const exact = variations.find((item) => item.id === ref || item.name === ref);
55
+ if (exact) {
56
+ return exact;
57
+ }
58
+ const match = /^(?:[A-Z][A-Z0-9]*_)?([a-z]+\d+)_(\d{1,2})$/.exec(ref.trim());
59
+ const candidates = match ? variations.filter((item) => item.creative_code === creativeCodeOf(match[1]) && item.number === Number(match[2])) : [];
60
+ if (candidates.length > 1) {
61
+ throw new Error(`"${ref}" matches several variations; use the full name: ${candidates.map((item) => item.name).join(', ')}`);
62
+ }
63
+ if (!candidates[0]) {
64
+ throw new Error(`Variation "${ref}" not found; use its full name or st003_02`);
65
+ }
66
+ return candidates[0];
67
+ };
68
+ const CONTENT_TYPES = {
69
+ '.png': 'image/png', '.jpg': 'image/jpeg', '.jpeg': 'image/jpeg', '.webp': 'image/webp', '.mp4': 'video/mp4', '.mov': 'video/quicktime',
70
+ };
71
+ /**
72
+ * `CLMB_st049_01_receipt-v2_1080x1920.png` belongs to the variation with the longest name that starts the file name,
73
+ * followed by `_`; the size is the first `WIDTHxHEIGHT` part after it.
74
+ */
75
+ export const matchCreativeFile = (filePath, variations) => {
76
+ const contentType = CONTENT_TYPES[path.extname(filePath).toLowerCase()];
77
+ const base = path.basename(filePath, path.extname(filePath));
78
+ if (!contentType) {
79
+ return { kind: 'unmatched' };
80
+ }
81
+ const variation = variations
82
+ .filter((item) => base.startsWith(`${item.name}_`))
83
+ .sort((a, b) => b.name.length - a.name.length)[0];
84
+ if (!variation) {
85
+ return { kind: 'unknown_variation' };
86
+ }
87
+ const size = /(?:^|_)(\d{2,5}x\d{2,5})(?:_|$)/.exec(base.slice(variation.name.length))?.[1];
88
+ if (!size) {
89
+ return { kind: 'unmatched' };
90
+ }
91
+ return { kind: 'matched', variation, size, contentType };
92
+ };
93
+ const listFiles = async (dir) => {
94
+ const entries = await readdir(dir, { withFileTypes: true });
95
+ const nested = await Promise.all(entries.map((entry) => {
96
+ const full = path.join(dir, entry.name);
97
+ if (entry.name.startsWith('.')) {
98
+ return [];
99
+ }
100
+ return entry.isDirectory() ? listFiles(full) : [full];
101
+ }));
102
+ return nested.flat().sort();
103
+ };
104
+ const sha256 = (body) => createHash('sha256').update(body).digest('hex');
105
+ const uploadFile = async (scope, input) => {
106
+ const hash = sha256(input.body);
107
+ const prepared = await api(scope, 'prepareFileUpload', 'mutation', {
108
+ variationId: input.variation.id, size: input.size, contentType: input.contentType, sizeBytes: input.body.byteLength, sha256: hash,
109
+ });
110
+ const response = await (input.fetchFn ?? fetch)(prepared.uploadUrl, {
111
+ method: 'PUT', headers: prepared.headers, body: new Uint8Array(input.body),
112
+ });
113
+ if (!response.ok) {
114
+ throw new Error(`Upload of ${input.variation.name} ${input.size} failed with HTTP ${response.status}`);
115
+ }
116
+ return api(scope, 'finalizeFileUpload', 'mutation', {
117
+ variationId: input.variation.id, size: input.size, key: prepared.key, sha256: hash,
118
+ });
119
+ };
120
+ /** Uploads every recognised file whose content differs from the stored one; never deletes; reports failures and goes on. */
121
+ export const syncCreativeFiles = async (scope, dir, options = {}) => {
122
+ const variations = await api(scope, 'variations', 'query');
123
+ const result = {
124
+ uploaded: [], unchanged: [], unmatched: [], unknownVariation: [],
125
+ failed: [],
126
+ };
127
+ for (const file of await listFiles(path.resolve(dir))) {
128
+ const matched = matchCreativeFile(file, variations);
129
+ if (matched.kind === 'unmatched') {
130
+ result.unmatched.push(file);
131
+ continue;
132
+ }
133
+ if (matched.kind === 'unknown_variation') {
134
+ result.unknownVariation.push(file);
135
+ continue;
136
+ }
137
+ const { variation, size, contentType } = matched;
138
+ const body = await readFile(file);
139
+ const label = `${variation.name} ${size}`;
140
+ if (variation.files.some((stored) => stored.size === size && stored.sha256 === sha256(body))) {
141
+ result.unchanged.push(label);
142
+ continue;
143
+ }
144
+ try {
145
+ if (!options.dryRun) {
146
+ await uploadFile(scope, { variation, size, contentType, body, fetchFn: options.fetchFn });
147
+ }
148
+ result.uploaded.push(label);
149
+ }
150
+ catch (error) {
151
+ result.failed.push({ file, error: error instanceof Error ? error.message : String(error) });
152
+ }
153
+ }
154
+ return { dryRun: Boolean(options.dryRun), ...result };
155
+ };
156
+ const parseBoolean = (value) => {
157
+ if (['true', 'yes', '1'].includes(value)) {
158
+ return true;
159
+ }
160
+ if (['false', 'no', '0'].includes(value)) {
161
+ return false;
162
+ }
163
+ throw new Error(`Expected true or false, got "${value}"`);
164
+ };
165
+ const parseNumber = (value) => {
166
+ const number = Number(value);
167
+ if (!Number.isFinite(number)) {
168
+ throw new Error(`Expected a number, got "${value}"`);
169
+ }
170
+ return number;
171
+ };
172
+ const parseNullableText = (value) => (value === '' || value === 'none' ? null : value);
173
+ const parseSizes = (value) => value.split(',').map((size) => size.trim()).filter(Boolean);
174
+ const parseResult = (value) => {
175
+ if (value === 'none' || value === '') {
176
+ return null;
177
+ }
178
+ if (value === 'go' || value === 'no_go') {
179
+ return value;
180
+ }
181
+ throw new Error('Use go, no_go or none');
182
+ };
183
+ const parseDate = (value) => {
184
+ if (value === 'none') {
185
+ return null;
186
+ }
187
+ const dotted = /^(\d{2})\.(\d{2})\.(\d{4})$/.exec(value);
188
+ const iso = dotted ? `${dotted[3]}-${dotted[2]}-${dotted[1]}` : value;
189
+ if (!/^\d{4}-\d{2}-\d{2}$/.test(iso)) {
190
+ throw new Error('Use a date such as 2026-08-03');
191
+ }
192
+ return iso;
193
+ };
194
+ const ANGLE_OPTIONS = [
195
+ { flag: '--slug <slug>', description: 'Naming slug, lowercase (deadline, office-night)', key: 'slug' },
196
+ { flag: '--name <name>', description: 'Display name', key: 'name' },
197
+ { flag: '--status <status>', description: ANGLE_STATUSES.join(' | '), key: 'status' },
198
+ { flag: '--description <text>', description: 'Description and mechanics', key: 'description' },
199
+ { flag: '--key-elements <text>', description: 'Key visual elements', key: 'key_elements' },
200
+ { flag: '--iteration-ideas <text>', description: 'Ideas for iterations and reworks', key: 'iteration_ideas' },
201
+ { flag: '--notes <text>', description: 'Limits and notes', key: 'notes' },
202
+ { flag: '--source <text>', description: 'Where the idea came from', key: 'source' },
203
+ { flag: '--example-url <url>', description: 'Example folder link ("none" clears)', key: 'example_url', parse: parseNullableText },
204
+ { flag: '--test-spend <usd>', description: 'Manual test spend', key: 'test_spend', parse: parseNumber },
205
+ { flag: '--test-purchases <n>', description: 'Manual test purchases', key: 'test_purchases', parse: parseNumber },
206
+ { flag: '--scale-spend <usd>', description: 'Manual scale spend', key: 'scale_spend', parse: parseNumber },
207
+ { flag: '--scale-purchases <n>', description: 'Manual scale purchases', key: 'scale_purchases', parse: parseNumber },
208
+ { flag: '--best-winner <name>', description: 'Best winner variation, such as CLMB_st056_03', key: 'best_winner_name', parse: parseNullableText },
209
+ { flag: '--best-winner-spend <usd>', description: 'Manual spend of the best winner', key: 'best_winner_spend', parse: parseNumber },
210
+ ];
211
+ const VARIATION_OPTIONS = [
212
+ { flag: '--date <date>', description: 'Variation date (2026-08-03 or 03.08.2026)', key: 'variation_date', parse: parseDate },
213
+ { flag: '--brand <brand>', description: 'Brand from the dictionary ("none" clears)', key: 'brand', parse: parseNullableText },
214
+ { flag: '--task-type <type>', description: 'Task type from the dictionary', key: 'task_type', parse: parseNullableText },
215
+ { flag: '--creo-type <type>', description: 'Creo type from the dictionary', key: 'creo_type', parse: parseNullableText },
216
+ { flag: '--sizes <list>', description: 'Comma-separated sizes, such as 1080x1080,1080x1920', key: 'sizes', parse: parseSizes },
217
+ { flag: '--duration <seconds>', description: 'Video duration in seconds', key: 'duration_seconds', parse: parseNumber },
218
+ { flag: '--visual-hook <hook>', description: 'Visual hook from the dictionary', key: 'visual_hook', parse: parseNullableText },
219
+ { flag: '--text-hook <hook>', description: 'Text hook from the dictionary', key: 'text_hook', parse: parseNullableText },
220
+ { flag: '--origin <ref>', description: 'Creative or variation this iterates on (CLMB_st119 or CLMB_st119_04)', key: 'origin_ref', parse: parseNullableText },
221
+ { flag: '--launched <bool>', description: 'Launched in a test: true | false', key: 'launched', parse: parseBoolean },
222
+ { flag: '--result <result>', description: 'Test result: go | no_go | none', key: 'test_result', parse: parseResult },
223
+ { flag: '--winner <bool>', description: 'Winner: true | false', key: 'winner', parse: parseBoolean },
224
+ { flag: '--comment <text>', description: 'Comment', key: 'comment' },
225
+ ];
226
+ const addOptions = (command, options) => {
227
+ for (const option of options) {
228
+ command.option(option.flag, option.description);
229
+ }
230
+ return command;
231
+ };
232
+ const camel = (flag) => flag.split(' ')[0].replace(/^--/, '').replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
233
+ const collect = (values, options) => Object.fromEntries(options
234
+ .filter((option) => values[camel(option.flag)] !== undefined)
235
+ .map((option) => {
236
+ const raw = values[camel(option.flag)];
237
+ return [option.key, option.parse ? option.parse(raw) : raw];
238
+ }));
239
+ /** `fgrove creatives …`: angles, creatives, variations, dictionaries and files of one project. */
240
+ export const registerCreativeCommands = (program, deps) => {
241
+ const run = (work) => (async (...args) => {
242
+ const command = args[args.length - 1];
243
+ const options = command.optsWithGlobals();
244
+ const positional = args.slice(0, -2);
245
+ print(await work(await deps.resolveScope(options), options, ...positional));
246
+ });
247
+ const scoped = (command) => command
248
+ .option('--workspace <id-or-slug-or-name>', 'Workspace id, slug, or name')
249
+ .option('--project <id-or-slug-or-name>', 'Project id, slug, or name');
250
+ const angles = (scope) => api(scope, 'angles', 'query');
251
+ const creatives = (scope) => api(scope, 'creatives', 'query');
252
+ const variations = (scope) => api(scope, 'variations', 'query');
253
+ const root = program.command('creatives').description('Creatives Platform: angles, creatives, variations, dictionaries and files (JSON output)');
254
+ root.addHelpText('after', `
255
+ Model: Creative (st003) > Variation (CLMB_st003_02_deadline, belongs to one Angle) > File (one per size).
256
+ Before creating an angle, always run "fgrove creatives angles search <words>" to avoid duplicates.
257
+ Field values (format, brand, task_type, creo_type, size, visual_hook, text_hook) must be in the project dictionary.
258
+ Files are named <variation name>_<WIDTHxHEIGHT>[_anything].<png|jpg|webp|mp4|mov>.
259
+
260
+ Examples:
261
+ fgrove creatives settings set-prefix CLMB --project claimbee
262
+ fgrove creatives dictionary add brand Amazon Google PayPal --project claimbee
263
+ fgrove creatives angles create --slug deadline --name "Deadline approaching" --status working --project claimbee
264
+ fgrove creatives create --format st --drive-url https://drive.google.com/... --project claimbee
265
+ fgrove creatives variations create --creative st003 --angle deadline --brand Amazon --sizes 1080x1080,1080x1920 --project claimbee
266
+ fgrove creatives variations update st003_02 --launched true --result go --winner true --project claimbee
267
+ fgrove creatives files sync ./downloads/st003 --project claimbee`);
268
+ const settings = root.command('settings').description('Project creative settings');
269
+ scoped(settings.command('show').description('Show the name prefix and dictionaries'))
270
+ .action(run((scope) => api(scope, 'settings', 'query')));
271
+ scoped(settings.command('set-prefix <prefix>').description('Set the creative name prefix, such as CLMB (renames all variations)'))
272
+ .action(run((scope, _options, prefix) => api(scope, 'setNamePrefix', 'mutation', { prefix })));
273
+ const dictionary = root.command('dictionary').description(`Dictionary values per field: ${DICTIONARY_FIELDS.join(', ')}`);
274
+ scoped(dictionary.command('list').description('List dictionary values (defaults and project values)').option('--field <field>', 'Only this field'))
275
+ .action(run(async (scope, options) => {
276
+ const { dictionary: values } = await api(scope, 'settings', 'query');
277
+ return values.filter((value) => !options.field || value.field === options.field);
278
+ }));
279
+ scoped(dictionary.command('add <field> <values...>').description('Add one or more project values to a field'))
280
+ .action(async (field, values, _options, command) => {
281
+ const scope = await deps.resolveScope(command.optsWithGlobals());
282
+ const results = [];
283
+ for (const value of values) {
284
+ results.push(await api(scope, 'addDictionaryValue', 'mutation', { field, value })
285
+ .catch((error) => ({ field, value, error: error.message })));
286
+ }
287
+ print(results);
288
+ });
289
+ scoped(dictionary.command('remove <field> <value>').description('Remove a project value (defaults stay)'))
290
+ .action(run((scope, _options, field, value) => api(scope, 'removeDictionaryValue', 'mutation', { field, value })));
291
+ const angle = root.command('angles').description('Angles: reusable creative ideas');
292
+ scoped(angle.command('list').description('List angles').option('--status <status>', ANGLE_STATUSES.join(' | ')))
293
+ .action(run(async (scope, options) => (await angles(scope))
294
+ .filter((item) => !options.status || item.status === options.status)
295
+ .map(({ code, slug, name, status, variation_count, launched_count, go_count, winner_count }) => ({ code, slug, name, status, variation_count, launched_count, go_count, winner_count }))));
296
+ scoped(angle.command('search <text>').description('Find existing angles similar to the text (run before create)'))
297
+ .action(run(async (scope, _options, text) => searchAngles(await angles(scope), text)));
298
+ scoped(angle.command('get <angle>').description('Show one angle by code, slug, or id'))
299
+ .action(run(async (scope, _options, ref) => findAngle(await angles(scope), ref)));
300
+ addOptions(scoped(angle.command('create').description('Create an angle (code is assigned when omitted)')
301
+ .option('--code <code>', 'Explicit code, such as C004').option('--parent <angle>', 'Parent angle code or slug')), ANGLE_OPTIONS)
302
+ .action(run(async (scope, options) => {
303
+ if (!options.slug || !options.name) {
304
+ throw new Error('--slug and --name are required');
305
+ }
306
+ const existing = await angles(scope);
307
+ const duplicate = existing.find((item) => item.slug === options.slug);
308
+ if (duplicate) {
309
+ throw new Error(`Angle slug "${options.slug}" is taken by ${duplicate.code}. Similar: ${JSON.stringify(searchAngles(existing, `${options.slug} ${options.name}`))}`);
310
+ }
311
+ return api(scope, 'createAngle', 'mutation', {
312
+ ...collect(options, ANGLE_OPTIONS),
313
+ ...(options.code ? { code: options.code } : {}),
314
+ ...(options.parent ? { parent_angle_id: findAngle(existing, options.parent).id } : {}),
315
+ });
316
+ }));
317
+ addOptions(scoped(angle.command('update <angle>').description('Update an angle by code, slug, or id')
318
+ .option('--parent <angle>', 'Parent angle code or slug ("none" clears)')), ANGLE_OPTIONS)
319
+ .action(run(async (scope, options, ref) => {
320
+ const existing = await angles(scope);
321
+ return api(scope, 'updateAngle', 'mutation', {
322
+ angleId: findAngle(existing, ref).id,
323
+ ...collect(options, ANGLE_OPTIONS),
324
+ ...(options.parent ? { parent_angle_id: options.parent === 'none' ? null : findAngle(existing, options.parent).id } : {}),
325
+ });
326
+ }));
327
+ scoped(angle.command('delete <angle>').description('Delete an angle without creatives (otherwise set --status failed)'))
328
+ .action(run(async (scope, _options, ref) => api(scope, 'deleteAngle', 'mutation', { angleId: findAngle(await angles(scope), ref).id })));
329
+ scoped(root.command('list').description('List creatives'))
330
+ .action(run((scope) => api(scope, 'creatives', 'query')));
331
+ scoped(root.command('create').description('Create a creative (number is assigned per format when omitted)')
332
+ .requiredOption('--format <format>', 'Format from the dictionary (st, vid, vidst)')
333
+ .option('--number <n>', 'Explicit number, such as 3 for st003').option('--drive-url <url>', 'Google Drive folder link'))
334
+ .action(run((scope, options) => api(scope, 'createCreative', 'mutation', {
335
+ format: options.format,
336
+ ...(options.number ? { number: parseNumber(options.number) } : {}),
337
+ driveUrl: options.driveUrl ?? null,
338
+ })));
339
+ scoped(root.command('update <creative>').description('Change a creative\'s Drive link')
340
+ .requiredOption('--drive-url <url>', 'Google Drive folder link ("none" clears)'))
341
+ .action(run(async (scope, options, ref) => api(scope, 'updateCreative', 'mutation', {
342
+ creativeId: findCreative(await creatives(scope), ref).id,
343
+ driveUrl: parseNullableText(options.driveUrl),
344
+ })));
345
+ scoped(root.command('delete <creative>').description('Delete a creative with its variations and files'))
346
+ .action(run(async (scope, _options, ref) => api(scope, 'deleteCreative', 'mutation', { creativeId: findCreative(await creatives(scope), ref).id })));
347
+ const variation = root.command('variations').description('Variations: the launched and tested versions of a creative');
348
+ scoped(variation.command('list').description('List variations')
349
+ .option('--angle <angle>', 'Only this angle').option('--creative <creative>', 'Only this creative'))
350
+ .action(run(async (scope, options) => api(scope, 'variations', 'query', {
351
+ ...(options.angle ? { angleId: findAngle(await angles(scope), options.angle).id } : {}),
352
+ ...(options.creative ? { creativeId: findCreative(await creatives(scope), options.creative).id } : {}),
353
+ })));
354
+ addOptions(scoped(variation.command('create').description('Create a variation (number is assigned when omitted)')
355
+ .requiredOption('--creative <creative>', 'Creative code, such as st003')
356
+ .requiredOption('--angle <angle>', 'Angle code or slug')
357
+ .option('--number <n>', 'Explicit variation number')
358
+ .option('--name <name>', 'Keep this exact name, such as CLMB_st049_01_receipt-v2 (otherwise derived)')), VARIATION_OPTIONS)
359
+ .action(run(async (scope, options) => api(scope, 'createVariation', 'mutation', {
360
+ creativeId: findCreative(await creatives(scope), options.creative).id,
361
+ angleId: findAngle(await angles(scope), options.angle).id,
362
+ ...(options.number ? { number: parseNumber(options.number) } : {}),
363
+ ...(options.name ? { name: options.name } : {}),
364
+ ...collect(options, VARIATION_OPTIONS),
365
+ })));
366
+ addOptions(scoped(variation.command('update <variation>').description('Update a variation (full name, or st003_02 when unique)')
367
+ .option('--angle <angle>', 'Move to this angle (renames a derived name)')), VARIATION_OPTIONS)
368
+ .action(run(async (scope, options, ref) => api(scope, 'updateVariation', 'mutation', {
369
+ variationId: findVariation(await variations(scope), ref).id,
370
+ ...(options.angle ? { angleId: findAngle(await angles(scope), options.angle).id } : {}),
371
+ ...collect(options, VARIATION_OPTIONS),
372
+ })));
373
+ scoped(variation.command('delete <variation>').description('Delete a variation and its files'))
374
+ .action(run(async (scope, _options, ref) => api(scope, 'deleteVariation', 'mutation', { variationId: findVariation(await variations(scope), ref).id })));
375
+ const files = root.command('files').description('Creative Files stored by FunnelsGrove, one per variation and size');
376
+ scoped(files.command('sync <dir>').description('Upload new or changed files named by convention; never deletes')
377
+ .option('--dry-run', 'Show what would upload'))
378
+ .action(run((scope, options, dir) => syncCreativeFiles(scope, dir, options)));
379
+ scoped(files.command('upload <file>').description('Upload one file with an explicit variation and size')
380
+ .requiredOption('--variation <variation>', 'Variation, such as st003_02').requiredOption('--size <size>', 'Size, such as 1080x1920'))
381
+ .action(run(async (scope, options, file) => {
382
+ const contentType = CONTENT_TYPES[path.extname(file).toLowerCase()];
383
+ if (!contentType) {
384
+ throw new Error('Use a png, jpg, webp, mp4 or mov file');
385
+ }
386
+ if (!(await stat(file)).isFile()) {
387
+ throw new Error(`${file} is not a file`);
388
+ }
389
+ const target = findVariation(await variations(scope), options.variation);
390
+ return uploadFile(scope, { variation: target, size: options.size, contentType, body: await readFile(file) });
391
+ }));
392
+ scoped(files.command('delete').description('Delete one stored file')
393
+ .requiredOption('--variation <variation>', 'Variation, such as st003_02').requiredOption('--size <size>', 'Size, such as 1080x1920'))
394
+ .action(run(async (scope, options) => api(scope, 'deleteFile', 'mutation', {
395
+ variationId: findVariation(await variations(scope), options.variation).id, size: options.size,
396
+ })));
397
+ };
@@ -99,7 +99,7 @@ export declare const writeSupportWorkflow: (dir: string, workflow: SupportWorkfl
99
99
  }>;
100
100
  export declare const formatSupportWorkflowLoaded: (project: SupportProject, workflow: SupportWorkflow, entryPath: string, previous?: LoadedVersions | null) => string[];
101
101
  /** The support folder's CLAUDE.md: the same for every agent, reviewed with the CLI, never edited per project. */
102
- export declare const SUPPORT_FOLDER_INSTRUCTIONS = "# FunnelsGrove support folder\n\nThis folder is for working FunnelsGrove Support Tickets with the `fgrove support` CLI. Each project has its own Support Workflow, which `fgrove` writes to `fgrove-support/<project-id>/`.\n\nWhen the person asks to work, check or decide support tickets, in any wording or language, or a task prompt starts with `Support Routine run`, `Support decisions tick` or `Support loop tick`:\n\n1. `fgrove support projects` lists the projects you may work and whether support is on for each.\n2. Work the projects the person or the prompt names; otherwise every project with support on, one at a time.\n3. For each project, run `fgrove support workflow --project <id> --out <this folder's absolute path>/fgrove-support/<id>` (from any folder), read the WORKFLOW.md it names in full, and follow it for that project's tickets only.\n4. Finish one project before loading the next. Never apply one project's workflow to another project's ticket. A ticket that is clearly about another product of the same organization moves there with `fgrove support assign-project TCK-N --project <id>`; load that project's workflow before working it.\n\nUnassigned Tickets have no project and so no workflow. Work them only when the person or the prompt asks: `fgrove support queue --take 5` without `--project`. A ticket that has a project: load its workflow first (step 3). An Unassigned one: assign it only when its Support Address alias or the product it names points to exactly one of your projects, and `fgrove support billing --project <id> --email <customer> --json` finds the customer there. Then run `fgrove support assign-project TCK-N --project <id>` and follow that project's workflow. Otherwise escalate it with the note \"Project unclear:\" and the candidates and evidence. Never reply to an Unassigned Ticket.\n\n## Support every hour\n\nWhen the person asks to keep support running (every hour, a loop), set up two things, each named in the person's language so they see what it is:\n\n1. **The automatic queue**, a Claude Desktop scheduled task (the scheduled-tasks tool): taskId `fgrove-support-queue`, a title meaning \"Support: automatic queue\" (in Russian: \"\u041F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0430: \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0440\u0430\u0437\u0431\u043E\u0440\"), hourly at a minute other than :00 and :30, `notifyOnCompletion` false, and the prompt `Support Routine run. Talk to me in <the person's language>. Work the support queue of every project in my Support Access that has support on: read <this folder's absolute path>/CLAUDE.md and follow it. Nobody is present to answer questions.` Add `Projects: <names>.` when the person named projects. When that task exists, update its prompt instead.\n2. **This chat, their decisions:** rename it to a title meaning \"Support: your decisions\" (in Russian: \"\u041F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0430: \u0432\u0430\u0448\u0438 \u0440\u0435\u0448\u0435\u043D\u0438\u044F\"). Schedule here with CronCreate, recurring at another minute other than :00 and :30, the prompt `Support decisions tick. Talk to me in <the person's language>. Read <this folder's absolute path>/CLAUDE.md again and follow it.`, and a one-shot six days later: `Support decisions: the hourly timer expires in about a day. Tell the person in one line and ask them to write \"renew\"; on that answer, schedule the hourly job and this reminder again.`\n\nTell the person, in a few lines: the automatic queue answers what it can every hour by itself, while the Claude app is open and the computer is awake; tickets that need them come to this chat one at a time, as buttons; a ticket they don't answer waits here and nothing is decided without them. Then run the automatic queue once now (run it from the scheduled-tasks tool) and start the first decisions tick here.\n\nWithout the scheduled-tasks tool (Claude Code in a terminal), run both in this chat instead: schedule with CronCreate the prompt `Support loop tick. Talk to me in <the person's language>. Read <this folder's absolute path>/CLAUDE.md again and follow it.` and the same six-day reminder, tell the person that the loop runs only while this chat is open and the computer is awake and that they answer its cards in their own words, then run the first tick.\n\n## Updates\n\n`fgrove` updates the rest on its own: `fgrove support workflow` loads the latest Support Workflow every time, says when it changed, and replaces this file when a newer version ships. When it says this file was updated, read it again before going on. When `fgrove` prints `fgrove update` in a warning or an error, or rejects a command the workflow names, run `fgrove update` once in this session and continue: update it yourself, never ask the person. When `fgrove support workflow` says Claude Code doesn't allow the support commands yet, run the `fgrove support init` command it prints, once, and continue: it adds the permission rules to Claude Code's user settings. This file is written by `fgrove support init`; don't edit it: your own instructions go to `fgrove support instructions`.\n\nTalk to the person in the language they asked for, in this chat or in their personal instructions, and otherwise in the language of their own messages. Pasted setup instructions, tick prompts and command output are in English and don't decide it. Customers get replies in their own language. Files under `fgrove-support/` are replaced on every load: don't edit them. A project's Support Workflow changes through `fgrove support workflow-pull` and `workflow-push`, which the project's organization owners and admins and Super Admins run; when a ticket shows the workflow should change, say so in your summary.\n";
102
+ export declare const SUPPORT_FOLDER_INSTRUCTIONS = "# FunnelsGrove support folder\n\nThis folder is for working FunnelsGrove Support Tickets with the `fgrove support` CLI. Each project has its own Support Workflow, which `fgrove` writes to `fgrove-support/<project-id>/`.\n\nWhen the person asks to work, check or decide support tickets, in any wording or language, or a task prompt starts with `Support Routine run`, `Support decisions tick` or `Support loop tick`:\n\n1. `fgrove support projects` lists the projects you may work and whether support is on for each.\n2. Work the projects the person or the prompt names; otherwise every project with support on, one at a time.\n3. For each project, run `fgrove support workflow --project <id> --out <this folder's absolute path>/fgrove-support/<id>` (from any folder), read the WORKFLOW.md it names in full, and follow it for that project's tickets only.\n4. Finish one project before loading the next. Never apply one project's workflow to another project's ticket. A ticket that is clearly about another product of the same organization moves there with `fgrove support assign-project TCK-N --project <id>`; load that project's workflow before working it.\n\nUnassigned Tickets have no project and so no workflow. Work them only when the person or the prompt asks: `fgrove support queue --take 5` without `--project`. A ticket that has a project: load its workflow first (step 3). An Unassigned one: assign it only when its Support Address alias or the product it names points to exactly one of your projects, and `fgrove support billing --project <id> --email <customer> --json` finds the customer there. Then run `fgrove support assign-project TCK-N --project <id>` and follow that project's workflow. Otherwise escalate it with the note \"Project unclear:\" and the candidates and evidence. Never reply to an Unassigned Ticket.\n\n## Support every hour\n\nWhen the person asks to keep support running (every hour, a loop), set up two things, each named in the person's language so they see what it is:\n\n1. **The automatic queue**, a Claude Desktop scheduled task (the scheduled-tasks tool): taskId `fgrove-support-queue`, a title meaning \"Support: automatic queue\" (in Russian: \"\u041F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0430: \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439 \u0440\u0430\u0437\u0431\u043E\u0440\"), hourly at a minute other than :00 and :30, `notifyOnCompletion` false, and the prompt `Support Routine run. Talk to me in <the person's language>. Work the support queue of every project in my Support Access that has support on: read <this folder's absolute path>/CLAUDE.md and follow it. Nobody is present to answer questions.` Add `Projects: <names>.` when the person named projects. When that task exists, update its prompt instead.\n2. **This chat, their decisions:** rename it to a title meaning \"Support: your decisions\" (in Russian: \"\u041F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0430: \u0432\u0430\u0448\u0438 \u0440\u0435\u0448\u0435\u043D\u0438\u044F\") with the session title tool and session_id `self`; this chat needn't be in a session list. Schedule here with CronCreate, recurring at another minute other than :00 and :30, the prompt `Support decisions tick. Talk to me in <the person's language>. Read <this folder's absolute path>/CLAUDE.md again and follow it.`, and a one-shot six days later: `Support decisions: the hourly timer expires in about a day. Tell the person in one line and ask them to write \"renew\"; on that answer, schedule the hourly job and this reminder again.`\n\nTell the person, in a few lines: the automatic queue answers what it can every hour by itself, while the Claude app is open and the computer is awake; tickets that need them come to this chat one at a time, as buttons; a ticket they don't answer waits here and nothing is decided without them. Then run the automatic queue once now (run it from the scheduled-tasks tool) and start the first decisions tick here.\n\nWithout the scheduled-tasks tool (Claude Code in a terminal), run both in this chat instead: schedule with CronCreate the prompt `Support loop tick. Talk to me in <the person's language>. Read <this folder's absolute path>/CLAUDE.md again and follow it.` and the same six-day reminder, tell the person that the loop runs only while this chat is open and the computer is awake and that they answer its cards in their own words, then run the first tick.\n\n## Updates\n\n`fgrove` updates the rest on its own: `fgrove support workflow` loads the latest Support Workflow every time, says when it changed, and replaces this file when a newer version ships. When it says this file was updated, read it again before going on. When `fgrove` prints `fgrove update` in a warning or an error, or rejects a command the workflow names, run `fgrove update` once in this session and continue: update it yourself, never ask the person. When `fgrove support workflow` says Claude Code doesn't allow the support commands yet, run the `fgrove support init` command it prints, once, and continue: it adds the permission rules to Claude Code's user settings. This file is written by `fgrove support init`; don't edit it: your own instructions go to `fgrove support instructions`.\n\nTalk to the person in the language they asked for, in this chat or in their personal instructions, and otherwise in the language of their own messages. Pasted setup instructions, tick prompts and command output are in English and don't decide it. Customers get replies in their own language. Files under `fgrove-support/` are replaced on every load: don't edit them. A project's Support Workflow changes through `fgrove support workflow-pull` and `workflow-push`, which the project's organization owners and admins and Super Admins run; when a ticket shows the workflow should change, say so in your summary.\n";
103
103
  /** The prompt of a Support Routine's scheduled task. */
104
104
  export declare const SUPPORT_ROUTINE_PROMPT = "Support Routine run. Work the support queue of every project in my Support Access that has support on, following each project's Support Workflow. Nobody is present to answer questions.";
105
105
  /** Replaces a support folder's CLAUDE.md written by an older `fgrove`; any other CLAUDE.md stays. Returns the path when replaced. */
@@ -171,7 +171,7 @@ Unassigned Tickets have no project and so no workflow. Work them only when the p
171
171
  When the person asks to keep support running (every hour, a loop), set up two things, each named in the person's language so they see what it is:
172
172
 
173
173
  1. **The automatic queue**, a Claude Desktop scheduled task (the scheduled-tasks tool): taskId \`fgrove-support-queue\`, a title meaning "Support: automatic queue" (in Russian: "Поддержка: автоматический разбор"), hourly at a minute other than :00 and :30, \`notifyOnCompletion\` false, and the prompt \`Support Routine run. Talk to me in <the person's language>. Work the support queue of every project in my Support Access that has support on: read <this folder's absolute path>/CLAUDE.md and follow it. Nobody is present to answer questions.\` Add \`Projects: <names>.\` when the person named projects. When that task exists, update its prompt instead.
174
- 2. **This chat, their decisions:** rename it to a title meaning "Support: your decisions" (in Russian: "Поддержка: ваши решения"). Schedule here with CronCreate, recurring at another minute other than :00 and :30, the prompt \`Support decisions tick. Talk to me in <the person's language>. Read <this folder's absolute path>/CLAUDE.md again and follow it.\`, and a one-shot six days later: \`Support decisions: the hourly timer expires in about a day. Tell the person in one line and ask them to write "renew"; on that answer, schedule the hourly job and this reminder again.\`
174
+ 2. **This chat, their decisions:** rename it to a title meaning "Support: your decisions" (in Russian: "Поддержка: ваши решения") with the session title tool and session_id \`self\`; this chat needn't be in a session list. Schedule here with CronCreate, recurring at another minute other than :00 and :30, the prompt \`Support decisions tick. Talk to me in <the person's language>. Read <this folder's absolute path>/CLAUDE.md again and follow it.\`, and a one-shot six days later: \`Support decisions: the hourly timer expires in about a day. Tell the person in one line and ask them to write "renew"; on that answer, schedule the hourly job and this reminder again.\`
175
175
 
176
176
  Tell the person, in a few lines: the automatic queue answers what it can every hour by itself, while the Claude app is open and the computer is awake; tickets that need them come to this chat one at a time, as buttons; a ticket they don't answer waits here and nothing is decided without them. Then run the automatic queue once now (run it from the scheduled-tasks tool) and start the first decisions tick here.
177
177
 
@@ -4,10 +4,10 @@
4
4
  "minimumCliVersion": "0.1.20",
5
5
  "entries": [
6
6
  {
7
- "repositoryCliVersion": "0.1.351",
7
+ "repositoryCliVersion": "0.1.353",
8
8
  "manifest": {
9
9
  "schemaVersion": 1,
10
- "bundleVersion": "2.0.344",
10
+ "bundleVersion": "2.0.346",
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": "5db03d9f8f9adf0542dc4bd4008a5cf42073cc3eb99909892efaffe49b751e5c"
48
+ "sha256": "7aeda8d18a85667010396e754ff77338acd30494b09819a23fdf257401ff7f15"
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": "8b3a1d3859156a55c0125093d720aefc84a9eda7153a58211eba2460fc23316b"
148
+ "sha256": "7dacbe5ea0b190e1e6604033cfa5d933ff0da2aacd5c1035fcf0616601da4367"
149
149
  }
150
150
  ]
151
151
  }
152
152
  },
153
153
  {
154
- "repositoryCliVersion": "0.1.350",
154
+ "repositoryCliVersion": "0.1.352",
155
155
  "manifest": {
156
156
  "schemaVersion": 1,
157
- "bundleVersion": "2.0.343",
157
+ "bundleVersion": "2.0.345",
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": "642abb9ad362188cefdc4b756c3fcfeb78c2aba54b552ab606996cae32285a25"
195
+ "sha256": "a66ccac6a2aa87361d491759c06c87c718755552f04250ca51768679fbade4ac"
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": "b7421e4fbee50ef16e21c4863c256cdf1acbb146356d093d6c234b6bc209eff0"
295
+ "sha256": "853f573a6667f1ec5ff4da9075ca8df488f82d984723c44bc947e60f020c6b51"
296
296
  }
297
297
  ]
298
298
  }
299
299
  },
300
300
  {
301
- "repositoryCliVersion": "0.1.349",
301
+ "repositoryCliVersion": "0.1.351",
302
302
  "manifest": {
303
303
  "schemaVersion": 1,
304
- "bundleVersion": "2.0.342",
304
+ "bundleVersion": "2.0.344",
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": "7feb445afac29d0bdde1c88a9c1a067c9f7b7582030ae9d74f4794a1a9096653"
342
+ "sha256": "5db03d9f8f9adf0542dc4bd4008a5cf42073cc3eb99909892efaffe49b751e5c"
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": "0527f742251b4a66cff004a686a5e700ec25f8bafd0e58e61ccd1ede0dcf307f"
442
+ "sha256": "8b3a1d3859156a55c0125093d720aefc84a9eda7153a58211eba2460fc23316b"
443
443
  }
444
444
  ]
445
445
  }
446
446
  },
447
447
  {
448
- "repositoryCliVersion": "0.1.348",
448
+ "repositoryCliVersion": "0.1.350",
449
449
  "manifest": {
450
450
  "schemaVersion": 1,
451
- "bundleVersion": "2.0.341",
451
+ "bundleVersion": "2.0.343",
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": "3bf19c149e0c203b4958a9476d561e1ebd25deb7f0592b7b3190029c2d307a21"
489
+ "sha256": "642abb9ad362188cefdc4b756c3fcfeb78c2aba54b552ab606996cae32285a25"
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": "d8d48c6b6b11c9ab8031f1d48da083125856a0362571263d53c828399d27d64f"
589
+ "sha256": "b7421e4fbee50ef16e21c4863c256cdf1acbb146356d093d6c234b6bc209eff0"
590
590
  }
591
591
  ]
592
592
  }
593
593
  },
594
594
  {
595
- "repositoryCliVersion": "0.1.347",
595
+ "repositoryCliVersion": "0.1.349",
596
596
  "manifest": {
597
597
  "schemaVersion": 1,
598
- "bundleVersion": "2.0.340",
598
+ "bundleVersion": "2.0.342",
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": "22881ce507f392cb400365d2c7fffc741a62b2709584047ce1e438da9e8c194a"
636
+ "sha256": "7feb445afac29d0bdde1c88a9c1a067c9f7b7582030ae9d74f4794a1a9096653"
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": "7019f60385a97377bc21204f3ee4fdbbc9a89b3891db7be77797f3bbe3fdf797"
736
+ "sha256": "0527f742251b4a66cff004a686a5e700ec25f8bafd0e58e61ccd1ede0dcf307f"
737
737
  }
738
738
  ]
739
739
  }
740
740
  },
741
741
  {
742
- "repositoryCliVersion": "0.1.346",
742
+ "repositoryCliVersion": "0.1.348",
743
743
  "manifest": {
744
744
  "schemaVersion": 1,
745
- "bundleVersion": "2.0.339",
745
+ "bundleVersion": "2.0.341",
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": "a4e723239213aed01bf4715f2de2204eb1fdce0dd7f06e46ff659beadbe1659f"
783
+ "sha256": "3bf19c149e0c203b4958a9476d561e1ebd25deb7f0592b7b3190029c2d307a21"
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": "d2d6da173d99ed4070db31af9905e939273db47f0be6628176b72b3b1e841ca9"
883
+ "sha256": "d8d48c6b6b11c9ab8031f1d48da083125856a0362571263d53c828399d27d64f"
884
884
  }
885
885
  ]
886
886
  }
887
887
  },
888
888
  {
889
- "repositoryCliVersion": "0.1.345",
889
+ "repositoryCliVersion": "0.1.347",
890
890
  "manifest": {
891
891
  "schemaVersion": 1,
892
- "bundleVersion": "2.0.338",
892
+ "bundleVersion": "2.0.340",
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": "4af92ed1a9d3c634f7efee9022c34e0e6d6021e5892b8cf3f0c6f42a1fe50b3c"
930
+ "sha256": "22881ce507f392cb400365d2c7fffc741a62b2709584047ce1e438da9e8c194a"
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": "e3f0a3852cebce3d841623380a3a373bca52c66261d77c004ed3fccc2d2ab00f"
1030
+ "sha256": "7019f60385a97377bc21204f3ee4fdbbc9a89b3891db7be77797f3bbe3fdf797"
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.351",
3
+ "version": "0.1.353",
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.344",
3
+ "bundleVersion": "2.0.346",
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": "5db03d9f8f9adf0542dc4bd4008a5cf42073cc3eb99909892efaffe49b751e5c"
41
+ "sha256": "7aeda8d18a85667010396e754ff77338acd30494b09819a23fdf257401ff7f15"
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": "8b3a1d3859156a55c0125093d720aefc84a9eda7153a58211eba2460fc23316b"
141
+ "sha256": "7dacbe5ea0b190e1e6604033cfa5d933ff0da2aacd5c1035fcf0616601da4367"
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.351`, 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.353`, 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.344",
3
+ "bundleVersion": "2.0.346",
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.344",
3
+ "bundleVersion": "2.0.346",
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": "5db03d9f8f9adf0542dc4bd4008a5cf42073cc3eb99909892efaffe49b751e5c"
41
+ "sha256": "7aeda8d18a85667010396e754ff77338acd30494b09819a23fdf257401ff7f15"
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": "8b3a1d3859156a55c0125093d720aefc84a9eda7153a58211eba2460fc23316b"
141
+ "sha256": "7dacbe5ea0b190e1e6604033cfa5d933ff0da2aacd5c1035fcf0616601da4367"
142
142
  }
143
143
  ]
144
144
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sourceTreeHash": "7b6a472831d329528314dc00645457f1a62a97668259b3b2f3eaf2f3ab365e0a",
3
+ "sourceTreeHash": "4a105ab747a7ebb1f4d4c59f5be95cf3d8d0881f7aacf611ddbb16b5ad405375",
4
4
  "stepContractVersion": 3,
5
- "docsBundleVersion": "2.0.344",
5
+ "docsBundleVersion": "2.0.346",
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": "39b41c77f1251e6b889a9d6b60cbf43cc92bc7e40b8bc1da8c808ebb7e637ea4",
19
+ "sha256": "1f893818c946009314c497eac9cd82b8c3b47db210c3cfbdaf795aaa27edac10",
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": "5db03d9f8f9adf0542dc4bd4008a5cf42073cc3eb99909892efaffe49b751e5c",
79
+ "sha256": "7aeda8d18a85667010396e754ff77338acd30494b09819a23fdf257401ff7f15",
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": "8b3a1d3859156a55c0125093d720aefc84a9eda7153a58211eba2460fc23316b",
209
+ "sha256": "7dacbe5ea0b190e1e6604033cfa5d933ff0da2aacd5c1035fcf0616601da4367",
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.351`, 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.353`, 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.344",
3
+ "bundleVersion": "2.0.346",
4
4
  "contractSource": "funnelsgrove-repository://apps/funnel-runtime/contracts/step-contract-v2.json",
5
5
  "fullyGenerated": [
6
6
  ".funnelsgrove-docs.json",