@jevitate/cli 0.26.1 → 0.27.0

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.
Files changed (52) hide show
  1. package/contracts/jevitate-catalog/v2/manifest.json +4 -4
  2. package/contracts/jevitate-catalog/v2/schemas/journey.schema.json +528 -0
  3. package/dist/author-journey-cli.js +54 -3
  4. package/dist/author-journey-cli.js.map +1 -1
  5. package/dist/bin.js +950 -161
  6. package/dist/build-info.generated.js +3 -3
  7. package/dist/campaign-api.d.ts +5 -0
  8. package/dist/campaign-api.js +23 -2
  9. package/dist/campaign-api.js.map +1 -1
  10. package/dist/campaign-cli.js +8 -3
  11. package/dist/campaign-cli.js.map +1 -1
  12. package/dist/campaign-preflight.d.ts +35 -8
  13. package/dist/campaign-preflight.js +66 -7
  14. package/dist/campaign-preflight.js.map +1 -1
  15. package/dist/catalog-contract-identity.d.ts +1 -1
  16. package/dist/catalog-contract-identity.js +1 -1
  17. package/dist/check-plan.js +2 -1
  18. package/dist/check-plan.js.map +1 -1
  19. package/dist/explore-cli/options.js +1 -0
  20. package/dist/explore-cli/options.js.map +1 -1
  21. package/dist/explore-cli/shared.d.ts +1 -0
  22. package/dist/explore-cli/shared.js.map +1 -1
  23. package/dist/explore-goal.d.ts +3 -1
  24. package/dist/explore-goal.js +1 -0
  25. package/dist/explore-goal.js.map +1 -1
  26. package/dist/explore-specs.d.ts +2 -2
  27. package/dist/explore-specs.js +69 -7
  28. package/dist/explore-specs.js.map +1 -1
  29. package/dist/fixtures/multi-workspace-app.d.ts +35 -0
  30. package/dist/fixtures/multi-workspace-app.js +107 -0
  31. package/dist/fixtures/multi-workspace-app.js.map +1 -0
  32. package/dist/goal-run-flags.d.ts +2 -0
  33. package/dist/goal-run-flags.js +2 -0
  34. package/dist/goal-run-flags.js.map +1 -1
  35. package/dist/login-cli.d.ts +3 -0
  36. package/dist/login-cli.js +11 -2
  37. package/dist/login-cli.js.map +1 -1
  38. package/dist/mcp-cli-tools.js +4 -0
  39. package/dist/mcp-cli-tools.js.map +1 -1
  40. package/dist/multi-run.d.ts +7 -0
  41. package/dist/multi-run.js +30 -4
  42. package/dist/multi-run.js.map +1 -1
  43. package/dist/persona-login.d.ts +37 -0
  44. package/dist/persona-login.js +167 -4
  45. package/dist/persona-login.js.map +1 -1
  46. package/dist/suite-explore-options.d.ts +4 -0
  47. package/dist/suite-explore-options.js +1 -0
  48. package/dist/suite-explore-options.js.map +1 -1
  49. package/dist/target-config.d.ts +2 -0
  50. package/dist/target-config.js +7 -1
  51. package/dist/target-config.js.map +1 -1
  52. package/package.json +10 -10
@@ -4,8 +4,8 @@
4
4
  "package": "@jevitate/cli",
5
5
  "source": {
6
6
  "repository": "https://github.com/matt-cochran/jevitate.git",
7
- "commit": "58ef64ab8c1e628bc25b3dab973b23b5b69a4488",
8
- "packageVersionAtCommit": "0.23.0"
7
+ "commit": "8d3c0e873123dbdb2bf59a494e2b80408a62987f",
8
+ "packageVersionAtCommit": "0.26.1"
9
9
  },
10
10
  "compatibility": {
11
11
  "repositoryCatalogMajor": 1,
@@ -66,8 +66,8 @@
66
66
  },
67
67
  {
68
68
  "path": "schemas/journey.schema.json",
69
- "bytes": 362358,
70
- "sha256": "521e0f150967b10e5cc4547cc1401238478b4e2fe04dfb8febaa8dba27ae7f04"
69
+ "bytes": 383676,
70
+ "sha256": "4b59e02b5138d592e6fbddba0e2f44543236511d550033adda915b9ac452ad0c"
71
71
  },
