@funnelsgrove/cli 0.1.132 → 0.1.139

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
@@ -15,7 +15,7 @@ import { buildCommittedSyncManifest, buildDownloadedSyncManifest, buildSourceCan
15
15
  import { mergeTextSourceWithGit } from './sourceRebase.js';
16
16
  import { executeExperimentCreate, formatExperimentCreateSuccess, recoverExperimentCreateTransaction, } from './experimentCreate.js';
17
17
  import { pullEnvFile } from './envSync.js';
18
- import { executeEmailPull, executeEmailPush, executeEmailSend, executeEmailSequenceAddStep, executeEmailSequenceCreate, executeEmailSequencePublish, executeEmailSequenceSetActive, executeEmailTemplatePublish, executeEmailValidate, parseEmailVariablesJson, } from './emailCommands.js';
18
+ import { executeEmailPull, executeEmailPush, executeEmailSend, executeEmailUpdateVariables, executeEmailSequenceAddStep, executeEmailSequenceCancel, executeEmailSequenceCreate, executeEmailSequencePublish, executeEmailSequenceSetActive, executeEmailTemplatePublish, executeEmailValidate, parseEmailVariablesJson, } from './emailCommands.js';
19
19
  import { formatGitHubConnectRows, formatGitHubJobRows, formatGitHubStatusRows, } from './githubOutput.js';
20
20
  import { GitHubSyncTimeoutError, syncGitHubDraftIfConnected, } from './githubSyncFlow.js';
21
21
  import { reskinFunnel } from './reskin.js';
@@ -1768,6 +1768,21 @@ emailCommand
1768
1768
  throw new Error(`Email delivery ${result.id} finished with status ${result.status}.`);
1769
1769
  }
1770
1770
  });
1771
+ emailCommand
1772
+ .command('update-variables <delivery-id>')
1773
+ .description('Update variables for a queued personalized sequence email')
1774
+ .requiredOption('--variables <json>', 'Variables to merge as a JSON object')
1775
+ .option('--api-url <url>', 'Emails SDK API URL', process.env.FUNNELSGROVE_EMAILS_API_URL || 'https://sdk-api.funnelsgrove.com')
1776
+ .option('--private-token <token>', 'Private project token (defaults to FUNNELSGROVE_PRIVATE_TOKEN)', process.env.FUNNELSGROVE_PRIVATE_TOKEN)
1777
+ .action(async (deliveryId, options) => {
1778
+ const result = await executeEmailUpdateVariables({
1779
+ apiUrl: options.apiUrl,
1780
+ privateToken: options.privateToken || '',
1781
+ deliveryId,
1782
+ variables: parseEmailVariablesJson(options.variables),
1783
+ });
1784
+ console.log(JSON.stringify(result, null, 2));
1785
+ });
1771
1786
  addEmailScopeOptions(emailCommand
1772
1787
  .command('pull')
1773
1788
  .description('Pull project email drafts into local files'))
@@ -1831,7 +1846,8 @@ addEmailScopeOptions(emailSequenceCommand
1831
1846
  .option('--funnel-id <uuid>', 'Limit the sequence to one project funnel')
1832
1847
  .option('--all-funnels', 'Apply the sequence to every funnel in the project')
1833
1848
  .option('--delay-hours <hours>', 'First-step delay in hours')
1834
- .option('--delay-days <days>', 'First-step delay in days'))
1849
+ .option('--delay-days <days>', 'First-step delay in days')
1850
+ .option('--personalize', 'Request a personalization webhook 20 minutes before sending'))
1835
1851
  .action(async (slug, options) => {
1836
1852
  if (Boolean(options.funnelId) === Boolean(options.allFunnels)) {
1837
1853
  throw new Error('Provide exactly one of --funnel-id or --all-funnels.');
@@ -1848,6 +1864,7 @@ addEmailScopeOptions(emailSequenceCommand
1848
1864
  firstStepKey: options.key,
1849
1865
  templateSlug: options.template,
1850
1866
  delaySeconds: parseEmailSequenceDelay(options),
1867
+ personalizationEnabled: options.personalize,
1851
1868
  });
1852
1869
  console.log(`Created local email sequence ${slug}.`);
1853
1870
  });
