@memberjunction/cli 6.1.0 → 6.1.2

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 (2) hide show
  1. package/oclif.manifest.json +1147 -1147
  2. package/package.json +22 -22
@@ -2654,84 +2654,6 @@
2654
2654
  "usage.js"
2655
2655
  ]
2656
2656
  },
2657
- "plugin:add": {
2658
- "aliases": [],
2659
- "args": {
2660
- "package": {
2661
- "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
2662
- "name": "package",
2663
- "required": true
2664
- }
2665
- },
2666
- "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
2667
- "examples": [
2668
- "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
2669
- "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
2670
- ],
2671
- "flags": {
2672
- "format": {
2673
- "description": "Output format",
2674
- "name": "format",
2675
- "default": "text",
2676
- "hasDynamicHelp": false,
2677
- "multiple": false,
2678
- "options": [
2679
- "text",
2680
- "json"
2681
- ],
2682
- "type": "option"
2683
- }
2684
- },
2685
- "hasDynamicHelp": false,
2686
- "hiddenAliases": [],
2687
- "id": "plugin:add",
2688
- "pluginAlias": "@memberjunction/cli",
2689
- "pluginName": "@memberjunction/cli",
2690
- "pluginType": "core",
2691
- "strict": true,
2692
- "enableJsonFlag": false,
2693
- "isESM": true,
2694
- "relativePath": [
2695
- "dist",
2696
- "commands",
2697
- "plugin",
2698
- "add.js"
2699
- ]
2700
- },
2701
- "plugin:usage": {
2702
- "aliases": [],
2703
- "args": {},
2704
- "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
2705
- "flags": {
2706
- "format": {
2707
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2708
- "name": "format",
2709
- "hasDynamicHelp": false,
2710
- "multiple": false,
2711
- "options": [
2712
- "text",
2713
- "json",
2714
- "md"
2715
- ],
2716
- "type": "option"
2717
- }
2718
- },
2719
- "hasDynamicHelp": false,
2720
- "hiddenAliases": [],
2721
- "id": "plugin:usage",
2722
- "pluginAlias": "@memberjunction/cli",
2723
- "pluginName": "@memberjunction/cli",
2724
- "pluginType": "core",
2725
- "strict": true,
2726
- "enableJsonFlag": false,
2727
- "isESM": true,
2728
- "relativePath": [
2729
- "dist",
2730
- "commands",
2731
- "plugin",
2732
- "usage.js"
2733
- ]
2734
- },
2735
2657
  "migrate:convert": {
2736
2658
  "aliases": [],
2737
2659
  "args": {},
@@ -3071,6 +2993,84 @@
3071
2993
  "usage.js"
3072
2994
  ]
3073
2995
  },
2996
+ "plugin:add": {
2997
+ "aliases": [],
2998
+ "args": {
2999
+ "package": {
3000
+ "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
3001
+ "name": "package",
3002
+ "required": true
3003
+ }
3004
+ },
3005
+ "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
3006
+ "examples": [
3007
+ "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
3008
+ "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
3009
+ ],
3010
+ "flags": {
3011
+ "format": {
3012
+ "description": "Output format",
3013
+ "name": "format",
3014
+ "default": "text",
3015
+ "hasDynamicHelp": false,
3016
+ "multiple": false,
3017
+ "options": [
3018
+ "text",
3019
+ "json"
3020
+ ],
3021
+ "type": "option"
3022
+ }
3023
+ },
3024
+ "hasDynamicHelp": false,
3025
+ "hiddenAliases": [],
3026
+ "id": "plugin:add",
3027
+ "pluginAlias": "@memberjunction/cli",
3028
+ "pluginName": "@memberjunction/cli",
3029
+ "pluginType": "core",
3030
+ "strict": true,
3031
+ "enableJsonFlag": false,
3032
+ "isESM": true,
3033
+ "relativePath": [
3034
+ "dist",
3035
+ "commands",
3036
+ "plugin",
3037
+ "add.js"
3038
+ ]
3039
+ },
3040
+ "plugin:usage": {
3041
+ "aliases": [],
3042
+ "args": {},
3043
+ "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
3044
+ "flags": {
3045
+ "format": {
3046
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3047
+ "name": "format",
3048
+ "hasDynamicHelp": false,
3049
+ "multiple": false,
3050
+ "options": [
3051
+ "text",
3052
+ "json",
3053
+ "md"
3054
+ ],
3055
+ "type": "option"
3056
+ }
3057
+ },
3058
+ "hasDynamicHelp": false,
3059
+ "hiddenAliases": [],
3060
+ "id": "plugin:usage",
3061
+ "pluginAlias": "@memberjunction/cli",
3062
+ "pluginName": "@memberjunction/cli",
3063
+ "pluginType": "core",
3064
+ "strict": true,
3065
+ "enableJsonFlag": false,
3066
+ "isESM": true,
3067
+ "relativePath": [
3068
+ "dist",
3069
+ "commands",
3070
+ "plugin",
3071
+ "usage.js"
3072
+ ]
3073
+ },
3074
3074
  "querygen:export": {
3075
3075
  "aliases": [],
3076
3076
  "args": {},
@@ -3762,110 +3762,60 @@
3762
3762
  "usage.js"
3763
3763
  ]
3764
3764
  },