72
72
  {
73
73
  "path": "schemas/personas.schema.json",
@@ -631,6 +631,94 @@
631
631
  "type": "string",
632
632
  "minLength": 1,
633
633
  "maxLength": 2000
634
+ },
635
+ "count": {
636
+ "anyOf": [
637
+ {
638
+ "type": "object",
639
+ "properties": {
640
+ "exact": {
641
+ "type": "integer",
642
+ "minimum": 0,
643
+ "maximum": 1000
644
+ }
645
+ },
646
+ "required": [
647
+ "exact"
648
+ ],
649
+ "additionalProperties": false
650
+ },
651
+ {
652
+ "type": "object",
653
+ "properties": {
654
+ "min": {
655
+ "type": "integer",
656
+ "minimum": 0,
657
+ "maximum": 1000
658
+ }
659
+ },
660
+ "required": [
661
+ "min"
662
+ ],
663
+ "additionalProperties": false
664
+ },
665
+ {
666
+ "type": "object",
667
+ "properties": {
668
+ "max": {
669
+ "type": "integer",
670
+ "minimum": 0,
671
+ "maximum": 1000
672
+ }
673
+ },
674
+ "required": [
675
+ "max"
676
+ ],
677
+ "additionalProperties": false
678
+ }
679
+ ]
680
+ },
681
+ "bodyShape": {
682
+ "type": "object",
683
+ "properties": {
684
+ "fields": {
685
+ "minItems": 1,
686
+ "maxItems": 50,
687
+ "type": "array",
688
+ "items": {
689
+ "type": "object",
690
+ "properties": {
691
+ "name": {
692
+ "type": "string",
693
+ "minLength": 1,
694
+ "maxLength": 200
695
+ },
696
+ "predicate": {
697
+ "type": "string",
698
+ "enum": [
699
+ "exists",
700
+ "absent",
701
+ "string",
702
+ "number",
703
+ "boolean",
704
+ "null",
705
+ "array",
706
+ "object"
707
+ ]
708
+ }
709
+ },
710
+ "required": [
711
+ "name",
712
+ "predicate"
713
+ ],
714
+ "additionalProperties": false
715
+ }
716
+ }
717
+ },
718
+ "required": [
719
+ "fields"
720
+ ],
721
+ "additionalProperties": false
634
722
  }
635
723
  },
636
724
  "required": [
@@ -707,6 +795,94 @@
707
795
  "additionalProperties": false
708
796
  }
709
797
  ]
798
+ },
799
+ "count": {
800
+ "anyOf": [
801
+ {
802
+ "type": "object",
803
+ "properties": {
804
+ "exact": {
805
+ "type": "integer",
806
+ "minimum": 0,
807
+ "maximum": 1000
808
+ }
809
+ },
810
+ "required": [
811
+ "exact"
812
+ ],
813
+ "additionalProperties": false
814
+ },
815
+ {
816
+ "type": "object",
817
+ "properties": {
818
+ "min": {
819
+ "type": "integer",
820
+ "minimum": 0,
821
+ "maximum": 1000
822
+ }
823
+ },
824
+ "required": [
825
+ "min"
826
+ ],
827
+ "additionalProperties": false
828
+ },
829
+ {
830
+ "type": "object",
831
+ "properties": {
832
+ "max": {
833
+ "type": "integer",
834
+ "minimum": 0,
835
+ "maximum": 1000
836
+ }
837
+ },
838
+ "required": [
839
+ "max"
840
+ ],
841
+ "additionalProperties": false
842
+ }
843
+ ]
844
+ },
845
+ "bodyShape": {
846
+ "type": "object",
847
+ "properties": {
848
+ "fields": {
849
+ "minItems": 1,
850
+ "maxItems": 50,
851
+ "type": "array",
852
+ "items": {
853
+ "type": "object",
854
+ "properties": {
855
+ "name": {
856
+ "type": "string",
857
+ "minLength": 1,
858
+ "maxLength": 200
859
+ },
860
+ "predicate": {
861
+ "type": "string",
862
+ "enum": [
863
+ "exists",
864
+ "absent",
865
+ "string",
866
+ "number",
867
+ "boolean",
868
+ "null",
869
+ "array",
870
+ "object"
871
+ ]
872
+ }
873
+ },
874
+ "required": [
875
+ "name",
876
+ "predicate"
877
+ ],
878
+ "additionalProperties": false
879
+ }
880
+ }
881
+ },
882
+ "required": [
883
+ "fields"
884
+ ],
885
+ "additionalProperties": false
710
886
  }