@@ -1859,12 +1876,15 @@ addEmailScopeOptions(emailSequenceCommand
1859
1876
  .option('--subject <subject>', 'Direct-copy subject')
1860
1877
  .option('--body <body>', 'Direct-copy plain-text body')
1861
1878
  .option('--delay-hours <hours>', 'Delay after the previous step in hours')
1862
- .option('--delay-days <days>', 'Delay after the previous step in days'))
1879
+ .option('--delay-days <days>', 'Delay after the previous step in days')
1880
+ .option('--personalize', 'Request a personalization webhook 20 minutes before sending'))
1863
1881
  .action(async (slug, options) => {
1864
1882
  const direct = options.subject !== undefined || options.body !== undefined;
1865
1883
  if (Boolean(options.template) === direct || (direct && (!options.subject || !options.body))) {
1866
1884
  throw new Error('Provide either --template or both --subject and --body.');
1867
1885
  }
1886
+ if (direct && options.personalize)
1887
+ throw new Error('--personalize is available only with --template.');
1868
1888
  await executeEmailSequenceAddStep({
1869
1889
  ...await resolveEmailCommandScope(options),
1870
1890
  slug,
@@ -1873,6 +1893,7 @@ addEmailScopeOptions(emailSequenceCommand
1873
1893
  subject: options.subject,
1874
1894
  body: options.body,
1875
1895
  delaySeconds: parseEmailSequenceDelay(options),
1896
+ personalizationEnabled: options.personalize,
1876
1897
  });
1877
1898
  console.log(`Added email sequence step ${options.key} to ${slug}.`);
1878
1899
  });
@@ -1900,6 +1921,25 @@ for (const active of [true, false]) {
1900
1921
  console.log(`${active ? 'Enabled' : 'Disabled'} email sequence ${slug}.`);
1901
1922
  });
1902
1923
  }