3765
- "test:compare": {
3765
+ "sync:file-reset": {
3766
3766
  "aliases": [],
3767
- "args": {
3768
- "runId1": {
3769
- "description": "First test run ID to compare",
3770
- "name": "runId1",
3771
- "required": false
3772
- },
3773
- "runId2": {
3774
- "description": "Second test run ID to compare",
3775
- "name": "runId2",
3776
- "required": false
3777
- }
3778
- },
3779
- "description": "Compare test runs for regression detection",
3767
+ "args": {},
3768
+ "description": "Reset file metadata sections",
3780
3769
  "examples": [
3781
3770
  "<%= config.bin %> <%= command.id %>",
3782
- "<%= config.bin %> <%= command.id %> --latest",
3783
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
3784
- "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
3785
- "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
3786
- "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
3787
- "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
3771
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
3772
+ "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
3773
+ "<%= config.bin %> <%= command.id %> --all"
3788
3774
  ],
3789
3775
  "flags": {
3790
- "version": {
3791
- "char": "v",
3792
- "description": "Compare runs by version",
3793
- "name": "version",
3776
+ "dir": {
3777
+ "description": "Specific entity directory to reset",
3778
+ "name": "dir",
3794
3779
  "hasDynamicHelp": false,
3795
- "multiple": true,
3780
+ "multiple": false,
3796
3781
  "type": "option"
3797
3782
  },
3798
- "commit": {
3799
- "char": "c",
3800
- "description": "Compare runs by git commit",
3801
- "name": "commit",
3783
+ "sections": {
3784
+ "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
3785
+ "name": "sections",
3802
3786
  "hasDynamicHelp": false,
3803
- "multiple": true,
3787
+ "multiple": false,
3804
3788
  "type": "option"
3805
3789
  },
3806
- "diff-only": {
3807
- "description": "Show only differences",
3808
- "name": "diff-only",
3790
+ "all": {
3791
+ "description": "Reset all metadata sections",
3792
+ "name": "all",
3809
3793
  "allowNo": false,
3810
3794
  "type": "boolean"
3811
3795
  },
3812
- "latest": {
3813
- "char": "l",
3814
- "description": "Compare the two most recent completed suite runs",
3815
- "name": "latest",
3796
+ "dry-run": {
3797
+ "description": "Show what would be reset without actually resetting",
3798
+ "name": "dry-run",
3816
3799
  "allowNo": false,
3817
3800
  "type": "boolean"
3818
3801
  },
3819
- "from-json": {
3820
- "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
3821
- "name": "from-json",
3822
- "hasDynamicHelp": false,
3823
- "multiple": true,
3824
- "type": "option"
3825
- },
3826
- "format": {
3827
- "char": "f",
3828
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
3829
- "name": "format",
3830
- "hasDynamicHelp": false,
3831
- "multiple": false,
3832
- "options": [
3833
- "text",
3834
- "json",
3835
- "md",
3836
- "human",
3837
- "console",
3838
- "markdown",
3839
- "compact",
3840
- "table"
3841
- ],
3842
- "type": "option"
3843
- },
3844
- "output": {
3845
- "char": "o",
3846
- "description": "Output file path",
3847
- "name": "output",
3848
- "hasDynamicHelp": false,
3849
- "multiple": false,
3850
- "type": "option"
3802
+ "force": {
3803
+ "description": "Skip confirmation prompts",
3804
+ "name": "force",
3805
+ "allowNo": false,
3806
+ "type": "boolean"
3851
3807
  },
3852
3808
  "verbose": {
3853
- "description": "Show detailed information",
3809
+ "char": "v",
3810
+ "description": "Show detailed output",
3854
3811
  "name": "verbose",
3855
3812
  "allowNo": false,
3856
3813
  "type": "boolean"
3857
- },
3858
- "tag": {
3859
- "description": "Filter suite runs by tag (matches against MJTestSuiteRunEntity.Tags). Useful for isolating runs from a specific source environment in an archive MJ. DB mode only — --from-json ignores this flag.",
3860
- "name": "tag",
3861
- "hasDynamicHelp": false,
3862
- "multiple": false,
3863
- "type": "option"
3864
3814
  }
3865
3815
  },
3866
3816
  "hasDynamicHelp": false,
3867
3817
  "hiddenAliases": [],
3868
- "id": "test:compare",
3818
+ "id": "sync:file-reset",
3869
3819
  "pluginAlias": "@memberjunction/cli",
3870
3820
  "pluginName": "@memberjunction/cli",
3871
3821
  "pluginType": "core",
@@ -3875,119 +3825,69 @@
3875
3825
  "relativePath": [
3876
3826
  "dist",
3877
3827
  "commands",
3878
- "test",
3879
- "compare.js"
3828
+ "sync",
3829
+ "file-reset.js"
3880
3830
  ]
3881
3831
  },
3882
- "test:history": {
3832
+ "sync:init": {
3883
3833
  "aliases": [],
3884
3834
  "args": {},
3885
- "description": "View test execution history",
3835
+ "description": "Initialize a directory for metadata synchronization.\n\nPrompts at a terminal; runs unattended when piped, spawned, or in CI. To script it,\npass --setup-entity (and --entity/--dir when setting up \"other\").",
3886
3836
  "examples": [
3887
- "<%= config.bin %> <%= command.id %>",
3888
- "<%= config.bin %> <%= command.id %> --test=<test-id>",
3889
- "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
3890
- "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
3891
- "<%= config.bin %> <%= command.id %> --limit=50"
3892
- ],
3893
- "flags": {
3894
- "test": {
3895
- "char": "t",
3896
- "description": "Filter by test ID",
3897
- "name": "test",
3898
- "hasDynamicHelp": false,
3899
- "multiple": false,
3900
- "type": "option"
3837
+ {
3838
+ "command": "<%= config.bin %> <%= command.id %> --setup-entity=no",
3839
+ "description": "Initialize with no entity directory"
3901
3840
  },
3902
- "recent": {
3903
- "char": "r",
3904
- "description": "Number of recent runs to show",
3905
- "name": "recent",
3906
- "hasDynamicHelp": false,
3907
- "multiple": false,
3908
- "type": "option"
3841
+ {
3842
+ "command": "<%= config.bin %> <%= command.id %> --setup-entity=ai-prompts",
3843
+ "description": "Initialize and set up the AI Prompts directory"
3909
3844
  },
3910
- "from": {
3911
- "description": "Show history from date (YYYY-MM-DD)",
3912
- "name": "from",
3913
- "hasDynamicHelp": false,
3914
- "multiple": false,
3915
- "type": "option"
3845
+ {
3846
+ "command": "<%= config.bin %> <%= command.id %> --setup-entity=other --entity=\"MJ: AI Models\" --dir=ai-models",
3847
+ "description": "Initialize for an arbitrary entity"
3916
3848
  },
3917
- "status": {
3918
- "char": "s",
3919
- "description": "Filter by status",
3920
- "name": "status",
3849
+ {
3850
+ "command": "<%= config.bin %> <%= command.id %> --no-interactive --setup-entity=no",
3851
+ "description": "Never prompt, even at a terminal"
3852
+ }
3853
+ ],
3854
+ "flags": {
3855
+ "setup-entity": {
3856
+ "description": "Which entity directory to set up. Use \"no\" to skip.",
3857
+ "name": "setup-entity",
3921
3858
  "hasDynamicHelp": false,
3922
3859
  "multiple": false,
3860
+ "options": [
3861
+ "ai-prompts",
3862
+ "other",
3863
+ "no"
3864
+ ],
3923
3865
  "type": "option"
3924
3866
  },
3925
- "format": {
3926
- "char": "f",
3927
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
3928
- "name": "format",
3867
+ "entity": {
3868
+ "description": "Entity name when --setup-entity=other (e.g. \"MJ: AI Models\").",
3869
+ "name": "entity",
3929
3870
  "hasDynamicHelp": false,
3930
3871
  "multiple": false,
3931
- "options": [
3932
- "text",
3933
- "json",
3934
- "md",
3935
- "human",
3936
- "console",
3937
- "markdown",
3938
- "compact",
3939
- "table"
3940
- ],
3941
3872
  "type": "option"
3942
3873
  },
3943
- "output": {
3944
- "char": "o",
3945
- "description": "Output file path",
3946
- "name": "output",
3874
+ "dir": {
3875
+ "description": "Directory name when --setup-entity=other. Defaults to a slug of --entity.",
3876
+ "name": "dir",
3947
3877
  "hasDynamicHelp": false,
3948
3878
  "multiple": false,
3949
3879
  "type": "option"
3950
3880
  },
3951
- "verbose": {
3952
- "char": "v",
3953
- "description": "Show detailed information",
3954
- "name": "verbose",
3955
- "allowNo": false,
3881
+ "overwrite": {
3882
+ "description": "Overwrite an existing configuration. Without this, an initialized directory is left untouched.",
3883
+ "name": "overwrite",
3884
+ "allowNo": true,
3956
3885
  "type": "boolean"
3957
3886
  }
3958
3887
  },
3959
3888
  "hasDynamicHelp": false,
3960
3889
  "hiddenAliases": [],
3961
- "id": "test:history",
3962
- "pluginAlias": "@memberjunction/cli",
3963
- "pluginName": "@memberjunction/cli",
3964
- "pluginType": "core",
3965
- "strict": true,
3966
- "enableJsonFlag": false,
3967
- "isESM": true,
3968
- "relativePath": [
3969
- "dist",
3970
- "commands",
3971
- "test",
3972
- "history.js"
3973
- ]
3974
- },
3975
- "test": {
3976
- "aliases": [],
3977
- "args": {},
3978
- "description": "MemberJunction Testing Framework - Execute and manage tests",
3979
- "examples": [
3980
- "<%= config.bin %> <%= command.id %> run <test-id>",
3981
- "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
3982
- "<%= config.bin %> <%= command.id %> suite <suite-id>",
3983
- "<%= config.bin %> <%= command.id %> list",
3984
- "<%= config.bin %> <%= command.id %> list --suites",
3985
- "<%= config.bin %> <%= command.id %> validate --all"
3986
- ],
3987
- "flags": {},
3988
- "hasDynamicHelp": false,
3989
- "hiddenAliases": [],
3990
- "id": "test",
3890
+ "id": "sync:init",
3991
3891
  "pluginAlias": "@memberjunction/cli",
3992
3892
  "pluginName": "@memberjunction/cli",
3993
3893
  "pluginType": "core",
@@ -3997,191 +3897,162 @@
3997
3897
  "relativePath": [
3998
3898
  "dist",
3999
3899
  "commands",
4000
- "test",
4001
- "index.js"
3900
+ "sync",
3901
+ "init.js"
4002
3902
  ]
4003
3903
  },
4004
- "test:list": {
3904
+ "sync:pull": {
4005
3905
  "aliases": [],
4006
3906
  "args": {},
4007
- "description": "List available tests, suites, and types",
3907
+ "description": "Pull metadata from database to local files",
4008
3908
  "examples": [
4009
- "<%= config.bin %> <%= command.id %>",
4010
- "<%= config.bin %> <%= command.id %> --suites",
4011
- "<%= config.bin %> <%= command.id %> --types",
4012
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
4013
- "<%= config.bin %> <%= command.id %> --tag=smoke",
4014
- "<%= config.bin %> <%= command.id %> --status=active --verbose"
3909
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
3910
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
3911
+ "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
4015
3912
  ],
4016
3913
  "flags": {
4017
- "suites": {
4018
- "description": "List test suites instead of tests",
4019
- "name": "suites",
3914
+ "format": {
3915
+ "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
3916
+ "name": "format",
3917
+ "hasDynamicHelp": false,
3918
+ "multiple": false,
3919
+ "options": [
3920
+ "text",
3921
+ "json",
3922
+ "md",
3923
+ "human",
3924
+ "console",
3925
+ "markdown"
3926
+ ],
3927
+ "type": "option"
3928
+ },
3929
+ "verbose": {
3930
+ "char": "v",
3931
+ "description": "Show detailed output",
3932
+ "name": "verbose",
4020
3933
  "allowNo": false,
4021
3934
  "type": "boolean"
4022
3935
  },
4023
- "types": {
4024
- "description": "List test types",
4025
- "name": "types",
3936
+ "no-banner": {
3937
+ "description": "Suppress the startup banner and runtime advisory",
3938
+ "name": "no-banner",
4026
3939
  "allowNo": false,
4027
3940
  "type": "boolean"
4028
3941
  },
4029
- "type": {
4030
- "char": "t",
4031
- "description": "Filter by test type",
4032
- "name": "type",
4033
- "hasDynamicHelp": false,
4034
- "multiple": false,
4035
- "type": "option"
3942
+ "no-app-packages": {
3943
+ "description": "Do not load installed Open App server packages (or the host's generated packages) for this run, so records are written with the generic BaseEntity — no custom Save() logic or lifecycle hooks.",
3944
+ "name": "no-app-packages",
3945
+ "allowNo": false,
3946
+ "type": "boolean"
4036
3947
  },
4037
- "tag": {
4038
- "description": "Filter by tag",
4039
- "name": "tag",
4040
- "hasDynamicHelp": false,
4041
- "multiple": false,
4042
- "type": "option"
3948
+ "interactive": {
3949
+ "description": "Allow interactive prompts. Defaults to on at a terminal and off when piped, spawned, or in CI, so an agent never hangs on a question. Use --no-interactive to force it off.",
3950
+ "name": "interactive",
3951
+ "allowNo": true,
3952
+ "type": "boolean"
4043
3953
  },
4044
- "status": {
4045
- "char": "s",
4046
- "description": "Filter by status",
4047
- "name": "status",
3954
+ "entity": {
3955
+ "description": "Entity name to pull",
3956
+ "name": "entity",
3957
+ "required": true,
4048
3958
  "hasDynamicHelp": false,
4049
3959
  "multiple": false,
4050
3960
  "type": "option"
4051
3961
  },
4052
- "format": {
4053
- "char": "f",
4054
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4055
- "name": "format",
3962
+ "filter": {
3963
+ "description": "Additional filter for pulling specific records",
3964
+ "name": "filter",
4056
3965
  "hasDynamicHelp": false,
4057
3966
  "multiple": false,
4058
- "options": [
4059
- "text",
4060
- "json",
4061
- "md",
4062
- "human",
4063
- "console",
4064
- "markdown",
4065
- "compact",
4066
- "table"
4067
- ],
4068
3967
  "type": "option"
4069
3968
  },
4070
- "output": {
4071
- "char": "o",
4072
- "description": "Output file path",
4073
- "name": "output",
3969
+ "dry-run": {
3970
+ "description": "Show what would be pulled without actually pulling",
3971
+ "name": "dry-run",
3972
+ "allowNo": false,
3973
+ "type": "boolean"
3974
+ },
3975
+ "multi-file": {
3976
+ "description": "Create a single file with multiple records (provide filename)",
3977
+ "name": "multi-file",
4074
3978
  "hasDynamicHelp": false,
4075
3979
  "multiple": false,
4076
3980
  "type": "option"
4077
3981
  },
4078
- "verbose": {
4079
- "char": "v",
4080
- "description": "Show detailed information",
4081
- "name": "verbose",
3982
+ "no-validate": {
3983
+ "description": "Skip validation before pull",
3984
+ "name": "no-validate",
4082
3985
  "allowNo": false,
4083
3986
  "type": "boolean"
4084
- }
4085
- },
4086
- "hasDynamicHelp": false,
4087
- "hiddenAliases": [],
4088
- "id": "test:list",
4089
- "pluginAlias": "@memberjunction/cli",
4090
- "pluginName": "@memberjunction/cli",
4091
- "pluginType": "core",
4092
- "strict": true,
4093
- "enableJsonFlag": false,
4094
- "isESM": true,
4095
- "relativePath": [
4096
- "dist",
4097
- "commands",
4098
- "test",
4099
- "list.js"
4100
- ]
4101
- },
4102
- "test:run": {
4103
- "aliases": [],
4104
- "args": {
4105
- "testId": {
4106
- "description": "Test ID to execute",
4107
- "name": "testId",
4108
- "required": false
4109
- }
4110
- },
4111
- "description": "Execute a single test by ID or name",
4112
- "examples": [
4113
- "<%= config.bin %> <%= command.id %> <test-id>",
4114
- "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
4115
- "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
4116
- "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
4117
- "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
4118
- ],
4119
- "flags": {
4120
- "name": {
4121
- "char": "n",
4122
- "description": "Test name to execute",
4123
- "name": "name",
4124
- "hasDynamicHelp": false,
4125
- "multiple": false,
4126
- "type": "option"
4127
3987
  },
4128
- "environment": {
4129
- "char": "e",
4130
- "description": "Environment context (dev, staging, prod)",
4131
- "name": "environment",
4132
- "hasDynamicHelp": false,
4133
- "multiple": false,
4134
- "type": "option"
3988
+ "update-existing": {
3989
+ "description": "Update existing records during pull",
3990
+ "name": "update-existing",
3991
+ "allowNo": false,
3992
+ "type": "boolean"
4135
3993
  },
4136
- "format": {
4137
- "char": "f",
4138
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4139
- "name": "format",
3994
+ "create-new": {
3995
+ "description": "Create new files for records not found locally",
3996
+ "name": "create-new",
3997
+ "allowNo": false,
3998
+ "type": "boolean"
3999
+ },
4000
+ "backup-before-update": {
4001
+ "description": "Create backups before updating files",
4002
+ "name": "backup-before-update",
4003
+ "allowNo": false,
4004
+ "type": "boolean"
4005
+ },
4006
+ "merge-strategy": {
4007
+ "description": "Merge strategy for updates",
4008
+ "name": "merge-strategy",
4009
+ "default": "merge",
4140
4010
  "hasDynamicHelp": false,
4141
4011
  "multiple": false,
4142
4012
  "options": [
4143
- "text",
4144
- "json",
4145
- "md",
4146
- "human",
4147
- "console",
4148
- "markdown",
4149
- "compact",
4150
- "table"
4013
+ "merge",
4014
+ "overwrite",
4015
+ "skip"
4151
4016
  ],
4152
4017
  "type": "option"
4153
4018
  },
4154
- "output": {
4155
- "char": "o",
4156
- "description": "Output file path",
4157
- "name": "output",
4019
+ "backup-directory": {
4020
+ "description": "Custom backup directory (default: .backups)",
4021
+ "name": "backup-directory",
4158
4022
  "hasDynamicHelp": false,
4159
4023
  "multiple": false,
4160
4024
  "type": "option"
4161
4025
  },
4162
- "dry-run": {
4163
- "description": "Validate without executing",
4164
- "name": "dry-run",
4165
- "allowNo": false,
4166
- "type": "boolean"
4026
+ "preserve-fields": {
4027
+ "description": "Comma-separated list of fields to preserve during updates",
4028
+ "name": "preserve-fields",
4029
+ "hasDynamicHelp": false,
4030
+ "multiple": true,
4031
+ "type": "option"
4167
4032
  },
4168
- "verbose": {
4169
- "char": "v",
4170
- "description": "Show detailed execution information",
4171
- "name": "verbose",
4172
- "allowNo": false,
4173
- "type": "boolean"
4033
+ "exclude-fields": {
4034
+ "description": "Comma-separated list of fields to exclude from pull",
4035
+ "name": "exclude-fields",
4036
+ "hasDynamicHelp": false,
4037
+ "multiple": true,
4038
+ "type": "option"
4174
4039
  },
4175
- "checks-module": {
4176
- "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
4177
- "name": "checks-module",
4040
+ "target-dir": {
4041
+ "description": "Specific target directory (overrides auto-discovery)",
4042
+ "name": "target-dir",
4178
4043
  "hasDynamicHelp": false,
4179
4044
  "multiple": false,
4180
4045
  "type": "option"
4181
4046
  },
4182
- "oracles-module": {
4183
- "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the test runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
4184
- "name": "oracles-module",
4047
+ "incremental": {
4048
+ "description": "Only pull records updated since last successful pull",
4049
+ "name": "incremental",
4050
+ "allowNo": false,
4051
+ "type": "boolean"
4052
+ },
4053
+ "since": {
4054
+ "description": "Only pull records updated after this ISO 8601 timestamp",
4055
+ "name": "since",
4185
4056
  "hasDynamicHelp": false,
4186
4057
  "multiple": false,
4187
4058
  "type": "option"
@@ -4189,48 +4060,75 @@
4189
4060
  },
4190
4061
  "hasDynamicHelp": false,
4191
4062
  "hiddenAliases": [],
4192
- "id": "test:run",
4063
+ "id": "sync:pull",
4193
4064
  "pluginAlias": "@memberjunction/cli",
4194
4065
  "pluginName": "@memberjunction/cli",
4195
4066
  "pluginType": "core",
4196
4067
  "strict": true,
4197
4068
  "enableJsonFlag": false,
4069
+ "Usage": {
4070
+ "domain": "sync",
4071
+ "command": "sync:pull",
4072
+ "summary": "Pull database records into local metadata files.",
4073
+ "description": "Writes records of --entity into the matching entity directory, creating or updating files per the merge strategy.",
4074
+ "flags": [
4075
+ {
4076
+ "name": "--entity",
4077
+ "type": "string",
4078
+ "description": "Entity name to pull (required)"
4079
+ },
4080
+ {
4081
+ "name": "--filter",
4082
+ "type": "string",
4083
+ "description": "Extra SQL filter for which records to pull"
4084
+ },
4085
+ {
4086
+ "name": "--merge-strategy",
4087
+ "type": "merge|overwrite|skip",
4088
+ "description": "How to reconcile existing files"
4089
+ },
4090
+ {
4091
+ "name": "--dry-run",
4092
+ "type": "boolean",
4093
+ "description": "Report what would be pulled without writing"
4094
+ },
4095
+ {
4096
+ "name": "--format",
4097
+ "type": "text|json|md",
4098
+ "description": "Output format (json for machine-readable result)"
4099
+ }
4100
+ ],
4101
+ "examples": [
4102
+ "mj sync pull --entity=\"MJ: AI Prompts\"",
4103
+ "mj sync pull --entity=\"Actions\" --format=json"
4104
+ ],
4105
+ "runtime": {
4106
+ "class": "variable",
4107
+ "typicalSeconds": 15,
4108
+ "note": "scales with number of records matched for --entity"
4109
+ }
4110
+ },
4198
4111
  "isESM": true,
4199
4112
  "relativePath": [
4200
4113
  "dist",
4201
4114
  "commands",
4202
- "test",
4203
- "run.js"
4115
+ "sync",
4116
+ "pull.js"
4204
4117
  ]
4205
4118
  },
4206
- "test:suite": {
4119
+ "sync:push": {
4207
4120
  "aliases": [],
4208
- "args": {
4209
- "suiteId": {
4210
- "description": "Test suite ID to execute",
4211
- "name": "suiteId",
4212
- "required": false
4213
- }
4214
- },
4215
- "description": "Execute a test suite",
4121
+ "args": {},
4122
+ "description": "Push local file changes to the database",
4216
4123
  "examples": [
4217
- "<%= config.bin %> <%= command.id %> <suite-id>",
4218
- "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
4219
- "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
4220
- "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
4124
+ "<%= config.bin %> <%= command.id %>",
4125
+ "<%= config.bin %> <%= command.id %> --dry-run",
4126
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4127
+ "<%= config.bin %> <%= command.id %> --ci --format=json"
4221
4128
  ],
4222
4129
  "flags": {
4223
- "name": {
4224
- "char": "n",
4225
- "description": "Test suite name to execute",
4226
- "name": "name",
4227
- "hasDynamicHelp": false,
4228
- "multiple": false,
4229
- "type": "option"
4230
- },
4231
4130
  "format": {
4232
- "char": "f",
4233
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4131
+ "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
4234
4132
  "name": "format",
4235
4133
  "hasDynamicHelp": false,
4236
4134
  "multiple": false,
@@ -4240,93 +4138,223 @@
4240
4138
  "md",
4241
4139
  "human",
4242
4140
  "console",
4243
- "markdown",
4244
- "compact",
4245
- "table"
4141
+ "markdown"
4246
4142
  ],
4247
4143
  "type": "option"
4248
4144
  },
4249
- "output": {
4250
- "char": "o",
4251
- "description": "Output file path",
4252
- "name": "output",
4253
- "hasDynamicHelp": false,
4254
- "multiple": false,
4255
- "type": "option"
4256
- },
4257
4145
  "verbose": {
4258
4146
  "char": "v",
4259
- "description": "Show detailed execution information",
4147
+ "description": "Show detailed output",
4260
4148
  "name": "verbose",
4261
4149
  "allowNo": false,
4262
4150
  "type": "boolean"
4263
4151
  },
4264
- "delay": {
4265
- "char": "d",
4266
- "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
4267
- "name": "delay",
4268
- "default": 0,
4269
- "hasDynamicHelp": false,
4270
- "multiple": false,
4271
- "type": "option"
4152
+ "no-banner": {
4153
+ "description": "Suppress the startup banner and runtime advisory",
4154
+ "name": "no-banner",
4155
+ "allowNo": false,
4156
+ "type": "boolean"
4272
4157
  },
4273
- "parallel": {
4274
- "char": "p",
4275
- "description": "Run tests in parallel with shared browser sessions",
4276
- "name": "parallel",
4158
+ "no-app-packages": {
4159
+ "description": "Do not load installed Open App server packages (or the host's generated packages) for this run, so records are written with the generic BaseEntity — no custom Save() logic or lifecycle hooks.",
4160
+ "name": "no-app-packages",
4277
4161
  "allowNo": false,
4278
4162
  "type": "boolean"
4279
4163
  },
4280
- "max-parallel": {
4281
- "description": "Maximum number of parallel workers (default 4)",
4282
- "name": "max-parallel",
4283
- "default": 4,
4284
- "hasDynamicHelp": false,
4285
- "multiple": false,
4286
- "type": "option"
4164
+ "interactive": {
4165
+ "description": "Allow interactive prompts. Defaults to on at a terminal and off when piped, spawned, or in CI, so an agent never hangs on a question. Use --no-interactive to force it off.",
4166
+ "name": "interactive",
4167
+ "allowNo": true,
4168
+ "type": "boolean"
4287
4169
  },
4288
- "flaky-check": {
4289
- "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
4290
- "name": "flaky-check",
4170
+ "dir": {
4171
+ "description": "Specific entity directory to push",
4172
+ "name": "dir",
4291
4173
  "hasDynamicHelp": false,
4292
4174
  "multiple": false,
4293
4175
  "type": "option"
4294
4176
  },
4295
- "checks-module": {
4296
- "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
4297
- "name": "checks-module",
4177
+ "dry-run": {
4178
+ "description": "Show what would be pushed without actually pushing",
4179
+ "name": "dry-run",
4180
+ "allowNo": false,
4181
+ "type": "boolean"
4182
+ },
4183
+ "ci": {
4184
+ "description": "CI mode - no prompts, fail on issues",
4185
+ "name": "ci",
4186
+ "allowNo": false,
4187
+ "type": "boolean"
4188
+ },
4189
+ "no-validate": {
4190
+ "description": "Skip validation before push",
4191
+ "name": "no-validate",
4192
+ "allowNo": false,
4193
+ "type": "boolean"
4194
+ },
4195
+ "delete-db-only": {
4196
+ "description": "Delete database-only records that reference records being deleted (prevents FK errors)",
4197
+ "name": "delete-db-only",
4198
+ "allowNo": false,
4199
+ "type": "boolean"
4200
+ },
4201
+ "parallel-batch-size": {
4202
+ "description": "JSON-root graphs to process in parallel (default: 10, not 1)",
4203
+ "name": "parallel-batch-size",
4204
+ "default": 10,
4298
4205
  "hasDynamicHelp": false,
4299
4206
  "multiple": false,
4300
4207
  "type": "option"
4301
4208
  },
4302
- "oracles-module": {
4303
- "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the suite runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
4304
- "name": "oracles-module",
4209
+ "include": {
4210
+ "description": "Only process these directories (comma-separated, supports patterns)",
4211
+ "name": "include",
4212
+ "hasDynamicHelp": false,
4213
+ "multiple": false,
4214
+ "type": "option"
4215
+ },
4216
+ "exclude": {
4217
+ "description": "Skip these directories (comma-separated, supports patterns)",
4218
+ "name": "exclude",
4305
4219
  "hasDynamicHelp": false,
4306
4220
  "multiple": false,
4307
4221
  "type": "option"
4222
+ },
4223
+ "incremental": {
4224
+ "description": "Skip unchanged files using stored checksums from last push",
4225
+ "name": "incremental",
4226
+ "allowNo": false,
4227
+ "type": "boolean"
4228
+ },
4229
+ "change-detail": {
4230
+ "description": "Write a detailed per-record change report (primary keys + field diffs) to a file",
4231
+ "name": "change-detail",
4232
+ "allowNo": false,
4233
+ "type": "boolean"
4308
4234
  }
4309
4235
  },
4310
4236
  "hasDynamicHelp": false,
4311
4237
  "hiddenAliases": [],
4312
- "id": "test:suite",
4238
+ "id": "sync:push",
4313
4239
  "pluginAlias": "@memberjunction/cli",
4314
4240
  "pluginName": "@memberjunction/cli",
4315
4241
  "pluginType": "core",
4316
4242
  "strict": true,
4317
4243
  "enableJsonFlag": false,
4244
+ "Usage": {
4245
+ "domain": "sync",
4246
+ "command": "sync:push",
4247
+ "summary": "Push local metadata files to the database (upsert).",
4248
+ "description": "Reads entity directories under --dir and creates/updates matching records. Runs validation first unless --no-validate.",
4249
+ "flags": [
4250
+ {
4251
+ "name": "--dir",
4252
+ "type": "string",
4253
+ "description": "Entity directory to push"
4254
+ },
4255
+ {
4256
+ "name": "--dry-run",
4257
+ "type": "boolean",
4258
+ "description": "Report what would change without writing"
4259
+ },
4260
+ {
4261
+ "name": "--ci",
4262
+ "type": "boolean",
4263
+ "description": "No prompts; non-zero exit on error"
4264
+ },
4265
+ {
4266
+ "name": "--no-validate",
4267
+ "type": "boolean",
4268
+ "description": "Skip pre-push validation"
4269
+ },
4270
+ {
4271
+ "name": "--incremental",
4272
+ "type": "boolean",
4273
+ "description": "Skip unchanged files using stored checksums"
4274
+ },
4275
+ {
4276
+ "name": "--format",
4277
+ "type": "text|json|md",
4278
+ "description": "Output format (json for machine-readable result)"
4279
+ }
4280
+ ],
4281
+ "examples": [
4282
+ "mj sync push --dir=ai-agents",
4283
+ "mj sync push --ci --format=json"
4284
+ ],
4285
+ "runtime": {
4286
+ "class": "variable",
4287
+ "typicalSeconds": 20,
4288
+ "note": "scales with number of records in --dir"
4289
+ }
4290
+ },
4318
4291
  "isESM": true,
4319
4292
  "relativePath": [
4320
4293
  "dist",
4321
4294
  "commands",
4322
- "test",
4323
- "suite.js"
4295
+ "sync",
4296
+ "push.js"
4324
4297
  ]
4325
4298
  },
4326
- "test:usage": {
4299
+ "sync:status": {
4327
4300
  "aliases": [],
4328
4301
  "args": {},
4329
- "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
4302
+ "description": "Show status of local files vs database",
4303
+ "examples": [
4304
+ "<%= config.bin %> <%= command.id %>",
4305
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4306
+ "<%= config.bin %> <%= command.id %> --verbose"
4307
+ ],
4308
+ "flags": {
4309
+ "dir": {
4310
+ "description": "Specific entity directory to check status",
4311
+ "name": "dir",
4312
+ "hasDynamicHelp": false,
4313
+ "multiple": false,
4314
+ "type": "option"
4315
+ },
4316
+ "verbose": {
4317
+ "char": "v",
4318
+ "description": "Show detailed field-level differences",
4319
+ "name": "verbose",
4320
+ "allowNo": false,
4321
+ "type": "boolean"
4322
+ },
4323
+ "include": {
4324
+ "description": "Only process these directories (comma-separated, supports patterns)",
4325
+ "name": "include",
4326
+ "hasDynamicHelp": false,
4327
+ "multiple": false,
4328
+ "type": "option"
4329
+ },
4330
+ "exclude": {
4331
+ "description": "Skip these directories (comma-separated, supports patterns)",
4332
+ "name": "exclude",
4333
+ "hasDynamicHelp": false,
4334
+ "multiple": false,
4335
+ "type": "option"
4336
+ }
4337
+ },
4338
+ "hasDynamicHelp": false,
4339
+ "hiddenAliases": [],
4340
+ "id": "sync:status",
4341
+ "pluginAlias": "@memberjunction/cli",
4342
+ "pluginName": "@memberjunction/cli",
4343
+ "pluginType": "core",
4344
+ "strict": true,
4345
+ "enableJsonFlag": false,
4346
+ "isESM": true,
4347
+ "relativePath": [
4348
+ "dist",
4349
+ "commands",
4350
+ "sync",
4351
+ "status.js"
4352
+ ]
4353
+ },
4354
+ "sync:usage": {
4355
+ "aliases": [],
4356
+ "args": {},
4357
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
4330
4358
  "flags": {
4331
4359
  "format": {
4332
4360
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -4343,7 +4371,7 @@
4343
4371
  },
4344
4372
  "hasDynamicHelp": false,
4345
4373
  "hiddenAliases": [],
4346
- "id": "test:usage",
4374
+ "id": "sync:usage",
4347
4375
  "pluginAlias": "@memberjunction/cli",
4348
4376
  "pluginName": "@memberjunction/cli",
4349
4377
  "pluginType": "core",
@@ -4353,86 +4381,52 @@
4353
4381
  "relativePath": [
4354
4382
  "dist",
4355
4383
  "commands",
4356
- "test",
4384
+ "sync",
4357
4385
  "usage.js"
4358
4386
  ]
4359
4387
  },
4360
- "test:validate": {
4388
+ "sync:validate": {
4361
4389
  "aliases": [],
4362
- "args": {
4363
- "testId": {
4364
- "description": "Test ID to validate",
4365
- "name": "testId",
4366
- "required": false
4367
- }
4368
- },
4369
- "description": "Validate test definitions without executing",
4390
+ "args": {},
4391
+ "description": "Validate metadata files",
4370
4392
  "examples": [
4371
- "<%= config.bin %> <%= command.id %> <test-id>",
4372
- "<%= config.bin %> <%= command.id %> --all",
4373
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
4374
- "<%= config.bin %> <%= command.id %> --all --save-report",
4375
- "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
4393
+ "<%= config.bin %> <%= command.id %>",
4394
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4395
+ "<%= config.bin %> <%= command.id %> --save-report",
4396
+ "<%= config.bin %> <%= command.id %> --verbose"
4376
4397
  ],
4377
4398
  "flags": {
4378
- "all": {
4379
- "char": "a",
4380
- "description": "Validate all tests",
4381
- "name": "all",
4382
- "allowNo": false,
4383
- "type": "boolean"
4384
- },
4385
- "type": {
4386
- "char": "t",
4387
- "description": "Validate tests by type",
4388
- "name": "type",
4399
+ "dir": {
4400
+ "description": "Specific entity directory to validate",
4401
+ "name": "dir",
4389
4402
  "hasDynamicHelp": false,
4390
4403
  "multiple": false,
4391
4404
  "type": "option"
4392
4405
  },
4406
+ "verbose": {
4407
+ "char": "v",
4408
+ "description": "Show detailed validation output",
4409
+ "name": "verbose",
4410
+ "allowNo": false,
4411
+ "type": "boolean"
4412
+ },
4393
4413
  "save-report": {
4394
- "description": "Save validation report to file",
4414
+ "description": "Save validation report as markdown file",
4395
4415
  "name": "save-report",
4396
4416
  "allowNo": false,
4397
4417
  "type": "boolean"
4398
4418
  },
4399
- "format": {
4400
- "char": "f",
4401
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4402
- "name": "format",
4403
- "hasDynamicHelp": false,
4404
- "multiple": false,
4405
- "options": [
4406
- "text",
4407
- "json",
4408
- "md",
4409
- "human",
4410
- "console",
4411
- "markdown",
4412
- "compact",
4413
- "table"
4414
- ],
4415
- "type": "option"
4416
- },
4417
4419
  "output": {
4418
- "char": "o",
4419
- "description": "Output file path",
4420
+ "description": "Output file path for validation report (default: validation-report.md)",
4420
4421
  "name": "output",
4421
4422
  "hasDynamicHelp": false,
4422
4423
  "multiple": false,
4423
4424
  "type": "option"
4424
- },
4425
- "verbose": {
4426
- "char": "v",
4427
- "description": "Show detailed information",
4428
- "name": "verbose",
4429
- "allowNo": false,
4430
- "type": "boolean"
4431
4425
  }
4432
4426
  },
4433
4427
  "hasDynamicHelp": false,
4434
4428
  "hiddenAliases": [],
4435
- "id": "test:validate",
4429
+ "id": "sync:validate",
4436
4430
  "pluginAlias": "@memberjunction/cli",
4437
4431
  "pluginName": "@memberjunction/cli",
4438
4432
  "pluginType": "core",
@@ -4442,96 +4436,52 @@
4442
4436
  "relativePath": [
4443
4437
  "dist",
4444
4438
  "commands",
4445
- "test",
4439
+ "sync",
4446
4440
  "validate.js"
4447
4441
  ]
4448
4442
  },
4449
- "translate-sql": {
4443
+ "sync:watch": {
4450
4444
  "aliases": [],
4451
4445
  "args": {},
4452
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
4446
+ "description": "Watch for file changes and sync automatically",
4453
4447
  "examples": [
4454
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
4455
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
4456
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
4457
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
4458
- ],
4459
- "flags": {
4460
- "from": {
4461
- "description": "Source SQL dialect",
4462
- "name": "from",
4463
- "required": true,
4464
- "hasDynamicHelp": false,
4465
- "multiple": false,
4466
- "options": [
4467
- "sqlserver",
4468
- "postgresql"
4469
- ],
4470
- "type": "option"
4471
- },
4472
- "to": {
4473
- "description": "Target SQL dialect",
4474
- "name": "to",
4475
- "required": true,
4476
- "hasDynamicHelp": false,
4477
- "multiple": false,
4478
- "options": [
4479
- "sqlserver",
4480
- "postgresql"
4481
- ],
4482
- "type": "option"
4483
- },
4484
- "scope": {
4485
- "description": "What to scan for translation",
4486
- "name": "scope",
4487
- "default": "all",
4448
+ "<%= config.bin %> <%= command.id %>",
4449
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4450
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
4451
+ "<%= config.bin %> <%= command.id %> --no-validate"
4452
+ ],
4453
+ "flags": {
4454
+ "dir": {
4455
+ "description": "Specific entity directory to watch",
4456
+ "name": "dir",
4488
4457
  "hasDynamicHelp": false,
4489
4458
  "multiple": false,
4490
- "options": [
4491
- "queries",
4492
- "views",
4493
- "filters",
4494
- "all"
4495
- ],
4496
4459
  "type": "option"
4497
4460
  },
4498
- "sql": {
4499
- "description": "Translate a single SQL fragment (inline mode)",
4500
- "name": "sql",
4461
+ "debounce": {
4462
+ "description": "Debounce delay in milliseconds (default: 500)",
4463
+ "name": "debounce",
4501
4464
  "hasDynamicHelp": false,
4502
4465
  "multiple": false,
4503
4466
  "type": "option"
4504
4467
  },
4505
- "dry-run": {
4506
- "description": "Show what would be translated without making changes",
4507
- "name": "dry-run",
4508
- "allowNo": false,
4509
- "type": "boolean"
4510
- },
4511
- "review": {
4512
- "description": "Generate review report only (no writes to database)",
4513
- "name": "review",
4468
+ "no-validate": {
4469
+ "description": "Skip validation before sync",
4470
+ "name": "no-validate",
4514
4471
  "allowNo": false,
4515
4472
  "type": "boolean"
4516
4473
  },
4517
- "output": {
4518
- "char": "o",
4519
- "description": "Output directory for the translation report",
4520
- "name": "output",
4521
- "hasDynamicHelp": false,
4522
- "multiple": false,
4523
- "type": "option"
4524
- },
4525
- "force": {
4526
- "description": "Re-translate even if platform variants already exist",
4527
- "name": "force",
4474
+ "verbose": {
4475
+ "char": "v",
4476
+ "description": "Show detailed output",
4477
+ "name": "verbose",
4528
4478
  "allowNo": false,
4529
4479
  "type": "boolean"
4530
4480
  }
4531
4481
  },
4532
4482
  "hasDynamicHelp": false,
4533
4483
  "hiddenAliases": [],
4534
- "id": "translate-sql",
4484
+ "id": "sync:watch",
4535
4485
  "pluginAlias": "@memberjunction/cli",
4536
4486
  "pluginName": "@memberjunction/cli",
4537
4487
  "pluginType": "core",
@@ -4541,31 +4491,114 @@
4541
4491
  "relativePath": [
4542
4492
  "dist",
4543
4493
  "commands",
4544
- "translate-sql",
4545
- "index.js"
4494
+ "sync",
4495
+ "watch.js"
4546
4496
  ]
4547
4497
  },
4548
- "translate-sql:usage": {
4498
+ "test:compare": {
4549
4499
  "aliases": [],
4550
- "args": {},
4551
- "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
4500
+ "args": {
4501
+ "runId1": {
4502
+ "description": "First test run ID to compare",
4503
+ "name": "runId1",
4504
+ "required": false
4505
+ },
4506
+ "runId2": {
4507
+ "description": "Second test run ID to compare",
4508
+ "name": "runId2",
4509
+ "required": false
4510
+ }
4511
+ },
4512
+ "description": "Compare test runs for regression detection",
4513
+ "examples": [
4514
+ "<%= config.bin %> <%= command.id %>",
4515
+ "<%= config.bin %> <%= command.id %> --latest",
4516
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
4517
+ "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
4518
+ "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
4519
+ "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
4520
+ "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
4521
+ ],
4552
4522
  "flags": {
4523
+ "version": {
4524
+ "char": "v",
4525
+ "description": "Compare runs by version",
4526
+ "name": "version",
4527
+ "hasDynamicHelp": false,
4528
+ "multiple": true,
4529
+ "type": "option"
4530
+ },
4531
+ "commit": {
4532
+ "char": "c",
4533
+ "description": "Compare runs by git commit",
4534
+ "name": "commit",
4535
+ "hasDynamicHelp": false,
4536
+ "multiple": true,
4537
+ "type": "option"
4538
+ },
4539
+ "diff-only": {
4540
+ "description": "Show only differences",
4541
+ "name": "diff-only",
4542
+ "allowNo": false,
4543
+ "type": "boolean"
4544
+ },
4545
+ "latest": {
4546
+ "char": "l",
4547
+ "description": "Compare the two most recent completed suite runs",
4548
+ "name": "latest",
4549
+ "allowNo": false,
4550
+ "type": "boolean"
4551
+ },
4552
+ "from-json": {
4553
+ "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
4554
+ "name": "from-json",
4555
+ "hasDynamicHelp": false,
4556
+ "multiple": true,
4557
+ "type": "option"
4558
+ },
4553
4559
  "format": {
4554
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4560
+ "char": "f",
4561
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4555
4562
  "name": "format",
4556
4563
  "hasDynamicHelp": false,
4557
4564
  "multiple": false,
4558
4565
  "options": [
4559
4566
  "text",
4560
4567
  "json",
4561
- "md"
4568
+ "md",
4569
+ "human",
4570
+ "console",
4571
+ "markdown",
4572
+ "compact",
4573
+ "table"
4562
4574
  ],
4563
4575
  "type": "option"
4576
+ },
4577
+ "output": {
4578
+ "char": "o",
4579
+ "description": "Output file path",
4580
+ "name": "output",
4581
+ "hasDynamicHelp": false,
4582
+ "multiple": false,
4583
+ "type": "option"
4584
+ },
4585
+ "verbose": {
4586
+ "description": "Show detailed information",
4587
+ "name": "verbose",
4588
+ "allowNo": false,
4589
+ "type": "boolean"
4590
+ },
4591
+ "tag": {
4592
+ "description": "Filter suite runs by tag (matches against MJTestSuiteRunEntity.Tags). Useful for isolating runs from a specific source environment in an archive MJ. DB mode only — --from-json ignores this flag.",
4593
+ "name": "tag",
4594
+ "hasDynamicHelp": false,
4595
+ "multiple": false,
4596
+ "type": "option"
4564
4597
  }
4565
4598
  },
4566
4599
  "hasDynamicHelp": false,
4567
4600
  "hiddenAliases": [],
4568
- "id": "translate-sql:usage",
4601
+ "id": "test:compare",
4569
4602
  "pluginAlias": "@memberjunction/cli",
4570
4603
  "pluginName": "@memberjunction/cli",
4571
4604
  "pluginType": "core",
@@ -4575,135 +4608,90 @@
4575
4608
  "relativePath": [
4576
4609
  "dist",
4577
4610
  "commands",
4578
- "translate-sql",
4579
- "usage.js"
4611
+ "test",
4612
+ "compare.js"
4580
4613
  ]
4581
4614
  },
4582
- "update:claude": {
4615
+ "test:history": {
4583
4616
  "aliases": [],
4584
4617
  "args": {},
4585
- "description": "Update the Claude Code pack in the current directory.",
4618
+ "description": "View test execution history",
4586
4619
  "examples": [
4587
- "<%= config.bin %> update:claude",
4588
- "<%= config.bin %> update:claude --check",
4589
- "<%= config.bin %> update:claude --refresh-commands",
4590
- "<%= config.bin %> update:claude --allow-major",
4591
- "<%= config.bin %> update:claude --json"
4620
+ "<%= config.bin %> <%= command.id %>",
4621
+ "<%= config.bin %> <%= command.id %> --test=<test-id>",
4622
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
4623
+ "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
4624
+ "<%= config.bin %> <%= command.id %> --limit=50"
4592
4625
  ],
4593
4626
  "flags": {
4594
- "dir": {
4595
- "description": "Target directory",
4596
- "name": "dir",
4597
- "default": ".",
4627
+ "test": {
4628
+ "char": "t",
4629
+ "description": "Filter by test ID",
4630
+ "name": "test",
4598
4631
  "hasDynamicHelp": false,
4599
4632
  "multiple": false,
4600
4633
  "type": "option"
4601
4634
  },
4602
- "major": {
4603
- "description": "Force a specific MJ major (default: detected from package.json)",
4604
- "name": "major",
4635
+ "recent": {
4636
+ "char": "r",
4637
+ "description": "Number of recent runs to show",
4638
+ "name": "recent",
4605
4639
  "hasDynamicHelp": false,
4606
4640
  "multiple": false,
4607
4641
  "type": "option"
4608
4642
  },
4609
- "ref": {
4610
- "description": "Git ref to fetch from (branch or tag). Default: main.",
4611
- "name": "ref",
4643
+ "from": {
4644
+ "description": "Show history from date (YYYY-MM-DD)",
4645
+ "name": "from",
4612
4646
  "hasDynamicHelp": false,
4613
4647
  "multiple": false,
4614
4648
  "type": "option"
4615
4649
  },
4616
- "from": {
4617
- "description": "Use a local pack source instead of fetching from GitHub",
4618
- "name": "from",
4650
+ "status": {
4651
+ "char": "s",
4652
+ "description": "Filter by status",
4653
+ "name": "status",
4619
4654
  "hasDynamicHelp": false,
4620
4655
  "multiple": false,
4621
4656
  "type": "option"
4622
4657
  },
4623
- "offline": {
4624
- "description": "Forbid network; requires --from <path>",
4625
- "name": "offline",
4626
- "allowNo": false,
4627
- "type": "boolean"
4628
- },
4629
- "dry-run": {
4630
- "description": "Print what would be written; change nothing",
4631
- "name": "dry-run",
4632
- "allowNo": false,
4633
- "type": "boolean"
4634
- },
4635
- "yes": {
4636
- "char": "y",
4637
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
4638
- "name": "yes",
4639
- "allowNo": false,
4640
- "type": "boolean"
4641
- },
4642
- "force": {
4643
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
4644
- "name": "force",
4645
- "allowNo": false,
4646
- "type": "boolean"
4647
- },
4648
- "skip-commands": {
4649
- "description": "Skip seeding .claude/commands/",
4650
- "name": "skip-commands",
4651
- "allowNo": false,
4652
- "type": "boolean"
4653
- },
4654
- "skip-skills": {
4655
- "description": "Skip seeding .claude/skills/",
4656
- "name": "skip-skills",
4657
- "allowNo": false,
4658
- "type": "boolean"
4659
- },
4660
- "skip-settings": {
4661
- "description": "Skip merging .claude/settings.json",
4662
- "name": "skip-settings",
4663
- "allowNo": false,
4664
- "type": "boolean"
4665
- },
4666
- "check": {
4667
- "description": "Compare local pack version to remote without writing anything",
4668
- "name": "check",
4669
- "allowNo": false,
4670
- "type": "boolean"
4671
- },
4672
- "refresh-commands": {
4673
- "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
4674
- "name": "refresh-commands",
4675
- "allowNo": false,
4676
- "type": "boolean"
4677
- },
4678
- "refresh-skills": {
4679
- "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
4680
- "name": "refresh-skills",
4681
- "allowNo": false,
4682
- "type": "boolean"
4683
- },
4684
- "allow-major": {
4685
- "description": "Allow the remote pack's major to differ from local MJ's major",
4686
- "name": "allow-major",
4687
- "allowNo": false,
4688
- "type": "boolean"
4689
- },
4690
- "json": {
4691
- "description": "Output as JSON (matches plan §7.5 schema)",
4692
- "name": "json",
4693
- "allowNo": false,
4694
- "type": "boolean"
4695
- },
4696
- "verbose": {
4697
- "char": "v",
4698
- "description": "Show progress messages",
4699
- "name": "verbose",
4658
+ "format": {
4659
+ "char": "f",
4660
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4661
+ "name": "format",
4662
+ "hasDynamicHelp": false,
4663
+ "multiple": false,
4664
+ "options": [
4665
+ "text",
4666
+ "json",
4667
+ "md",
4668
+ "human",
4669
+ "console",
4670
+ "markdown",
4671
+ "compact",
4672
+ "table"
4673
+ ],
4674
+ "type": "option"
4675
+ },
4676
+ "output": {
4677
+ "char": "o",
4678
+ "description": "Output file path",
4679
+ "name": "output",
4680
+ "hasDynamicHelp": false,
4681
+ "multiple": false,
4682
+ "type": "option"
4683
+ },
4684
+ "verbose": {
4685
+ "char": "v",
4686
+ "description": "Show detailed information",
4687
+ "name": "verbose",
4700
4688
  "allowNo": false,
4701
4689
  "type": "boolean"
4702
4690
  }
4703
4691
  },
4704
4692
  "hasDynamicHelp": false,
4705
4693
  "hiddenAliases": [],
4706
- "id": "update:claude",
4694
+ "id": "test:history",
4707
4695
  "pluginAlias": "@memberjunction/cli",
4708
4696
  "pluginName": "@memberjunction/cli",
4709
4697
  "pluginType": "core",
@@ -4713,31 +4701,26 @@
4713
4701
  "relativePath": [
4714
4702
  "dist",
4715
4703
  "commands",
4716
- "update",
4717
- "claude.js"
4704
+ "test",
4705
+ "history.js"
4718
4706
  ]
4719
4707
  },
4720
- "update:usage": {
4708
+ "test": {
4721
4709
  "aliases": [],
4722
4710
  "args": {},
4723
- "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
4724
- "flags": {
4725
- "format": {
4726
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4727
- "name": "format",
4728
- "hasDynamicHelp": false,
4729
- "multiple": false,
4730
- "options": [
4731
- "text",
4732
- "json",
4733
- "md"
4734
- ],
4735
- "type": "option"
4736
- }
4737
- },
4711
+ "description": "MemberJunction Testing Framework - Execute and manage tests",
4712
+ "examples": [
4713
+ "<%= config.bin %> <%= command.id %> run <test-id>",
4714
+ "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
4715
+ "<%= config.bin %> <%= command.id %> suite <suite-id>",
4716
+ "<%= config.bin %> <%= command.id %> list",
4717
+ "<%= config.bin %> <%= command.id %> list --suites",
4718
+ "<%= config.bin %> <%= command.id %> validate --all"
4719
+ ],
4720
+ "flags": {},
4738
4721
  "hasDynamicHelp": false,
4739
4722
  "hiddenAliases": [],
4740
- "id": "update:usage",
4723
+ "id": "test",
4741
4724
  "pluginAlias": "@memberjunction/cli",
4742
4725
  "pluginName": "@memberjunction/cli",
4743
4726
  "pluginType": "core",
@@ -4747,56 +4730,87 @@
4747
4730
  "relativePath": [
4748
4731
  "dist",
4749
4732
  "commands",
4750
- "update",
4751
- "usage.js"
4733
+ "test",
4734
+ "index.js"
4752
4735
  ]
4753
4736
  },
4754
- "sync:file-reset": {
4737
+ "test:list": {
4755
4738
  "aliases": [],
4756
4739
  "args": {},
4757
- "description": "Reset file metadata sections",
4740
+ "description": "List available tests, suites, and types",
4758
4741
  "examples": [
4759
4742
  "<%= config.bin %> <%= command.id %>",
4760
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4761
- "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
4762
- "<%= config.bin %> <%= command.id %> --all"
4743
+ "<%= config.bin %> <%= command.id %> --suites",
4744
+ "<%= config.bin %> <%= command.id %> --types",
4745
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
4746
+ "<%= config.bin %> <%= command.id %> --tag=smoke",
4747
+ "<%= config.bin %> <%= command.id %> --status=active --verbose"
4763
4748
  ],
4764
4749
  "flags": {
4765
- "dir": {
4766
- "description": "Specific entity directory to reset",
4767
- "name": "dir",
4750
+ "suites": {
4751
+ "description": "List test suites instead of tests",
4752
+ "name": "suites",
4753
+ "allowNo": false,
4754
+ "type": "boolean"
4755
+ },
4756
+ "types": {
4757
+ "description": "List test types",
4758
+ "name": "types",
4759
+ "allowNo": false,
4760
+ "type": "boolean"
4761
+ },
4762
+ "type": {
4763
+ "char": "t",
4764
+ "description": "Filter by test type",
4765
+ "name": "type",
4768
4766
  "hasDynamicHelp": false,
4769
4767
  "multiple": false,
4770
4768
  "type": "option"
4771
4769
  },
4772
- "sections": {
4773
- "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
4774
- "name": "sections",
4770
+ "tag": {
4771
+ "description": "Filter by tag",
4772
+ "name": "tag",
4775
4773
  "hasDynamicHelp": false,
4776
4774
  "multiple": false,
4777
4775
  "type": "option"
4778
4776
  },
4779
- "all": {
4780
- "description": "Reset all metadata sections",
4781
- "name": "all",
4782
- "allowNo": false,
4783
- "type": "boolean"
4777
+ "status": {
4778
+ "char": "s",
4779
+ "description": "Filter by status",
4780
+ "name": "status",
4781
+ "hasDynamicHelp": false,
4782
+ "multiple": false,
4783
+ "type": "option"
4784
4784
  },
4785
- "dry-run": {
4786
- "description": "Show what would be reset without actually resetting",
4787
- "name": "dry-run",
4788
- "allowNo": false,
4789
- "type": "boolean"
4785
+ "format": {
4786
+ "char": "f",
4787
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4788
+ "name": "format",
4789
+ "hasDynamicHelp": false,
4790
+ "multiple": false,
4791
+ "options": [
4792
+ "text",
4793
+ "json",
4794
+ "md",
4795
+ "human",
4796
+ "console",
4797
+ "markdown",
4798
+ "compact",
4799
+ "table"
4800
+ ],
4801
+ "type": "option"
4790
4802
  },
4791
- "force": {
4792
- "description": "Skip confirmation prompts",
4793
- "name": "force",
4794
- "allowNo": false,
4795
- "type": "boolean"
4803
+ "output": {
4804
+ "char": "o",
4805
+ "description": "Output file path",
4806
+ "name": "output",
4807
+ "hasDynamicHelp": false,
4808
+ "multiple": false,
4809
+ "type": "option"
4796
4810
  },
4797
4811
  "verbose": {
4798
4812
  "char": "v",
4799
- "description": "Show detailed output",
4813
+ "description": "Show detailed information",
4800
4814
  "name": "verbose",
4801
4815
  "allowNo": false,
4802
4816
  "type": "boolean"
@@ -4804,7 +4818,7 @@
4804
4818
  },
4805
4819
  "hasDynamicHelp": false,
4806
4820
  "hiddenAliases": [],
4807
- "id": "sync:file-reset",
4821
+ "id": "test:list",
4808
4822
  "pluginAlias": "@memberjunction/cli",
4809
4823
  "pluginName": "@memberjunction/cli",
4810
4824
  "pluginType": "core",
@@ -4814,69 +4828,101 @@
4814
4828
  "relativePath": [
4815
4829
  "dist",
4816
4830
  "commands",
4817
- "sync",
4818
- "file-reset.js"
4831
+ "test",
4832
+ "list.js"
4819
4833
  ]
4820
4834
  },
4821
- "sync:init": {
4835
+ "test:run": {
4822
4836
  "aliases": [],
4823
- "args": {},
4824
- "description": "Initialize a directory for metadata synchronization.\n\nPrompts at a terminal; runs unattended when piped, spawned, or in CI. To script it,\npass --setup-entity (and --entity/--dir when setting up \"other\").",
4825
- "examples": [
4826
- {
4827
- "command": "<%= config.bin %> <%= command.id %> --setup-entity=no",
4828
- "description": "Initialize with no entity directory"
4829
- },
4830
- {
4831
- "command": "<%= config.bin %> <%= command.id %> --setup-entity=ai-prompts",
4832
- "description": "Initialize and set up the AI Prompts directory"
4833
- },
4834
- {
4835
- "command": "<%= config.bin %> <%= command.id %> --setup-entity=other --entity=\"MJ: AI Models\" --dir=ai-models",
4836
- "description": "Initialize for an arbitrary entity"
4837
- },
4838
- {
4839
- "command": "<%= config.bin %> <%= command.id %> --no-interactive --setup-entity=no",
4840
- "description": "Never prompt, even at a terminal"
4837
+ "args": {
4838
+ "testId": {
4839
+ "description": "Test ID to execute",
4840
+ "name": "testId",
4841
+ "required": false
4841
4842
  }
4843
+ },
4844
+ "description": "Execute a single test by ID or name",
4845
+ "examples": [
4846
+ "<%= config.bin %> <%= command.id %> <test-id>",
4847
+ "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
4848
+ "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
4849
+ "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
4850
+ "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
4842
4851
  ],
4843
4852
  "flags": {
4844
- "setup-entity": {
4845
- "description": "Which entity directory to set up. Use \"no\" to skip.",
4846
- "name": "setup-entity",
4853
+ "name": {
4854
+ "char": "n",
4855
+ "description": "Test name to execute",
4856
+ "name": "name",
4847
4857
  "hasDynamicHelp": false,
4848
4858
  "multiple": false,
4849
- "options": [
4850
- "ai-prompts",
4851
- "other",
4852
- "no"
4853
- ],
4854
4859
  "type": "option"
4855
4860
  },
4856
- "entity": {
4857
- "description": "Entity name when --setup-entity=other (e.g. \"MJ: AI Models\").",
4858
- "name": "entity",
4861
+ "environment": {
4862
+ "char": "e",
4863
+ "description": "Environment context (dev, staging, prod)",
4864
+ "name": "environment",
4859
4865
  "hasDynamicHelp": false,
4860
4866
  "multiple": false,
4861
4867
  "type": "option"
4862
4868
  },
4863
- "dir": {
4864
- "description": "Directory name when --setup-entity=other. Defaults to a slug of --entity.",
4865
- "name": "dir",
4869
+ "format": {
4870
+ "char": "f",
4871
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4872
+ "name": "format",
4873
+ "hasDynamicHelp": false,
4874
+ "multiple": false,
4875
+ "options": [
4876
+ "text",
4877
+ "json",
4878
+ "md",
4879
+ "human",
4880
+ "console",
4881
+ "markdown",
4882
+ "compact",
4883
+ "table"
4884
+ ],
4885
+ "type": "option"
4886
+ },
4887
+ "output": {
4888
+ "char": "o",
4889
+ "description": "Output file path",
4890
+ "name": "output",
4866
4891
  "hasDynamicHelp": false,
4867
4892
  "multiple": false,
4868
4893
  "type": "option"
4869
4894
  },
4870
- "overwrite": {
4871
- "description": "Overwrite an existing configuration. Without this, an initialized directory is left untouched.",
4872
- "name": "overwrite",
4873
- "allowNo": true,
4895
+ "dry-run": {
4896
+ "description": "Validate without executing",
4897
+ "name": "dry-run",
4898
+ "allowNo": false,
4899
+ "type": "boolean"
4900
+ },
4901
+ "verbose": {
4902
+ "char": "v",
4903
+ "description": "Show detailed execution information",
4904
+ "name": "verbose",
4905
+ "allowNo": false,
4874
4906
  "type": "boolean"
4907
+ },
4908
+ "checks-module": {
4909
+ "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
4910
+ "name": "checks-module",
4911
+ "hasDynamicHelp": false,
4912
+ "multiple": false,
4913
+ "type": "option"
4914
+ },
4915
+ "oracles-module": {
4916
+ "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the test runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
4917
+ "name": "oracles-module",
4918
+ "hasDynamicHelp": false,
4919
+ "multiple": false,
4920
+ "type": "option"
4875
4921
  }
4876
4922
  },
4877
4923
  "hasDynamicHelp": false,
4878
4924
  "hiddenAliases": [],
4879
- "id": "sync:init",
4925
+ "id": "test:run",
4880
4926
  "pluginAlias": "@memberjunction/cli",
4881
4927
  "pluginName": "@memberjunction/cli",
4882
4928
  "pluginType": "core",
@@ -4886,22 +4932,38 @@
4886
4932
  "relativePath": [
4887
4933
  "dist",
4888
4934
  "commands",
4889
- "sync",
4890
- "init.js"
4935
+ "test",
4936
+ "run.js"
4891
4937
  ]
4892
4938
  },
4893
- "sync:pull": {
4939
+ "test:suite": {
4894
4940
  "aliases": [],
4895
- "args": {},
4896
- "description": "Pull metadata from database to local files",
4941
+ "args": {
4942
+ "suiteId": {
4943
+ "description": "Test suite ID to execute",
4944
+ "name": "suiteId",
4945
+ "required": false
4946
+ }
4947
+ },
4948
+ "description": "Execute a test suite",
4897
4949
  "examples": [
4898
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
4899
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
4900
- "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
4950
+ "<%= config.bin %> <%= command.id %> <suite-id>",
4951
+ "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
4952
+ "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
4953
+ "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
4901
4954
  ],
4902
4955
  "flags": {
4956
+ "name": {
4957
+ "char": "n",
4958
+ "description": "Test suite name to execute",
4959
+ "name": "name",
4960
+ "hasDynamicHelp": false,
4961
+ "multiple": false,
4962
+ "type": "option"
4963
+ },
4903
4964
  "format": {
4904
- "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
4965
+ "char": "f",
4966
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4905
4967
  "name": "format",
4906
4968
  "hasDynamicHelp": false,
4907
4969
  "multiple": false,
@@ -4911,137 +4973,68 @@
4911
4973
  "md",
4912
4974
  "human",
4913
4975
  "console",
4914
- "markdown"
4976
+ "markdown",
4977
+ "compact",
4978
+ "table"
4915
4979
  ],
4916
4980
  "type": "option"
4917
4981
  },
4918
- "verbose": {
4919
- "char": "v",
4920
- "description": "Show detailed output",
4921
- "name": "verbose",
4922
- "allowNo": false,
4923
- "type": "boolean"
4924
- },
4925
- "no-banner": {
4926
- "description": "Suppress the startup banner and runtime advisory",
4927
- "name": "no-banner",
4928
- "allowNo": false,
4929
- "type": "boolean"
4930
- },
4931
- "no-app-packages": {
4932
- "description": "Do not load installed Open App server packages (or the host's generated packages) for this run, so records are written with the generic BaseEntity — no custom Save() logic or lifecycle hooks.",
4933
- "name": "no-app-packages",
4934
- "allowNo": false,
4935
- "type": "boolean"
4936
- },
4937
- "interactive": {
4938
- "description": "Allow interactive prompts. Defaults to on at a terminal and off when piped, spawned, or in CI, so an agent never hangs on a question. Use --no-interactive to force it off.",
4939
- "name": "interactive",
4940
- "allowNo": true,
4941
- "type": "boolean"
4942
- },
4943
- "entity": {
4944
- "description": "Entity name to pull",
4945
- "name": "entity",
4946
- "required": true,
4947
- "hasDynamicHelp": false,
4948
- "multiple": false,
4949
- "type": "option"
4950
- },
4951
- "filter": {
4952
- "description": "Additional filter for pulling specific records",
4953
- "name": "filter",
4982
+ "output": {
4983
+ "char": "o",
4984
+ "description": "Output file path",
4985
+ "name": "output",
4954
4986
  "hasDynamicHelp": false,
4955
4987
  "multiple": false,
4956
4988
  "type": "option"
4957
4989
  },
4958
- "dry-run": {
4959
- "description": "Show what would be pulled without actually pulling",
4960
- "name": "dry-run",
4990
+ "verbose": {
4991
+ "char": "v",
4992
+ "description": "Show detailed execution information",
4993
+ "name": "verbose",
4961
4994
  "allowNo": false,
4962
4995
  "type": "boolean"
4963
4996
  },
4964
- "multi-file": {
4965
- "description": "Create a single file with multiple records (provide filename)",
4966
- "name": "multi-file",
4997
+ "delay": {
4998
+ "char": "d",
4999
+ "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
5000
+ "name": "delay",
5001
+ "default": 0,
4967
5002
  "hasDynamicHelp": false,
4968
5003
  "multiple": false,
4969
5004
  "type": "option"
4970
5005
  },
4971
- "no-validate": {
4972
- "description": "Skip validation before pull",
4973
- "name": "no-validate",
4974
- "allowNo": false,
4975
- "type": "boolean"
4976
- },
4977
- "update-existing": {
4978
- "description": "Update existing records during pull",
4979
- "name": "update-existing",
4980
- "allowNo": false,
4981
- "type": "boolean"
4982
- },
4983
- "create-new": {
4984
- "description": "Create new files for records not found locally",
4985
- "name": "create-new",
4986
- "allowNo": false,
4987
- "type": "boolean"
4988
- },
4989
- "backup-before-update": {
4990
- "description": "Create backups before updating files",
4991
- "name": "backup-before-update",
5006
+ "parallel": {
5007
+ "char": "p",
5008
+ "description": "Run tests in parallel with shared browser sessions",
5009
+ "name": "parallel",
4992
5010
  "allowNo": false,
4993
5011
  "type": "boolean"
4994
5012
  },
4995
- "merge-strategy": {
4996
- "description": "Merge strategy for updates",
4997
- "name": "merge-strategy",
4998
- "default": "merge",
5013
+ "max-parallel": {
5014
+ "description": "Maximum number of parallel workers (default 4)",
5015
+ "name": "max-parallel",
5016
+ "default": 4,
4999
5017
  "hasDynamicHelp": false,
5000
5018
  "multiple": false,
5001
- "options": [
5002
- "merge",
5003
- "overwrite",
5004
- "skip"
5005
- ],
5006
5019
  "type": "option"
5007
5020
  },
5008
- "backup-directory": {
5009
- "description": "Custom backup directory (default: .backups)",
5010
- "name": "backup-directory",
5021
+ "flaky-check": {
5022
+ "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
5023
+ "name": "flaky-check",
5011
5024
  "hasDynamicHelp": false,
5012
5025
  "multiple": false,
5013
5026
  "type": "option"
5014
5027
  },
5015
- "preserve-fields": {
5016
- "description": "Comma-separated list of fields to preserve during updates",
5017
- "name": "preserve-fields",
5018
- "hasDynamicHelp": false,
5019
- "multiple": true,
5020
- "type": "option"
5021
- },
5022
- "exclude-fields": {
5023
- "description": "Comma-separated list of fields to exclude from pull",
5024
- "name": "exclude-fields",
5025
- "hasDynamicHelp": false,
5026
- "multiple": true,
5027
- "type": "option"
5028
- },
5029
- "target-dir": {
5030
- "description": "Specific target directory (overrides auto-discovery)",
5031
- "name": "target-dir",
5028
+ "checks-module": {
5029
+ "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
5030
+ "name": "checks-module",
5032
5031
  "hasDynamicHelp": false,
5033
5032
  "multiple": false,
5034
5033
  "type": "option"
5035
5034
  },
5036
- "incremental": {
5037
- "description": "Only pull records updated since last successful pull",
5038
- "name": "incremental",
5039
- "allowNo": false,
5040
- "type": "boolean"
5041
- },
5042
- "since": {
5043
- "description": "Only pull records updated after this ISO 8601 timestamp",
5044
- "name": "since",
5035
+ "oracles-module": {
5036
+ "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the suite runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
5037
+ "name": "oracles-module",
5045
5038
  "hasDynamicHelp": false,
5046
5039
  "multiple": false,
5047
5040
  "type": "option"
@@ -5049,284 +5042,229 @@
5049
5042
  },
5050
5043
  "hasDynamicHelp": false,
5051
5044
  "hiddenAliases": [],
5052
- "id": "sync:pull",
5045
+ "id": "test:suite",
5053
5046
  "pluginAlias": "@memberjunction/cli",
5054
5047
  "pluginName": "@memberjunction/cli",
5055
5048
  "pluginType": "core",
5056
5049
  "strict": true,
5057
5050
  "enableJsonFlag": false,
5058
- "Usage": {
5059
- "domain": "sync",
5060
- "command": "sync:pull",
5061
- "summary": "Pull database records into local metadata files.",
5062
- "description": "Writes records of --entity into the matching entity directory, creating or updating files per the merge strategy.",
5063
- "flags": [
5064
- {
5065
- "name": "--entity",
5066
- "type": "string",
5067
- "description": "Entity name to pull (required)"
5068
- },
5069
- {
5070
- "name": "--filter",
5071
- "type": "string",
5072
- "description": "Extra SQL filter for which records to pull"
5073
- },
5074
- {
5075
- "name": "--merge-strategy",
5076
- "type": "merge|overwrite|skip",
5077
- "description": "How to reconcile existing files"
5078
- },
5079
- {
5080
- "name": "--dry-run",
5081
- "type": "boolean",
5082
- "description": "Report what would be pulled without writing"
5083
- },
5084
- {
5085
- "name": "--format",
5086
- "type": "text|json|md",
5087
- "description": "Output format (json for machine-readable result)"
5088
- }
5089
- ],
5090
- "examples": [
5091
- "mj sync pull --entity=\"MJ: AI Prompts\"",
5092
- "mj sync pull --entity=\"Actions\" --format=json"
5093
- ],
5094
- "runtime": {
5095
- "class": "variable",
5096
- "typicalSeconds": 15,
5097
- "note": "scales with number of records matched for --entity"
5098
- }
5099
- },
5100
5051
  "isESM": true,
5101
5052
  "relativePath": [
5102
5053
  "dist",
5103
5054
  "commands",
5104
- "sync",
5105
- "pull.js"
5055
+ "test",
5056
+ "suite.js"
5106
5057
  ]
5107
5058
  },
5108
- "sync:push": {
5059
+ "test:usage": {
5109
5060
  "aliases": [],
5110
5061
  "args": {},
5111
- "description": "Push local file changes to the database",
5112
- "examples": [
5113
- "<%= config.bin %> <%= command.id %>",
5114
- "<%= config.bin %> <%= command.id %> --dry-run",
5115
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5116
- "<%= config.bin %> <%= command.id %> --ci --format=json"
5117
- ],
5062
+ "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
5118
5063
  "flags": {
5119
5064
  "format": {
5120
- "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
5065
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5121
5066
  "name": "format",
5122
5067
  "hasDynamicHelp": false,
5123
5068
  "multiple": false,
5124
5069
  "options": [
5125
5070
  "text",
5126
5071
  "json",
5127
- "md",
5128
- "human",
5129
- "console",
5130
- "markdown"
5072
+ "md"
5131
5073
  ],
5132
5074
  "type": "option"
5133
- },
5134
- "verbose": {
5135
- "char": "v",
5136
- "description": "Show detailed output",
5137
- "name": "verbose",
5138
- "allowNo": false,
5139
- "type": "boolean"
5140
- },
5141
- "no-banner": {
5142
- "description": "Suppress the startup banner and runtime advisory",
5143
- "name": "no-banner",
5144
- "allowNo": false,
5145
- "type": "boolean"
5146
- },
5147
- "no-app-packages": {
5148
- "description": "Do not load installed Open App server packages (or the host's generated packages) for this run, so records are written with the generic BaseEntity — no custom Save() logic or lifecycle hooks.",
5149
- "name": "no-app-packages",
5075
+ }
5076
+ },
5077
+ "hasDynamicHelp": false,
5078
+ "hiddenAliases": [],
5079
+ "id": "test:usage",
5080
+ "pluginAlias": "@memberjunction/cli",
5081
+ "pluginName": "@memberjunction/cli",
5082
+ "pluginType": "core",
5083
+ "strict": true,
5084
+ "enableJsonFlag": false,
5085
+ "isESM": true,
5086
+ "relativePath": [
5087
+ "dist",
5088
+ "commands",
5089
+ "test",
5090
+ "usage.js"
5091
+ ]
5092
+ },
5093
+ "test:validate": {
5094
+ "aliases": [],
5095
+ "args": {
5096
+ "testId": {
5097
+ "description": "Test ID to validate",
5098
+ "name": "testId",
5099
+ "required": false
5100
+ }
5101
+ },
5102
+ "description": "Validate test definitions without executing",
5103
+ "examples": [
5104
+ "<%= config.bin %> <%= command.id %> <test-id>",
5105
+ "<%= config.bin %> <%= command.id %> --all",
5106
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
5107
+ "<%= config.bin %> <%= command.id %> --all --save-report",
5108
+ "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
5109
+ ],
5110
+ "flags": {
5111
+ "all": {
5112
+ "char": "a",
5113
+ "description": "Validate all tests",
5114
+ "name": "all",
5150
5115
  "allowNo": false,
5151
5116
  "type": "boolean"
5152
5117
  },
5153
- "interactive": {
5154
- "description": "Allow interactive prompts. Defaults to on at a terminal and off when piped, spawned, or in CI, so an agent never hangs on a question. Use --no-interactive to force it off.",
5155
- "name": "interactive",
5156
- "allowNo": true,
5157
- "type": "boolean"
5158
- },
5159
- "dir": {
5160
- "description": "Specific entity directory to push",
5161
- "name": "dir",
5118
+ "type": {
5119
+ "char": "t",
5120
+ "description": "Validate tests by type",
5121
+ "name": "type",
5162
5122
  "hasDynamicHelp": false,
5163
5123
  "multiple": false,
5164
5124
  "type": "option"
5165
5125
  },
5166
- "dry-run": {
5167
- "description": "Show what would be pushed without actually pushing",
5168
- "name": "dry-run",
5169
- "allowNo": false,
5170
- "type": "boolean"
5171
- },
5172
- "ci": {
5173
- "description": "CI mode - no prompts, fail on issues",
5174
- "name": "ci",
5175
- "allowNo": false,
5176
- "type": "boolean"
5177
- },
5178
- "no-validate": {
5179
- "description": "Skip validation before push",
5180
- "name": "no-validate",
5181
- "allowNo": false,
5182
- "type": "boolean"
5183
- },
5184
- "delete-db-only": {
5185
- "description": "Delete database-only records that reference records being deleted (prevents FK errors)",
5186
- "name": "delete-db-only",
5126
+ "save-report": {
5127
+ "description": "Save validation report to file",
5128
+ "name": "save-report",
5187
5129
  "allowNo": false,
5188
5130
  "type": "boolean"
5189
5131
  },
5190
- "parallel-batch-size": {
5191
- "description": "JSON-root graphs to process in parallel (default: 10, not 1)",
5192
- "name": "parallel-batch-size",
5193
- "default": 10,
5194
- "hasDynamicHelp": false,
5195
- "multiple": false,
5196
- "type": "option"
5197
- },
5198
- "include": {
5199
- "description": "Only process these directories (comma-separated, supports patterns)",
5200
- "name": "include",
5132
+ "format": {
5133
+ "char": "f",
5134
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
5135
+ "name": "format",
5201
5136
  "hasDynamicHelp": false,
5202
5137
  "multiple": false,
5138
+ "options": [
5139
+ "text",
5140
+ "json",
5141
+ "md",
5142
+ "human",
5143
+ "console",
5144
+ "markdown",
5145
+ "compact",
5146
+ "table"
5147
+ ],
5203
5148
  "type": "option"
5204
5149
  },
5205
- "exclude": {
5206
- "description": "Skip these directories (comma-separated, supports patterns)",
5207
- "name": "exclude",
5150
+ "output": {
5151
+ "char": "o",
5152
+ "description": "Output file path",
5153
+ "name": "output",
5208
5154
  "hasDynamicHelp": false,
5209
5155
  "multiple": false,
5210
5156
  "type": "option"
5211
5157
  },
5212
- "incremental": {
5213
- "description": "Skip unchanged files using stored checksums from last push",
5214
- "name": "incremental",
5215
- "allowNo": false,
5216
- "type": "boolean"
5217
- },
5218
- "change-detail": {
5219
- "description": "Write a detailed per-record change report (primary keys + field diffs) to a file",
5220
- "name": "change-detail",
5158
+ "verbose": {
5159
+ "char": "v",
5160
+ "description": "Show detailed information",
5161
+ "name": "verbose",
5221
5162
  "allowNo": false,
5222
5163
  "type": "boolean"
5223
5164
  }
5224
5165
  },
5225
5166
  "hasDynamicHelp": false,
5226
5167
  "hiddenAliases": [],
5227
- "id": "sync:push",
5168
+ "id": "test:validate",
5228
5169
  "pluginAlias": "@memberjunction/cli",
5229
5170
  "pluginName": "@memberjunction/cli",
5230
5171
  "pluginType": "core",
5231
5172
  "strict": true,
5232
5173
  "enableJsonFlag": false,
5233
- "Usage": {
5234
- "domain": "sync",
5235
- "command": "sync:push",
5236
- "summary": "Push local metadata files to the database (upsert).",
5237
- "description": "Reads entity directories under --dir and creates/updates matching records. Runs validation first unless --no-validate.",
5238
- "flags": [
5239
- {
5240
- "name": "--dir",
5241
- "type": "string",
5242
- "description": "Entity directory to push"
5243
- },
5244
- {
5245
- "name": "--dry-run",
5246
- "type": "boolean",
5247
- "description": "Report what would change without writing"
5248
- },
5249
- {
5250
- "name": "--ci",
5251
- "type": "boolean",
5252
- "description": "No prompts; non-zero exit on error"
5253
- },
5254
- {
5255
- "name": "--no-validate",
5256
- "type": "boolean",
5257
- "description": "Skip pre-push validation"
5258
- },
5259
- {
5260
- "name": "--incremental",
5261
- "type": "boolean",
5262
- "description": "Skip unchanged files using stored checksums"
5263
- },
5264
- {
5265
- "name": "--format",
5266
- "type": "text|json|md",
5267
- "description": "Output format (json for machine-readable result)"
5268
- }
5269
- ],
5270
- "examples": [
5271
- "mj sync push --dir=ai-agents",
5272
- "mj sync push --ci --format=json"
5273
- ],
5274
- "runtime": {
5275
- "class": "variable",
5276
- "typicalSeconds": 20,
5277
- "note": "scales with number of records in --dir"
5278
- }
5279
- },
5280
5174
  "isESM": true,
5281
5175
  "relativePath": [
5282
5176
  "dist",
5283
5177
  "commands",
5284
- "sync",
5285
- "push.js"
5178
+ "test",
5179
+ "validate.js"
5286
5180
  ]
5287
5181
  },
5288
- "sync:status": {
5182
+ "translate-sql": {
5289
5183
  "aliases": [],
5290
5184
  "args": {},
5291
- "description": "Show status of local files vs database",
5185
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
5292
5186
  "examples": [
5293
- "<%= config.bin %> <%= command.id %>",
5294
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5295
- "<%= config.bin %> <%= command.id %> --verbose"
5187
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
5188
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
5189
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
5190
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
5296
5191
  ],
5297
5192
  "flags": {
5298
- "dir": {
5299
- "description": "Specific entity directory to check status",
5300
- "name": "dir",
5193
+ "from": {
5194
+ "description": "Source SQL dialect",
5195
+ "name": "from",
5196
+ "required": true,
5301
5197
  "hasDynamicHelp": false,
5302
5198
  "multiple": false,
5199
+ "options": [
5200
+ "sqlserver",
5201
+ "postgresql"
5202
+ ],
5303
5203
  "type": "option"
5304
5204
  },
5305
- "verbose": {
5306
- "char": "v",
5307
- "description": "Show detailed field-level differences",
5308
- "name": "verbose",
5309
- "allowNo": false,
5310
- "type": "boolean"
5205
+ "to": {
5206
+ "description": "Target SQL dialect",
5207
+ "name": "to",
5208
+ "required": true,
5209
+ "hasDynamicHelp": false,
5210
+ "multiple": false,
5211
+ "options": [
5212
+ "sqlserver",
5213
+ "postgresql"
5214
+ ],
5215
+ "type": "option"
5311
5216
  },
5312
- "include": {
5313
- "description": "Only process these directories (comma-separated, supports patterns)",
5314
- "name": "include",
5217
+ "scope": {
5218
+ "description": "What to scan for translation",
5219
+ "name": "scope",
5220
+ "default": "all",
5221
+ "hasDynamicHelp": false,
5222
+ "multiple": false,
5223
+ "options": [
5224
+ "queries",
5225
+ "views",
5226
+ "filters",
5227
+ "all"
5228
+ ],
5229
+ "type": "option"
5230
+ },
5231
+ "sql": {
5232
+ "description": "Translate a single SQL fragment (inline mode)",
5233
+ "name": "sql",
5315
5234
  "hasDynamicHelp": false,
5316
5235
  "multiple": false,
5317
5236
  "type": "option"
5318
5237
  },
5319
- "exclude": {
5320
- "description": "Skip these directories (comma-separated, supports patterns)",
5321
- "name": "exclude",
5238
+ "dry-run": {
5239
+ "description": "Show what would be translated without making changes",
5240
+ "name": "dry-run",
5241
+ "allowNo": false,
5242
+ "type": "boolean"
5243
+ },
5244
+ "review": {
5245
+ "description": "Generate review report only (no writes to database)",
5246
+ "name": "review",
5247
+ "allowNo": false,
5248
+ "type": "boolean"
5249
+ },
5250
+ "output": {
5251
+ "char": "o",
5252
+ "description": "Output directory for the translation report",
5253
+ "name": "output",
5322
5254
  "hasDynamicHelp": false,
5323
5255
  "multiple": false,
5324
5256
  "type": "option"
5257
+ },
5258
+ "force": {
5259
+ "description": "Re-translate even if platform variants already exist",
5260
+ "name": "force",
5261
+ "allowNo": false,
5262
+ "type": "boolean"
5325
5263
  }
5326
5264
  },
5327
5265
  "hasDynamicHelp": false,
5328
5266
  "hiddenAliases": [],
5329
- "id": "sync:status",
5267
+ "id": "translate-sql",
5330
5268
  "pluginAlias": "@memberjunction/cli",
5331
5269
  "pluginName": "@memberjunction/cli",
5332
5270
  "pluginType": "core",
@@ -5336,14 +5274,14 @@
5336
5274
  "relativePath": [
5337
5275
  "dist",
5338
5276
  "commands",
5339
- "sync",
5340
- "status.js"
5277
+ "translate-sql",
5278
+ "index.js"
5341
5279
  ]
5342
5280
  },
5343
- "sync:usage": {
5281
+ "translate-sql:usage": {
5344
5282
  "aliases": [],
5345
5283
  "args": {},
5346
- "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
5284
+ "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
5347
5285
  "flags": {
5348
5286
  "format": {
5349
5287
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -5360,7 +5298,7 @@
5360
5298
  },
5361
5299
  "hasDynamicHelp": false,
5362
5300
  "hiddenAliases": [],
5363
- "id": "sync:usage",
5301
+ "id": "translate-sql:usage",
5364
5302
  "pluginAlias": "@memberjunction/cli",
5365
5303
  "pluginName": "@memberjunction/cli",
5366
5304
  "pluginType": "core",
@@ -5370,52 +5308,135 @@
5370
5308
  "relativePath": [
5371
5309
  "dist",
5372
5310
  "commands",
5373
- "sync",
5311
+ "translate-sql",
5374
5312
  "usage.js"
5375
5313
  ]
5376
5314
  },
5377
- "sync:validate": {
5315
+ "update:claude": {
5378
5316
  "aliases": [],
5379
5317
  "args": {},
5380
- "description": "Validate metadata files",
5318
+ "description": "Update the Claude Code pack in the current directory.",
5381
5319
  "examples": [
5382
- "<%= config.bin %> <%= command.id %>",
5383
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5384
- "<%= config.bin %> <%= command.id %> --save-report",
5385
- "<%= config.bin %> <%= command.id %> --verbose"
5320
+ "<%= config.bin %> update:claude",
5321
+ "<%= config.bin %> update:claude --check",
5322
+ "<%= config.bin %> update:claude --refresh-commands",
5323
+ "<%= config.bin %> update:claude --allow-major",
5324
+ "<%= config.bin %> update:claude --json"
5386
5325
  ],
5387
5326
  "flags": {
5388
5327
  "dir": {
5389
- "description": "Specific entity directory to validate",
5328
+ "description": "Target directory",
5390
5329
  "name": "dir",
5330
+ "default": ".",
5391
5331
  "hasDynamicHelp": false,
5392
5332
  "multiple": false,
5393
5333
  "type": "option"
5394
5334
  },
5395
- "verbose": {
5396
- "char": "v",
5397
- "description": "Show detailed validation output",
5398
- "name": "verbose",
5335
+ "major": {
5336
+ "description": "Force a specific MJ major (default: detected from package.json)",
5337
+ "name": "major",
5338
+ "hasDynamicHelp": false,
5339
+ "multiple": false,
5340
+ "type": "option"
5341
+ },
5342
+ "ref": {
5343
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
5344
+ "name": "ref",
5345
+ "hasDynamicHelp": false,
5346
+ "multiple": false,
5347
+ "type": "option"
5348
+ },
5349
+ "from": {
5350
+ "description": "Use a local pack source instead of fetching from GitHub",
5351
+ "name": "from",
5352
+ "hasDynamicHelp": false,
5353
+ "multiple": false,
5354
+ "type": "option"
5355
+ },
5356
+ "offline": {
5357
+ "description": "Forbid network; requires --from <path>",
5358
+ "name": "offline",
5399
5359
  "allowNo": false,
5400
5360
  "type": "boolean"
5401
5361
  },
5402
- "save-report": {
5403
- "description": "Save validation report as markdown file",
5404
- "name": "save-report",
5362
+ "dry-run": {
5363
+ "description": "Print what would be written; change nothing",
5364
+ "name": "dry-run",
5405
5365
  "allowNo": false,
5406
5366
  "type": "boolean"
5407
5367
  },
5408
- "output": {
5409
- "description": "Output file path for validation report (default: validation-report.md)",
5410
- "name": "output",
5411
- "hasDynamicHelp": false,
5412
- "multiple": false,
5413
- "type": "option"
5368
+ "yes": {
5369
+ "char": "y",
5370
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
5371
+ "name": "yes",
5372
+ "allowNo": false,
5373
+ "type": "boolean"
5374
+ },
5375
+ "force": {
5376
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
5377
+ "name": "force",
5378
+ "allowNo": false,
5379
+ "type": "boolean"
5380
+ },
5381
+ "skip-commands": {
5382
+ "description": "Skip seeding .claude/commands/",
5383
+ "name": "skip-commands",
5384
+ "allowNo": false,
5385
+ "type": "boolean"
5386
+ },
5387
+ "skip-skills": {
5388
+ "description": "Skip seeding .claude/skills/",
5389
+ "name": "skip-skills",
5390
+ "allowNo": false,
5391
+ "type": "boolean"
5392
+ },
5393
+ "skip-settings": {
5394
+ "description": "Skip merging .claude/settings.json",
5395
+ "name": "skip-settings",
5396
+ "allowNo": false,
5397
+ "type": "boolean"
5398
+ },
5399
+ "check": {
5400
+ "description": "Compare local pack version to remote without writing anything",
5401
+ "name": "check",
5402
+ "allowNo": false,
5403
+ "type": "boolean"
5404
+ },
5405
+ "refresh-commands": {
5406
+ "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
5407
+ "name": "refresh-commands",
5408
+ "allowNo": false,
5409
+ "type": "boolean"
5410
+ },
5411
+ "refresh-skills": {
5412
+ "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
5413
+ "name": "refresh-skills",
5414
+ "allowNo": false,
5415
+ "type": "boolean"
5416
+ },
5417
+ "allow-major": {
5418
+ "description": "Allow the remote pack's major to differ from local MJ's major",
5419
+ "name": "allow-major",
5420
+ "allowNo": false,
5421
+ "type": "boolean"
5422
+ },
5423
+ "json": {
5424
+ "description": "Output as JSON (matches plan §7.5 schema)",
5425
+ "name": "json",
5426
+ "allowNo": false,
5427
+ "type": "boolean"
5428
+ },
5429
+ "verbose": {
5430
+ "char": "v",
5431
+ "description": "Show progress messages",
5432
+ "name": "verbose",
5433
+ "allowNo": false,
5434
+ "type": "boolean"
5414
5435
  }
5415
5436
  },
5416
5437
  "hasDynamicHelp": false,
5417
5438
  "hiddenAliases": [],
5418
- "id": "sync:validate",
5439
+ "id": "update:claude",
5419
5440
  "pluginAlias": "@memberjunction/cli",
5420
5441
  "pluginName": "@memberjunction/cli",
5421
5442
  "pluginType": "core",
@@ -5425,52 +5446,31 @@
5425
5446
  "relativePath": [
5426
5447
  "dist",
5427
5448
  "commands",
5428
- "sync",
5429
- "validate.js"
5449
+ "update",
5450
+ "claude.js"
5430
5451
  ]
5431
5452
  },
5432
- "sync:watch": {
5453
+ "update:usage": {
5433
5454
  "aliases": [],
5434
5455
  "args": {},
5435
- "description": "Watch for file changes and sync automatically",
5436
- "examples": [
5437
- "<%= config.bin %> <%= command.id %>",
5438
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5439
- "<%= config.bin %> <%= command.id %> --debounce=1000",
5440
- "<%= config.bin %> <%= command.id %> --no-validate"
5441
- ],
5456
+ "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
5442
5457
  "flags": {
5443
- "dir": {
5444
- "description": "Specific entity directory to watch",
5445
- "name": "dir",
5446
- "hasDynamicHelp": false,
5447
- "multiple": false,
5448
- "type": "option"
5449
- },
5450
- "debounce": {
5451
- "description": "Debounce delay in milliseconds (default: 500)",
5452
- "name": "debounce",
5458
+ "format": {
5459
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5460
+ "name": "format",
5453
5461
  "hasDynamicHelp": false,
5454
5462
  "multiple": false,
5463
+ "options": [
5464
+ "text",
5465
+ "json",
5466
+ "md"
5467
+ ],
5455
5468
  "type": "option"
5456
- },
5457
- "no-validate": {
5458
- "description": "Skip validation before sync",
5459
- "name": "no-validate",
5460
- "allowNo": false,
5461
- "type": "boolean"
5462
- },
5463
- "verbose": {
5464
- "char": "v",
5465
- "description": "Show detailed output",
5466
- "name": "verbose",
5467
- "allowNo": false,
5468
- "type": "boolean"
5469
5469
  }
5470
5470
  },
5471
5471
  "hasDynamicHelp": false,
5472
5472
  "hiddenAliases": [],
5473
- "id": "sync:watch",
5473
+ "id": "update:usage",
5474
5474
  "pluginAlias": "@memberjunction/cli",
5475
5475
  "pluginName": "@memberjunction/cli",
5476
5476
  "pluginType": "core",
@@ -5480,8 +5480,8 @@
5480
5480
  "relativePath": [
5481
5481
  "dist",
5482
5482
  "commands",
5483
- "sync",
5484
- "watch.js"
5483
+ "update",
5484
+ "usage.js"
5485
5485
  ]
5486
5486
  },
5487
5487
  "ai:actions:list": {
@@ -6847,5 +6847,5 @@
6847
6847
  ]
6848
6848
  }
6849
6849
  },
6850
- "version": "6.1.0"
6850
+ "version": "6.1.2"
6851
6851
  }