711
887
  },
712
888
  "required": [
@@ -1495,6 +1671,94 @@
1495
1671
  "type": "string",
1496
1672
  "minLength": 1,
1497
1673
  "maxLength": 2000
1674
+ },
1675
+ "count": {
1676
+ "anyOf": [
1677
+ {
1678
+ "type": "object",
1679
+ "properties": {
1680
+ "exact": {
1681
+ "type": "integer",
1682
+ "minimum": 0,
1683
+ "maximum": 1000
1684
+ }
1685
+ },
1686
+ "required": [
1687
+ "exact"
1688
+ ],
1689
+ "additionalProperties": false
1690
+ },
1691
+ {
1692
+ "type": "object",
1693
+ "properties": {
1694
+ "min": {
1695
+ "type": "integer",
1696
+ "minimum": 0,
1697
+ "maximum": 1000
1698
+ }
1699
+ },
1700
+ "required": [
1701
+ "min"
1702
+ ],
1703
+ "additionalProperties": false
1704
+ },
1705
+ {
1706
+ "type": "object",
1707
+ "properties": {
1708
+ "max": {
1709
+ "type": "integer",
1710
+ "minimum": 0,
1711
+ "maximum": 1000
1712
+ }
1713
+ },
1714
+ "required": [
1715
+ "max"
1716
+ ],
1717
+ "additionalProperties": false
1718
+ }
1719
+ ]
1720
+ },
1721
+ "bodyShape": {
1722
+ "type": "object",
1723
+ "properties": {
1724
+ "fields": {
1725
+ "minItems": 1,
1726
+ "maxItems": 50,
1727
+ "type": "array",
1728
+ "items": {
1729
+ "type": "object",
1730
+ "properties": {
1731
+ "name": {
1732
+ "type": "string",
1733
+ "minLength": 1,
1734
+ "maxLength": 200
1735
+ },
1736
+ "predicate": {
1737
+ "type": "string",
1738
+ "enum": [
1739
+ "exists",
1740
+ "absent",
1741
+ "string",
1742
+ "number",
1743
+ "boolean",
1744
+ "null",
1745
+ "array",
1746
+ "object"
1747
+ ]
1748
+ }
1749
+ },
1750
+ "required": [
1751
+ "name",
1752
+ "predicate"
1753
+ ],
1754
+ "additionalProperties": false
1755
+ }
1756
+ }
1757
+ },
1758
+ "required": [
1759
+ "fields"
1760
+ ],
1761
+ "additionalProperties": false
1498
1762
  }
1499
1763
  },
1500
1764
  "required": [
@@ -1571,6 +1835,94 @@
1571
1835
  "additionalProperties": false
1572
1836
  }
1573
1837
  ]