1924
+ emailSequenceCommand
1925
+ .command('cancel <slug>')
1926
+ .description('Idempotently cancel active enrollments for one funnel user')
1927
+ .requiredOption('--user-id <uuid>', 'FunnelsGrove funnel end-user ID')
1928
+ .option('--reason <reason>', 'Cancellation reason', 'manual')
1929
+ .option('--dir <path>', 'Directory containing the emails folder', '.')
1930
+ .option('--api-url <url>', 'Emails SDK API URL', process.env.FUNNELSGROVE_EMAILS_API_URL || 'https://sdk-api.funnelsgrove.com')
1931
+ .option('--private-token <token>', 'Private project token (defaults to FUNNELSGROVE_PRIVATE_TOKEN)', process.env.FUNNELSGROVE_PRIVATE_TOKEN)
1932
+ .action(async (slug, options) => {
1933
+ const result = await executeEmailSequenceCancel({
1934
+ apiUrl: options.apiUrl,
1935
+ privateToken: options.privateToken || '',
1936
+ sourceDir: path.resolve(process.cwd(), options.dir),
1937
+ slug,
1938
+ funnelEndUserId: options.userId,
1939
+ reason: options.reason,
1940
+ });
1941
+ console.log(JSON.stringify(result, null, 2));
1942
+ });
1903
1943
  const projectsCommand = addExamples(program.command('projects').description('Manage projects'), [
1904
1944
  'fgrove projects list',
1905
1945
  'fgrove projects list --workspace acme',
@@ -38,6 +38,28 @@ export declare function executeEmailSend(input: {
38
38
  sleep?: (durationMs: number) => Promise<void>;
39
39
  now?: () => number;
40
40
  }): Promise<EmailSendStatus>;
41
+ export declare function executeEmailUpdateVariables(input: {
42
+ apiUrl: string;
43
+ privateToken: string;
44
+ deliveryId: string;
45
+ variables: Record<string, string | number | boolean>;
46
+ }, dependencies?: {
47
+ fetchImpl?: EmailSendFetch;
48
+ }): Promise<Record<string, unknown>>;
49
+ export declare function executeEmailSequenceCancel(input: {
50
+ apiUrl: string;
51
+ privateToken: string;
52
+ sourceDir: string;
53
+ slug: string;
54
+ funnelEndUserId: string;
55
+ reason: string;
56
+ }, dependencies?: {
57
+ fetchImpl?: EmailSendFetch;
58
+ }): Promise<{
59
+ sequenceId: string;
60
+ funnelEndUserId: string;
61
+ cancelled: number;
62
+ }>;
41
63
  export declare function executeEmailPull(scope: EmailCommandScope): Promise<{
42
64
  templates: number;
43
65
  sequences: number;
@@ -56,6 +78,7 @@ export declare function executeEmailSequenceAddStep(input: EmailCommandScope & {
56
78
  subject?: string;
57
79
  body?: string;
58
80
  delaySeconds: number;
81
+ personalizationEnabled?: boolean;
59
82
  }): Promise<void>;
60
83
  export declare function executeEmailSequenceCreate(input: EmailCommandScope & {
61
84
  slug: string;
@@ -65,6 +88,7 @@ export declare function executeEmailSequenceCreate(input: EmailCommandScope & {
65
88
  firstStepKey: string;
66
89
  templateSlug: string;
67
90
  delaySeconds: number;
91
+ personalizationEnabled?: boolean;
68
92
  }): Promise<void>;
69
93
  export declare function executeEmailSequenceSetActive(input: EmailCommandScope & {
70
94
  slug: string;
@@ -84,6 +84,59 @@ export async function executeEmailSend(input, dependencies = {}) {
84
84
  }
85
85
  throw new Error(`Timed out waiting for email delivery ${receipt.id}.`);
86
86
  }
87
+ export async function executeEmailUpdateVariables(input, dependencies = {}) {
88
+ if (!input.privateToken.trim())
89
+ throw new Error('A private project token is required.');
90
+ if (!UUID.test(input.deliveryId))
91
+ throw new Error('Delivery ID must be a UUID.');
92
+ return emailApiRequest({
93
+ apiUrl: input.apiUrl,
94
+ privateToken: input.privateToken,
95
+ path: `/sdk/private/emails/${encodeURIComponent(input.deliveryId)}/variables`,
96
+ method: 'PATCH',
97
+ body: { variables: input.variables },
98
+ fetchImpl: dependencies.fetchImpl || fetch,
99
+ });
100
+ }
101
+ export async function executeEmailSequenceCancel(input, dependencies = {}) {
102
+ if (!input.privateToken.trim())
103
+ throw new Error('A private project token is required.');
104
+ if (!UUID.test(input.funnelEndUserId))
105
+ throw new Error('Funnel end-user ID must be a UUID.');
106
+ const files = await readEmailFiles(input.sourceDir);
107
+ assertValidFiles(files);
108
+ const sequence = files.sequences.find((item) => item.slug === input.slug);
109
+ if (!sequence)
110
+ throw new Error(`Email sequence "${input.slug}" was not found locally.`);
111
+ if (!sequence.id)
112
+ throw new Error(`Push email sequence "${input.slug}" before cancelling an enrollment.`);
113
+ const remote = await emailApiRequest({
114
+ apiUrl: input.apiUrl,
115
+ privateToken: input.privateToken,
116
+ path: `/sdk/private/sequences/${encodeURIComponent(sequence.id)}`,
117
+ fetchImpl: dependencies.fetchImpl || fetch,
118
+ });
119
+ if (!isRecord(remote.sequence)
120
+ || remote.sequence.id !== sequence.id
121
+ || remote.sequence.slug !== sequence.slug) {
122
+ throw new Error(`Email identity mismatch: ID ${sequence.id} does not match local sequence slug "${sequence.slug}".`);
123
+ }
124
+ const response = await emailApiRequest({
125
+ apiUrl: input.apiUrl,
126
+ privateToken: input.privateToken,
127
+ path: `/sdk/private/sequences/${encodeURIComponent(sequence.id)}/enrollments/${encodeURIComponent(input.funnelEndUserId)}/cancel`,
128
+ method: 'POST',
129
+ body: { reason: input.reason },
130
+ fetchImpl: dependencies.fetchImpl || fetch,
131
+ });
132
+ if (response.sequenceId !== sequence.id
133
+ || response.funnelEndUserId !== input.funnelEndUserId
134
+ || !Number.isInteger(response.cancelled)
135
+ || Number(response.cancelled) < 0) {
136
+ throw new Error('Email API returned an invalid sequence cancellation result.');
137
+ }
138
+ return response;
139
+ }
87
140
  const hasDraft = (value) => (isRecord(value) && isRecord(value.draft));
88
141
  const assertRemoteResource = (value, resource) => {
89
142
  if (!isRecord(value)
@@ -169,11 +222,13 @@ const canonicalResource = (kind, value) => {
169
222
  mode: 'template',
170
223
  templateVersionId: step.templateVersionId,
171
224
  variables: isRecord(step.variables) ? step.variables : {},
225
+ personalizationEnabled: step.personalizationEnabled === true,
172
226
  }
173
227
  : step),
174
228
  exitEventTypes: Array.isArray(value.draft.exitEventTypes)
175
229
  ? [...new Set(value.draft.exitEventTypes)].sort()
176
230
  : [],
231
+ unsubscribeEnabled: value.draft.unsubscribeEnabled !== false,
177
232
  });
178
233
  };
179
234
  const loadCompleteItems = async (scope, input) => {
@@ -333,6 +388,7 @@ export async function executeEmailSequenceAddStep(input) {
333
388
  mode: 'template',
334
389
  templateVersionId,
335
390
  variables: {},
391
+ ...(input.personalizationEnabled ? { personalizationEnabled: true } : {}),
336
392
  });
337
393
  }
338
394
  await writeEmailSequenceFile(input.sourceDir, sequence);
@@ -382,10 +438,12 @@ export async function executeEmailSequenceCreate(input) {
382
438
  mode: 'template',
383
439
  templateVersionId,
384
440
  variables: {},
441
+ ...(input.personalizationEnabled ? { personalizationEnabled: true } : {}),
385
442
  }],
386
443
  exitEventTypes: input.triggerEventType === 'purchase_completed'
387
444
  ? []
388
445
  : ['purchase_completed'],
446
+ unsubscribeEnabled: true,
389
447
  },
390
448
  });
