@funnelsgrove/cli 0.1.278 → 0.1.279
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/funnel-contract-compatibility.json +31 -31
- package/package.json +1 -1
- package/template_docs/.funnelsgrove-docs.json +6 -6
- package/template_docs/AGENTS.md +1 -0
- package/template_docs/docs/funnelsgrove/START-HERE.md +1 -1
- package/template_docs/docs/funnelsgrove/contracts/content-answers.md +56 -0
- package/template_docs/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_docs/funnel-docs.config.json +1 -1
- package/template_scaffold/.funnelsgrove-docs.json +6 -6
- package/template_scaffold/.funnelsgrove-scaffold.json +8 -8
- package/template_scaffold/AGENTS.md +1 -0
- package/template_scaffold/docs/funnelsgrove/START-HERE.md +1 -1
- package/template_scaffold/docs/funnelsgrove/contracts/content-answers.md +56 -0
- package/template_scaffold/docs/funnelsgrove/migrations/step-contract-v3.md +1 -1
- package/template_scaffold/funnel-docs.config.json +1 -1
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
"minimumCliVersion": "0.1.20",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
7
|
-
"repositoryCliVersion": "0.1.
|
|
7
|
+
"repositoryCliVersion": "0.1.279",
|
|
8
8
|
"manifest": {
|
|
9
9
|
"schemaVersion": 1,
|
|
10
|
-
"bundleVersion": "2.0.
|
|
10
|
+
"bundleVersion": "2.0.272",
|
|
11
11
|
"stepContractVersion": 3,
|
|
12
12
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
13
13
|
"managedFiles": [
|
|
14
14
|
{
|
|
15
15
|
"path": "AGENTS.md",
|
|
16
|
-
"sha256": "
|
|
16
|
+
"sha256": "b7dc496d1dcfea176fb5a57e6d17f64abdcff77afeccfcecbbe1790d11da7386"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"path": "CLAUDE.md",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"path": "docs/funnelsgrove/START-HERE.md",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "5442274f8ca7ddded834147a693677e203a9c223e1db4260e56bf498ec06a362"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
32
|
-
"sha256": "
|
|
32
|
+
"sha256": "efd912eb405e4c64b33becb1cf9a397ba5fe9afc2d4e2aea115a0f5e0703ca87"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"path": "docs/funnelsgrove/contracts/flow-routing.md",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
48
|
-
"sha256": "
|
|
48
|
+
"sha256": "038a83e26aa4d24ad4ad6ec78a548cc7a2f2bc84d67adde6e9cc03bc11795a09"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -145,16 +145,16 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"path": "funnel-docs.config.json",
|
|
148
|
-
"sha256": "
|
|
148
|
+
"sha256": "3eacc262001aadac7bdc68e58d69fa8a102ef919cbdd09178f5be90812468747"
|
|
149
149
|
}
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"repositoryCliVersion": "0.1.
|
|
154
|
+
"repositoryCliVersion": "0.1.278",
|
|
155
155
|
"manifest": {
|
|
156
156
|
"schemaVersion": 1,
|
|
157
|
-
"bundleVersion": "2.0.
|
|
157
|
+
"bundleVersion": "2.0.271",
|
|
158
158
|
"stepContractVersion": 3,
|
|
159
159
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
160
160
|
"managedFiles": [
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
195
|
-
"sha256": "
|
|
195
|
+
"sha256": "012ef8788fdb0b5f7b8acc283ee9d0c3c9e23f68d944327ed8c2d9378de94585"
|
|
196
196
|
},
|
|
197
197
|
{
|
|
198
198
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -292,16 +292,16 @@
|
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
"path": "funnel-docs.config.json",
|
|
295
|
-
"sha256": "
|
|
295
|
+
"sha256": "580a792c8650972c8016c0052bec88f7a5331445a8a039bb35912c2da4c645a0"
|
|
296
296
|
}
|
|
297
297
|
]
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
|
-
"repositoryCliVersion": "0.1.
|
|
301
|
+
"repositoryCliVersion": "0.1.277",
|
|
302
302
|
"manifest": {
|
|
303
303
|
"schemaVersion": 1,
|
|
304
|
-
"bundleVersion": "2.0.
|
|
304
|
+
"bundleVersion": "2.0.270",
|
|
305
305
|
"stepContractVersion": 3,
|
|
306
306
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
307
307
|
"managedFiles": [
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
342
|
-
"sha256": "
|
|
342
|
+
"sha256": "b15776c8ec0ecbc1f9369ccd56daee4160c533f7b34285cd1c5013db38fd411f"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -439,16 +439,16 @@
|
|
|
439
439
|
},
|
|
440
440
|
{
|
|
441
441
|
"path": "funnel-docs.config.json",
|
|
442
|
-
"sha256": "
|
|
442
|
+
"sha256": "bdc9354312747f58fa96e201ec2b69b289dfbb21452f33866b3b7d2628490cd6"
|
|
443
443
|
}
|
|
444
444
|
]
|
|
445
445
|
}
|
|
446
446
|
},
|
|
447
447
|
{
|
|
448
|
-
"repositoryCliVersion": "0.1.
|
|
448
|
+
"repositoryCliVersion": "0.1.276",
|
|
449
449
|
"manifest": {
|
|
450
450
|
"schemaVersion": 1,
|
|
451
|
-
"bundleVersion": "2.0.
|
|
451
|
+
"bundleVersion": "2.0.269",
|
|
452
452
|
"stepContractVersion": 3,
|
|
453
453
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
454
454
|
"managedFiles": [
|
|
@@ -486,7 +486,7 @@
|
|
|
486
486
|
},
|
|
487
487
|
{
|
|
488
488
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
489
|
-
"sha256": "
|
|
489
|
+
"sha256": "fbff72ea55bddc1e2e58a66bfbf15677574868bfed25538507d169fd820f0202"
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -586,16 +586,16 @@
|
|
|
586
586
|
},
|
|
587
587
|
{
|
|
588
588
|
"path": "funnel-docs.config.json",
|
|
589
|
-
"sha256": "
|
|
589
|
+
"sha256": "2415311f4118e042c33855343708800e74c9f2433443f61ec4a44325f9a4dbc2"
|
|
590
590
|
}
|
|
591
591
|
]
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
594
|
{
|
|
595
|
-
"repositoryCliVersion": "0.1.
|
|
595
|
+
"repositoryCliVersion": "0.1.275",
|
|
596
596
|
"manifest": {
|
|
597
597
|
"schemaVersion": 1,
|
|
598
|
-
"bundleVersion": "2.0.
|
|
598
|
+
"bundleVersion": "2.0.268",
|
|
599
599
|
"stepContractVersion": 3,
|
|
600
600
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
601
601
|
"managedFiles": [
|
|
@@ -633,7 +633,7 @@
|
|
|
633
633
|
},
|
|
634
634
|
{
|
|
635
635
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
636
|
-
"sha256": "
|
|
636
|
+
"sha256": "63b9bffafc0e408b769ce39764c84a45f55218e890782496f6b6aceed18e1569"
|
|
637
637
|
},
|
|
638
638
|
{
|
|
639
639
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -733,16 +733,16 @@
|
|
|
733
733
|
},
|
|
734
734
|
{
|
|
735
735
|
"path": "funnel-docs.config.json",
|
|
736
|
-
"sha256": "
|
|
736
|
+
"sha256": "1fcfbd34138904d3ef4213e7950e2c1b124289d1a95fb42c29075ca7512db676"
|
|
737
737
|
}
|
|
738
738
|
]
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
741
|
{
|
|
742
|
-
"repositoryCliVersion": "0.1.
|
|
742
|
+
"repositoryCliVersion": "0.1.274",
|
|
743
743
|
"manifest": {
|
|
744
744
|
"schemaVersion": 1,
|
|
745
|
-
"bundleVersion": "2.0.
|
|
745
|
+
"bundleVersion": "2.0.267",
|
|
746
746
|
"stepContractVersion": 3,
|
|
747
747
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
748
748
|
"managedFiles": [
|
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
},
|
|
781
781
|
{
|
|
782
782
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
783
|
-
"sha256": "
|
|
783
|
+
"sha256": "c0ca8f28f9da2e9444d3895197d5d0528e0ca869d8de1240b3355c418dddcbf0"
|
|
784
784
|
},
|
|
785
785
|
{
|
|
786
786
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -880,16 +880,16 @@
|
|
|
880
880
|
},
|
|
881
881
|
{
|
|
882
882
|
"path": "funnel-docs.config.json",
|
|
883
|
-
"sha256": "
|
|
883
|
+
"sha256": "a27ba0ce92c1fb2819b5cf4e18acbed6e8c02abe61feb234731b80d4e213de0c"
|
|
884
884
|
}
|
|
885
885
|
]
|
|
886
886
|
}
|
|
887
887
|
},
|
|
888
888
|
{
|
|
889
|
-
"repositoryCliVersion": "0.1.
|
|
889
|
+
"repositoryCliVersion": "0.1.273",
|
|
890
890
|
"manifest": {
|
|
891
891
|
"schemaVersion": 1,
|
|
892
|
-
"bundleVersion": "2.0.
|
|
892
|
+
"bundleVersion": "2.0.266",
|
|
893
893
|
"stepContractVersion": 3,
|
|
894
894
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
895
895
|
"managedFiles": [
|
|
@@ -927,7 +927,7 @@
|
|
|
927
927
|
},
|
|
928
928
|
{
|
|
929
929
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
930
|
-
"sha256": "
|
|
930
|
+
"sha256": "c70753edc90c84360869c7c2d8e3b7431c6fc6486845e8dc6a114edcc6a222d9"
|
|
931
931
|
},
|
|
932
932
|
{
|
|
933
933
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -1027,7 +1027,7 @@
|
|
|
1027
1027
|
},
|
|
1028
1028
|
{
|
|
1029
1029
|
"path": "funnel-docs.config.json",
|
|
1030
|
-
"sha256": "
|
|
1030
|
+
"sha256": "8a2b3ef99715282070a4b49ff375b67267e25aae17e1ba3657a2e27764bac033"
|
|
1031
1031
|
}
|
|
1032
1032
|
]
|
|
1033
1033
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.272",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
7
7
|
{
|
|
8
8
|
"path": "AGENTS.md",
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "b7dc496d1dcfea176fb5a57e6d17f64abdcff77afeccfcecbbe1790d11da7386"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"path": "CLAUDE.md",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"path": "docs/funnelsgrove/START-HERE.md",
|
|
17
|
-
"sha256": "
|
|
17
|
+
"sha256": "5442274f8ca7ddded834147a693677e203a9c223e1db4260e56bf498ec06a362"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "efd912eb405e4c64b33becb1cf9a397ba5fe9afc2d4e2aea115a0f5e0703ca87"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "docs/funnelsgrove/contracts/flow-routing.md",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "038a83e26aa4d24ad4ad6ec78a548cc7a2f2bc84d67adde6e9cc03bc11795a09"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "3eacc262001aadac7bdc68e58d69fa8a102ef919cbdd09178f5be90812468747"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
package/template_docs/AGENTS.md
CHANGED
|
@@ -11,6 +11,7 @@ This file is generated from the FunnelsGrove step contract. Start at [the agent
|
|
|
11
11
|
| Change metadata or routing | [Step metadata](docs/funnelsgrove/contracts/step-metadata.md) and [flow routing](docs/funnelsgrove/contracts/flow-routing.md) |
|
|
12
12
|
| Add a locale or translate visitor copy | [Localization](docs/funnelsgrove/contracts/content-answers.md#localization) |
|
|
13
13
|
| Add or edit choices | [Content and answers](docs/funnelsgrove/contracts/content-answers.md) |
|
|
14
|
+
| Upload visitor files (voice, photos, screenshots) | [Temporary file uploads](docs/funnelsgrove/contracts/content-answers.md#temporary-file-uploads) |
|
|
14
15
|
| Edit product strategy, plan, or copy | [Content and answers](docs/funnelsgrove/contracts/content-answers.md) |
|
|
15
16
|
| Add an experiment | [Add an experiment](docs/funnelsgrove/recipes/add-experiment.md) |
|
|
16
17
|
| Edit email capture or analytics | [Analytics events](docs/funnelsgrove/contracts/analytics-events.md) |
|
|
@@ -42,7 +42,7 @@ Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf
|
|
|
42
42
|
- Step classification and parity: [step metadata](contracts/step-metadata.md) and the [step-type index](steps/INDEX.md).
|
|
43
43
|
- Analytics ownership and lifecycle: [analytics events](contracts/analytics-events.md).
|
|
44
44
|
- Manifest edges, reserved routes, branches, and experiments: [flow routing](contracts/flow-routing.md).
|
|
45
|
-
- Choice answers and
|
|
45
|
+
- Choice answers, email input, and temporary file uploads (voice, photos, screenshots): [content and answers](contracts/content-answers.md).
|
|
46
46
|
- Paywall, checkout, and subscription behavior: [payments](contracts/payments.md).
|
|
47
47
|
- New work: [add a step](recipes/add-step.md), [edit a step](recipes/edit-step.md), or [add an experiment](recipes/add-experiment.md).
|
|
48
48
|
- Verification: [local QA](qa/local.md), [analytics QA](qa/analytics.md), [paywall/checkout QA](qa/paywall-checkout.md), and [publish QA](qa/publish.md).
|
|
@@ -31,6 +31,62 @@ Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf
|
|
|
31
31
|
|
|
32
32
|
Ordinary form inputs validate and persist through their owning runtime path. The reserved email form calls `submitEmailCapture`; it never sends analytics manually and never decides the next route.
|
|
33
33
|
|
|
34
|
+
## Temporary file uploads
|
|
35
|
+
|
|
36
|
+
Visitor files (voice recordings, photos, chat screenshots, cover images) go to
|
|
37
|
+
temporary storage through `apiService.uploadTempFile` (`@funnelsgrove/runtime`
|
|
38
|
+
0.30.0 or later; check the funnel's `package.json` before using it). The browser
|
|
39
|
+
sends the original bytes straight to storage; the answer stores only the
|
|
40
|
+
returned `url` and `expiresAt`. The platform's storage lifecycle policy
|
|
41
|
+
**deletes each file 7 days after upload**, so use it during the funnel session
|
|
42
|
+
(preview, result generation, a hand-off within the week), never as a permanent
|
|
43
|
+
asset.
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { apiService, FunnelSdkHttpError, useFunnel } from '@funnelsgrove/runtime';
|
|
47
|
+
|
|
48
|
+
const { setAnswer } = useFunnel();
|
|
49
|
+
|
|
50
|
+
// Voice note: the MediaRecorder Blob, e.g. type "audio/webm;codecs=opus".
|
|
51
|
+
const recording = new Blob(chunks, { type: recorder.mimeType });
|
|
52
|
+
const voice = await apiService.uploadTempFile(recording, { purpose: 'voice' });
|
|
53
|
+
setAnswer('voiceNote', { url: voice.url, expiresAt: voice.expiresAt });
|
|
54
|
+
|
|
55
|
+
// Image: a File from <input type="file" accept="image/*">.
|
|
56
|
+
async function onPhotoSelected(file: File) {
|
|
57
|
+
try {
|
|
58
|
+
const photo = await apiService.uploadTempFile(file, { purpose: 'photo' });
|
|
59
|
+
setAnswer('coverPhoto', { url: photo.url, expiresAt: photo.expiresAt });
|
|
60
|
+
} catch (error) {
|
|
61
|
+
// 413: file too large. 415: unsupported type. Otherwise: network/storage.
|
|
62
|
+
const status = error instanceof FunnelSdkHttpError ? error.statusCode : null;
|
|
63
|
+
showUploadError(status === 413 ? 'tooLarge' : status === 415 ? 'unsupported' : 'retry');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
| Kind | Accepted `type` | Max size |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| Image | `image/jpeg`, `image/png`, `image/webp`, `image/heic`, `image/heif`, `image/gif` | 10 MB |
|
|
71
|
+
| Audio | `audio/webm`, `audio/ogg`, `audio/mp4`, `audio/mpeg`, `audio/wav`, `audio/x-m4a`, `audio/aac` | 25 MB |
|
|
72
|
+
|
|
73
|
+
- The upload uses the Blob/File `type`; codec suffixes such as `;codecs=opus` are
|
|
74
|
+
accepted, and a Blob without a `type` is rejected with 415. Validate type and
|
|
75
|
+
size before uploading and show localized copy for the three error branches
|
|
76
|
+
above; one tap retries the whole upload.
|
|
77
|
+
- `purpose` is a short lowercase slug (`voice`, `photo`, `screenshot`, `cover`)
|
|
78
|
+
recorded for diagnostics.
|
|
79
|
+
- Store `{ url, expiresAt }` (plus `contentType`/`sizeBytes` when needed) under a
|
|
80
|
+
stable answer key. Answers hold URLs only: base64, data URLs and raw bytes stay
|
|
81
|
+
out of answers and attributes.
|
|
82
|
+
- URLs are public but unguessable. Treat them as visitor content: display them to
|
|
83
|
+
that visitor and pass them to trusted processing only.
|
|
84
|
+
- Without a publishable SDK key (local preview), the helper returns a local
|
|
85
|
+
`blob:` URL with `expiresAt: null`; it works only in that browser tab. Test
|
|
86
|
+
real uploads in a published preview.
|
|
87
|
+
- Keep `apiService.uploadTempPhoto` for existing photo steps; new file steps use
|
|
88
|
+
`uploadTempFile`.
|
|
89
|
+
|
|
34
90
|
## Content/editor parity
|
|
35
91
|
|
|
36
92
|
Keep builder-editable values in content definitions, expose matching editor sections, and register them once. Do not move stable IDs or answer keys into editable copy.
|
|
@@ -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.29.0`, then `@funnelsgrove/analytics` `0.11.0`, then `@funnelsgrove/payments` `0.36.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.29.0`, then `@funnelsgrove/analytics` `0.11.0`, then `@funnelsgrove/payments` `0.36.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.279`, 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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"bundleVersion": "2.0.
|
|
3
|
+
"bundleVersion": "2.0.272",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
5
|
"contractHash": "d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf",
|
|
6
6
|
"managedFiles": [
|
|
7
7
|
{
|
|
8
8
|
"path": "AGENTS.md",
|
|
9
|
-
"sha256": "
|
|
9
|
+
"sha256": "b7dc496d1dcfea176fb5a57e6d17f64abdcff77afeccfcecbbe1790d11da7386"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
"path": "CLAUDE.md",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"path": "docs/funnelsgrove/START-HERE.md",
|
|
17
|
-
"sha256": "
|
|
17
|
+
"sha256": "5442274f8ca7ddded834147a693677e203a9c223e1db4260e56bf498ec06a362"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "docs/funnelsgrove/contracts/analytics-events.md",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
25
|
-
"sha256": "
|
|
25
|
+
"sha256": "efd912eb405e4c64b33becb1cf9a397ba5fe9afc2d4e2aea115a0f5e0703ca87"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"path": "docs/funnelsgrove/contracts/flow-routing.md",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
41
|
-
"sha256": "
|
|
41
|
+
"sha256": "038a83e26aa4d24ad4ad6ec78a548cc7a2f2bc84d67adde6e9cc03bc11795a09"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"path": "docs/funnelsgrove/qa/analytics.md",
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "funnel-docs.config.json",
|
|
141
|
-
"sha256": "
|
|
141
|
+
"sha256": "3eacc262001aadac7bdc68e58d69fa8a102ef919cbdd09178f5be90812468747"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"sourceTreeHash": "
|
|
3
|
+
"sourceTreeHash": "a748394927b0878dea52888004b3bfbad788a2df58c852d32495422f914009c1",
|
|
4
4
|
"stepContractVersion": 3,
|
|
5
|
-
"docsBundleVersion": "2.0.
|
|
5
|
+
"docsBundleVersion": "2.0.272",
|
|
6
6
|
"files": [
|
|
7
7
|
{
|
|
8
8
|
"path": ".env.example",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": ".funnelsgrove-docs.json",
|
|
19
|
-
"sha256": "
|
|
19
|
+
"sha256": "fc002e41d650e39f890e42c05e747665e786156489385cae4f85902cd326e5c1",
|
|
20
20
|
"mode": "100644"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"path": "AGENTS.md",
|
|
24
|
-
"sha256": "
|
|
24
|
+
"sha256": "b7dc496d1dcfea176fb5a57e6d17f64abdcff77afeccfcecbbe1790d11da7386",
|
|
25
25
|
"mode": "100644"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"path": "docs/funnelsgrove/START-HERE.md",
|
|
49
|
-
"sha256": "
|
|
49
|
+
"sha256": "5442274f8ca7ddded834147a693677e203a9c223e1db4260e56bf498ec06a362",
|
|
50
50
|
"mode": "100644"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
"path": "docs/funnelsgrove/contracts/content-answers.md",
|
|
59
|
-
"sha256": "
|
|
59
|
+
"sha256": "efd912eb405e4c64b33becb1cf9a397ba5fe9afc2d4e2aea115a0f5e0703ca87",
|
|
60
60
|
"mode": "100644"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"path": "docs/funnelsgrove/migrations/step-contract-v3.md",
|
|
79
|
-
"sha256": "
|
|
79
|
+
"sha256": "038a83e26aa4d24ad4ad6ec78a548cc7a2f2bc84d67adde6e9cc03bc11795a09",
|
|
80
80
|
"mode": "100644"
|
|
81
81
|
},
|
|
82
82
|
{
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
"path": "funnel-docs.config.json",
|
|
209
|
-
"sha256": "
|
|
209
|
+
"sha256": "3eacc262001aadac7bdc68e58d69fa8a102ef919cbdd09178f5be90812468747",
|
|
210
210
|
"mode": "100644"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
@@ -11,6 +11,7 @@ This file is generated from the FunnelsGrove step contract. Start at [the agent
|
|
|
11
11
|
| Change metadata or routing | [Step metadata](docs/funnelsgrove/contracts/step-metadata.md) and [flow routing](docs/funnelsgrove/contracts/flow-routing.md) |
|
|
12
12
|
| Add a locale or translate visitor copy | [Localization](docs/funnelsgrove/contracts/content-answers.md#localization) |
|
|
13
13
|
| Add or edit choices | [Content and answers](docs/funnelsgrove/contracts/content-answers.md) |
|
|
14
|
+
| Upload visitor files (voice, photos, screenshots) | [Temporary file uploads](docs/funnelsgrove/contracts/content-answers.md#temporary-file-uploads) |
|
|
14
15
|
| Edit product strategy, plan, or copy | [Content and answers](docs/funnelsgrove/contracts/content-answers.md) |
|
|
15
16
|
| Add an experiment | [Add an experiment](docs/funnelsgrove/recipes/add-experiment.md) |
|
|
16
17
|
| Edit email capture or analytics | [Analytics events](docs/funnelsgrove/contracts/analytics-events.md) |
|
|
@@ -42,7 +42,7 @@ Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf
|
|
|
42
42
|
- Step classification and parity: [step metadata](contracts/step-metadata.md) and the [step-type index](steps/INDEX.md).
|
|
43
43
|
- Analytics ownership and lifecycle: [analytics events](contracts/analytics-events.md).
|
|
44
44
|
- Manifest edges, reserved routes, branches, and experiments: [flow routing](contracts/flow-routing.md).
|
|
45
|
-
- Choice answers and
|
|
45
|
+
- Choice answers, email input, and temporary file uploads (voice, photos, screenshots): [content and answers](contracts/content-answers.md).
|
|
46
46
|
- Paywall, checkout, and subscription behavior: [payments](contracts/payments.md).
|
|
47
47
|
- New work: [add a step](recipes/add-step.md), [edit a step](recipes/edit-step.md), or [add an experiment](recipes/add-experiment.md).
|
|
48
48
|
- Verification: [local QA](qa/local.md), [analytics QA](qa/analytics.md), [paywall/checkout QA](qa/paywall-checkout.md), and [publish QA](qa/publish.md).
|
|
@@ -31,6 +31,62 @@ Contract hash: `d761e91d5ac6ff9e72c6d49c5bcd014270912473a66f99c49d726c65998085cf
|
|
|
31
31
|
|
|
32
32
|
Ordinary form inputs validate and persist through their owning runtime path. The reserved email form calls `submitEmailCapture`; it never sends analytics manually and never decides the next route.
|
|
33
33
|
|
|
34
|
+
## Temporary file uploads
|
|
35
|
+
|
|
36
|
+
Visitor files (voice recordings, photos, chat screenshots, cover images) go to
|
|
37
|
+
temporary storage through `apiService.uploadTempFile` (`@funnelsgrove/runtime`
|
|
38
|
+
0.30.0 or later; check the funnel's `package.json` before using it). The browser
|
|
39
|
+
sends the original bytes straight to storage; the answer stores only the
|
|
40
|
+
returned `url` and `expiresAt`. The platform's storage lifecycle policy
|
|
41
|
+
**deletes each file 7 days after upload**, so use it during the funnel session
|
|
42
|
+
(preview, result generation, a hand-off within the week), never as a permanent
|
|
43
|
+
asset.
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { apiService, FunnelSdkHttpError, useFunnel } from '@funnelsgrove/runtime';
|
|
47
|
+
|
|
48
|
+
const { setAnswer } = useFunnel();
|
|
49
|
+
|
|
50
|
+
// Voice note: the MediaRecorder Blob, e.g. type "audio/webm;codecs=opus".
|
|
51
|
+
const recording = new Blob(chunks, { type: recorder.mimeType });
|
|
52
|
+
const voice = await apiService.uploadTempFile(recording, { purpose: 'voice' });
|
|
53
|
+
setAnswer('voiceNote', { url: voice.url, expiresAt: voice.expiresAt });
|
|
54
|
+
|
|
55
|
+
// Image: a File from <input type="file" accept="image/*">.
|
|
56
|
+
async function onPhotoSelected(file: File) {
|
|
57
|
+
try {
|
|
58
|
+
const photo = await apiService.uploadTempFile(file, { purpose: 'photo' });
|
|
59
|
+
setAnswer('coverPhoto', { url: photo.url, expiresAt: photo.expiresAt });
|
|
60
|
+
} catch (error) {
|
|
61
|
+
// 413: file too large. 415: unsupported type. Otherwise: network/storage.
|
|
62
|
+
const status = error instanceof FunnelSdkHttpError ? error.statusCode : null;
|
|
63
|
+
showUploadError(status === 413 ? 'tooLarge' : status === 415 ? 'unsupported' : 'retry');
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
| Kind | Accepted `type` | Max size |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| Image | `image/jpeg`, `image/png`, `image/webp`, `image/heic`, `image/heif`, `image/gif` | 10 MB |
|
|
71
|
+
| Audio | `audio/webm`, `audio/ogg`, `audio/mp4`, `audio/mpeg`, `audio/wav`, `audio/x-m4a`, `audio/aac` | 25 MB |
|
|
72
|
+
|
|
73
|
+
- The upload uses the Blob/File `type`; codec suffixes such as `;codecs=opus` are
|
|
74
|
+
accepted, and a Blob without a `type` is rejected with 415. Validate type and
|
|
75
|
+
size before uploading and show localized copy for the three error branches
|
|
76
|
+
above; one tap retries the whole upload.
|
|
77
|
+
- `purpose` is a short lowercase slug (`voice`, `photo`, `screenshot`, `cover`)
|
|
78
|
+
recorded for diagnostics.
|
|
79
|
+
- Store `{ url, expiresAt }` (plus `contentType`/`sizeBytes` when needed) under a
|
|
80
|
+
stable answer key. Answers hold URLs only: base64, data URLs and raw bytes stay
|
|
81
|
+
out of answers and attributes.
|
|
82
|
+
- URLs are public but unguessable. Treat them as visitor content: display them to
|
|
83
|
+
that visitor and pass them to trusted processing only.
|
|
84
|
+
- Without a publishable SDK key (local preview), the helper returns a local
|
|
85
|
+
`blob:` URL with `expiresAt: null`; it works only in that browser tab. Test
|
|
86
|
+
real uploads in a published preview.
|
|
87
|
+
- Keep `apiService.uploadTempPhoto` for existing photo steps; new file steps use
|
|
88
|
+
`uploadTempFile`.
|
|
89
|
+
|
|
34
90
|
## Content/editor parity
|
|
35
91
|
|
|
36
92
|
Keep builder-editable values in content definitions, expose matching editor sections, and register them once. Do not move stable IDs or answer keys into editable copy.
|
|
@@ -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.29.0`, then `@funnelsgrove/analytics` `0.11.0`, then `@funnelsgrove/payments` `0.36.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.
|
|
20
|
+
Release `@funnelsgrove/sdk` `0.4.0` first, then `@funnelsgrove/runtime` `0.29.0`, then `@funnelsgrove/analytics` `0.11.0`, then `@funnelsgrove/payments` `0.36.0`. The production deploy verifies the zero-traffic API candidate, publishes and verifies `@funnelsgrove/cli` `0.1.279`, 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
|