1838
+ },
1839
+ "count": {
1840
+ "anyOf": [
1841
+ {
1842
+ "type": "object",
1843
+ "properties": {
1844
+ "exact": {
1845
+ "type": "integer",
1846
+ "minimum": 0,
1847
+ "maximum": 1000
1848
+ }
1849
+ },
1850
+ "required": [
1851
+ "exact"
1852
+ ],
1853
+ "additionalProperties": false
1854
+ },
1855
+ {
1856
+ "type": "object",
1857
+ "properties": {
1858
+ "min": {
1859
+ "type": "integer",
1860
+ "minimum": 0,
1861
+ "maximum": 1000
1862
+ }
1863
+ },
1864
+ "required": [
1865
+ "min"
1866
+ ],
1867
+ "additionalProperties": false
1868
+ },
1869
+ {
1870
+ "type": "object",
1871
+ "properties": {
1872
+ "max": {
1873
+ "type": "integer",
1874
+ "minimum": 0,
1875
+ "maximum": 1000
1876
+ }
1877
+ },
1878
+ "required": [
1879
+ "max"
1880
+ ],
1881
+ "additionalProperties": false
1882
+ }
1883
+ ]
1884
+ },
1885
+ "bodyShape": {
1886
+ "type": "object",
1887
+ "properties": {
1888
+ "fields": {
1889
+ "minItems": 1,
1890
+ "maxItems": 50,
1891
+ "type": "array",
1892
+ "items": {
1893
+ "type": "object",
1894
+ "properties": {
1895
+ "name": {
1896
+ "type": "string",
1897
+ "minLength": 1,
1898
+ "maxLength": 200
1899
+ },
1900
+ "predicate": {
1901
+ "type": "string",
1902
+ "enum": [
1903
+ "exists",
1904
+ "absent",
1905
+ "string",
1906
+ "number",
1907
+ "boolean",
1908
+ "null",
1909
+ "array",
1910
+ "object"
1911
+ ]
1912
+ }
1913
+ },
1914
+ "required": [
1915
+ "name",
1916
+ "predicate"
1917
+ ],
1918
+ "additionalProperties": false
1919
+ }
1920
+ }
1921
+ },
1922
+ "required": [
1923
+ "fields"
1924
+ ],
1925
+ "additionalProperties": false
1574
1926
  }
1575
1927
  },
1576
1928
  "required": [
@@ -2904,6 +3256,94 @@
2904
3256
  "type": "string",
2905
3257
  "minLength": 1,
2906
3258
  "maxLength": 2000
3259
+ },
3260
+ "count": {
3261
+ "anyOf": [
3262
+ {
3263
+ "type": "object",
3264
+ "properties": {
3265
+ "exact": {
3266
+ "type": "integer",
3267
+ "minimum": 0,
3268
+ "maximum": 1000
3269
+ }
3270
+ },
3271
+ "required": [
3272
+ "exact"
3273
+ ],
3274
+ "additionalProperties": false
3275
+ },
3276
+ {
3277
+ "type": "object",
3278
+ "properties": {
3279
+ "min": {
3280
+ "type": "integer",
3281
+ "minimum": 0,
3282
+ "maximum": 1000
3283
+ }
3284
+ },
3285
+ "required": [
3286
+ "min"
3287
+ ],
3288
+ "additionalProperties": false
3289
+ },
3290
+ {
3291
+ "type": "object",
3292
+ "properties": {
3293
+ "max": {
3294
+ "type": "integer",
3295
+ "minimum": 0,
3296
+ "maximum": 1000
3297
+ }
3298
+ },
3299
+ "required": [
3300
+ "max"
3301
+ ],
3302
+ "additionalProperties": false
3303
+ }
3304
+ ]
3305
+ },
3306
+ "bodyShape": {
3307
+ "type": "object",
3308
+ "properties": {
3309
+ "fields": {
3310
+ "minItems": 1,
3311
+ "maxItems": 50,
3312
+ "type": "array",
3313
+ "items": {
3314
+ "type": "object",
3315
+ "properties": {
3316
+ "name": {
3317
+ "type": "string",
3318
+ "minLength": 1,
3319
+ "maxLength": 200
3320
+ },
3321
+ "predicate": {
3322
+ "type": "string",
3323
+ "enum": [
3324
+ "exists",
3325
+ "absent",
3326
+ "string",
3327
+ "number",
3328
+ "boolean",
3329
+ "null",
3330
+ "array",
3331
+ "object"
3332
+ ]
3333
+ }
3334
+ },
3335
+ "required": [
3336
+ "name",
3337
+ "predicate"
3338
+ ],
3339
+ "additionalProperties": false
3340
+ }
3341
+ }
3342
+ },
3343
+ "required": [
3344
+ "fields"
3345
+ ],
3346
+ "additionalProperties": false
2907
3347
  }
2908
3348
  },
2909
3349
  "required": [
@@ -2980,6 +3420,94 @@
2980
3420
  "additionalProperties": false
2981
3421
  }