391
449
  }
@@ -1,6 +1,7 @@
1
1
  import { type FunnelValidationDiagnostic } from './diagnosticOutput.js';
2
2
  export type EmailTemplateVariableType = 'string' | 'number' | 'boolean';
3
3
  export type EmailEventType = 'email_captured' | 'purchase_completed' | 'registration_completed';
4
+ export type EmailSequenceExitEventType = Exclude<EmailEventType, 'email_captured'>;
4
5
  export type EmailTemplateDraft = {
5
6
  subject: string;
6
7
  previewText: string | null;
@@ -20,6 +21,7 @@ export type EmailSequenceTemplateStep = {
20
21
  mode: 'template';
21
22
  templateVersionId: string;
22
23
  variables: Record<string, string | number | boolean>;
24
+ personalizationEnabled?: boolean;
23
25
  };
24
26
  export type EmailSequenceDirectStep = {
25
27
  key: string;
@@ -33,7 +35,8 @@ export type EmailSequenceDraft = {
33
35
  triggerEventType: EmailEventType;
34
36
  funnelIds: string[];
35
37
  steps: EmailSequenceStep[];
36
- exitEventTypes: EmailEventType[];
38
+ exitEventTypes: EmailSequenceExitEventType[];
39
+ unsubscribeEnabled: boolean;
37
40
  };
38
41
  export type EmailSequenceFile = {
39
42
  id: string | null;
@@ -7,6 +7,10 @@ const EMAIL_EVENTS = new Set([
7
7
  'purchase_completed',
8
8
  'registration_completed',
9
9
  ]);
10
+ const EMAIL_EXIT_EVENTS = new Set([
11
+ 'purchase_completed',
12
+ 'registration_completed',
13
+ ]);
10
14
  const VARIABLE_TYPES = new Set(['string', 'number', 'boolean']);
11
15
  const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
12
16
  const SLUG = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
@@ -29,9 +33,10 @@ const SEQUENCE_KEYS = new Set([
29
33
  'funnelIds',
30
34
  'steps',
31
35
  'exitEventTypes',
36
+ 'unsubscribeEnabled',
32
37
  ]);
33
38
  const LEGACY_SEQUENCE_STEP_KEYS = new Set(['key', 'delaySeconds', 'templateVersionId']);
34
- const TEMPLATE_SEQUENCE_STEP_KEYS = new Set(['key', 'delaySeconds', 'mode', 'templateVersionId', 'variables']);
39
+ const TEMPLATE_SEQUENCE_STEP_KEYS = new Set(['key', 'delaySeconds', 'mode', 'templateVersionId', 'variables', 'personalizationEnabled']);
35
40
  const DIRECT_SEQUENCE_STEP_KEYS = new Set(['key', 'delaySeconds', 'mode', 'subject', 'body']);
36
41
  const isRecord = (value) => (typeof value === 'object' && value !== null && !Array.isArray(value));
37
42
  const assertNoSymlinkPath = async (root, relativePath = '') => {
@@ -285,6 +290,9 @@ const validateSequence = (value, pathSlug, file, diagnostics) => {
285
290
  diagnostics.push(schemaDiagnostic(file, `steps[${index}].templateVersionId`, 'UUID', step.templateVersionId));
286
291
  }
287
292
  if (stepMode === 'template') {
293
+ if (step.personalizationEnabled !== undefined && typeof step.personalizationEnabled !== 'boolean') {
294
+ diagnostics.push(schemaDiagnostic(file, `steps[${index}].personalizationEnabled`, 'boolean', step.personalizationEnabled));
295
+ }
288
296
  if (!isRecord(step.variables)) {
289
297
  diagnostics.push(schemaDiagnostic(file, `steps[${index}].variables`, 'object', step.variables));
290
298
  }
@@ -302,19 +310,22 @@ const validateSequence = (value, pathSlug, file, diagnostics) => {
302
310
  }
303
311
  });
304
312
  }
305
- if (!Array.isArray(value.exitEventTypes) || value.exitEventTypes.length > EMAIL_EVENTS.size) {
306
- diagnostics.push(schemaDiagnostic(file, 'exitEventTypes', 'up to 3 event types', value.exitEventTypes));
313
+ if (!Array.isArray(value.exitEventTypes) || value.exitEventTypes.length > EMAIL_EXIT_EVENTS.size) {
314
+ diagnostics.push(schemaDiagnostic(file, 'exitEventTypes', 'up to 2 event types', value.exitEventTypes));
307
315
  }
308
316
  else {
309
317
  value.exitEventTypes.forEach((event, index) => {
310
- if (!EMAIL_EVENTS.has(event)) {
311
- diagnostics.push(schemaDiagnostic(file, `exitEventTypes[${index}]`, [...EMAIL_EVENTS], event));
318
+ if (!EMAIL_EXIT_EVENTS.has(event)) {
319
+ diagnostics.push(schemaDiagnostic(file, `exitEventTypes[${index}]`, [...EMAIL_EXIT_EVENTS], event));
312
320
  }
313
321
  });
314
322
  if (value.exitEventTypes.includes(value.triggerEventType)) {
315
323
  diagnostics.push(schemaDiagnostic(file, 'exitEventTypes', 'events excluding triggerEventType', value.exitEventTypes));
316
324
  }
317
325
  }
326
+ if (value.unsubscribeEnabled !== undefined && typeof value.unsubscribeEnabled !== 'boolean') {
327
+ diagnostics.push(schemaDiagnostic(file, 'unsubscribeEnabled', 'boolean', value.unsubscribeEnabled));
328
+ }
318
329
  if (diagnostics.length !== initialCount)
319
330
  return null;
320
331
  return {
@@ -338,8 +349,10 @@ const validateSequence = (value, pathSlug, file, diagnostics) => {
338
349
  mode: 'template',
339
350
  templateVersionId: step.templateVersionId,
340
351
  variables: (step.variables || {}),
352
+ ...(step.personalizationEnabled === true ? { personalizationEnabled: true } : {}),
341
353
  }),
342
354
  exitEventTypes: value.exitEventTypes,
355
+ unsubscribeEnabled: value.unsubscribeEnabled ?? true,
343
356
  },
344
357
  };
345
358
  };
@@ -507,8 +520,10 @@ export async function writeEmailSequenceFile(sourceDir, sequence) {
507
520
  mode: 'template',
508
521
  templateVersionId: step.templateVersionId,
509
522
  variables: step.variables || {},
523
+ ...(step.personalizationEnabled ? { personalizationEnabled: true } : {}),
510
524
  }),
511
525
  exitEventTypes: sortedUnique(sequence.draft.exitEventTypes),
526
+ unsubscribeEnabled: sequence.draft.unsubscribeEnabled,
512
527
  };
513
528
  await writeAtomic(path.join(sequenceRoot, `${sequence.slug}.json`), `${JSON.stringify(serialized, null, 2)}\n`);
514
529
  }
@@ -4,10 +4,10 @@
4
4
  "minimumCliVersion": "0.1.20",
5
5
  "entries": [
6
6
  {
7
- "repositoryCliVersion": "0.1.132",
7
+ "repositoryCliVersion": "0.1.139",
8
8
  "manifest": {
9
9
  "schemaVersion": 1,
10
- "bundleVersion": "2.0.122",
10
+ "bundleVersion": "2.0.129",
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": "46f46756190a6085c562b9ceb2fd4a0eac961ea4f985f85a1f6e715827e171a6"
48
+ "sha256": "2a6ffbd2768cf73b049b4b067c003c81c2e3d3679fea6bf3f2865ddf419983f4"
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": "01ad9b12769dd8894b2aaeea0bf21e7b622c3e4ee4612987acdcb2ec5bf93d6f"
148
+ "sha256": "adda37f1991ccbb5e7abf2b9f1465688c116e6604b08a3d63f104b295a93140b"
149
149
  }
150
150
  ]
151
151
  }
152
152
  },
153
153
  {
154
- "repositoryCliVersion": "0.1.131",
154
+ "repositoryCliVersion": "0.1.138",
155
155
  "manifest": {
156
156
  "schemaVersion": 1,
157
- "bundleVersion": "2.0.121",
157
+ "bundleVersion": "2.0.128",
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": "1a8d1f9bf73b24fc07d26b56fa4185fdc9183a45bcf98b9b1996d8e27792bd1e"
195
+ "sha256": "ac3397d4724b3653080cb43f6b01bfc43e65da4acb867592974ef106d6833bcf"
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": "de523557a1057d95aaaf9a535b518fb4d8ca6bd99eaafdd57aab56db17c7cf1e"
295
+ "sha256": "793db126d3f299dfc98bd4dd715dfd5183d155557e32ec401491397364da5475"
296
296
  }
297
297
  ]