2982
3422
  ]
3423
+ },
3424
+ "count": {
3425
+ "anyOf": [
3426
+ {
3427
+ "type": "object",
3428
+ "properties": {
3429
+ "exact": {
3430
+ "type": "integer",
3431
+ "minimum": 0,
3432
+ "maximum": 1000
3433
+ }
3434
+ },
3435
+ "required": [
3436
+ "exact"
3437
+ ],
3438
+ "additionalProperties": false
3439
+ },
3440
+ {
3441
+ "type": "object",
3442
+ "properties": {
3443
+ "min": {
3444
+ "type": "integer",
3445
+ "minimum": 0,
3446
+ "maximum": 1000
3447
+ }
3448
+ },
3449
+ "required": [
3450
+ "min"
3451
+ ],
3452
+ "additionalProperties": false
3453
+ },
3454
+ {
3455
+ "type": "object",
3456
+ "properties": {
3457
+ "max": {
3458
+ "type": "integer",
3459
+ "minimum": 0,
3460
+ "maximum": 1000
3461
+ }
3462
+ },
3463
+ "required": [
3464
+ "max"
3465
+ ],
3466
+ "additionalProperties": false
3467
+ }
3468
+ ]
3469
+ },
3470
+ "bodyShape": {
3471
+ "type": "object",
3472
+ "properties": {
3473
+ "fields": {
3474
+ "minItems": 1,
3475
+ "maxItems": 50,
3476
+ "type": "array",
3477
+ "items": {
3478
+ "type": "object",
3479
+ "properties": {
3480
+ "name": {
3481
+ "type": "string",
3482
+ "minLength": 1,
3483
+ "maxLength": 200
3484
+ },
3485
+ "predicate": {
3486
+ "type": "string",
3487
+ "enum": [
3488
+ "exists",
3489
+ "absent",
3490
+ "string",
3491
+ "number",
3492
+ "boolean",
3493
+ "null",
3494
+ "array",
3495
+ "object"
3496
+ ]
3497
+ }
3498
+ },
3499
+ "required": [
3500
+ "name",
3501
+ "predicate"
3502
+ ],
3503
+ "additionalProperties": false
3504
+ }
3505
+ }
3506
+ },
3507
+ "required": [
3508
+ "fields"
3509
+ ],
3510
+ "additionalProperties": false
2983
3511
  }
2984
3512
  },