298
298
  }
299
299
  },
300
300
  {
301
- "repositoryCliVersion": "0.1.130",
301
+ "repositoryCliVersion": "0.1.136",
302
302
  "manifest": {
303
303
  "schemaVersion": 1,
304
- "bundleVersion": "2.0.120",
304
+ "bundleVersion": "2.0.126",
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": "875b31938089b6c1542a3210c198e5ff8441d7f1c1b9c462fb9b7539a9b5914f"
342
+ "sha256": "6a7b8bea3fa6b4245307e96b51872fe04ab576c3a9161314f90c00cf6415465c"
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": "af6994cd686529a6ec4d1c52020a729196bd6d7722f404ea4d35e8fd1e187467"
442
+ "sha256": "8b1218c5e5343b2c3e00079170da131aff33f5a808365700f8eab62dbf7433b9"
443
443
  }
444
444
  ]
445
445
  }
446
446
  },
447
447
  {
448
- "repositoryCliVersion": "0.1.129",
448
+ "repositoryCliVersion": "0.1.135",
449
449
  "manifest": {
450
450
  "schemaVersion": 1,
451
- "bundleVersion": "2.0.119",
451
+ "bundleVersion": "2.0.125",
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": "9533a1fbc6ed324a102781a38b959eda3ef757f4a4c5641d1d8e11817f717d29"
489
+ "sha256": "c7a266bb4f6614daa2a1adcfb3248f99330a8d4184866a4611268b93a4352203"
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": "4147b73766033401edcadbb4a651437d7874bee47fb53e3b5c7561b479bd74f5"
589
+ "sha256": "ad9e79fd0ee9d6478567615d78e34efa272fc6a1c5f8016cd1aae64ba3e24679"
590
590
  }
591
591
  ]
592
592
  }
593
593
  },
594
594
  {
595
- "repositoryCliVersion": "0.1.128",
595
+ "repositoryCliVersion": "0.1.132",
596
596
  "manifest": {
597
597
  "schemaVersion": 1,
598
- "bundleVersion": "2.0.118",
598
+ "bundleVersion": "2.0.122",
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": "9fda9058abbc36cd358c7ec85a94e2d1b4271557aac049f6725791e46f4ee3c7"
636
+ "sha256": "46f46756190a6085c562b9ceb2fd4a0eac961ea4f985f85a1f6e715827e171a6"
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": "9d15e82c7dc8628d4177779b20f1171b5d10baa4700f080a5541faf50fa35427"
736
+ "sha256": "01ad9b12769dd8894b2aaeea0bf21e7b622c3e4ee4612987acdcb2ec5bf93d6f"
737
737
  }
738
738
  ]
739
739
  }
740
740
  },
741
741
  {
742
- "repositoryCliVersion": "0.1.127",
742
+ "repositoryCliVersion": "0.1.131",
743
743
  "manifest": {
744
744
  "schemaVersion": 1,
745
- "bundleVersion": "2.0.117",
745
+ "bundleVersion": "2.0.121",
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": "5527d83fd379876fc35270889c1b1c7852197446c6b2fcf2fb7ab2210fd45ade"
783
+ "sha256": "1a8d1f9bf73b24fc07d26b56fa4185fdc9183a45bcf98b9b1996d8e27792bd1e"
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": "d41b8f198f39f8ae337b55857c633e0a5b1affbc52b9acf1456c79805be4c8a4"
883
+ "sha256": "de523557a1057d95aaaf9a535b518fb4d8ca6bd99eaafdd57aab56db17c7cf1e"
884
884
  }
885
885
  ]
886
886
  }
887
887
  },
888
888
  {
889
- "repositoryCliVersion": "0.1.126",
889
+ "repositoryCliVersion": "0.1.130",
890
890
  "manifest": {
891
891
  "schemaVersion": 1,
892
- "bundleVersion": "2.0.116",
892
+ "bundleVersion": "2.0.120",
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": "dbcc2a36828773b8c744079703ea1c9572acae06da3fe17dbb4f42fe42197c90"
930
+ "sha256": "875b31938089b6c1542a3210c198e5ff8441d7f1c1b9c462fb9b7539a9b5914f"
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": "9ec65369cf3fd8f5683e43e69344fd93b185e54c2ddc1963ad942d33b75df4f0"
1030
+ "sha256": "af6994cd686529a6ec4d1c52020a729196bd6d7722f404ea4d35e8fd1e187467"
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.132",
3
+ "version": "0.1.139",
4
4
  "description": "FunnelsGrove command-line tools for editing, syncing, and publishing funnels",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,12 +34,12 @@
34
34
  "test": "vitest run"
35
35
  },
36
36
  "dependencies": {
37
- "@funnelsgrove/runtime": "0.7.25",
37
+ "@funnelsgrove/runtime": "0.7.26",
38
38
  "commander": "^12.0.0",
39
39
  "typescript": "^5.8.3"
40
40
  },
41
41
  "devDependencies": {
42
- "@funnelsgrove/analytics": "0.1.74",
42
+ "@funnelsgrove/analytics": "0.1.75",
43
43
  "@funnelsgrove/payments": "0.7.19",
44
44
  "vitest": "^3.0.0"
45
45
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "bundleVersion": "2.0.122",
3
+ "bundleVersion": "2.0.129",
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": "46f46756190a6085c562b9ceb2fd4a0eac961ea4f985f85a1f6e715827e171a6"
41
+ "sha256": "2a6ffbd2768cf73b049b4b067c003c81c2e3d3679fea6bf3f2865ddf419983f4"
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": "01ad9b12769dd8894b2aaeea0bf21e7b622c3e4ee4612987acdcb2ec5bf93d6f"
141
+ "sha256": "adda37f1991ccbb5e7abf2b9f1465688c116e6604b08a3d63f104b295a93140b"
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/runtime` `0.7.25` first, then `@funnelsgrove/analytics` `0.1.74`, then `@funnelsgrove/payments` `0.7.19`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.132`, 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/runtime` `0.7.26` first, then `@funnelsgrove/analytics` `0.1.75`, then `@funnelsgrove/payments` `0.7.19`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.139`, 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.122",
3
+ "bundleVersion": "2.0.129",
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.122",
3
+ "bundleVersion": "2.0.129",
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": "46f46756190a6085c562b9ceb2fd4a0eac961ea4f985f85a1f6e715827e171a6"
41
+ "sha256": "2a6ffbd2768cf73b049b4b067c003c81c2e3d3679fea6bf3f2865ddf419983f4"
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": "01ad9b12769dd8894b2aaeea0bf21e7b622c3e4ee4612987acdcb2ec5bf93d6f"
141
+ "sha256": "adda37f1991ccbb5e7abf2b9f1465688c116e6604b08a3d63f104b295a93140b"
142
142
  }
143
143
  ]
144
144
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sourceTreeHash": "b2180f5ae2945d936d54e08b648e016b4e61b83a90fc3c06a369e2b10d08fdff",
3
+ "sourceTreeHash": "1a0c798df5c5dead5025036f207f2b08a007662721a51530d73f2583face8fa9",
4
4
  "stepContractVersion": 3,
5
- "docsBundleVersion": "2.0.122",
5
+ "docsBundleVersion": "2.0.129",
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": "4405f94970dda9ceaece5edea5cf2c8d6f62313df42e5885bcde5c5beaf2a70e",
19
+ "sha256": "4787e89c601c86fa74bbd5f28cfab16686c90ef58cdffe750847c3d1b7baafdd",
20
20
  "mode": "100644"
21
21
  },
22
22
  {
@@ -101,7 +101,7 @@
101
101
  },
102
102
  {
103
103
  "path": "docs/funnelsgrove/migrations/step-contract-v3.md",
104
- "sha256": "46f46756190a6085c562b9ceb2fd4a0eac961ea4f985f85a1f6e715827e171a6",
104
+ "sha256": "2a6ffbd2768cf73b049b4b067c003c81c2e3d3679fea6bf3f2865ddf419983f4",
105
105
  "mode": "100644"
106
106
  },
107
107
  {
@@ -236,7 +236,7 @@
236
236
  },
237
237
  {
238
238
  "path": "funnel-docs.config.json",
239
- "sha256": "01ad9b12769dd8894b2aaeea0bf21e7b622c3e4ee4612987acdcb2ec5bf93d6f",
239
+ "sha256": "adda37f1991ccbb5e7abf2b9f1465688c116e6604b08a3d63f104b295a93140b",
240
240
  "mode": "100644"
241
241
  },
242
242
  {
@@ -261,12 +261,12 @@
261
261
  },
262
262
  {
263
263
  "path": "package-lock.json",
264
- "sha256": "cb2fa59e86a439220effda7a4383a4d3bb840e99db9679330b028048c5ed87d8",
264
+ "sha256": "09e020ec8442cb7a0a87a1ffddec86d6caee3a54b494ed844407007063ff68a2",
265
265
  "mode": "100644"
266
266
  },