2985
3513
  "required": [
@@ -28,7 +28,7 @@ import { LogClassesError } from "./log-classes.js";
28
28
  const AUTHOR_GOAL_RUN_FLAGS = [
29
29
  "successWhen", "allowVacuousChecks", "actionDeltas", "secret", "secretField", "totp", "typeFixture", "uploadFixture", "fixture",
30
30
  "saveStorageState", "replyWaitMs", "replyQuietMs", "replyCeilingMs", "replyMaxChars", "jobWaitMs", "deny", "paid", "allowControl",
31
- "allowDestructive", "allowWrites", "dialogs", "readRpc", "hangReplays", "settleIgnore", "longPollMs", "apiPrefix", "ignoreNoProgress",
31
+ "allowDestructive", "allowWrites", "dialogs", "readRpc", "hangReplays", "settleIgnore", "longPollMs", "devServer", "apiPrefix", "ignoreNoProgress",
32
32
  "allowSecretCmd", "secretCmdAttempts",
33
33
  ];
34
34
  /** #369: one take's diagnostics as human lines (the paths a person opens next). */
@@ -81,6 +81,55 @@ export function formatAuthorJourneyHuman(data) {
81
81
  lines.push(` ${lintFindingLine(w)}`);
82
82
  return `${lines.join("\n")}\n`;
83
83
  }
84
+ /** #744: the flags every `explore-author-journey` needs, with the placeholder a corrected line uses. */
85
+ const REQUIRED_AUTHOR_ARGS = [
86
+ { flag: "--url", attr: "url", placeholder: "<url>" },
87
+ { flag: "--goal", attr: "goal", placeholder: "<text>" },
88
+ { flag: "--success", attr: "success", placeholder: "<spec>" },
89
+ { flag: "--id", attr: "id", placeholder: "<id>" },
90
+ { flag: "--name", attr: "name", placeholder: "<name>" },
91
+ ];
92
+ /** #744: flags whose VALUES are (or may carry) secrets — never echoed in a corrected invocation. */
93
+ const SECRET_ARG_FLAGS = new Set(["--secret", "--secret-field", "--totp"]);
94
+ /** A copy-pasteable token: whitespace or shell punctuation is JSON-quoted. */
95
+ function quoteArg(v) {
96
+ return /[\s"'`$\\|&;<>(){}*?!#]/.test(v) ? JSON.stringify(v) : v;
97
+ }
98
+ /** The required flags absent from the parsed options (an empty `--success` counts as absent). */
99
+ function missingAuthorArgs(opts) {
100
+ return REQUIRED_AUTHOR_ARGS.filter((a) => {
101
+ const v = opts[a.attr];
102
+ return v === undefined || v === "" || (Array.isArray(v) && v.length === 0);
103
+ });
104
+ }
105
+ /**
106
+ * #744: the invocation the user most likely meant — the flags they already gave (secret values
107
+ * redacted), plus a placeholder for each missing required flag. Every flag the command accepts is
108
+ * rendered by its own long form, so the corrected line is complete and copy-pasteable.
109
+ */
110
+ function authorCorrectedInvocation(cmd, opts, missing) {
111
+ const parts = ["jevitate", "explore-author-journey"];
112
+ for (const opt of cmd.options) {
113
+ if (opt.long === undefined || opt.long === "--json")
114
+ continue;
115
+ const value = opts[opt.attributeName()];
116
+ if (value === undefined || value === false)
117
+ continue;
118
+ if (Array.isArray(value)) {
119
+ for (const item of value)
120
+ parts.push(opt.long, SECRET_ARG_FLAGS.has(opt.long) ? "<redacted>" : quoteArg(String(item)));
121
+ continue;
122
+ }
123
+ if (value === true) {
124
+ parts.push(opt.long);
125
+ continue;
126
+ }
127
+ parts.push(opt.long, SECRET_ARG_FLAGS.has(opt.long) ? "<redacted>" : quoteArg(String(value)));
128
+ }
129
+ for (const m of missing)
130
+ parts.push(m.flag, m.placeholder);
131
+ return parts.join(" ");
132
+ }
84
133
  /** Registers `jevitate explore-author-journey` (Jev authors an unpromoted, parameterized Journey). */
85
134
  export function registerAuthorJourneyCommands(program, deps) {
86
135
  // Additive: `explore author-journey` — Jev-driving authors a promotable
@@ -123,12 +172,14 @@ export function registerAuthorJourneyCommands(program, deps) {
123
172
  ].join("\n"))
124
173
  .action(async function () {
125
174
  const o = this.opts();
175
+ const optsRecord = o;
126
176
  if (o.storageState !== undefined && !existsSync(o.storageState)) {
127
- emitJson(program, fail("E_EXPLORE_ARGS", `storage state not found: ${o.storageState}`));
177
+ emitJson(program, fail("E_EXPLORE_AUTHOR_JOURNEY_ARGS", `--storage-state <file> not found: ${o.storageState} — corrected invocation: ${authorCorrectedInvocation(this, optsRecord, missingAuthorArgs(optsRecord))}`));
128
178
  return;
129
179
  }
130
180
  if (!o.url || !o.goal || o.success.length === 0 || !o.id || !o.name) {
131
- emitJson(program, fail("E_AUTHOR_ARGS", "--url, --goal, --success, --id and --name are all required"));
181
+ const missingArgs = missingAuthorArgs(optsRecord);
182
+ emitJson(program, fail("E_EXPLORE_AUTHOR_JOURNEY_ARGS", `${missingArgs.map((m) => m.flag).join(", ")} ${missingArgs.length === 1 ? "is" : "are"} required — corrected invocation: ${authorCorrectedInvocation(this, optsRecord, missingArgs)}`));
132
183
  return;
133
184
  }
134
185
  // #322/#400: every kind `explore --success` takes — page, reloadThen and network checks.