267
267
  {
268
268
  "path": "package.json",
269
- "sha256": "b791dad2cb55568b486e733a6fe03cbc26ac3da547640a1e70e8538004b682ba",
269
+ "sha256": "a965a1abeef3d228a57be9f89275144d9530cafec0d85351cf541fdcc5b8d1ac",
270
270
  "mode": "100644"
271
271
  },
272
272
  {
@@ -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/runtime` `0.7.25` first, then `@funnelsgrove/analytics` `0.1.74`, then `@funnelsgrove/payments` `0.7.19`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.132`, 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/runtime` `0.7.26` first, then `@funnelsgrove/analytics` `0.1.75`, then `@funnelsgrove/payments` `0.7.19`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.139`, 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.122",
3
+ "bundleVersion": "2.0.129",
4
4
  "contractSource": "funnelsgrove-repository://apps/funnel-runtime/contracts/step-contract-v2.json",
5
5
  "fullyGenerated": [
6
6
  ".funnelsgrove-docs.json",
@@ -8,9 +8,9 @@
8
8
  "name": "funnel-template",
9
9
  "version": "0.1.0",
10
10
  "dependencies": {
11
- "@funnelsgrove/analytics": "^0.1.74",
11
+ "@funnelsgrove/analytics": "^0.1.75",
12
12
  "@funnelsgrove/payments": "^0.7.19",
13
- "@funnelsgrove/runtime": "^0.7.25",
13
+ "@funnelsgrove/runtime": "^0.7.26",
14
14
  "@stripe/react-stripe-js": "^5.6.0",
15
15
  "@stripe/stripe-js": "^8.7.0",
16
16
  "lucide-react": "^0.553.0",
@@ -938,11 +938,11 @@
938
938
  }
939
939
  },
940
940
  "node_modules/@funnelsgrove/analytics": {
941
- "version": "0.1.74",
942
- "resolved": "https://registry.npmjs.org/@funnelsgrove/analytics/-/analytics-0.1.74.tgz",
943
- "integrity": "sha512-ZWEeAUhYdWdcHROR17mLy9mKrRCnbM3JgkzPsNSBRvfiwPocBBkEaizpIOubKBwTfIjsdc10lPkRQKrx/9VlUQ==",
941
+ "version": "0.1.75",
942
+ "resolved": "https://registry.npmjs.org/@funnelsgrove/analytics/-/analytics-0.1.75.tgz",
943
+ "integrity": "sha512-q7hOSmSuyHQEN/95MBcgjAwWqewUTUlbH3BgaSaYBPabGZyZxMC3Zopmyva/OieXmQ0f3J8JQlpxhdEB7ssftA==",
944
944
  "dependencies": {
945
- "@funnelsgrove/runtime": "0.7.25"
945
+ "@funnelsgrove/runtime": "0.7.26"
946
946
  }
947
947
  },
948
948
  "node_modules/@funnelsgrove/payments": {
@@ -961,9 +961,9 @@
961
961
  }
962
962
  },
963
963
  "node_modules/@funnelsgrove/runtime": {
964
- "version": "0.7.25",
965
- "resolved": "https://registry.npmjs.org/@funnelsgrove/runtime/-/runtime-0.7.25.tgz",
966
- "integrity": "sha512-CBW4LGeBM3k/DeCZ1Kl0/5+nkw1IjQVe+qU04qiIqhTt8uH0YxvuVUnzkijVutc7H2soutVFUDYomFAvZgf76w==",
964
+ "version": "0.7.26",
965
+ "resolved": "https://registry.npmjs.org/@funnelsgrove/runtime/-/runtime-0.7.26.tgz",
966
+ "integrity": "sha512-PbdmEC23bJpGo/dRNhhHTbp2y8a/IZ3Ggs3746UwZQOxxzV9ImkNVeWQl0zlmnGvBLWGOWcpTW48nuneR0uwuw==",
967
967
  "dependencies": {
968
968
  "posthog-js": "^1.369.2",
969
969
  "react": "19.2.3",
@@ -12,9 +12,9 @@
12
12
  "validate:funnel": "vite-node --config src/contract/funnel-validator.vite.config.ts src/contract/validate-funnel.cli.ts"
13
13
  },
14
14
  "dependencies": {
15
- "@funnelsgrove/analytics": "^0.1.74",
15
+ "@funnelsgrove/analytics": "^0.1.75",
16
16
  "@funnelsgrove/payments": "^0.7.19",
17
- "@funnelsgrove/runtime": "^0.7.25",
17
+ "@funnelsgrove/runtime": "^0.7.26",
18
18
  "@stripe/react-stripe-js": "^5.6.0",
19
19
  "@stripe/stripe-js": "^8.7.0",
20
20
  "lucide-react": "^0.553.0",