@memberjunction/cli 6.2.0-edge.5 → 6.2.0-edge.6

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 (42) hide show
  1. package/README.md +22 -0
  2. package/dist/commands/agent/init.d.ts +5 -0
  3. package/dist/commands/agent/init.d.ts.map +1 -1
  4. package/dist/commands/agent/init.js +109 -0
  5. package/dist/commands/agent/init.js.map +1 -1
  6. package/dist/commands/ai/actions/run.d.ts.map +1 -1
  7. package/dist/commands/ai/actions/run.js +5 -1
  8. package/dist/commands/ai/actions/run.js.map +1 -1
  9. package/dist/commands/ai/agents/run.d.ts +1 -0
  10. package/dist/commands/ai/agents/run.d.ts.map +1 -1
  11. package/dist/commands/ai/agents/run.js +20 -6
  12. package/dist/commands/ai/agents/run.js.map +1 -1
  13. package/dist/commands/ai/prompts/run.d.ts.map +1 -1
  14. package/dist/commands/ai/prompts/run.js +5 -1
  15. package/dist/commands/ai/prompts/run.js.map +1 -1
  16. package/dist/commands/app/install.d.ts.map +1 -1
  17. package/dist/commands/app/install.js +17 -2
  18. package/dist/commands/app/install.js.map +1 -1
  19. package/dist/commands/app/upgrade.d.ts.map +1 -1
  20. package/dist/commands/app/upgrade.js +7 -1
  21. package/dist/commands/app/upgrade.js.map +1 -1
  22. package/dist/init-templates/citizen-builder/.agents/skills/new-agent/SKILL.md +19 -6
  23. package/dist/init-templates/citizen-builder/.agents/skills/test-agent/SKILL.md +4 -1
  24. package/dist/init-templates/citizen-builder/.claude/skills/new-agent/SKILL.md +19 -6
  25. package/dist/init-templates/citizen-builder/.claude/skills/test-agent/SKILL.md +4 -1
  26. package/dist/init-templates/citizen-builder/.env.example +4 -2
  27. package/dist/init-templates/citizen-builder/AGENTS.md +136 -40
  28. package/dist/init-templates/citizen-builder/README.md +18 -5
  29. package/dist/init-templates/citizen-builder/docker-compose.yml +6 -5
  30. package/dist/init-templates/citizen-builder/metadata/.mj-sync.json +7 -4
  31. package/dist/init-templates/citizen-builder/metadata/agents/.customer-insight-agent.json +17 -13
  32. package/dist/init-templates/citizen-builder/metadata/prompts/.customer-insight-prompt.json +3 -1
  33. package/dist/init-templates/citizen-builder/metadata/prompts/templates/customer-insight.template.md +8 -0
  34. package/dist/init-templates/citizen-builder/scripts/docker-entrypoint.sh +140 -38
  35. package/dist/init-templates/citizen-builder/scripts/sync-metadata.sh +1 -1
  36. package/dist/lib/dev-workspace/build.d.ts.map +1 -1
  37. package/dist/lib/dev-workspace/build.js +43 -11
  38. package/dist/lib/dev-workspace/build.js.map +1 -1
  39. package/dist/lib/dev-workspace/types.d.ts +9 -5
  40. package/dist/lib/dev-workspace/types.d.ts.map +1 -1
  41. package/oclif.manifest.json +1852 -1836
  42. package/package.json +26 -26
@@ -280,13 +280,14 @@
280
280
  "required": true
281
281
  }
282
282
  },
283
- "description": "Install an MJ Open App from a GitHub repository",
283
+ "description": "Install an MJ Open App from a GitHub repository.\n\nPrivate repositories need a GitHub credential. GitHub returns 404 (not 403) for a repo it will not show you, so without one an install fails as though the app or its version did not exist. Set GITHUB_TOKEN in the environment, or add the repo to openApps.github.tokens (or set openApps.github.token) in mj.config.cjs.",
284
284
  "examples": [
285
285
  "<%= config.bin %> app install https://github.com/acme/mj-crm",
286
286
  "<%= config.bin %> app install https://github.com/acme/mj-crm --version 1.2.0",
287
287
  "<%= config.bin %> app install https://github.com/acme/mj-crm --verbose",
288
288
  "<%= config.bin %> app install https://github.com/MemberJunction/Integrations/CRM/HubSpot",
289
- "<%= config.bin %> app install https://github.com/acme/mj-crm --non-interactive"
289
+ "<%= config.bin %> app install https://github.com/acme/mj-crm --non-interactive",
290
+ "GITHUB_TOKEN=$(gh auth token) <%= config.bin %> app install https://github.com/acme/private-app"
290
291
  ],
291
292
  "flags": {
292
293
  "version": {
@@ -1108,56 +1109,65 @@
1108
1109
  "usage.js"
1109
1110
  ]
1110
1111
  },
1111
- "cache:clear": {
1112
+ "bump": {
1112
1113
  "aliases": [],
1113
1114
  "args": {},
1114
- "description": "Clear the shared Redis cache (REDIS_URL) so every running server reloads from the database",
1115
+ "description": "Bumps MemberJunction dependency versions",
1115
1116
  "examples": [
1116
1117
  {
1117
1118
  "command": "<%= config.bin %> <%= command.id %>",
1118
- "description": "Clear RunView, dataset and metadata caches"
1119
+ "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
1119
1120
  },
1120
1121
  {
1121
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
1122
- "description": "Show the target and key counts; delete nothing"
1122
+ "command": "<%= config.bin %> <%= command.id %> -rdv",
1123
+ "description": "Preview all recursive packages bumps without writing any changes."
1123
1124
  },
1124
1125
  {
1125
- "command": "<%= config.bin %> <%= command.id %> --category RunViewCache",
1126
- "description": "Clear one category"
1126
+ "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
1127
+ "description": "Recursively bump all @memberjunction/* dependencies in all packages to version v2.10.0 and output only the paths containing the updated package.json files. Pipe the output to xargs to run npm install in each directory and update the package-lock.json files as well."
1127
1128
  }
1128
1129
  ],
1129
1130
  "flags": {
1130
- "dry-run": {
1131
- "description": "Report the target and how many keys each category holds, without deleting or notifying",
1132
- "name": "dry-run",
1131
+ "verbose": {
1132
+ "char": "v",
1133
+ "description": "Enable additional logging",
1134
+ "name": "verbose",
1133
1135
  "allowNo": false,
1134
1136
  "type": "boolean"
1135
1137
  },
1136
- "category": {
1137
- "description": "Category to clear (repeatable). Default: RunViewCache, RunQueryCache, DatasetCache, Metadata",
1138
- "name": "category",
1139
- "hasDynamicHelp": false,
1140
- "multiple": true,
1141
- "type": "option"
1138
+ "recursive": {
1139
+ "char": "r",
1140
+ "description": "Bump version in current directory and all subdirectories",
1141
+ "name": "recursive",
1142
+ "allowNo": false,
1143
+ "type": "boolean"
1142
1144
  },
1143
- "url": {
1144
- "description": "Redis URL. Default: REDIS_URL",
1145
- "name": "url",
1145
+ "tag": {
1146
+ "char": "t",
1147
+ "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
1148
+ "name": "tag",
1146
1149
  "hasDynamicHelp": false,
1147
1150
  "multiple": false,
1148
1151
  "type": "option"
1149
1152
  },
1150
- "prefix": {
1151
- "description": "Key prefix. Default: REDIS_KEY_PREFIX, else \"mj\"",
1152
- "name": "prefix",
1153
- "hasDynamicHelp": false,
1154
- "multiple": false,
1155
- "type": "option"
1153
+ "quiet": {
1154
+ "char": "q",
1155
+ "description": "Only output paths for updated packages",
1156
+ "name": "quiet",
1157
+ "allowNo": false,
1158
+ "type": "boolean"
1159
+ },
1160
+ "dry": {
1161
+ "char": "d",
1162
+ "description": "Dry run, do not write changes to package.json files",
1163
+ "name": "dry",
1164
+ "allowNo": false,
1165
+ "type": "boolean"
1156
1166
  }
1157
1167
  },
1158
1168
  "hasDynamicHelp": false,
1159
1169
  "hiddenAliases": [],
1160
- "id": "cache:clear",
1170
+ "id": "bump",
1161
1171
  "pluginAlias": "@memberjunction/cli",
1162
1172
  "pluginName": "@memberjunction/cli",
1163
1173
  "pluginType": "core",
@@ -1167,14 +1177,14 @@
1167
1177
  "relativePath": [
1168
1178
  "dist",
1169
1179
  "commands",
1170
- "cache",
1171
- "clear.js"
1180
+ "bump",
1181
+ "index.js"
1172
1182
  ]
1173
1183
  },
1174
- "cache:usage": {
1184
+ "bump:usage": {
1175
1185
  "aliases": [],
1176
1186
  "args": {},
1177
- "description": "Show usage, flags, examples, and runtime hints for every `mj cache` command.",
1187
+ "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
1178
1188
  "flags": {
1179
1189
  "format": {
1180
1190
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -1191,7 +1201,7 @@
1191
1201
  },
1192
1202
  "hasDynamicHelp": false,
1193
1203
  "hiddenAliases": [],
1194
- "id": "cache:usage",
1204
+ "id": "bump:usage",
1195
1205
  "pluginAlias": "@memberjunction/cli",
1196
1206
  "pluginName": "@memberjunction/cli",
1197
1207
  "pluginType": "core",
@@ -1201,69 +1211,60 @@
1201
1211
  "relativePath": [
1202
1212
  "dist",
1203
1213
  "commands",
1204
- "cache",
1214
+ "bump",
1205
1215
  "usage.js"
1206
1216
  ]
1207
1217
  },
1208
- "bump": {
1218
+ "cache:clear": {
1209
1219
  "aliases": [],
1210
1220
  "args": {},
1211
- "description": "Bumps MemberJunction dependency versions",
1221
+ "description": "Clear the shared Redis cache (REDIS_URL) so every running server reloads from the database",
1212
1222
  "examples": [
1213
1223
  {
1214
1224
  "command": "<%= config.bin %> <%= command.id %>",
1215
- "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
1225
+ "description": "Clear RunView, dataset and metadata caches"
1216
1226
  },
1217
1227
  {
1218
- "command": "<%= config.bin %> <%= command.id %> -rdv",
1219
- "description": "Preview all recursive packages bumps without writing any changes."
1228
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
1229
+ "description": "Show the target and key counts; delete nothing"
1220
1230
  },
1221
1231
  {
1222
- "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
1223
- "description": "Recursively bump all @memberjunction/* dependencies in all packages to version v2.10.0 and output only the paths containing the updated package.json files. Pipe the output to xargs to run npm install in each directory and update the package-lock.json files as well."
1232
+ "command": "<%= config.bin %> <%= command.id %> --category RunViewCache",
1233
+ "description": "Clear one category"
1224
1234
  }
1225
1235
  ],
1226
1236
  "flags": {
1227
- "verbose": {
1228
- "char": "v",
1229
- "description": "Enable additional logging",
1230
- "name": "verbose",
1237
+ "dry-run": {
1238
+ "description": "Report the target and how many keys each category holds, without deleting or notifying",
1239
+ "name": "dry-run",
1231
1240
  "allowNo": false,
1232
1241
  "type": "boolean"
1233
1242
  },
1234
- "recursive": {
1235
- "char": "r",
1236
- "description": "Bump version in current directory and all subdirectories",
1237
- "name": "recursive",
1238
- "allowNo": false,
1239
- "type": "boolean"
1243
+ "category": {
1244
+ "description": "Category to clear (repeatable). Default: RunViewCache, RunQueryCache, DatasetCache, Metadata",
1245
+ "name": "category",
1246
+ "hasDynamicHelp": false,
1247
+ "multiple": true,
1248
+ "type": "option"
1240
1249
  },
1241
- "tag": {
1242
- "char": "t",
1243
- "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
1244
- "name": "tag",
1250
+ "url": {
1251
+ "description": "Redis URL. Default: REDIS_URL",
1252
+ "name": "url",
1245
1253
  "hasDynamicHelp": false,
1246
1254
  "multiple": false,
1247
1255
  "type": "option"
1248
1256
  },
1249
- "quiet": {
1250
- "char": "q",
1251
- "description": "Only output paths for updated packages",
1252
- "name": "quiet",
1253
- "allowNo": false,
1254
- "type": "boolean"
1255
- },
1256
- "dry": {
1257
- "char": "d",
1258
- "description": "Dry run, do not write changes to package.json files",
1259
- "name": "dry",
1260
- "allowNo": false,
1261
- "type": "boolean"
1257
+ "prefix": {
1258
+ "description": "Key prefix. Default: REDIS_KEY_PREFIX, else \"mj\"",
1259
+ "name": "prefix",
1260
+ "hasDynamicHelp": false,
1261
+ "multiple": false,
1262
+ "type": "option"
1262
1263
  }
1263
1264
  },
1264
1265
  "hasDynamicHelp": false,
1265
1266
  "hiddenAliases": [],
1266
- "id": "bump",
1267
+ "id": "cache:clear",
1267
1268
  "pluginAlias": "@memberjunction/cli",
1268
1269
  "pluginName": "@memberjunction/cli",
1269
1270
  "pluginType": "core",
@@ -1273,14 +1274,14 @@
1273
1274
  "relativePath": [
1274
1275
  "dist",
1275
1276
  "commands",
1276
- "bump",
1277
- "index.js"
1277
+ "cache",
1278
+ "clear.js"
1278
1279
  ]
1279
1280
  },
1280
- "bump:usage": {
1281
+ "cache:usage": {
1281
1282
  "aliases": [],
1282
1283
  "args": {},
1283
- "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
1284
+ "description": "Show usage, flags, examples, and runtime hints for every `mj cache` command.",
1284
1285
  "flags": {
1285
1286
  "format": {
1286
1287
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -1297,7 +1298,7 @@
1297
1298
  },
1298
1299
  "hasDynamicHelp": false,
1299
1300
  "hiddenAliases": [],
1300
- "id": "bump:usage",
1301
+ "id": "cache:usage",
1301
1302
  "pluginAlias": "@memberjunction/cli",
1302
1303
  "pluginName": "@memberjunction/cli",
1303
1304
  "pluginType": "core",
@@ -1307,7 +1308,7 @@
1307
1308
  "relativePath": [
1308
1309
  "dist",
1309
1310
  "commands",
1310
- "bump",
1311
+ "cache",
1311
1312
  "usage.js"
1312
1313
  ]
1313
1314
  },
@@ -1940,6 +1941,62 @@
1940
1941
  "usage.js"
1941
1942
  ]
1942
1943
  },
1944
+ "dev": {
1945
+ "aliases": [],
1946
+ "args": {},
1947
+ "description": "Local development tooling: generate, inspect, and tear down the cross-repo pnpm workspace that links sibling repo clones. Run `mj dev usage` for every command's flags, examples, and runtime hints.",
1948
+ "flags": {},
1949
+ "hasDynamicHelp": false,
1950
+ "hidden": false,
1951
+ "hiddenAliases": [],
1952
+ "id": "dev",
1953
+ "pluginAlias": "@memberjunction/cli",
1954
+ "pluginName": "@memberjunction/cli",
1955
+ "pluginType": "core",
1956
+ "strict": true,
1957
+ "enableJsonFlag": false,
1958
+ "isESM": true,
1959
+ "relativePath": [
1960
+ "dist",
1961
+ "commands",
1962
+ "dev",
1963
+ "index.js"
1964
+ ]
1965
+ },
1966
+ "dev:usage": {
1967
+ "aliases": [],
1968
+ "args": {},
1969
+ "description": "Show usage, flags, examples, and runtime hints for every `mj dev` command.",
1970
+ "flags": {
1971
+ "format": {
1972
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1973
+ "name": "format",
1974
+ "hasDynamicHelp": false,
1975
+ "multiple": false,
1976
+ "options": [
1977
+ "text",
1978
+ "json",
1979
+ "md"
1980
+ ],
1981
+ "type": "option"
1982
+ }
1983
+ },
1984
+ "hasDynamicHelp": false,
1985
+ "hiddenAliases": [],
1986
+ "id": "dev:usage",
1987
+ "pluginAlias": "@memberjunction/cli",
1988
+ "pluginName": "@memberjunction/cli",
1989
+ "pluginType": "core",
1990
+ "strict": true,
1991
+ "enableJsonFlag": false,
1992
+ "isESM": true,
1993
+ "relativePath": [
1994
+ "dist",
1995
+ "commands",
1996
+ "dev",
1997
+ "usage.js"
1998
+ ]
1999
+ },
1943
2000
  "dbdoc:analyze": {
1944
2001
  "aliases": [],
1945
2002
  "args": {},
@@ -2469,80 +2526,24 @@
2469
2526
  "usage.js"
2470
2527
  ]
2471
2528
  },
2472
- "dev": {
2473
- "aliases": [],
2474
- "args": {},
2475
- "description": "Local development tooling: generate, inspect, and tear down the cross-repo pnpm workspace that links sibling repo clones. Run `mj dev usage` for every command's flags, examples, and runtime hints.",
2476
- "flags": {},
2477
- "hasDynamicHelp": false,
2478
- "hidden": false,
2479
- "hiddenAliases": [],
2480
- "id": "dev",
2481
- "pluginAlias": "@memberjunction/cli",
2482
- "pluginName": "@memberjunction/cli",
2483
- "pluginType": "core",
2484
- "strict": true,
2485
- "enableJsonFlag": false,
2486
- "isESM": true,
2487
- "relativePath": [
2488
- "dist",
2489
- "commands",
2490
- "dev",
2491
- "index.js"
2492
- ]
2493
- },
2494
- "dev:usage": {
2529
+ "doctor": {
2495
2530
  "aliases": [],
2496
2531
  "args": {},
2497
- "description": "Show usage, flags, examples, and runtime hints for every `mj dev` command.",
2532
+ "description": "Diagnose a MemberJunction installation",
2533
+ "examples": [
2534
+ "<%= config.bin %> <%= command.id %>",
2535
+ "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
2536
+ "<%= config.bin %> <%= command.id %> --format json",
2537
+ "<%= config.bin %> <%= command.id %> --scope ai",
2538
+ "<%= config.bin %> <%= command.id %> --verbose",
2539
+ "<%= config.bin %> <%= command.id %> --report",
2540
+ "<%= config.bin %> <%= command.id %> --report_extended"
2541
+ ],
2498
2542
  "flags": {
2499
- "format": {
2500
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2501
- "name": "format",
2502
- "hasDynamicHelp": false,
2503
- "multiple": false,
2504
- "options": [
2505
- "text",
2506
- "json",
2507
- "md"
2508
- ],
2509
- "type": "option"
2510
- }
2511
- },
2512
- "hasDynamicHelp": false,
2513
- "hiddenAliases": [],
2514
- "id": "dev:usage",
2515
- "pluginAlias": "@memberjunction/cli",
2516
- "pluginName": "@memberjunction/cli",
2517
- "pluginType": "core",
2518
- "strict": true,
2519
- "enableJsonFlag": false,
2520
- "isESM": true,
2521
- "relativePath": [
2522
- "dist",
2523
- "commands",
2524
- "dev",
2525
- "usage.js"
2526
- ]
2527
- },
2528
- "doctor": {
2529
- "aliases": [],
2530
- "args": {},
2531
- "description": "Diagnose a MemberJunction installation",
2532
- "examples": [
2533
- "<%= config.bin %> <%= command.id %>",
2534
- "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
2535
- "<%= config.bin %> <%= command.id %> --format json",
2536
- "<%= config.bin %> <%= command.id %> --scope ai",
2537
- "<%= config.bin %> <%= command.id %> --verbose",
2538
- "<%= config.bin %> <%= command.id %> --report",
2539
- "<%= config.bin %> <%= command.id %> --report_extended"
2540
- ],
2541
- "flags": {
2542
- "dir": {
2543
- "description": "Target directory to diagnose",
2544
- "name": "dir",
2545
- "default": ".",
2543
+ "dir": {
2544
+ "description": "Target directory to diagnose",
2545
+ "name": "dir",
2546
+ "default": ".",
2546
2547
  "hasDynamicHelp": false,
2547
2548
  "multiple": false,
2548
2549
  "type": "option"
@@ -3902,78 +3903,89 @@
3902
3903
  "usage.js"
3903
3904
  ]
3904
3905
  },
3905
- "sql-convert": {
3906
+ "queue:backlog": {
3906
3907
  "aliases": [],
3907
- "args": {
3908
- "source": {
3909
- "description": "Source SQL file path",
3910
- "name": "source",
3911
- "required": true
3912
- }
3913
- },
3914
- "description": "Convert SQL files between database dialects using rule-based BatchConverter engine",
3908
+ "args": {},
3909
+ "description": "Show the autoscaler metric for one subscription: claimable pending plus in-flight deliveries",
3915
3910
  "examples": [
3916
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres",
3917
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --output converted.sql",
3918
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --schema my_schema",
3919
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --no-header --verbose"
3911
+ "<%= config.bin %> <%= command.id %> --subscription venue-import",
3912
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --json"
3920
3913
  ],
3921
3914
  "flags": {
3922
- "from": {
3923
- "description": "Source SQL dialect",
3924
- "name": "from",
3915
+ "subscription": {
3916
+ "char": "s",
3917
+ "description": "Subscription name",
3918
+ "name": "subscription",
3925
3919
  "required": true,
3926
3920
  "hasDynamicHelp": false,
3927
3921
  "multiple": false,
3928
3922
  "type": "option"
3929
3923
  },
3930
- "to": {
3931
- "description": "Target SQL dialect",
3932
- "name": "to",
3924
+ "json": {
3925
+ "description": "Print JSON instead of text",
3926
+ "name": "json",
3927
+ "allowNo": false,
3928
+ "type": "boolean"
3929
+ }
3930
+ },
3931
+ "hasDynamicHelp": false,
3932
+ "hiddenAliases": [],
3933
+ "id": "queue:backlog",
3934
+ "pluginAlias": "@memberjunction/cli",
3935
+ "pluginName": "@memberjunction/cli",
3936
+ "pluginType": "core",
3937
+ "strict": true,
3938
+ "enableJsonFlag": false,
3939
+ "isESM": true,
3940
+ "relativePath": [
3941
+ "dist",
3942
+ "commands",
3943
+ "queue",
3944
+ "backlog.js"
3945
+ ]
3946
+ },
3947
+ "queue:dead-letters": {
3948
+ "aliases": [],
3949
+ "args": {},
3950
+ "description": "List a work-queue subscription's dead-lettered deliveries",
3951
+ "examples": [
3952
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --page-size 20"
3953
+ ],
3954
+ "flags": {
3955
+ "subscription": {
3956
+ "char": "s",
3957
+ "description": "Subscription name",
3958
+ "name": "subscription",
3933
3959
  "required": true,
3934
3960
  "hasDynamicHelp": false,
3935
3961
  "multiple": false,
3936
3962
  "type": "option"
3937
3963
  },
3938
- "output": {
3939
- "char": "o",
3940
- "description": "Output file path (default: <source>.converted.<ext>)",
3941
- "name": "output",
3964
+ "cursor": {
3965
+ "description": "nextCursor from a previous page",
3966
+ "name": "cursor",
3942
3967
  "hasDynamicHelp": false,
3943
3968
  "multiple": false,
3944
3969
  "type": "option"
3945
3970
  },
3946
- "schema": {
3947
- "description": "Target schema name",
3948
- "name": "schema",
3949
- "default": "__mj",
3971
+ "page-size": {
3972
+ "description": "Items per page (1–500)",
3973
+ "name": "page-size",
3974
+ "default": 50,
3950
3975
  "hasDynamicHelp": false,
3951
3976
  "multiple": false,
3952
3977
  "type": "option"
3953
3978
  },
3954
- "no-header": {
3955
- "description": "Skip PG header (extensions, schema, implicit cast)",
3956
- "name": "no-header",
3957
- "allowNo": false,
3958
- "type": "boolean"
3959
- },
3960
- "no-post-process": {
3961
- "description": "Skip post-processing pass",
3962
- "name": "no-post-process",
3963
- "allowNo": false,
3964
- "type": "boolean"
3965
- },
3966
- "verbose": {
3967
- "char": "v",
3968
- "description": "Show per-statement progress and detailed report",
3969
- "name": "verbose",
3979
+ "json": {
3980
+ "description": "Print JSON instead of a table",
3981
+ "name": "json",
3970
3982
  "allowNo": false,
3971
3983
  "type": "boolean"
3972
3984
  }
3973
3985
  },
3974
3986
  "hasDynamicHelp": false,
3975
3987
  "hiddenAliases": [],
3976
- "id": "sql-convert",
3988
+ "id": "queue:dead-letters",
3977
3989
  "pluginAlias": "@memberjunction/cli",
3978
3990
  "pluginName": "@memberjunction/cli",
3979
3991
  "pluginType": "core",
@@ -3983,31 +3995,49 @@
3983
3995
  "relativePath": [
3984
3996
  "dist",
3985
3997
  "commands",
3986
- "sql-convert",
3987
- "index.js"
3998
+ "queue",
3999
+ "dead-letters.js"
3988
4000
  ]
3989
4001
  },
3990
- "sql-convert:usage": {
4002
+ "queue:discard": {
3991
4003
  "aliases": [],
3992
4004
  "args": {},
3993
- "description": "Show usage, flags, examples, and runtime hints for every `mj sql-convert` command.",
4005
+ "description": "Discard one pending or dead-lettered work-queue delivery, or cancel one that is in flight",
4006
+ "examples": [
4007
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --reason \"bad batch, republished\""
4008
+ ],
3994
4009
  "flags": {
3995
- "format": {
3996
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3997
- "name": "format",
4010
+ "subscription": {
4011
+ "char": "s",
4012
+ "description": "Subscription name",
4013
+ "name": "subscription",
4014
+ "required": true,
4015
+ "hasDynamicHelp": false,
4016
+ "multiple": false,
4017
+ "type": "option"
4018
+ },
4019
+ "delivery": {
4020
+ "char": "d",
4021
+ "description": "DeliveryID to discard",
4022
+ "name": "delivery",
4023
+ "required": true,
4024
+ "hasDynamicHelp": false,
4025
+ "multiple": false,
4026
+ "type": "option"
4027
+ },
4028
+ "reason": {
4029
+ "char": "r",
4030
+ "description": "Why the work is dropped (at most 1000 characters)",
4031
+ "name": "reason",
4032
+ "required": true,
3998
4033
  "hasDynamicHelp": false,
3999
4034
  "multiple": false,
4000
- "options": [
4001
- "text",
4002
- "json",
4003
- "md"
4004
- ],
4005
4035
  "type": "option"
4006
4036
  }
4007
4037
  },
4008
4038
  "hasDynamicHelp": false,
4009
4039
  "hiddenAliases": [],
4010
- "id": "sql-convert:usage",
4040
+ "id": "queue:discard",
4011
4041
  "pluginAlias": "@memberjunction/cli",
4012
4042
  "pluginName": "@memberjunction/cli",
4013
4043
  "pluginType": "core",
@@ -4017,87 +4047,39 @@
4017
4047
  "relativePath": [
4018
4048
  "dist",
4019
4049
  "commands",
4020
- "sql-convert",
4021
- "usage.js"
4050
+ "queue",
4051
+ "discard.js"
4022
4052
  ]
4023
4053
  },
4024
- "standards:adopt": {
4054
+ "queue:export-topology": {
4025
4055
  "aliases": [],
4026
4056
  "args": {},
4027
- "description": "Adopt MemberJunction standards in this repository (config + CI + npm script + layer declarations)",
4057
+ "description": "Write the topology manifest for one transport (input to the Terraform module)",
4028
4058
  "examples": [
4029
- {
4030
- "command": "<%= config.bin %> <%= command.id %>",
4031
- "description": "Adopt every standard available at this CLI version"
4032
- },
4033
- {
4034
- "command": "<%= config.bin %> <%= command.id %> --ci github --declare-compliant",
4035
- "description": "Full setup: config, GitHub workflow, npm script, and declare already-compliant packages"
4036
- },
4037
- {
4038
- "command": "<%= config.bin %> <%= command.id %> --dry-run",
4039
- "description": "Show what would change"
4040
- },
4041
- {
4042
- "command": "<%= config.bin %> <%= command.id %> --upgrade",
4043
- "description": "Review standards added since this repo adopted, and bump its recorded version"
4044
- }
4059
+ "<%= config.bin %> <%= command.id %> --transport AWS-prod --output infrastructure/work-queue/manifest.json"
4045
4060
  ],
4046
4061
  "flags": {
4047
- "cwd": {
4048
- "description": "Repository root. Defaults to the current directory.",
4049
- "name": "cwd",
4062
+ "transport": {
4063
+ "char": "t",
4064
+ "description": "Transport name",
4065
+ "name": "transport",
4066
+ "required": true,
4050
4067
  "hasDynamicHelp": false,
4051
4068
  "multiple": false,
4052
4069
  "type": "option"
4053
4070
  },
4054
- "check": {
4055
- "description": "Only adopt these check ids.",
4056
- "name": "check",
4057
- "hasDynamicHelp": false,
4058
- "multiple": true,
4059
- "type": "option"
4060
- },
4061
- "ci": {
4062
- "description": "Write a CI workflow for this provider.",
4063
- "name": "ci",
4064
- "default": "none",
4071
+ "output": {
4072
+ "char": "o",
4073
+ "description": "File to write; stdout when omitted",
4074
+ "name": "output",
4065
4075
  "hasDynamicHelp": false,
4066
4076
  "multiple": false,
4067
- "options": [
4068
- "github",
4069
- "none"
4070
- ],
4071
4077
  "type": "option"
4072
- },
4073
- "npm-script": {
4074
- "description": "Add an \"mj:standards\" script to the root package.json.",
4075
- "name": "npm-script",
4076
- "allowNo": true,
4077
- "type": "boolean"
4078
- },
4079
- "declare-compliant": {
4080
- "description": "Declare mjUILayer on packages that already comply. Without this a fresh adoption enforces nothing — every package is undeclared, so every package is skipped.",
4081
- "name": "declare-compliant",
4082
- "allowNo": false,
4083
- "type": "boolean"
4084
- },
4085
- "upgrade": {
4086
- "description": "Enable standards newer than this repo’s recorded StandardsVersion, and bump it.",
4087
- "name": "upgrade",
4088
- "allowNo": false,
4089
- "type": "boolean"
4090
- },
4091
- "dry-run": {
4092
- "description": "Report what would change; write nothing.",
4093
- "name": "dry-run",
4094
- "allowNo": false,
4095
- "type": "boolean"
4096
4078
  }
4097
4079
  },
4098
4080
  "hasDynamicHelp": false,
4099
4081
  "hiddenAliases": [],
4100
- "id": "standards:adopt",
4082
+ "id": "queue:export-topology",
4101
4083
  "pluginAlias": "@memberjunction/cli",
4102
4084
  "pluginName": "@memberjunction/cli",
4103
4085
  "pluginType": "core",
@@ -4107,59 +4089,34 @@
4107
4089
  "relativePath": [
4108
4090
  "dist",
4109
4091
  "commands",
4110
- "standards",
4111
- "adopt.js"
4112
- ]
4092
+ "queue",
4093
+ "export-topology.js"
4094
+ ]
4113
4095
  },
4114
- "standards:check": {
4096
+ "queue:import-bindings": {
4115
4097
  "aliases": [],
4116
- "args": {},
4117
- "description": "Run the MemberJunction standards this repository has adopted",
4118
- "examples": [
4119
- {
4120
- "command": "<%= config.bin %> <%= command.id %>",
4121
- "description": "Run every adopted standard"
4122
- },
4123
- {
4124
- "command": "<%= config.bin %> <%= command.id %> --check ui-layers",
4125
- "description": "Run one standard"
4126
- },
4127
- {
4128
- "command": "<%= config.bin %> <%= command.id %> --strict",
4129
- "description": "Fail on warnings too"
4098
+ "args": {
4099
+ "file": {
4100
+ "description": "BindingImport JSON file",
4101
+ "name": "file",
4102
+ "required": true
4130
4103
  }
4104
+ },
4105
+ "description": "Record cloud resource bindings (Terraform output) on work-queue topics and subscriptions",
4106
+ "examples": [
4107
+ "terraform output -json mj_work_queue_bindings > bindings.json && <%= config.bin %> <%= command.id %> bindings.json"
4131
4108
  ],
4132
4109
  "flags": {
4133
- "cwd": {
4134
- "description": "Repository root. Defaults to the current directory.",
4135
- "name": "cwd",
4136
- "hasDynamicHelp": false,
4137
- "multiple": false,
4138
- "type": "option"
4139
- },
4140
- "check": {
4141
- "description": "Only run these check ids.",
4142
- "name": "check",
4143
- "hasDynamicHelp": false,
4144
- "multiple": true,
4145
- "type": "option"
4146
- },
4147
- "strict": {
4148
- "description": "Treat warnings as errors. Use in CI once a newly adopted check is clean.",
4149
- "name": "strict",
4150
- "allowNo": false,
4151
- "type": "boolean"
4152
- },
4153
- "quiet": {
4154
- "description": "Print only the summary line.",
4155
- "name": "quiet",
4110
+ "json": {
4111
+ "description": "Print issues as JSON",
4112
+ "name": "json",
4156
4113
  "allowNo": false,
4157
4114
  "type": "boolean"
4158
4115
  }
4159
4116
  },
4160
4117
  "hasDynamicHelp": false,
4161
4118
  "hiddenAliases": [],
4162
- "id": "standards:check",
4119
+ "id": "queue:import-bindings",
4163
4120
  "pluginAlias": "@memberjunction/cli",
4164
4121
  "pluginName": "@memberjunction/cli",
4165
4122
  "pluginType": "core",
@@ -4169,33 +4126,23 @@
4169
4126
  "relativePath": [
4170
4127
  "dist",
4171
4128
  "commands",
4172
- "standards",
4173
- "check.js"
4129
+ "queue",
4130
+ "import-bindings.js"
4174
4131
  ]
4175
4132
  },
4176
- "standards:list": {
4133
+ "queue": {
4177
4134
  "aliases": [],
4178
4135
  "args": {},
4179
- "description": "List every MemberJunction standard and this repository’s stance on it",
4180
- "flags": {
4181
- "cwd": {
4182
- "description": "Repository root. Defaults to the current directory.",
4183
- "name": "cwd",
4184
- "hasDynamicHelp": false,
4185
- "multiple": false,
4186
- "type": "option"
4187
- },
4188
- "verbose": {
4189
- "char": "v",
4190
- "description": "Include the full description of each standard.",
4191
- "name": "verbose",
4192
- "allowNo": false,
4193
- "type": "boolean"
4194
- }
4195
- },
4136
+ "description": "Operate the durable work queue",
4137
+ "examples": [
4138
+ "<%= config.bin %> <%= command.id %> publish --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4139
+ "<%= config.bin %> <%= command.id %> stats",
4140
+ "<%= config.bin %> <%= command.id %> dead-letters --subscription email.unsubscribe"
4141
+ ],
4142
+ "flags": {},
4196
4143
  "hasDynamicHelp": false,
4197
4144
  "hiddenAliases": [],
4198
- "id": "standards:list",
4145
+ "id": "queue",
4199
4146
  "pluginAlias": "@memberjunction/cli",
4200
4147
  "pluginName": "@memberjunction/cli",
4201
4148
  "pluginType": "core",
@@ -4205,31 +4152,64 @@
4205
4152
  "relativePath": [
4206
4153
  "dist",
4207
4154
  "commands",
4208
- "standards",
4209
- "list.js"
4155
+ "queue",
4156
+ "index.js"
4210
4157
  ]
4211
4158
  },
4212
- "standards:usage": {
4159
+ "queue:partitions": {
4213
4160
  "aliases": [],
4214
4161
  "args": {},
4215
- "description": "Show usage, flags, examples, and runtime hints for every `mj standards` command.",
4162
+ "description": "List a work-queue subscription's in-flight or blocked partition keys",
4163
+ "examples": [
4164
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --condition Blocked"
4165
+ ],
4216
4166
  "flags": {
4217
- "format": {
4218
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4219
- "name": "format",
4167
+ "subscription": {
4168
+ "char": "s",
4169
+ "description": "Subscription name",
4170
+ "name": "subscription",
4171
+ "required": true,
4172
+ "hasDynamicHelp": false,
4173
+ "multiple": false,
4174
+ "type": "option"
4175
+ },
4176
+ "condition": {
4177
+ "description": "Only keys in this condition",
4178
+ "name": "condition",
4220
4179
  "hasDynamicHelp": false,
4221
4180
  "multiple": false,
4222
4181
  "options": [
4223
- "text",
4224
- "json",
4225
- "md"
4182
+ "Idle",
4183
+ "InFlight",
4184
+ "Blocked"
4226
4185
  ],
4227
4186
  "type": "option"
4187
+ },
4188
+ "cursor": {
4189
+ "description": "nextCursor from a previous page",
4190
+ "name": "cursor",
4191
+ "hasDynamicHelp": false,
4192
+ "multiple": false,
4193
+ "type": "option"
4194
+ },
4195
+ "page-size": {
4196
+ "description": "Items per page (1–500)",
4197
+ "name": "page-size",
4198
+ "default": 50,
4199
+ "hasDynamicHelp": false,
4200
+ "multiple": false,
4201
+ "type": "option"
4202
+ },
4203
+ "json": {
4204
+ "description": "Print JSON instead of a table",
4205
+ "name": "json",
4206
+ "allowNo": false,
4207
+ "type": "boolean"
4228
4208
  }
4229
4209
  },
4230
4210
  "hasDynamicHelp": false,
4231
4211
  "hiddenAliases": [],
4232
- "id": "standards:usage",
4212
+ "id": "queue:partitions",
4233
4213
  "pluginAlias": "@memberjunction/cli",
4234
4214
  "pluginName": "@memberjunction/cli",
4235
4215
  "pluginType": "core",
@@ -4239,64 +4219,80 @@
4239
4219
  "relativePath": [
4240
4220
  "dist",
4241
4221
  "commands",
4242
- "standards",
4243
- "usage.js"
4222
+ "queue",
4223
+ "partitions.js"
4244
4224
  ]
4245
4225
  },
4246
- "sync:file-reset": {
4226
+ "queue:publish": {
4247
4227
  "aliases": [],
4248
4228
  "args": {},
4249
- "description": "Reset file metadata sections",
4229
+ "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
4250
4230
  "examples": [
4251
- "<%= config.bin %> <%= command.id %>",
4252
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4253
- "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
4254
- "<%= config.bin %> <%= command.id %> --all"
4231
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4232
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
4233
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
4255
4234
  ],
4256
4235
  "flags": {
4257
- "dir": {
4258
- "description": "Specific entity directory to reset",
4259
- "name": "dir",
4236
+ "topic": {
4237
+ "char": "t",
4238
+ "description": "Topic name",
4239
+ "name": "topic",
4240
+ "required": true,
4260
4241
  "hasDynamicHelp": false,
4261
4242
  "multiple": false,
4262
4243
  "type": "option"
4263
4244
  },
4264
- "sections": {
4265
- "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
4266
- "name": "sections",
4245
+ "payload": {
4246
+ "char": "p",
4247
+ "description": "Message payload as JSON",
4248
+ "name": "payload",
4249
+ "default": "{}",
4267
4250
  "hasDynamicHelp": false,
4268
4251
  "multiple": false,
4269
4252
  "type": "option"
4270
4253
  },
4271
- "all": {
4272
- "description": "Reset all metadata sections",
4273
- "name": "all",
4274
- "allowNo": false,
4275
- "type": "boolean"
4254
+ "partition-key": {
4255
+ "char": "k",
4256
+ "description": "PartitionKey for Exclusive / Ordered subscriptions",
4257
+ "name": "partition-key",
4258
+ "hasDynamicHelp": false,
4259
+ "multiple": false,
4260
+ "type": "option"
4276
4261
  },
4277
- "dry-run": {
4278
- "description": "Show what would be reset without actually resetting",
4279
- "name": "dry-run",
4280
- "allowNo": false,
4281
- "type": "boolean"
4262
+ "dedup-key": {
4263
+ "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
4264
+ "name": "dedup-key",
4265
+ "hasDynamicHelp": false,
4266
+ "multiple": false,
4267
+ "type": "option"
4282
4268
  },
4283
- "force": {
4284
- "description": "Skip confirmation prompts",
4285
- "name": "force",
4286
- "allowNo": false,
4287
- "type": "boolean"
4269
+ "attribute": {
4270
+ "char": "a",
4271
+ "description": "Message attribute as key=value (repeatable)",
4272
+ "name": "attribute",
4273
+ "hasDynamicHelp": false,
4274
+ "multiple": true,
4275
+ "type": "option"
4288
4276
  },
4289
- "verbose": {
4290
- "char": "v",
4291
- "description": "Show detailed output",
4292
- "name": "verbose",
4277
+ "count": {
4278
+ "char": "n",
4279
+ "description": "How many copies to publish in one batch",
4280
+ "name": "count",
4281
+ "default": 1,
4282
+ "hasDynamicHelp": false,
4283
+ "multiple": false,
4284
+ "type": "option"
4285
+ },
4286
+ "json": {
4287
+ "description": "Print the publish results as JSON",
4288
+ "name": "json",
4293
4289
  "allowNo": false,
4294
4290
  "type": "boolean"
4295
4291
  }
4296
4292
  },
4297
4293
  "hasDynamicHelp": false,
4298
4294
  "hiddenAliases": [],
4299
- "id": "sync:file-reset",
4295
+ "id": "queue:publish",
4300
4296
  "pluginAlias": "@memberjunction/cli",
4301
4297
  "pluginName": "@memberjunction/cli",
4302
4298
  "pluginType": "core",
@@ -4306,69 +4302,87 @@
4306
4302
  "relativePath": [
4307
4303
  "dist",
4308
4304
  "commands",
4309
- "sync",
4310
- "file-reset.js"
4305
+ "queue",
4306
+ "publish.js"
4311
4307
  ]
4312
4308
  },
4313
- "sync:init": {
4309
+ "queue:replay": {
4314
4310
  "aliases": [],
4315
4311
  "args": {},
4316
- "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\").",
4312
+ "description": "Replay one dead-lettered work-queue delivery",
4317
4313
  "examples": [
4318
- {
4319
- "command": "<%= config.bin %> <%= command.id %> --setup-entity=no",
4320
- "description": "Initialize with no entity directory"
4321
- },
4322
- {
4323
- "command": "<%= config.bin %> <%= command.id %> --setup-entity=ai-prompts",
4324
- "description": "Initialize and set up the AI Prompts directory"
4325
- },
4326
- {
4327
- "command": "<%= config.bin %> <%= command.id %> --setup-entity=other --entity=\"MJ: AI Models\" --dir=ai-models",
4328
- "description": "Initialize for an arbitrary entity"
4329
- },
4330
- {
4331
- "command": "<%= config.bin %> <%= command.id %> --no-interactive --setup-entity=no",
4332
- "description": "Never prompt, even at a terminal"
4333
- }
4314
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
4334
4315
  ],
4335
4316
  "flags": {
4336
- "setup-entity": {
4337
- "description": "Which entity directory to set up. Use \"no\" to skip.",
4338
- "name": "setup-entity",
4339
- "hasDynamicHelp": false,
4317
+ "subscription": {
4318
+ "char": "s",
4319
+ "description": "Subscription name",
4320
+ "name": "subscription",
4321
+ "required": true,
4322
+ "hasDynamicHelp": false,
4340
4323
  "multiple": false,
4341
- "options": [
4342
- "ai-prompts",
4343
- "other",
4344
- "no"
4345
- ],
4346
4324
  "type": "option"
4347
4325
  },
4348
- "entity": {
4349
- "description": "Entity name when --setup-entity=other (e.g. \"MJ: AI Models\").",
4350
- "name": "entity",
4326
+ "delivery": {
4327
+ "char": "d",
4328
+ "description": "DeliveryID from `mj queue dead-letters`",
4329
+ "name": "delivery",
4330
+ "required": true,
4351
4331
  "hasDynamicHelp": false,
4352
4332
  "multiple": false,
4353
4333
  "type": "option"
4354
4334
  },
4355
- "dir": {
4356
- "description": "Directory name when --setup-entity=other. Defaults to a slug of --entity.",
4357
- "name": "dir",
4335
+ "note": {
4336
+ "description": "Operator note stored with the resolution",
4337
+ "name": "note",
4338
+ "hasDynamicHelp": false,
4339
+ "multiple": false,
4340
+ "type": "option"
4341
+ }
4342
+ },
4343
+ "hasDynamicHelp": false,
4344
+ "hiddenAliases": [],
4345
+ "id": "queue:replay",
4346
+ "pluginAlias": "@memberjunction/cli",
4347
+ "pluginName": "@memberjunction/cli",
4348
+ "pluginType": "core",
4349
+ "strict": true,
4350
+ "enableJsonFlag": false,
4351
+ "isESM": true,
4352
+ "relativePath": [
4353
+ "dist",
4354
+ "commands",
4355
+ "queue",
4356
+ "replay.js"
4357
+ ]
4358
+ },
4359
+ "queue:stats": {
4360
+ "aliases": [],
4361
+ "args": {},
4362
+ "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
4363
+ "examples": [
4364
+ "<%= config.bin %> <%= command.id %>",
4365
+ "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
4366
+ ],
4367
+ "flags": {
4368
+ "subscription": {
4369
+ "char": "s",
4370
+ "description": "Subscription name; omit for every subscription",
4371
+ "name": "subscription",
4358
4372
  "hasDynamicHelp": false,
4359
4373
  "multiple": false,
4360
4374
  "type": "option"
4361
4375
  },
4362
- "overwrite": {
4363
- "description": "Overwrite an existing configuration. Without this, an initialized directory is left untouched.",
4364
- "name": "overwrite",
4365
- "allowNo": true,
4376
+ "json": {
4377
+ "description": "Print JSON instead of a table",
4378
+ "name": "json",
4379
+ "allowNo": false,
4366
4380
  "type": "boolean"
4367
4381
  }
4368
4382
  },
4369
4383
  "hasDynamicHelp": false,
4370
4384
  "hiddenAliases": [],
4371
- "id": "sync:init",
4385
+ "id": "queue:stats",
4372
4386
  "pluginAlias": "@memberjunction/cli",
4373
4387
  "pluginName": "@memberjunction/cli",
4374
4388
  "pluginType": "core",
@@ -4378,156 +4392,153 @@
4378
4392
  "relativePath": [
4379
4393
  "dist",
4380
4394
  "commands",
4381
- "sync",
4382
- "init.js"
4395
+ "queue",
4396
+ "stats.js"
4383
4397
  ]
4384
4398
  },
4385
- "sync:pull": {
4399
+ "queue:usage": {
4386
4400
  "aliases": [],
4387
4401
  "args": {},
4388
- "description": "Pull metadata from database to local files",
4402
+ "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
4389
4403
  "flags": {
4390
4404
  "format": {
4391
- "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
4405
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4392
4406
  "name": "format",
4393
4407
  "hasDynamicHelp": false,
4394
4408
  "multiple": false,
4395
4409
  "options": [
4396
4410
  "text",
4397
4411
  "json",
4398
- "md",
4399
- "human",
4400
- "console",
4401
- "markdown"
4412
+ "md"
4402
4413
  ],
4403
4414
  "type": "option"
4404
- },
4405
- "verbose": {
4406
- "char": "v",
4407
- "description": "Show detailed output",
4408
- "name": "verbose",
4409
- "allowNo": false,
4410
- "type": "boolean"
4411
- },
4412
- "no-banner": {
4413
- "description": "Suppress the startup banner and runtime advisory",
4414
- "name": "no-banner",
4415
- "allowNo": false,
4416
- "type": "boolean"
4417
- },
4418
- "no-app-packages": {
4419
- "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.",
4420
- "name": "no-app-packages",
4421
- "allowNo": false,
4422
- "type": "boolean"
4423
- },
4424
- "interactive": {
4425
- "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.",
4426
- "name": "interactive",
4427
- "allowNo": true,
4428
- "type": "boolean"
4429
- },
4430
- "entity": {
4431
- "description": "Entity name to pull",
4432
- "name": "entity",
4433
- "required": true,
4434
- "hasDynamicHelp": false,
4435
- "multiple": false,
4436
- "type": "option"
4437
- },
4438
- "filter": {
4439
- "description": "Additional filter for pulling specific records",
4440
- "name": "filter",
4415
+ }
4416
+ },
4417
+ "hasDynamicHelp": false,
4418
+ "hiddenAliases": [],
4419
+ "id": "queue:usage",
4420
+ "pluginAlias": "@memberjunction/cli",
4421
+ "pluginName": "@memberjunction/cli",
4422
+ "pluginType": "core",
4423
+ "strict": true,
4424
+ "enableJsonFlag": false,
4425
+ "isESM": true,
4426
+ "relativePath": [
4427
+ "dist",
4428
+ "commands",
4429
+ "queue",
4430
+ "usage.js"
4431
+ ]
4432
+ },
4433
+ "queue:validate-bindings": {
4434
+ "aliases": [],
4435
+ "args": {},
4436
+ "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
4437
+ "examples": [
4438
+ "<%= config.bin %> <%= command.id %>",
4439
+ "<%= config.bin %> <%= command.id %> --transport AWS-prod"
4440
+ ],
4441
+ "flags": {
4442
+ "transport": {
4443
+ "char": "t",
4444
+ "description": "Validate one transport's bindings against its resources",
4445
+ "name": "transport",
4441
4446
  "hasDynamicHelp": false,
4442
4447
  "multiple": false,
4443
4448
  "type": "option"
4444
4449
  },
4445
- "dry-run": {
4446
- "description": "Show what would be pulled without actually pulling",
4447
- "name": "dry-run",
4450
+ "json": {
4451
+ "description": "Print issues as JSON",
4452
+ "name": "json",
4448
4453
  "allowNo": false,
4449
4454
  "type": "boolean"
4450
- },
4451
- "multi-file": {
4452
- "description": "Create a single file with multiple records (provide filename)",
4453
- "name": "multi-file",
4455
+ }
4456
+ },
4457
+ "hasDynamicHelp": false,
4458
+ "hiddenAliases": [],
4459
+ "id": "queue:validate-bindings",
4460
+ "pluginAlias": "@memberjunction/cli",
4461
+ "pluginName": "@memberjunction/cli",
4462
+ "pluginType": "core",
4463
+ "strict": true,
4464
+ "enableJsonFlag": false,
4465
+ "isESM": true,
4466
+ "relativePath": [
4467
+ "dist",
4468
+ "commands",
4469
+ "queue",
4470
+ "validate-bindings.js"
4471
+ ]
4472
+ },
4473
+ "queue:work": {
4474
+ "aliases": [],
4475
+ "args": {},
4476
+ "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
4477
+ "examples": [
4478
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
4479
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
4480
+ "<%= config.bin %> <%= command.id %> --subscription \"*\""
4481
+ ],
4482
+ "flags": {
4483
+ "subscription": {
4484
+ "char": "s",
4485
+ "description": "Subscription name, or '*' for every MJWorker subscription",
4486
+ "name": "subscription",
4487
+ "required": true,
4454
4488
  "hasDynamicHelp": false,
4455
4489
  "multiple": false,
4456
4490
  "type": "option"
4457
4491
  },
4458
- "no-validate": {
4459
- "description": "Skip validation before pull",
4460
- "name": "no-validate",
4461
- "allowNo": false,
4462
- "type": "boolean"
4463
- },
4464
- "update-existing": {
4465
- "description": "Update existing records during pull (default: the folder config, else true)",
4466
- "name": "update-existing",
4467
- "allowNo": true,
4468
- "type": "boolean"
4469
- },
4470
- "create-new": {
4471
- "description": "Create new files for records not found locally (default: the folder config, else true)",
4472
- "name": "create-new",
4473
- "allowNo": true,
4474
- "type": "boolean"
4475
- },
4476
- "backup-before-update": {
4477
- "description": "Create backups before updating files",
4478
- "name": "backup-before-update",
4492
+ "once": {
4493
+ "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
4494
+ "name": "once",
4479
4495
  "allowNo": false,
4480
4496
  "type": "boolean"
4481
4497
  },
4482
- "merge-strategy": {
4483
- "description": "Merge strategy for updates (default: the folder config, else merge)",
4484
- "name": "merge-strategy",
4498
+ "max": {
4499
+ "dependsOn": [
4500
+ "once"
4501
+ ],
4502
+ "description": "With --once: how many deliveries to receive",
4503
+ "name": "max",
4504
+ "default": 1,
4485
4505
  "hasDynamicHelp": false,
4486
4506
  "multiple": false,
4487
- "options": [
4488
- "merge",
4489
- "overwrite",
4490
- "skip"
4491
- ],
4492
4507
  "type": "option"
4493
4508
  },
4494
- "backup-directory": {
4495
- "description": "Custom backup directory (default: .backups)",
4496
- "name": "backup-directory",
4509
+ "idle-exit-ms": {
4510
+ "dependsOn": [
4511
+ "once"
4512
+ ],
4513
+ "description": "With --once: exit after this long with an empty queue",
4514
+ "name": "idle-exit-ms",
4515
+ "default": 5000,
4497
4516
  "hasDynamicHelp": false,
4498
4517
  "multiple": false,
4499
4518
  "type": "option"
4500
4519
  },
4501
- "preserve-fields": {
4502
- "description": "Comma-separated list of fields to preserve during updates",
4503
- "name": "preserve-fields",
4520
+ "max-duration-ms": {
4521
+ "dependsOn": [
4522
+ "once"
4523
+ ],
4524
+ "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
4525
+ "name": "max-duration-ms",
4504
4526
  "hasDynamicHelp": false,
4505
- "multiple": true,
4527
+ "multiple": false,
4506
4528
  "type": "option"
4507
4529
  },
4508
- "exclude-fields": {
4509
- "description": "Comma-separated list of fields to exclude from pull",
4510
- "name": "exclude-fields",
4511
- "hasDynamicHelp": false,
4512
- "multiple": true,
4513
- "type": "option"
4514
- },
4515
- "target-dir": {
4516
- "description": "Specific target directory (overrides auto-discovery)",
4517
- "name": "target-dir",
4530
+ "concurrency": {
4531
+ "description": "Handlers in flight per subscription",
4532
+ "name": "concurrency",
4533
+ "default": 1,
4518
4534
  "hasDynamicHelp": false,
4519
4535
  "multiple": false,
4520
4536
  "type": "option"
4521
4537
  },
4522
- "incremental": {
4523
- "description": "Only pull records updated since last successful pull",
4524
- "name": "incremental",
4525
- "allowNo": false,
4526
- "type": "boolean"
4527
- },
4528
- "since": {
4529
- "description": "Only pull records updated after this ISO 8601 timestamp",
4530
- "name": "since",
4538
+ "shutdown-drain-ms": {
4539
+ "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
4540
+ "name": "shutdown-drain-ms",
4541
+ "default": 30000,
4531
4542
  "hasDynamicHelp": false,
4532
4543
  "multiple": false,
4533
4544
  "type": "option"
@@ -4535,315 +4546,126 @@
4535
4546
  },
4536
4547
  "hasDynamicHelp": false,
4537
4548
  "hiddenAliases": [],
4538
- "id": "sync:pull",
4549
+ "id": "queue:work",
4539
4550
  "pluginAlias": "@memberjunction/cli",
4540
4551
  "pluginName": "@memberjunction/cli",
4541
4552
  "pluginType": "core",
4542
4553
  "strict": true,
4543
4554
  "enableJsonFlag": false,
4544
- "Examples": [
4545
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
4546
- "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
4547
- "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
4548
- ],
4549
- "Usage": {
4550
- "domain": "sync",
4551
- "command": "sync:pull",
4552
- "summary": "Pull database records into local metadata files.",
4553
- "description": "Writes records of --entity into the matching entity directory, creating or updating files per the merge strategy.",
4554
- "flags": [
4555
- {
4556
- "name": "--entity",
4557
- "type": "string",
4558
- "description": "Entity name to pull (required)"
4559
- },
4560
- {
4561
- "name": "--filter",
4562
- "type": "string",
4563
- "description": "Extra SQL filter for which records to pull"
4564
- },
4565
- {
4566
- "name": "--merge-strategy",
4567
- "type": "merge|overwrite|skip",
4568
- "description": "How to reconcile existing files"
4569
- },
4570
- {
4571
- "name": "--dry-run",
4572
- "type": "boolean",
4573
- "description": "Report what would be pulled without writing"
4574
- },
4575
- {
4576
- "name": "--format",
4577
- "type": "text|json|md",
4578
- "description": "Output format (json for machine-readable result)"
4579
- }
4580
- ],
4581
- "examples": [
4582
- "mj sync pull --entity=\"MJ: AI Prompts\"",
4583
- "mj sync pull --entity=\"Actions\" --format=json"
4584
- ],
4585
- "runtime": {
4586
- "class": "variable",
4587
- "typicalSeconds": 15,
4588
- "note": "scales with number of records matched for --entity"
4589
- }
4590
- },
4591
4555
  "isESM": true,
4592
4556
  "relativePath": [
4593
4557
  "dist",
4594
4558
  "commands",
4595
- "sync",
4596
- "pull.js"
4559
+ "queue",
4560
+ "work.js"
4597
4561
  ]
4598
4562
  },
4599
- "sync:push": {
4563
+ "sql-convert": {
4600
4564
  "aliases": [],
4601
- "args": {},
4602
- "description": "Push local file changes to the database",
4565
+ "args": {
4566
+ "source": {
4567
+ "description": "Source SQL file path",
4568
+ "name": "source",
4569
+ "required": true
4570
+ }
4571
+ },
4572
+ "description": "Convert SQL files between database dialects using rule-based BatchConverter engine",
4573
+ "examples": [
4574
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres",
4575
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --output converted.sql",
4576
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --schema my_schema",
4577
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --no-header --verbose"
4578
+ ],
4603
4579
  "flags": {
4604
- "format": {
4605
- "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
4606
- "name": "format",
4607
- "hasDynamicHelp": false,
4608
- "multiple": false,
4609
- "options": [
4610
- "text",
4611
- "json",
4612
- "md",
4613
- "human",
4614
- "console",
4615
- "markdown"
4616
- ],
4617
- "type": "option"
4618
- },
4619
- "verbose": {
4620
- "char": "v",
4621
- "description": "Show detailed output",
4622
- "name": "verbose",
4623
- "allowNo": false,
4624
- "type": "boolean"
4625
- },
4626
- "no-banner": {
4627
- "description": "Suppress the startup banner and runtime advisory",
4628
- "name": "no-banner",
4629
- "allowNo": false,
4630
- "type": "boolean"
4631
- },
4632
- "no-app-packages": {
4633
- "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.",
4634
- "name": "no-app-packages",
4635
- "allowNo": false,
4636
- "type": "boolean"
4637
- },
4638
- "interactive": {
4639
- "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.",
4640
- "name": "interactive",
4641
- "allowNo": true,
4642
- "type": "boolean"
4643
- },
4644
- "dir": {
4645
- "description": "Specific entity directory to push",
4646
- "name": "dir",
4580
+ "from": {
4581
+ "description": "Source SQL dialect",
4582
+ "name": "from",
4583
+ "required": true,
4647
4584
  "hasDynamicHelp": false,
4648
4585
  "multiple": false,
4649
4586
  "type": "option"
4650
4587
  },
4651
- "dry-run": {
4652
- "description": "Show what would be pushed without actually pushing",
4653
- "name": "dry-run",
4654
- "allowNo": false,
4655
- "type": "boolean"
4656
- },
4657
- "ci": {
4658
- "description": "CI mode - no prompts, fail on issues",
4659
- "name": "ci",
4660
- "allowNo": false,
4661
- "type": "boolean"
4662
- },
4663
- "no-validate": {
4664
- "description": "Skip validation before push",
4665
- "name": "no-validate",
4666
- "allowNo": false,
4667
- "type": "boolean"
4668
- },
4669
- "delete-db-only": {
4670
- "description": "Delete database-only records that reference records being deleted (prevents FK errors)",
4671
- "name": "delete-db-only",
4672
- "allowNo": false,
4673
- "type": "boolean"
4674
- },
4675
- "isolated-transactions": {
4676
- "description": "Give every JSON-root graph its own connection and transaction, so siblings are written in parallel and each create/update commits as it is saved (a failure does not roll those back). Off by default: the whole push runs in one transaction, one graph at a time. Overrides push.isolatedTransactions in every .mj-sync.json, in both directions — use --no-isolated-transactions to force one run back to a single transaction",
4677
- "name": "isolated-transactions",
4678
- "allowNo": true,
4679
- "type": "boolean"
4680
- },
4681
- "parallel-batch-size": {
4682
- "description": "JSON-root graphs to process in parallel in a directory using isolated transactions (default: 10)",
4683
- "name": "parallel-batch-size",
4588
+ "to": {
4589
+ "description": "Target SQL dialect",
4590
+ "name": "to",
4591
+ "required": true,
4684
4592
  "hasDynamicHelp": false,
4685
4593
  "multiple": false,
4686
4594
  "type": "option"
4687
4595
  },
4688
- "include": {
4689
- "description": "Only process these directories (comma-separated, supports patterns)",
4690
- "name": "include",
4596
+ "output": {
4597
+ "char": "o",
4598
+ "description": "Output file path (default: <source>.converted.<ext>)",
4599
+ "name": "output",
4691
4600
  "hasDynamicHelp": false,
4692
4601
  "multiple": false,
4693
4602
  "type": "option"
4694
4603
  },
4695
- "exclude": {
4696
- "description": "Skip these directories (comma-separated, supports patterns)",
4697
- "name": "exclude",
4604
+ "schema": {
4605
+ "description": "Target schema name",
4606
+ "name": "schema",
4607
+ "default": "__mj",
4698
4608
  "hasDynamicHelp": false,
4699
4609
  "multiple": false,
4700
4610
  "type": "option"
4701
4611
  },
4702
- "incremental": {
4703
- "description": "Skip unchanged files using stored checksums from last push",
4704
- "name": "incremental",
4612
+ "no-header": {
4613
+ "description": "Skip PG header (extensions, schema, implicit cast)",
4614
+ "name": "no-header",
4705
4615
  "allowNo": false,
4706
4616
  "type": "boolean"
4707
4617
  },
4708
- "change-detail": {
4709
- "description": "Write a detailed per-record change report (primary keys + field diffs) to a file",
4710
- "name": "change-detail",
4618
+ "no-post-process": {
4619
+ "description": "Skip post-processing pass",
4620
+ "name": "no-post-process",
4711
4621
  "allowNo": false,
4712
4622
  "type": "boolean"
4713
4623
  },
4714
- "skip-cache-clear": {
4715
- "description": "Do not clear the shared Redis cache (REDIS_URL) after pushing. Also: MJ_SKIP_SHARED_CACHE_CLEAR=1",
4716
- "name": "skip-cache-clear",
4624
+ "verbose": {
4625
+ "char": "v",
4626
+ "description": "Show per-statement progress and detailed report",
4627
+ "name": "verbose",
4717
4628
  "allowNo": false,
4718
4629
  "type": "boolean"
4719
4630
  }
4720
4631
  },
4721
4632
  "hasDynamicHelp": false,
4722
4633
  "hiddenAliases": [],
4723
- "id": "sync:push",
4634
+ "id": "sql-convert",
4724
4635
  "pluginAlias": "@memberjunction/cli",
4725
4636
  "pluginName": "@memberjunction/cli",
4726
4637
  "pluginType": "core",
4727
4638
  "strict": true,
4728
4639
  "enableJsonFlag": false,
4729
- "Examples": [
4730
- "<%= config.bin %> <%= command.id %>",
4731
- "<%= config.bin %> <%= command.id %> --dry-run",
4732
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4733
- "<%= config.bin %> <%= command.id %> --ci --format=json"
4734
- ],
4735
- "Usage": {
4736
- "domain": "sync",
4737
- "command": "sync:push",
4738
- "summary": "Push local metadata files to the database (upsert).",
4739
- "description": "Reads entity directories under --dir and creates/updates matching records. Runs validation first unless --no-validate.",
4740
- "flags": [
4741
- {
4742
- "name": "--dir",
4743
- "type": "string",
4744
- "description": "Entity directory to push"
4745
- },
4746
- {
4747
- "name": "--dry-run",
4748
- "type": "boolean",
4749
- "description": "Report what would change without writing"
4750
- },
4751
- {
4752
- "name": "--ci",
4753
- "type": "boolean",
4754
- "description": "No prompts; non-zero exit on error"
4755
- },
4756
- {
4757
- "name": "--no-validate",
4758
- "type": "boolean",
4759
- "description": "Skip pre-push validation"
4760
- },
4761
- {
4762
- "name": "--incremental",
4763
- "type": "boolean",
4764
- "description": "Skip unchanged files using stored checksums"
4765
- },
4766
- {
4767
- "name": "--isolated-transactions",
4768
- "type": "boolean",
4769
- "description": "Per-graph connections; creates/updates commit as they go and are not rolled back"
4770
- },
4771
- {
4772
- "name": "--parallel-batch-size",
4773
- "type": "number",
4774
- "description": "Graphs at once in an isolated directory (default 10)"
4775
- },
4776
- {
4777
- "name": "--format",
4778
- "type": "text|json|md",
4779
- "description": "Output format (json for machine-readable result)"
4780
- },
4781
- {
4782
- "name": "--skip-cache-clear",
4783
- "type": "boolean",
4784
- "description": "Do not clear the shared Redis cache after pushing"
4785
- }
4786
- ],
4787
- "examples": [
4788
- "mj sync push --dir=ai-agents",
4789
- "mj sync push --ci --format=json"
4790
- ],
4791
- "runtime": {
4792
- "class": "variable",
4793
- "typicalSeconds": 20,
4794
- "note": "scales with number of records in --dir"
4795
- }
4796
- },
4797
4640
  "isESM": true,
4798
4641
  "relativePath": [
4799
4642
  "dist",
4800
4643
  "commands",
4801
- "sync",
4802
- "push.js"
4644
+ "sql-convert",
4645
+ "index.js"
4803
4646
  ]
4804
4647
  },
4805
- "sync:status": {
4648
+ "sql-convert:usage": {
4806
4649
  "aliases": [],
4807
4650
  "args": {},
4808
- "description": "Show status of local files vs database",
4809
- "examples": [
4810
- "<%= config.bin %> <%= command.id %>",
4811
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4812
- "<%= config.bin %> <%= command.id %> --verbose"
4813
- ],
4651
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sql-convert` command.",
4814
4652
  "flags": {
4815
- "dir": {
4816
- "description": "Specific entity directory to check status",
4817
- "name": "dir",
4818
- "hasDynamicHelp": false,
4819
- "multiple": false,
4820
- "type": "option"
4821
- },
4822
- "verbose": {
4823
- "char": "v",
4824
- "description": "Show detailed field-level differences",
4825
- "name": "verbose",
4826
- "allowNo": false,
4827
- "type": "boolean"
4828
- },
4829
- "include": {
4830
- "description": "Only process these directories (comma-separated, supports patterns)",
4831
- "name": "include",
4832
- "hasDynamicHelp": false,
4833
- "multiple": false,
4834
- "type": "option"
4835
- },
4836
- "exclude": {
4837
- "description": "Skip these directories (comma-separated, supports patterns)",
4838
- "name": "exclude",
4653
+ "format": {
4654
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4655
+ "name": "format",
4839
4656
  "hasDynamicHelp": false,
4840
4657
  "multiple": false,
4658
+ "options": [
4659
+ "text",
4660
+ "json",
4661
+ "md"
4662
+ ],
4841
4663
  "type": "option"
4842
4664
  }
4843
4665
  },
4844
4666
  "hasDynamicHelp": false,
4845
4667
  "hiddenAliases": [],
4846
- "id": "sync:status",
4668
+ "id": "sql-convert:usage",
4847
4669
  "pluginAlias": "@memberjunction/cli",
4848
4670
  "pluginName": "@memberjunction/cli",
4849
4671
  "pluginType": "core",
@@ -4853,31 +4675,87 @@
4853
4675
  "relativePath": [
4854
4676
  "dist",
4855
4677
  "commands",
4856
- "sync",
4857
- "status.js"
4678
+ "sql-convert",
4679
+ "usage.js"
4858
4680
  ]
4859
4681
  },
4860
- "sync:usage": {
4682
+ "standards:adopt": {
4861
4683
  "aliases": [],
4862
4684
  "args": {},
4863
- "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
4685
+ "description": "Adopt MemberJunction standards in this repository (config + CI + npm script + layer declarations)",
4686
+ "examples": [
4687
+ {
4688
+ "command": "<%= config.bin %> <%= command.id %>",
4689
+ "description": "Adopt every standard available at this CLI version"
4690
+ },
4691
+ {
4692
+ "command": "<%= config.bin %> <%= command.id %> --ci github --declare-compliant",
4693
+ "description": "Full setup: config, GitHub workflow, npm script, and declare already-compliant packages"
4694
+ },
4695
+ {
4696
+ "command": "<%= config.bin %> <%= command.id %> --dry-run",
4697
+ "description": "Show what would change"
4698
+ },
4699
+ {
4700
+ "command": "<%= config.bin %> <%= command.id %> --upgrade",
4701
+ "description": "Review standards added since this repo adopted, and bump its recorded version"
4702
+ }
4703
+ ],
4864
4704
  "flags": {
4865
- "format": {
4866
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4867
- "name": "format",
4705
+ "cwd": {
4706
+ "description": "Repository root. Defaults to the current directory.",
4707
+ "name": "cwd",
4708
+ "hasDynamicHelp": false,
4709
+ "multiple": false,
4710
+ "type": "option"
4711
+ },
4712
+ "check": {
4713
+ "description": "Only adopt these check ids.",
4714
+ "name": "check",
4715
+ "hasDynamicHelp": false,
4716
+ "multiple": true,
4717
+ "type": "option"
4718
+ },
4719
+ "ci": {
4720
+ "description": "Write a CI workflow for this provider.",
4721
+ "name": "ci",
4722
+ "default": "none",
4868
4723
  "hasDynamicHelp": false,
4869
4724
  "multiple": false,
4870
4725
  "options": [
4871
- "text",
4872
- "json",
4873
- "md"
4726
+ "github",
4727
+ "none"
4874
4728
  ],
4875
4729
  "type": "option"
4730
+ },
4731
+ "npm-script": {
4732
+ "description": "Add an \"mj:standards\" script to the root package.json.",
4733
+ "name": "npm-script",
4734
+ "allowNo": true,
4735
+ "type": "boolean"
4736
+ },
4737
+ "declare-compliant": {
4738
+ "description": "Declare mjUILayer on packages that already comply. Without this a fresh adoption enforces nothing — every package is undeclared, so every package is skipped.",
4739
+ "name": "declare-compliant",
4740
+ "allowNo": false,
4741
+ "type": "boolean"
4742
+ },
4743
+ "upgrade": {
4744
+ "description": "Enable standards newer than this repo’s recorded StandardsVersion, and bump it.",
4745
+ "name": "upgrade",
4746
+ "allowNo": false,
4747
+ "type": "boolean"
4748
+ },
4749
+ "dry-run": {
4750
+ "description": "Report what would change; write nothing.",
4751
+ "name": "dry-run",
4752
+ "allowNo": false,
4753
+ "type": "boolean"
4876
4754
  }
4877
4755
  },
4878
4756
  "hasDynamicHelp": false,
4879
4757
  "hiddenAliases": [],
4880
- "id": "sync:usage",
4758
+ "id": "standards:adopt",
4881
4759
  "pluginAlias": "@memberjunction/cli",
4882
4760
  "pluginName": "@memberjunction/cli",
4883
4761
  "pluginType": "core",
@@ -4887,52 +4765,59 @@
4887
4765
  "relativePath": [
4888
4766
  "dist",
4889
4767
  "commands",
4890
- "sync",
4891
- "usage.js"
4768
+ "standards",
4769
+ "adopt.js"
4892
4770
  ]
4893
4771
  },
4894
- "sync:validate": {
4772
+ "standards:check": {
4895
4773
  "aliases": [],
4896
4774
  "args": {},
4897
- "description": "Validate metadata files",
4775
+ "description": "Run the MemberJunction standards this repository has adopted",
4898
4776
  "examples": [
4899
- "<%= config.bin %> <%= command.id %>",
4900
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4901
- "<%= config.bin %> <%= command.id %> --save-report",
4902
- "<%= config.bin %> <%= command.id %> --verbose"
4777
+ {
4778
+ "command": "<%= config.bin %> <%= command.id %>",
4779
+ "description": "Run every adopted standard"
4780
+ },
4781
+ {
4782
+ "command": "<%= config.bin %> <%= command.id %> --check ui-layers",
4783
+ "description": "Run one standard"
4784
+ },
4785
+ {
4786
+ "command": "<%= config.bin %> <%= command.id %> --strict",
4787
+ "description": "Fail on warnings too"
4788
+ }
4903
4789
  ],
4904
4790
  "flags": {
4905
- "dir": {
4906
- "description": "Specific entity directory to validate",
4907
- "name": "dir",
4791
+ "cwd": {
4792
+ "description": "Repository root. Defaults to the current directory.",
4793
+ "name": "cwd",
4908
4794
  "hasDynamicHelp": false,
4909
4795
  "multiple": false,
4910
4796
  "type": "option"
4911
4797
  },
4912
- "verbose": {
4913
- "char": "v",
4914
- "description": "Show detailed validation output",
4915
- "name": "verbose",
4798
+ "check": {
4799
+ "description": "Only run these check ids.",
4800
+ "name": "check",
4801
+ "hasDynamicHelp": false,
4802
+ "multiple": true,
4803
+ "type": "option"
4804
+ },
4805
+ "strict": {
4806
+ "description": "Treat warnings as errors. Use in CI once a newly adopted check is clean.",
4807
+ "name": "strict",
4916
4808
  "allowNo": false,
4917
4809
  "type": "boolean"
4918
4810
  },
4919
- "save-report": {
4920
- "description": "Save validation report as markdown file",
4921
- "name": "save-report",
4811
+ "quiet": {
4812
+ "description": "Print only the summary line.",
4813
+ "name": "quiet",
4922
4814
  "allowNo": false,
4923
4815
  "type": "boolean"
4924
- },
4925
- "output": {
4926
- "description": "Output file path for validation report (default: validation-report.md)",
4927
- "name": "output",
4928
- "hasDynamicHelp": false,
4929
- "multiple": false,
4930
- "type": "option"
4931
4816
  }
4932
4817
  },
4933
4818
  "hasDynamicHelp": false,
4934
4819
  "hiddenAliases": [],
4935
- "id": "sync:validate",
4820
+ "id": "standards:check",
4936
4821
  "pluginAlias": "@memberjunction/cli",
4937
4822
  "pluginName": "@memberjunction/cli",
4938
4823
  "pluginType": "core",
@@ -4942,44 +4827,25 @@
4942
4827
  "relativePath": [
4943
4828
  "dist",
4944
4829
  "commands",
4945
- "sync",
4946
- "validate.js"
4830
+ "standards",
4831
+ "check.js"
4947
4832
  ]
4948
4833
  },
4949
- "sync:watch": {
4834
+ "standards:list": {
4950
4835
  "aliases": [],
4951
4836
  "args": {},
4952
- "description": "Watch for file changes and sync automatically",
4953
- "examples": [
4954
- "<%= config.bin %> <%= command.id %>",
4955
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4956
- "<%= config.bin %> <%= command.id %> --debounce=1000",
4957
- "<%= config.bin %> <%= command.id %> --no-validate"
4958
- ],
4837
+ "description": "List every MemberJunction standard and this repository’s stance on it",
4959
4838
  "flags": {
4960
- "dir": {
4961
- "description": "Specific entity directory to watch",
4962
- "name": "dir",
4963
- "hasDynamicHelp": false,
4964
- "multiple": false,
4965
- "type": "option"
4966
- },
4967
- "debounce": {
4968
- "description": "Debounce delay in milliseconds (default: 500)",
4969
- "name": "debounce",
4839
+ "cwd": {
4840
+ "description": "Repository root. Defaults to the current directory.",
4841
+ "name": "cwd",
4970
4842
  "hasDynamicHelp": false,
4971
4843
  "multiple": false,
4972
4844
  "type": "option"
4973
4845
  },
4974
- "no-validate": {
4975
- "description": "Skip validation before sync",
4976
- "name": "no-validate",
4977
- "allowNo": false,
4978
- "type": "boolean"
4979
- },
4980
4846
  "verbose": {
4981
4847
  "char": "v",
4982
- "description": "Show detailed output",
4848
+ "description": "Include the full description of each standard.",
4983
4849
  "name": "verbose",
4984
4850
  "allowNo": false,
4985
4851
  "type": "boolean"
@@ -4987,7 +4853,7 @@
4987
4853
  },
4988
4854
  "hasDynamicHelp": false,
4989
4855
  "hiddenAliases": [],
4990
- "id": "sync:watch",
4856
+ "id": "standards:list",
4991
4857
  "pluginAlias": "@memberjunction/cli",
4992
4858
  "pluginName": "@memberjunction/cli",
4993
4859
  "pluginType": "core",
@@ -4997,14 +4863,48 @@
4997
4863
  "relativePath": [
4998
4864
  "dist",
4999
4865
  "commands",
5000
- "sync",
5001
- "watch.js"
4866
+ "standards",
4867
+ "list.js"
5002
4868
  ]
5003
4869
  },
5004
- "translate-sql": {
4870
+ "standards:usage": {
5005
4871
  "aliases": [],
5006
4872
  "args": {},
5007
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
4873
+ "description": "Show usage, flags, examples, and runtime hints for every `mj standards` command.",
4874
+ "flags": {
4875
+ "format": {
4876
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4877
+ "name": "format",
4878
+ "hasDynamicHelp": false,
4879
+ "multiple": false,
4880
+ "options": [
4881
+ "text",
4882
+ "json",
4883
+ "md"
4884
+ ],
4885
+ "type": "option"
4886
+ }
4887
+ },
4888
+ "hasDynamicHelp": false,
4889
+ "hiddenAliases": [],
4890
+ "id": "standards:usage",
4891
+ "pluginAlias": "@memberjunction/cli",
4892
+ "pluginName": "@memberjunction/cli",
4893
+ "pluginType": "core",
4894
+ "strict": true,
4895
+ "enableJsonFlag": false,
4896
+ "isESM": true,
4897
+ "relativePath": [
4898
+ "dist",
4899
+ "commands",
4900
+ "standards",
4901
+ "usage.js"
4902
+ ]
4903
+ },
4904
+ "translate-sql": {
4905
+ "aliases": [],
4906
+ "args": {},
4907
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
5008
4908
  "examples": [
5009
4909
  "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
5010
4910
  "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
@@ -5134,123 +5034,52 @@
5134
5034
  "usage.js"
5135
5035
  ]
5136
5036
  },
5137
- "update:claude": {
5037
+ "sync:file-reset": {
5138
5038
  "aliases": [],
5139
5039
  "args": {},
5140
- "description": "Update the Claude Code pack in the current directory.",
5040
+ "description": "Reset file metadata sections",
5141
5041
  "examples": [
5142
- "<%= config.bin %> update:claude",
5143
- "<%= config.bin %> update:claude --check",
5144
- "<%= config.bin %> update:claude --refresh-commands",
5145
- "<%= config.bin %> update:claude --allow-major",
5146
- "<%= config.bin %> update:claude --json"
5042
+ "<%= config.bin %> <%= command.id %>",
5043
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5044
+ "<%= config.bin %> <%= command.id %> --sections=\"dependencies,references\"",
5045
+ "<%= config.bin %> <%= command.id %> --all"
5147
5046
  ],
5148
5047
  "flags": {
5149
5048
  "dir": {
5150
- "description": "Target directory",
5049
+ "description": "Specific entity directory to reset",
5151
5050
  "name": "dir",
5152
- "default": ".",
5153
- "hasDynamicHelp": false,
5154
- "multiple": false,
5155
- "type": "option"
5156
- },
5157
- "major": {
5158
- "description": "Force a specific MJ major (default: detected from package.json)",
5159
- "name": "major",
5160
- "hasDynamicHelp": false,
5161
- "multiple": false,
5162
- "type": "option"
5163
- },
5164
- "ref": {
5165
- "description": "Git ref to fetch from (branch or tag). Default: main.",
5166
- "name": "ref",
5167
5051
  "hasDynamicHelp": false,
5168
5052
  "multiple": false,
5169
5053
  "type": "option"
5170
5054
  },
5171
- "from": {
5172
- "description": "Use a local pack source instead of fetching from GitHub",
5173
- "name": "from",
5055
+ "sections": {
5056
+ "description": "Comma-separated list of sections to reset (dependencies,references,related,lookup)",
5057
+ "name": "sections",
5174
5058
  "hasDynamicHelp": false,
5175
5059
  "multiple": false,
5176
5060
  "type": "option"
5177
5061
  },
5178
- "offline": {
5179
- "description": "Forbid network; requires --from <path>",
5180
- "name": "offline",
5062
+ "all": {
5063
+ "description": "Reset all metadata sections",
5064
+ "name": "all",
5181
5065
  "allowNo": false,
5182
5066
  "type": "boolean"
5183
5067
  },
5184
5068
  "dry-run": {
5185
- "description": "Print what would be written; change nothing",
5069
+ "description": "Show what would be reset without actually resetting",
5186
5070
  "name": "dry-run",
5187
5071
  "allowNo": false,
5188
5072
  "type": "boolean"
5189
5073
  },
5190
- "yes": {
5191
- "char": "y",
5192
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
5193
- "name": "yes",
5194
- "allowNo": false,
5195
- "type": "boolean"
5196
- },
5197
5074
  "force": {
5198
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
5075
+ "description": "Skip confirmation prompts",
5199
5076
  "name": "force",
5200
5077
  "allowNo": false,
5201
5078
  "type": "boolean"
5202
5079
  },
5203
- "skip-commands": {
5204
- "description": "Skip seeding .claude/commands/",
5205
- "name": "skip-commands",
5206
- "allowNo": false,
5207
- "type": "boolean"
5208
- },
5209
- "skip-skills": {
5210
- "description": "Skip seeding .claude/skills/",
5211
- "name": "skip-skills",
5212
- "allowNo": false,
5213
- "type": "boolean"
5214
- },
5215
- "skip-settings": {
5216
- "description": "Skip merging .claude/settings.json",
5217
- "name": "skip-settings",
5218
- "allowNo": false,
5219
- "type": "boolean"
5220
- },
5221
- "check": {
5222
- "description": "Compare local pack version to remote without writing anything",
5223
- "name": "check",
5224
- "allowNo": false,
5225
- "type": "boolean"
5226
- },
5227
- "refresh-commands": {
5228
- "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
5229
- "name": "refresh-commands",
5230
- "allowNo": false,
5231
- "type": "boolean"
5232
- },
5233
- "refresh-skills": {
5234
- "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
5235
- "name": "refresh-skills",
5236
- "allowNo": false,
5237
- "type": "boolean"
5238
- },
5239
- "allow-major": {
5240
- "description": "Allow the remote pack's major to differ from local MJ's major",
5241
- "name": "allow-major",
5242
- "allowNo": false,
5243
- "type": "boolean"
5244
- },
5245
- "json": {
5246
- "description": "Output as JSON (matches plan §7.5 schema)",
5247
- "name": "json",
5248
- "allowNo": false,
5249
- "type": "boolean"
5250
- },
5251
5080
  "verbose": {
5252
5081
  "char": "v",
5253
- "description": "Show progress messages",
5082
+ "description": "Show detailed output",
5254
5083
  "name": "verbose",
5255
5084
  "allowNo": false,
5256
5085
  "type": "boolean"
@@ -5258,7 +5087,7 @@
5258
5087
  },
5259
5088
  "hasDynamicHelp": false,
5260
5089
  "hiddenAliases": [],
5261
- "id": "update:claude",
5090
+ "id": "sync:file-reset",
5262
5091
  "pluginAlias": "@memberjunction/cli",
5263
5092
  "pluginName": "@memberjunction/cli",
5264
5093
  "pluginType": "core",
@@ -5268,31 +5097,69 @@
5268
5097
  "relativePath": [
5269
5098
  "dist",
5270
5099
  "commands",
5271
- "update",
5272
- "claude.js"
5100
+ "sync",
5101
+ "file-reset.js"
5273
5102
  ]
5274
5103
  },
5275
- "update:usage": {
5104
+ "sync:init": {
5276
5105
  "aliases": [],
5277
5106
  "args": {},
5278
- "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
5107
+ "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\").",
5108
+ "examples": [
5109
+ {
5110
+ "command": "<%= config.bin %> <%= command.id %> --setup-entity=no",
5111
+ "description": "Initialize with no entity directory"
5112
+ },
5113
+ {
5114
+ "command": "<%= config.bin %> <%= command.id %> --setup-entity=ai-prompts",
5115
+ "description": "Initialize and set up the AI Prompts directory"
5116
+ },
5117
+ {
5118
+ "command": "<%= config.bin %> <%= command.id %> --setup-entity=other --entity=\"MJ: AI Models\" --dir=ai-models",
5119
+ "description": "Initialize for an arbitrary entity"
5120
+ },
5121
+ {
5122
+ "command": "<%= config.bin %> <%= command.id %> --no-interactive --setup-entity=no",
5123
+ "description": "Never prompt, even at a terminal"
5124
+ }
5125
+ ],
5279
5126
  "flags": {
5280
- "format": {
5281
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5282
- "name": "format",
5127
+ "setup-entity": {
5128
+ "description": "Which entity directory to set up. Use \"no\" to skip.",
5129
+ "name": "setup-entity",
5283
5130
  "hasDynamicHelp": false,
5284
5131
  "multiple": false,
5285
5132
  "options": [
5286
- "text",
5287
- "json",
5288
- "md"
5133
+ "ai-prompts",
5134
+ "other",
5135
+ "no"
5289
5136
  ],
5290
5137
  "type": "option"
5138
+ },
5139
+ "entity": {
5140
+ "description": "Entity name when --setup-entity=other (e.g. \"MJ: AI Models\").",
5141
+ "name": "entity",
5142
+ "hasDynamicHelp": false,
5143
+ "multiple": false,
5144
+ "type": "option"
5145
+ },
5146
+ "dir": {
5147
+ "description": "Directory name when --setup-entity=other. Defaults to a slug of --entity.",
5148
+ "name": "dir",
5149
+ "hasDynamicHelp": false,
5150
+ "multiple": false,
5151
+ "type": "option"
5152
+ },
5153
+ "overwrite": {
5154
+ "description": "Overwrite an existing configuration. Without this, an initialized directory is left untouched.",
5155
+ "name": "overwrite",
5156
+ "allowNo": true,
5157
+ "type": "boolean"
5291
5158
  }
5292
5159
  },
5293
5160
  "hasDynamicHelp": false,
5294
5161
  "hiddenAliases": [],
5295
- "id": "update:usage",
5162
+ "id": "sync:init",
5296
5163
  "pluginAlias": "@memberjunction/cli",
5297
5164
  "pluginName": "@memberjunction/cli",
5298
5165
  "pluginType": "core",
@@ -5302,106 +5169,156 @@
5302
5169
  "relativePath": [
5303
5170
  "dist",
5304
5171
  "commands",
5305
- "update",
5306
- "usage.js"
5172
+ "sync",
5173
+ "init.js"
5307
5174
  ]
5308
5175
  },
5309
- "test:compare": {
5176
+ "sync:pull": {
5310
5177
  "aliases": [],
5311
- "args": {
5312
- "runId1": {
5313
- "description": "First test run ID to compare",
5314
- "name": "runId1",
5315
- "required": false
5316
- },
5317
- "runId2": {
5318
- "description": "Second test run ID to compare",
5319
- "name": "runId2",
5320
- "required": false
5321
- }
5322
- },
5323
- "description": "Compare test runs for regression detection",
5324
- "examples": [
5325
- "<%= config.bin %> <%= command.id %>",
5326
- "<%= config.bin %> <%= command.id %> --latest",
5327
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
5328
- "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
5329
- "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
5330
- "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
5331
- "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
5332
- ],
5178
+ "args": {},
5179
+ "description": "Pull metadata from database to local files",
5333
5180
  "flags": {
5334
- "version": {
5335
- "char": "v",
5336
- "description": "Compare runs by version",
5337
- "name": "version",
5338
- "hasDynamicHelp": false,
5339
- "multiple": true,
5340
- "type": "option"
5341
- },
5342
- "commit": {
5343
- "char": "c",
5344
- "description": "Compare runs by git commit",
5345
- "name": "commit",
5181
+ "format": {
5182
+ "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
5183
+ "name": "format",
5346
5184
  "hasDynamicHelp": false,
5347
- "multiple": true,
5185
+ "multiple": false,
5186
+ "options": [
5187
+ "text",
5188
+ "json",
5189
+ "md",
5190
+ "human",
5191
+ "console",
5192
+ "markdown"
5193
+ ],
5348
5194
  "type": "option"
5349
5195
  },
5350
- "diff-only": {
5351
- "description": "Show only differences",
5352
- "name": "diff-only",
5196
+ "verbose": {
5197
+ "char": "v",
5198
+ "description": "Show detailed output",
5199
+ "name": "verbose",
5353
5200
  "allowNo": false,
5354
5201
  "type": "boolean"
5355
5202
  },
5356
- "latest": {
5357
- "char": "l",
5358
- "description": "Compare the two most recent completed suite runs",
5359
- "name": "latest",
5203
+ "no-banner": {
5204
+ "description": "Suppress the startup banner and runtime advisory",
5205
+ "name": "no-banner",
5360
5206
  "allowNo": false,
5361
5207
  "type": "boolean"
5362
5208
  },
5363
- "from-json": {
5364
- "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
5365
- "name": "from-json",
5209
+ "no-app-packages": {
5210
+ "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.",
5211
+ "name": "no-app-packages",
5212
+ "allowNo": false,
5213
+ "type": "boolean"
5214
+ },
5215
+ "interactive": {
5216
+ "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.",
5217
+ "name": "interactive",
5218
+ "allowNo": true,
5219
+ "type": "boolean"
5220
+ },
5221
+ "entity": {
5222
+ "description": "Entity name to pull",
5223
+ "name": "entity",
5224
+ "required": true,
5366
5225
  "hasDynamicHelp": false,
5367
- "multiple": true,
5226
+ "multiple": false,
5368
5227
  "type": "option"
5369
5228
  },
5370
- "format": {
5371
- "char": "f",
5372
- "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.",
5373
- "name": "format",
5229
+ "filter": {
5230
+ "description": "Additional filter for pulling specific records",
5231
+ "name": "filter",
5232
+ "hasDynamicHelp": false,
5233
+ "multiple": false,
5234
+ "type": "option"
5235
+ },
5236
+ "dry-run": {
5237
+ "description": "Show what would be pulled without actually pulling",
5238
+ "name": "dry-run",
5239
+ "allowNo": false,
5240
+ "type": "boolean"
5241
+ },
5242
+ "multi-file": {
5243
+ "description": "Create a single file with multiple records (provide filename)",
5244
+ "name": "multi-file",
5245
+ "hasDynamicHelp": false,
5246
+ "multiple": false,
5247
+ "type": "option"
5248
+ },
5249
+ "no-validate": {
5250
+ "description": "Skip validation before pull",
5251
+ "name": "no-validate",
5252
+ "allowNo": false,
5253
+ "type": "boolean"
5254
+ },
5255
+ "update-existing": {
5256
+ "description": "Update existing records during pull (default: the folder config, else true)",
5257
+ "name": "update-existing",
5258
+ "allowNo": true,
5259
+ "type": "boolean"
5260
+ },
5261
+ "create-new": {
5262
+ "description": "Create new files for records not found locally (default: the folder config, else true)",
5263
+ "name": "create-new",
5264
+ "allowNo": true,
5265
+ "type": "boolean"
5266
+ },
5267
+ "backup-before-update": {
5268
+ "description": "Create backups before updating files",
5269
+ "name": "backup-before-update",
5270
+ "allowNo": false,
5271
+ "type": "boolean"
5272
+ },
5273
+ "merge-strategy": {
5274
+ "description": "Merge strategy for updates (default: the folder config, else merge)",
5275
+ "name": "merge-strategy",
5374
5276
  "hasDynamicHelp": false,
5375
5277
  "multiple": false,
5376
5278
  "options": [
5377
- "text",
5378
- "json",
5379
- "md",
5380
- "human",
5381
- "console",
5382
- "markdown",
5383
- "compact",
5384
- "table"
5279
+ "merge",
5280
+ "overwrite",
5281
+ "skip"
5385
5282
  ],
5386
5283
  "type": "option"
5387
5284
  },
5388
- "output": {
5389
- "char": "o",
5390
- "description": "Output file path",
5391
- "name": "output",
5285
+ "backup-directory": {
5286
+ "description": "Custom backup directory (default: .backups)",
5287
+ "name": "backup-directory",
5392
5288
  "hasDynamicHelp": false,
5393
5289
  "multiple": false,
5394
5290
  "type": "option"
5395
5291
  },
5396
- "verbose": {
5397
- "description": "Show detailed information",
5398
- "name": "verbose",
5292
+ "preserve-fields": {
5293
+ "description": "Comma-separated list of fields to preserve during updates",
5294
+ "name": "preserve-fields",
5295
+ "hasDynamicHelp": false,
5296
+ "multiple": true,
5297
+ "type": "option"
5298
+ },
5299
+ "exclude-fields": {
5300
+ "description": "Comma-separated list of fields to exclude from pull",
5301
+ "name": "exclude-fields",
5302
+ "hasDynamicHelp": false,
5303
+ "multiple": true,
5304
+ "type": "option"
5305
+ },
5306
+ "target-dir": {
5307
+ "description": "Specific target directory (overrides auto-discovery)",
5308
+ "name": "target-dir",
5309
+ "hasDynamicHelp": false,
5310
+ "multiple": false,
5311
+ "type": "option"
5312
+ },
5313
+ "incremental": {
5314
+ "description": "Only pull records updated since last successful pull",
5315
+ "name": "incremental",
5399
5316
  "allowNo": false,
5400
5317
  "type": "boolean"
5401
5318
  },
5402
- "tag": {
5403
- "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.",
5404
- "name": "tag",
5319
+ "since": {
5320
+ "description": "Only pull records updated after this ISO 8601 timestamp",
5321
+ "name": "since",
5405
5322
  "hasDynamicHelp": false,
5406
5323
  "multiple": false,
5407
5324
  "type": "option"
@@ -5409,66 +5326,74 @@
5409
5326
  },
5410
5327
  "hasDynamicHelp": false,
5411
5328
  "hiddenAliases": [],
5412
- "id": "test:compare",
5329
+ "id": "sync:pull",
5413
5330
  "pluginAlias": "@memberjunction/cli",
5414
5331
  "pluginName": "@memberjunction/cli",
5415
5332
  "pluginType": "core",
5416
5333
  "strict": true,
5417
5334
  "enableJsonFlag": false,
5335
+ "Examples": [
5336
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Prompts\"",
5337
+ "<%= config.bin %> <%= command.id %> --entity=\"MJ: AI Agents\" --merge-strategy=overwrite",
5338
+ "<%= config.bin %> <%= command.id %> --entity=\"Templates\" --dry-run --verbose"
5339
+ ],
5340
+ "Usage": {
5341
+ "domain": "sync",
5342
+ "command": "sync:pull",
5343
+ "summary": "Pull database records into local metadata files.",
5344
+ "description": "Writes records of --entity into the matching entity directory, creating or updating files per the merge strategy.",
5345
+ "flags": [
5346
+ {
5347
+ "name": "--entity",
5348
+ "type": "string",
5349
+ "description": "Entity name to pull (required)"
5350
+ },
5351
+ {
5352
+ "name": "--filter",
5353
+ "type": "string",
5354
+ "description": "Extra SQL filter for which records to pull"
5355
+ },
5356
+ {
5357
+ "name": "--merge-strategy",
5358
+ "type": "merge|overwrite|skip",
5359
+ "description": "How to reconcile existing files"
5360
+ },
5361
+ {
5362
+ "name": "--dry-run",
5363
+ "type": "boolean",
5364
+ "description": "Report what would be pulled without writing"
5365
+ },
5366
+ {
5367
+ "name": "--format",
5368
+ "type": "text|json|md",
5369
+ "description": "Output format (json for machine-readable result)"
5370
+ }
5371
+ ],
5372
+ "examples": [
5373
+ "mj sync pull --entity=\"MJ: AI Prompts\"",
5374
+ "mj sync pull --entity=\"Actions\" --format=json"
5375
+ ],
5376
+ "runtime": {
5377
+ "class": "variable",
5378
+ "typicalSeconds": 15,
5379
+ "note": "scales with number of records matched for --entity"
5380
+ }
5381
+ },
5418
5382
  "isESM": true,
5419
5383
  "relativePath": [
5420
5384
  "dist",
5421
5385
  "commands",
5422
- "test",
5423
- "compare.js"
5386
+ "sync",
5387
+ "pull.js"
5424
5388
  ]
5425
5389
  },
5426
- "test:history": {
5390
+ "sync:push": {
5427
5391
  "aliases": [],
5428
5392
  "args": {},
5429
- "description": "View test execution history",
5430
- "examples": [
5431
- "<%= config.bin %> <%= command.id %>",
5432
- "<%= config.bin %> <%= command.id %> --test=<test-id>",
5433
- "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
5434
- "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
5435
- "<%= config.bin %> <%= command.id %> --limit=50"
5436
- ],
5393
+ "description": "Push local file changes to the database",
5437
5394
  "flags": {
5438
- "test": {
5439
- "char": "t",
5440
- "description": "Filter by test ID",
5441
- "name": "test",
5442
- "hasDynamicHelp": false,
5443
- "multiple": false,
5444
- "type": "option"
5445
- },
5446
- "recent": {
5447
- "char": "r",
5448
- "description": "Number of recent runs to show",
5449
- "name": "recent",
5450
- "hasDynamicHelp": false,
5451
- "multiple": false,
5452
- "type": "option"
5453
- },
5454
- "from": {
5455
- "description": "Show history from date (YYYY-MM-DD)",
5456
- "name": "from",
5457
- "hasDynamicHelp": false,
5458
- "multiple": false,
5459
- "type": "option"
5460
- },
5461
- "status": {
5462
- "char": "s",
5463
- "description": "Filter by status",
5464
- "name": "status",
5465
- "hasDynamicHelp": false,
5466
- "multiple": false,
5467
- "type": "option"
5468
- },
5469
5395
  "format": {
5470
- "char": "f",
5471
- "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.",
5396
+ "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
5472
5397
  "name": "format",
5473
5398
  "hasDynamicHelp": false,
5474
5399
  "multiple": false,
@@ -5478,319 +5403,230 @@
5478
5403
  "md",
5479
5404
  "human",
5480
5405
  "console",
5481
- "markdown",
5482
- "compact",
5483
- "table"
5406
+ "markdown"
5484
5407
  ],
5485
5408
  "type": "option"
5486
5409
  },
5487
- "output": {
5488
- "char": "o",
5489
- "description": "Output file path",
5490
- "name": "output",
5491
- "hasDynamicHelp": false,
5492
- "multiple": false,
5493
- "type": "option"
5494
- },
5495
5410
  "verbose": {
5496
5411
  "char": "v",
5497
- "description": "Show detailed information",
5412
+ "description": "Show detailed output",
5498
5413
  "name": "verbose",
5499
5414
  "allowNo": false,
5500
5415
  "type": "boolean"
5501
- }
5502
- },
5503
- "hasDynamicHelp": false,
5504
- "hiddenAliases": [],
5505
- "id": "test:history",
5506
- "pluginAlias": "@memberjunction/cli",
5507
- "pluginName": "@memberjunction/cli",
5508
- "pluginType": "core",
5509
- "strict": true,
5510
- "enableJsonFlag": false,
5511
- "isESM": true,
5512
- "relativePath": [
5513
- "dist",
5514
- "commands",
5515
- "test",
5516
- "history.js"
5517
- ]
5518
- },
5519
- "test": {
5520
- "aliases": [],
5521
- "args": {},
5522
- "description": "MemberJunction Testing Framework - Execute and manage tests",
5523
- "examples": [
5524
- "<%= config.bin %> <%= command.id %> run <test-id>",
5525
- "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
5526
- "<%= config.bin %> <%= command.id %> suite <suite-id>",
5527
- "<%= config.bin %> <%= command.id %> list",
5528
- "<%= config.bin %> <%= command.id %> list --suites",
5529
- "<%= config.bin %> <%= command.id %> validate --all"
5530
- ],
5531
- "flags": {},
5532
- "hasDynamicHelp": false,
5533
- "hiddenAliases": [],
5534
- "id": "test",
5535
- "pluginAlias": "@memberjunction/cli",
5536
- "pluginName": "@memberjunction/cli",
5537
- "pluginType": "core",
5538
- "strict": true,
5539
- "enableJsonFlag": false,
5540
- "isESM": true,
5541
- "relativePath": [
5542
- "dist",
5543
- "commands",
5544
- "test",
5545
- "index.js"
5546
- ]
5547
- },
5548
- "test:list": {
5549
- "aliases": [],
5550
- "args": {},
5551
- "description": "List available tests, suites, and types",
5552
- "examples": [
5553
- "<%= config.bin %> <%= command.id %>",
5554
- "<%= config.bin %> <%= command.id %> --suites",
5555
- "<%= config.bin %> <%= command.id %> --types",
5556
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
5557
- "<%= config.bin %> <%= command.id %> --tag=smoke",
5558
- "<%= config.bin %> <%= command.id %> --status=active --verbose"
5559
- ],
5560
- "flags": {
5561
- "suites": {
5562
- "description": "List test suites instead of tests",
5563
- "name": "suites",
5416
+ },
5417
+ "no-banner": {
5418
+ "description": "Suppress the startup banner and runtime advisory",
5419
+ "name": "no-banner",
5564
5420
  "allowNo": false,
5565
5421
  "type": "boolean"
5566
5422
  },
5567
- "types": {
5568
- "description": "List test types",
5569
- "name": "types",
5423
+ "no-app-packages": {
5424
+ "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.",
5425
+ "name": "no-app-packages",
5570
5426
  "allowNo": false,
5571
5427
  "type": "boolean"
5572
5428
  },
5573
- "type": {
5574
- "char": "t",
5575
- "description": "Filter by test type",
5576
- "name": "type",
5577
- "hasDynamicHelp": false,
5578
- "multiple": false,
5579
- "type": "option"
5429
+ "interactive": {
5430
+ "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.",
5431
+ "name": "interactive",
5432
+ "allowNo": true,
5433
+ "type": "boolean"
5580
5434
  },
5581
- "tag": {
5582
- "description": "Filter by tag",
5583
- "name": "tag",
5435
+ "dir": {
5436
+ "description": "Specific entity directory to push",
5437
+ "name": "dir",
5584
5438
  "hasDynamicHelp": false,
5585
5439
  "multiple": false,
5586
5440
  "type": "option"
5587
5441
  },
5588
- "status": {
5589
- "char": "s",
5590
- "description": "Filter by status",
5591
- "name": "status",
5442
+ "dry-run": {
5443
+ "description": "Show what would be pushed without actually pushing",
5444
+ "name": "dry-run",
5445
+ "allowNo": false,
5446
+ "type": "boolean"
5447
+ },
5448
+ "ci": {
5449
+ "description": "CI mode - no prompts, fail on issues",
5450
+ "name": "ci",
5451
+ "allowNo": false,
5452
+ "type": "boolean"
5453
+ },
5454
+ "no-validate": {
5455
+ "description": "Skip validation before push",
5456
+ "name": "no-validate",
5457
+ "allowNo": false,
5458
+ "type": "boolean"
5459
+ },
5460
+ "delete-db-only": {
5461
+ "description": "Delete database-only records that reference records being deleted (prevents FK errors)",
5462
+ "name": "delete-db-only",
5463
+ "allowNo": false,
5464
+ "type": "boolean"
5465
+ },
5466
+ "isolated-transactions": {
5467
+ "description": "Give every JSON-root graph its own connection and transaction, so siblings are written in parallel and each create/update commits as it is saved (a failure does not roll those back). Off by default: the whole push runs in one transaction, one graph at a time. Overrides push.isolatedTransactions in every .mj-sync.json, in both directions — use --no-isolated-transactions to force one run back to a single transaction",
5468
+ "name": "isolated-transactions",
5469
+ "allowNo": true,
5470
+ "type": "boolean"
5471
+ },
5472
+ "parallel-batch-size": {
5473
+ "description": "JSON-root graphs to process in parallel in a directory using isolated transactions (default: 10)",
5474
+ "name": "parallel-batch-size",
5592
5475
  "hasDynamicHelp": false,
5593
5476
  "multiple": false,
5594
5477
  "type": "option"
5595
5478
  },
5596
- "format": {
5597
- "char": "f",
5598
- "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.",
5599
- "name": "format",
5479
+ "include": {
5480
+ "description": "Only process these directories (comma-separated, supports patterns)",
5481
+ "name": "include",
5600
5482
  "hasDynamicHelp": false,
5601
5483
  "multiple": false,
5602
- "options": [
5603
- "text",
5604
- "json",
5605
- "md",
5606
- "human",
5607
- "console",
5608
- "markdown",
5609
- "compact",
5610
- "table"
5611
- ],
5612
5484
  "type": "option"
5613
5485
  },
5614
- "output": {
5615
- "char": "o",
5616
- "description": "Output file path",
5617
- "name": "output",
5486
+ "exclude": {
5487
+ "description": "Skip these directories (comma-separated, supports patterns)",
5488
+ "name": "exclude",
5618
5489
  "hasDynamicHelp": false,
5619
5490
  "multiple": false,
5620
5491
  "type": "option"
5621
5492
  },
5622
- "verbose": {
5623
- "char": "v",
5624
- "description": "Show detailed information",
5625
- "name": "verbose",
5493
+ "incremental": {
5494
+ "description": "Skip unchanged files using stored checksums from last push",
5495
+ "name": "incremental",
5496
+ "allowNo": false,
5497
+ "type": "boolean"
5498
+ },
5499
+ "change-detail": {
5500
+ "description": "Write a detailed per-record change report (primary keys + field diffs) to a file",
5501
+ "name": "change-detail",
5502
+ "allowNo": false,
5503
+ "type": "boolean"
5504
+ },
5505
+ "skip-cache-clear": {
5506
+ "description": "Do not clear the shared Redis cache (REDIS_URL) after pushing. Also: MJ_SKIP_SHARED_CACHE_CLEAR=1",
5507
+ "name": "skip-cache-clear",
5626
5508
  "allowNo": false,
5627
5509
  "type": "boolean"
5628
5510
  }
5629
5511
  },
5630
5512
  "hasDynamicHelp": false,
5631
5513
  "hiddenAliases": [],
5632
- "id": "test:list",
5633
- "pluginAlias": "@memberjunction/cli",
5634
- "pluginName": "@memberjunction/cli",
5635
- "pluginType": "core",
5636
- "strict": true,
5637
- "enableJsonFlag": false,
5638
- "isESM": true,
5639
- "relativePath": [
5640
- "dist",
5641
- "commands",
5642
- "test",
5643
- "list.js"
5644
- ]
5645
- },
5646
- "test:promote-criteria": {
5647
- "aliases": [],
5648
- "args": {
5649
- "test": {
5650
- "description": "Test name or ID",
5651
- "name": "test",
5652
- "required": true
5653
- }
5654
- },
5655
- "description": "Copy a test's inline judge criteria into a Draft rubric and set Test.RubricID. Does not publish.",
5656
- "examples": [
5657
- "<%= config.bin %> <%= command.id %> <test-id>",
5658
- "<%= config.bin %> <%= command.id %> \"Reply check\""
5659
- ],
5660
- "flags": {},
5661
- "hasDynamicHelp": false,
5662
- "hiddenAliases": [],
5663
- "id": "test:promote-criteria",
5664
- "pluginAlias": "@memberjunction/cli",
5665
- "pluginName": "@memberjunction/cli",
5666
- "pluginType": "core",
5667
- "strict": true,
5668
- "enableJsonFlag": false,
5669
- "isESM": true,
5670
- "relativePath": [
5671
- "dist",
5672
- "commands",
5673
- "test",
5674
- "promote-criteria.js"
5675
- ]
5676
- },
5677
- "test:report": {
5678
- "aliases": [],
5679
- "args": {
5680
- "runId": {
5681
- "description": "Test run ID",
5682
- "name": "runId",
5683
- "required": true
5684
- }
5685
- },
5686
- "description": "Print the per-criterion rubric breakdown for a test run.",
5687
- "flags": {},
5688
- "hasDynamicHelp": false,
5689
- "hiddenAliases": [],
5690
- "id": "test:report",
5514
+ "id": "sync:push",
5691
5515
  "pluginAlias": "@memberjunction/cli",
5692
5516
  "pluginName": "@memberjunction/cli",
5693
5517
  "pluginType": "core",
5694
5518
  "strict": true,
5695
5519
  "enableJsonFlag": false,
5696
- "isESM": true,
5697
- "relativePath": [
5698
- "dist",
5699
- "commands",
5700
- "test",
5701
- "report.js"
5702
- ]
5703
- },
5704
- "test:run": {
5705
- "aliases": [],
5706
- "args": {
5707
- "testId": {
5708
- "description": "Test ID to execute",
5709
- "name": "testId",
5710
- "required": false
5711
- }
5712
- },
5713
- "description": "Execute a single test by ID or name",
5714
- "examples": [
5715
- "<%= config.bin %> <%= command.id %> <test-id>",
5716
- "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
5717
- "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
5718
- "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
5719
- "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
5520
+ "Examples": [
5521
+ "<%= config.bin %> <%= command.id %>",
5522
+ "<%= config.bin %> <%= command.id %> --dry-run",
5523
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5524
+ "<%= config.bin %> <%= command.id %> --ci --format=json"
5720
5525
  ],
5721
- "flags": {
5722
- "name": {
5723
- "char": "n",
5724
- "description": "Test name to execute",
5725
- "name": "name",
5726
- "hasDynamicHelp": false,
5727
- "multiple": false,
5728
- "type": "option"
5729
- },
5730
- "environment": {
5731
- "char": "e",
5732
- "description": "Environment context (dev, staging, prod)",
5733
- "name": "environment",
5734
- "hasDynamicHelp": false,
5735
- "multiple": false,
5736
- "type": "option"
5737
- },
5738
- "format": {
5739
- "char": "f",
5740
- "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.",
5741
- "name": "format",
5742
- "hasDynamicHelp": false,
5743
- "multiple": false,
5744
- "options": [
5745
- "text",
5746
- "json",
5747
- "md",
5748
- "human",
5749
- "console",
5750
- "markdown",
5751
- "compact",
5752
- "table"
5753
- ],
5754
- "type": "option"
5755
- },
5756
- "output": {
5757
- "char": "o",
5758
- "description": "Output file path",
5759
- "name": "output",
5526
+ "Usage": {
5527
+ "domain": "sync",
5528
+ "command": "sync:push",
5529
+ "summary": "Push local metadata files to the database (upsert).",
5530
+ "description": "Reads entity directories under --dir and creates/updates matching records. Runs validation first unless --no-validate.",
5531
+ "flags": [
5532
+ {
5533
+ "name": "--dir",
5534
+ "type": "string",
5535
+ "description": "Entity directory to push"
5536
+ },
5537
+ {
5538
+ "name": "--dry-run",
5539
+ "type": "boolean",
5540
+ "description": "Report what would change without writing"
5541
+ },
5542
+ {
5543
+ "name": "--ci",
5544
+ "type": "boolean",
5545
+ "description": "No prompts; non-zero exit on error"
5546
+ },
5547
+ {
5548
+ "name": "--no-validate",
5549
+ "type": "boolean",
5550
+ "description": "Skip pre-push validation"
5551
+ },
5552
+ {
5553
+ "name": "--incremental",
5554
+ "type": "boolean",
5555
+ "description": "Skip unchanged files using stored checksums"
5556
+ },
5557
+ {
5558
+ "name": "--isolated-transactions",
5559
+ "type": "boolean",
5560
+ "description": "Per-graph connections; creates/updates commit as they go and are not rolled back"
5561
+ },
5562
+ {
5563
+ "name": "--parallel-batch-size",
5564
+ "type": "number",
5565
+ "description": "Graphs at once in an isolated directory (default 10)"
5566
+ },
5567
+ {
5568
+ "name": "--format",
5569
+ "type": "text|json|md",
5570
+ "description": "Output format (json for machine-readable result)"
5571
+ },
5572
+ {
5573
+ "name": "--skip-cache-clear",
5574
+ "type": "boolean",
5575
+ "description": "Do not clear the shared Redis cache after pushing"
5576
+ }
5577
+ ],
5578
+ "examples": [
5579
+ "mj sync push --dir=ai-agents",
5580
+ "mj sync push --ci --format=json"
5581
+ ],
5582
+ "runtime": {
5583
+ "class": "variable",
5584
+ "typicalSeconds": 20,
5585
+ "note": "scales with number of records in --dir"
5586
+ }
5587
+ },
5588
+ "isESM": true,
5589
+ "relativePath": [
5590
+ "dist",
5591
+ "commands",
5592
+ "sync",
5593
+ "push.js"
5594
+ ]
5595
+ },
5596
+ "sync:status": {
5597
+ "aliases": [],
5598
+ "args": {},
5599
+ "description": "Show status of local files vs database",
5600
+ "examples": [
5601
+ "<%= config.bin %> <%= command.id %>",
5602
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5603
+ "<%= config.bin %> <%= command.id %> --verbose"
5604
+ ],
5605
+ "flags": {
5606
+ "dir": {
5607
+ "description": "Specific entity directory to check status",
5608
+ "name": "dir",
5760
5609
  "hasDynamicHelp": false,
5761
5610
  "multiple": false,
5762
5611
  "type": "option"
5763
5612
  },
5764
- "dry-run": {
5765
- "description": "Validate without executing",
5766
- "name": "dry-run",
5767
- "allowNo": false,
5768
- "type": "boolean"
5769
- },
5770
5613
  "verbose": {
5771
5614
  "char": "v",
5772
- "description": "Show detailed execution information",
5615
+ "description": "Show detailed field-level differences",
5773
5616
  "name": "verbose",
5774
5617
  "allowNo": false,
5775
5618
  "type": "boolean"
5776
5619
  },
5777
- "checks-module": {
5778
- "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).",
5779
- "name": "checks-module",
5780
- "hasDynamicHelp": false,
5781
- "multiple": false,
5782
- "type": "option"
5783
- },
5784
- "rubric": {
5785
- "description": "Rubric override: name or id, optionally @version (1.2.0 or a version id)",
5786
- "name": "rubric",
5620
+ "include": {
5621
+ "description": "Only process these directories (comma-separated, supports patterns)",
5622
+ "name": "include",
5787
5623
  "hasDynamicHelp": false,
5788
5624
  "multiple": false,
5789
5625
  "type": "option"
5790
5626
  },
5791
- "oracles-module": {
5792
- "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.",
5793
- "name": "oracles-module",
5627
+ "exclude": {
5628
+ "description": "Skip these directories (comma-separated, supports patterns)",
5629
+ "name": "exclude",
5794
5630
  "hasDynamicHelp": false,
5795
5631
  "multiple": false,
5796
5632
  "type": "option"
@@ -5798,7 +5634,7 @@
5798
5634
  },
5799
5635
  "hasDynamicHelp": false,
5800
5636
  "hiddenAliases": [],
5801
- "id": "test:run",
5637
+ "id": "sync:status",
5802
5638
  "pluginAlias": "@memberjunction/cli",
5803
5639
  "pluginName": "@memberjunction/cli",
5804
5640
  "pluginType": "core",
@@ -5808,58 +5644,31 @@
5808
5644
  "relativePath": [
5809
5645
  "dist",
5810
5646
  "commands",
5811
- "test",
5812
- "run.js"
5647
+ "sync",
5648
+ "status.js"
5813
5649
  ]
5814
5650
  },
5815
- "test:scripts": {
5651
+ "sync:usage": {
5816
5652
  "aliases": [],
5817
5653
  "args": {},
5818
- "description": "Review and promote recorded replay scripts. A run that re-derives a test which already had a script stores the new one as pending rather than replacing what replay uses, so a UI change never rewrites the suite unnoticed. This is where you see the drift and decide.",
5819
- "examples": [
5820
- "<%= config.bin %> <%= command.id %>",
5821
- "<%= config.bin %> <%= command.id %> --test \"T042 - Filter Grid\"",
5822
- "<%= config.bin %> <%= command.id %> --promote --test \"T042 - Filter Grid\"",
5823
- "<%= config.bin %> <%= command.id %> --promote --yes",
5824
- "<%= config.bin %> <%= command.id %> --discard --test \"T042 - Filter Grid\""
5825
- ],
5654
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
5826
5655
  "flags": {
5827
- "test": {
5828
- "description": "Limit to one test, by name or ID",
5829
- "name": "test",
5656
+ "format": {
5657
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5658
+ "name": "format",
5830
5659
  "hasDynamicHelp": false,
5831
5660
  "multiple": false,
5832
- "type": "option"
5833
- },
5834
- "promote": {
5835
- "description": "Promote the pending script(s) into the slot replay uses",
5836
- "exclusive": [
5837
- "discard"
5838
- ],
5839
- "name": "promote",
5840
- "allowNo": false,
5841
- "type": "boolean"
5842
- },
5843
- "discard": {
5844
- "description": "Drop the pending script(s), keeping the promoted one",
5845
- "exclusive": [
5846
- "promote"
5661
+ "options": [
5662
+ "text",
5663
+ "json",
5664
+ "md"
5847
5665
  ],
5848
- "name": "discard",
5849
- "allowNo": false,
5850
- "type": "boolean"
5851
- },
5852
- "yes": {
5853
- "char": "y",
5854
- "description": "Confirm a bulk --promote/--discard that was not narrowed with --test",
5855
- "name": "yes",
5856
- "allowNo": false,
5857
- "type": "boolean"
5666
+ "type": "option"
5858
5667
  }
5859
5668
  },
5860
5669
  "hasDynamicHelp": false,
5861
5670
  "hiddenAliases": [],
5862
- "id": "test:scripts",
5671
+ "id": "sync:usage",
5863
5672
  "pluginAlias": "@memberjunction/cli",
5864
5673
  "pluginName": "@memberjunction/cli",
5865
5674
  "pluginType": "core",
@@ -5869,116 +5678,44 @@
5869
5678
  "relativePath": [
5870
5679
  "dist",
5871
5680
  "commands",
5872
- "test",
5873
- "scripts.js"
5681
+ "sync",
5682
+ "usage.js"
5874
5683
  ]
5875
5684
  },
5876
- "test:suite": {
5685
+ "sync:validate": {
5877
5686
  "aliases": [],
5878
- "args": {
5879
- "suiteId": {
5880
- "description": "Test suite ID to execute",
5881
- "name": "suiteId",
5882
- "required": false
5883
- }
5884
- },
5885
- "description": "Execute a test suite",
5687
+ "args": {},
5688
+ "description": "Validate metadata files",
5886
5689
  "examples": [
5887
- "<%= config.bin %> <%= command.id %> <suite-id>",
5888
- "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
5889
- "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
5890
- "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
5690
+ "<%= config.bin %> <%= command.id %>",
5691
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5692
+ "<%= config.bin %> <%= command.id %> --save-report",
5693
+ "<%= config.bin %> <%= command.id %> --verbose"
5891
5694
  ],
5892
5695
  "flags": {
5893
- "name": {
5894
- "char": "n",
5895
- "description": "Test suite name to execute",
5896
- "name": "name",
5897
- "hasDynamicHelp": false,
5898
- "multiple": false,
5899
- "type": "option"
5900
- },
5901
- "format": {
5902
- "char": "f",
5903
- "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.",
5904
- "name": "format",
5905
- "hasDynamicHelp": false,
5906
- "multiple": false,
5907
- "options": [
5908
- "text",
5909
- "json",
5910
- "md",
5911
- "human",
5912
- "console",
5913
- "markdown",
5914
- "compact",
5915
- "table"
5916
- ],
5917
- "type": "option"
5918
- },
5919
- "output": {
5920
- "char": "o",
5921
- "description": "Output file path",
5922
- "name": "output",
5696
+ "dir": {
5697
+ "description": "Specific entity directory to validate",
5698
+ "name": "dir",
5923
5699
  "hasDynamicHelp": false,
5924
5700
  "multiple": false,
5925
5701
  "type": "option"
5926
5702
  },
5927
5703
  "verbose": {
5928
5704
  "char": "v",
5929
- "description": "Show detailed execution information",
5705
+ "description": "Show detailed validation output",
5930
5706
  "name": "verbose",
5931
5707
  "allowNo": false,
5932
5708
  "type": "boolean"
5933
5709
  },
5934
- "delay": {
5935
- "char": "d",
5936
- "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
5937
- "name": "delay",
5938
- "default": 0,
5939
- "hasDynamicHelp": false,
5940
- "multiple": false,
5941
- "type": "option"
5942
- },
5943
- "parallel": {
5944
- "char": "p",
5945
- "description": "Run tests in parallel with shared browser sessions",
5946
- "name": "parallel",
5710
+ "save-report": {
5711
+ "description": "Save validation report as markdown file",
5712
+ "name": "save-report",
5947
5713
  "allowNo": false,
5948
5714
  "type": "boolean"
5949
5715
  },
5950
- "max-parallel": {
5951
- "description": "Maximum number of parallel workers (default 4)",
5952
- "name": "max-parallel",
5953
- "default": 4,
5954
- "hasDynamicHelp": false,
5955
- "multiple": false,
5956
- "type": "option"
5957
- },
5958
- "rubric": {
5959
- "description": "Rubric override for every test: name or id, optionally @version",
5960
- "name": "rubric",
5961
- "hasDynamicHelp": false,
5962
- "multiple": false,
5963
- "type": "option"
5964
- },
5965
- "flaky-check": {
5966
- "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
5967
- "name": "flaky-check",
5968
- "hasDynamicHelp": false,
5969
- "multiple": false,
5970
- "type": "option"
5971
- },
5972
- "checks-module": {
5973
- "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).",
5974
- "name": "checks-module",
5975
- "hasDynamicHelp": false,
5976
- "multiple": false,
5977
- "type": "option"
5978
- },
5979
- "oracles-module": {
5980
- "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.",
5981
- "name": "oracles-module",
5716
+ "output": {
5717
+ "description": "Output file path for validation report (default: validation-report.md)",
5718
+ "name": "output",
5982
5719
  "hasDynamicHelp": false,
5983
5720
  "multiple": false,
5984
5721
  "type": "option"
@@ -5986,7 +5723,7 @@
5986
5723
  },
5987
5724
  "hasDynamicHelp": false,
5988
5725
  "hiddenAliases": [],
5989
- "id": "test:suite",
5726
+ "id": "sync:validate",
5990
5727
  "pluginAlias": "@memberjunction/cli",
5991
5728
  "pluginName": "@memberjunction/cli",
5992
5729
  "pluginType": "core",
@@ -5996,31 +5733,52 @@
5996
5733
  "relativePath": [
5997
5734
  "dist",
5998
5735
  "commands",
5999
- "test",
6000
- "suite.js"
5736
+ "sync",
5737
+ "validate.js"
6001
5738
  ]
6002
5739
  },
6003
- "test:usage": {
5740
+ "sync:watch": {
6004
5741
  "aliases": [],
6005
5742
  "args": {},
6006
- "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
5743
+ "description": "Watch for file changes and sync automatically",
5744
+ "examples": [
5745
+ "<%= config.bin %> <%= command.id %>",
5746
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
5747
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
5748
+ "<%= config.bin %> <%= command.id %> --no-validate"
5749
+ ],
6007
5750
  "flags": {
6008
- "format": {
6009
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
6010
- "name": "format",
5751
+ "dir": {
5752
+ "description": "Specific entity directory to watch",
5753
+ "name": "dir",
5754
+ "hasDynamicHelp": false,
5755
+ "multiple": false,
5756
+ "type": "option"
5757
+ },
5758
+ "debounce": {
5759
+ "description": "Debounce delay in milliseconds (default: 500)",
5760
+ "name": "debounce",
6011
5761
  "hasDynamicHelp": false,
6012
5762
  "multiple": false,
6013
- "options": [
6014
- "text",
6015
- "json",
6016
- "md"
6017
- ],
6018
5763
  "type": "option"
5764
+ },
5765
+ "no-validate": {
5766
+ "description": "Skip validation before sync",
5767
+ "name": "no-validate",
5768
+ "allowNo": false,
5769
+ "type": "boolean"
5770
+ },
5771
+ "verbose": {
5772
+ "char": "v",
5773
+ "description": "Show detailed output",
5774
+ "name": "verbose",
5775
+ "allowNo": false,
5776
+ "type": "boolean"
6019
5777
  }
6020
5778
  },
6021
5779
  "hasDynamicHelp": false,
6022
5780
  "hiddenAliases": [],
6023
- "id": "test:usage",
5781
+ "id": "sync:watch",
6024
5782
  "pluginAlias": "@memberjunction/cli",
6025
5783
  "pluginName": "@memberjunction/cli",
6026
5784
  "pluginType": "core",
@@ -6030,49 +5788,71 @@
6030
5788
  "relativePath": [
6031
5789
  "dist",
6032
5790
  "commands",
6033
- "test",
6034
- "usage.js"
5791
+ "sync",
5792
+ "watch.js"
6035
5793
  ]
6036
5794
  },
6037
- "test:validate": {
5795
+ "test:compare": {
6038
5796
  "aliases": [],
6039
5797
  "args": {
6040
- "testId": {
6041
- "description": "Test ID to validate",
6042
- "name": "testId",
5798
+ "runId1": {
5799
+ "description": "First test run ID to compare",
5800
+ "name": "runId1",
5801
+ "required": false
5802
+ },
5803
+ "runId2": {
5804
+ "description": "Second test run ID to compare",
5805
+ "name": "runId2",
6043
5806
  "required": false
6044
5807
  }
6045
5808
  },
6046
- "description": "Validate test definitions without executing",
5809
+ "description": "Compare test runs for regression detection",
6047
5810
  "examples": [
6048
- "<%= config.bin %> <%= command.id %> <test-id>",
6049
- "<%= config.bin %> <%= command.id %> --all",
6050
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
6051
- "<%= config.bin %> <%= command.id %> --all --save-report",
6052
- "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
5811
+ "<%= config.bin %> <%= command.id %>",
5812
+ "<%= config.bin %> <%= command.id %> --latest",
5813
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
5814
+ "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
5815
+ "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
5816
+ "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
5817
+ "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
6053
5818
  ],
6054
5819
  "flags": {
6055
- "all": {
6056
- "char": "a",
6057
- "description": "Validate all tests",
6058
- "name": "all",
6059
- "allowNo": false,
6060
- "type": "boolean"
5820
+ "version": {
5821
+ "char": "v",
5822
+ "description": "Compare runs by version",
5823
+ "name": "version",
5824
+ "hasDynamicHelp": false,
5825
+ "multiple": true,
5826
+ "type": "option"
6061
5827
  },
6062
- "type": {
6063
- "char": "t",
6064
- "description": "Validate tests by type",
6065
- "name": "type",
5828
+ "commit": {
5829
+ "char": "c",
5830
+ "description": "Compare runs by git commit",
5831
+ "name": "commit",
6066
5832
  "hasDynamicHelp": false,
6067
- "multiple": false,
5833
+ "multiple": true,
6068
5834
  "type": "option"
6069
5835
  },
6070
- "save-report": {
6071
- "description": "Save validation report to file",
6072
- "name": "save-report",
5836
+ "diff-only": {
5837
+ "description": "Show only differences",
5838
+ "name": "diff-only",
5839
+ "allowNo": false,
5840
+ "type": "boolean"
5841
+ },
5842
+ "latest": {
5843
+ "char": "l",
5844
+ "description": "Compare the two most recent completed suite runs",
5845
+ "name": "latest",
6073
5846
  "allowNo": false,
6074
5847
  "type": "boolean"
6075
5848
  },
5849
+ "from-json": {
5850
+ "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
5851
+ "name": "from-json",
5852
+ "hasDynamicHelp": false,
5853
+ "multiple": true,
5854
+ "type": "option"
5855
+ },
6076
5856
  "format": {
6077
5857
  "char": "f",
6078
5858
  "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.",
@@ -6100,16 +5880,22 @@
6100
5880
  "type": "option"
6101
5881
  },
6102
5882
  "verbose": {
6103
- "char": "v",
6104
5883
  "description": "Show detailed information",
6105
5884
  "name": "verbose",
6106
5885
  "allowNo": false,
6107
5886
  "type": "boolean"
5887
+ },
5888
+ "tag": {
5889
+ "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.",
5890
+ "name": "tag",
5891
+ "hasDynamicHelp": false,
5892
+ "multiple": false,
5893
+ "type": "option"
6108
5894
  }
6109
5895
  },
6110
5896
  "hasDynamicHelp": false,
6111
5897
  "hiddenAliases": [],
6112
- "id": "test:validate",
5898
+ "id": "test:compare",
6113
5899
  "pluginAlias": "@memberjunction/cli",
6114
5900
  "pluginName": "@memberjunction/cli",
6115
5901
  "pluginType": "core",
@@ -6120,92 +5906,89 @@
6120
5906
  "dist",
6121
5907
  "commands",
6122
5908
  "test",
6123
- "validate.js"
5909
+ "compare.js"
6124
5910
  ]
6125
5911
  },
6126
- "queue:backlog": {
5912
+ "test:history": {
6127
5913
  "aliases": [],
6128
5914
  "args": {},
6129
- "description": "Show the autoscaler metric for one subscription: claimable pending plus in-flight deliveries",
5915
+ "description": "View test execution history",
6130
5916
  "examples": [
6131
- "<%= config.bin %> <%= command.id %> --subscription venue-import",
6132
- "<%= config.bin %> <%= command.id %> --subscription venue-import --json"
5917
+ "<%= config.bin %> <%= command.id %>",
5918
+ "<%= config.bin %> <%= command.id %> --test=<test-id>",
5919
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
5920
+ "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
5921
+ "<%= config.bin %> <%= command.id %> --limit=50"
6133
5922
  ],
6134
5923
  "flags": {
6135
- "subscription": {
6136
- "char": "s",
6137
- "description": "Subscription name",
6138
- "name": "subscription",
6139
- "required": true,
5924
+ "test": {
5925
+ "char": "t",
5926
+ "description": "Filter by test ID",
5927
+ "name": "test",
6140
5928
  "hasDynamicHelp": false,
6141
5929
  "multiple": false,
6142
5930
  "type": "option"
6143
5931
  },
6144
- "json": {
6145
- "description": "Print JSON instead of text",
6146
- "name": "json",
6147
- "allowNo": false,
6148
- "type": "boolean"
6149
- }
6150
- },
6151
- "hasDynamicHelp": false,
6152
- "hiddenAliases": [],
6153
- "id": "queue:backlog",
6154
- "pluginAlias": "@memberjunction/cli",
6155
- "pluginName": "@memberjunction/cli",
6156
- "pluginType": "core",
6157
- "strict": true,
6158
- "enableJsonFlag": false,
6159
- "isESM": true,
6160
- "relativePath": [
6161
- "dist",
6162
- "commands",
6163
- "queue",
6164
- "backlog.js"
6165
- ]
6166
- },
6167
- "queue:dead-letters": {
6168
- "aliases": [],
6169
- "args": {},
6170
- "description": "List a work-queue subscription's dead-lettered deliveries",
6171
- "examples": [
6172
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --page-size 20"
6173
- ],
6174
- "flags": {
6175
- "subscription": {
5932
+ "recent": {
5933
+ "char": "r",
5934
+ "description": "Number of recent runs to show",
5935
+ "name": "recent",
5936
+ "hasDynamicHelp": false,
5937
+ "multiple": false,
5938
+ "type": "option"
5939
+ },
5940
+ "from": {
5941
+ "description": "Show history from date (YYYY-MM-DD)",
5942
+ "name": "from",
5943
+ "hasDynamicHelp": false,
5944
+ "multiple": false,
5945
+ "type": "option"
5946
+ },
5947
+ "status": {
6176
5948
  "char": "s",
6177
- "description": "Subscription name",
6178
- "name": "subscription",
6179
- "required": true,
5949
+ "description": "Filter by status",
5950
+ "name": "status",
6180
5951
  "hasDynamicHelp": false,
6181
5952
  "multiple": false,
6182
5953
  "type": "option"
6183
5954
  },
6184
- "cursor": {
6185
- "description": "nextCursor from a previous page",
6186
- "name": "cursor",
5955
+ "format": {
5956
+ "char": "f",
5957
+ "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.",
5958
+ "name": "format",
6187
5959
  "hasDynamicHelp": false,
6188
5960
  "multiple": false,
5961
+ "options": [
5962
+ "text",
5963
+ "json",
5964
+ "md",
5965
+ "human",
5966
+ "console",
5967
+ "markdown",
5968
+ "compact",
5969
+ "table"
5970
+ ],
6189
5971
  "type": "option"
6190
5972
  },
6191
- "page-size": {
6192
- "description": "Items per page (1–500)",
6193
- "name": "page-size",
6194
- "default": 50,
5973
+ "output": {
5974
+ "char": "o",
5975
+ "description": "Output file path",
5976
+ "name": "output",
6195
5977
  "hasDynamicHelp": false,
6196
5978
  "multiple": false,
6197
5979
  "type": "option"
6198
5980
  },
6199
- "json": {
6200
- "description": "Print JSON instead of a table",
6201
- "name": "json",
5981
+ "verbose": {
5982
+ "char": "v",
5983
+ "description": "Show detailed information",
5984
+ "name": "verbose",
6202
5985
  "allowNo": false,
6203
5986
  "type": "boolean"
6204
5987
  }
6205
5988
  },
6206
5989
  "hasDynamicHelp": false,
6207
5990
  "hiddenAliases": [],
6208
- "id": "queue:dead-letters",
5991
+ "id": "test:history",
6209
5992
  "pluginAlias": "@memberjunction/cli",
6210
5993
  "pluginName": "@memberjunction/cli",
6211
5994
  "pluginType": "core",
@@ -6215,49 +5998,26 @@
6215
5998
  "relativePath": [
6216
5999
  "dist",
6217
6000
  "commands",
6218
- "queue",
6219
- "dead-letters.js"
6001
+ "test",
6002
+ "history.js"
6220
6003
  ]
6221
6004
  },
6222
- "queue:discard": {
6005
+ "test": {
6223
6006
  "aliases": [],
6224
6007
  "args": {},
6225
- "description": "Discard one pending or dead-lettered work-queue delivery, or cancel one that is in flight",
6008
+ "description": "MemberJunction Testing Framework - Execute and manage tests",
6226
6009
  "examples": [
6227
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --reason \"bad batch, republished\""
6010
+ "<%= config.bin %> <%= command.id %> run <test-id>",
6011
+ "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
6012
+ "<%= config.bin %> <%= command.id %> suite <suite-id>",
6013
+ "<%= config.bin %> <%= command.id %> list",
6014
+ "<%= config.bin %> <%= command.id %> list --suites",
6015
+ "<%= config.bin %> <%= command.id %> validate --all"
6228
6016
  ],
6229
- "flags": {
6230
- "subscription": {
6231
- "char": "s",
6232
- "description": "Subscription name",
6233
- "name": "subscription",
6234
- "required": true,
6235
- "hasDynamicHelp": false,
6236
- "multiple": false,
6237
- "type": "option"
6238
- },
6239
- "delivery": {
6240
- "char": "d",
6241
- "description": "DeliveryID to discard",
6242
- "name": "delivery",
6243
- "required": true,
6244
- "hasDynamicHelp": false,
6245
- "multiple": false,
6246
- "type": "option"
6247
- },
6248
- "reason": {
6249
- "char": "r",
6250
- "description": "Why the work is dropped (at most 1000 characters)",
6251
- "name": "reason",
6252
- "required": true,
6253
- "hasDynamicHelp": false,
6254
- "multiple": false,
6255
- "type": "option"
6256
- }
6257
- },
6017
+ "flags": {},
6258
6018
  "hasDynamicHelp": false,
6259
6019
  "hiddenAliases": [],
6260
- "id": "queue:discard",
6020
+ "id": "test",
6261
6021
  "pluginAlias": "@memberjunction/cli",
6262
6022
  "pluginName": "@memberjunction/cli",
6263
6023
  "pluginType": "core",
@@ -6267,39 +6027,95 @@
6267
6027
  "relativePath": [
6268
6028
  "dist",
6269
6029
  "commands",
6270
- "queue",
6271
- "discard.js"
6030
+ "test",
6031
+ "index.js"
6272
6032
  ]
6273
6033
  },
6274
- "queue:export-topology": {
6034
+ "test:list": {
6275
6035
  "aliases": [],
6276
6036
  "args": {},
6277
- "description": "Write the topology manifest for one transport (input to the Terraform module)",
6037
+ "description": "List available tests, suites, and types",
6278
6038
  "examples": [
6279
- "<%= config.bin %> <%= command.id %> --transport AWS-prod --output infrastructure/work-queue/manifest.json"
6039
+ "<%= config.bin %> <%= command.id %>",
6040
+ "<%= config.bin %> <%= command.id %> --suites",
6041
+ "<%= config.bin %> <%= command.id %> --types",
6042
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
6043
+ "<%= config.bin %> <%= command.id %> --tag=smoke",
6044
+ "<%= config.bin %> <%= command.id %> --status=active --verbose"
6280
6045
  ],
6281
6046
  "flags": {
6282
- "transport": {
6047
+ "suites": {
6048
+ "description": "List test suites instead of tests",
6049
+ "name": "suites",
6050
+ "allowNo": false,
6051
+ "type": "boolean"
6052
+ },
6053
+ "types": {
6054
+ "description": "List test types",
6055
+ "name": "types",
6056
+ "allowNo": false,
6057
+ "type": "boolean"
6058
+ },
6059
+ "type": {
6283
6060
  "char": "t",
6284
- "description": "Transport name",
6285
- "name": "transport",
6286
- "required": true,
6061
+ "description": "Filter by test type",
6062
+ "name": "type",
6063
+ "hasDynamicHelp": false,
6064
+ "multiple": false,
6065
+ "type": "option"
6066
+ },
6067
+ "tag": {
6068
+ "description": "Filter by tag",
6069
+ "name": "tag",
6070
+ "hasDynamicHelp": false,
6071
+ "multiple": false,
6072
+ "type": "option"
6073
+ },
6074
+ "status": {
6075
+ "char": "s",
6076
+ "description": "Filter by status",
6077
+ "name": "status",
6078
+ "hasDynamicHelp": false,
6079
+ "multiple": false,
6080
+ "type": "option"
6081
+ },
6082
+ "format": {
6083
+ "char": "f",
6084
+ "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.",
6085
+ "name": "format",
6287
6086
  "hasDynamicHelp": false,
6288
6087
  "multiple": false,
6088
+ "options": [
6089
+ "text",
6090
+ "json",
6091
+ "md",
6092
+ "human",
6093
+ "console",
6094
+ "markdown",
6095
+ "compact",
6096
+ "table"
6097
+ ],
6289
6098
  "type": "option"
6290
6099
  },
6291
6100
  "output": {
6292
6101
  "char": "o",
6293
- "description": "File to write; stdout when omitted",
6102
+ "description": "Output file path",
6294
6103
  "name": "output",
6295
6104
  "hasDynamicHelp": false,
6296
6105
  "multiple": false,
6297
6106
  "type": "option"
6107
+ },
6108
+ "verbose": {
6109
+ "char": "v",
6110
+ "description": "Show detailed information",
6111
+ "name": "verbose",
6112
+ "allowNo": false,
6113
+ "type": "boolean"
6298
6114
  }
6299
6115
  },
6300
6116
  "hasDynamicHelp": false,
6301
6117
  "hiddenAliases": [],
6302
- "id": "queue:export-topology",
6118
+ "id": "test:list",
6303
6119
  "pluginAlias": "@memberjunction/cli",
6304
6120
  "pluginName": "@memberjunction/cli",
6305
6121
  "pluginType": "core",
@@ -6309,34 +6125,28 @@
6309
6125
  "relativePath": [
6310
6126
  "dist",
6311
6127
  "commands",
6312
- "queue",
6313
- "export-topology.js"
6128
+ "test",
6129
+ "list.js"
6314
6130
  ]
6315
6131
  },
6316
- "queue:import-bindings": {
6132
+ "test:promote-criteria": {
6317
6133
  "aliases": [],
6318
6134
  "args": {
6319
- "file": {
6320
- "description": "BindingImport JSON file",
6321
- "name": "file",
6135
+ "test": {
6136
+ "description": "Test name or ID",
6137
+ "name": "test",
6322
6138
  "required": true
6323
6139
  }
6324
6140
  },
6325
- "description": "Record cloud resource bindings (Terraform output) on work-queue topics and subscriptions",
6141
+ "description": "Copy a test's inline judge criteria into a Draft rubric and set Test.RubricID. Does not publish.",
6326
6142
  "examples": [
6327
- "terraform output -json mj_work_queue_bindings > bindings.json && <%= config.bin %> <%= command.id %> bindings.json"
6143
+ "<%= config.bin %> <%= command.id %> <test-id>",
6144
+ "<%= config.bin %> <%= command.id %> \"Reply check\""
6328
6145
  ],
6329
- "flags": {
6330
- "json": {
6331
- "description": "Print issues as JSON",
6332
- "name": "json",
6333
- "allowNo": false,
6334
- "type": "boolean"
6335
- }
6336
- },
6146
+ "flags": {},
6337
6147
  "hasDynamicHelp": false,
6338
6148
  "hiddenAliases": [],
6339
- "id": "queue:import-bindings",
6149
+ "id": "test:promote-criteria",
6340
6150
  "pluginAlias": "@memberjunction/cli",
6341
6151
  "pluginName": "@memberjunction/cli",
6342
6152
  "pluginType": "core",
@@ -6346,23 +6156,24 @@
6346
6156
  "relativePath": [
6347
6157
  "dist",
6348
6158
  "commands",
6349
- "queue",
6350
- "import-bindings.js"
6159
+ "test",
6160
+ "promote-criteria.js"
6351
6161
  ]
6352
6162
  },
6353
- "queue": {
6163
+ "test:report": {
6354
6164
  "aliases": [],
6355
- "args": {},
6356
- "description": "Operate the durable work queue",
6357
- "examples": [
6358
- "<%= config.bin %> <%= command.id %> publish --topic samples.hello --payload '{\"name\":\"Paul\"}'",
6359
- "<%= config.bin %> <%= command.id %> stats",
6360
- "<%= config.bin %> <%= command.id %> dead-letters --subscription email.unsubscribe"
6361
- ],
6165
+ "args": {
6166
+ "runId": {
6167
+ "description": "Test run ID",
6168
+ "name": "runId",
6169
+ "required": true
6170
+ }
6171
+ },
6172
+ "description": "Print the per-criterion rubric breakdown for a test run.",
6362
6173
  "flags": {},
6363
6174
  "hasDynamicHelp": false,
6364
6175
  "hiddenAliases": [],
6365
- "id": "queue",
6176
+ "id": "test:report",
6366
6177
  "pluginAlias": "@memberjunction/cli",
6367
6178
  "pluginName": "@memberjunction/cli",
6368
6179
  "pluginType": "core",
@@ -6372,64 +6183,169 @@
6372
6183
  "relativePath": [
6373
6184
  "dist",
6374
6185
  "commands",
6375
- "queue",
6376
- "index.js"
6186
+ "test",
6187
+ "report.js"
6377
6188
  ]
6378
6189
  },
6379
- "queue:partitions": {
6190
+ "test:run": {
6380
6191
  "aliases": [],
6381
- "args": {},
6382
- "description": "List a work-queue subscription's in-flight or blocked partition keys",
6192
+ "args": {
6193
+ "testId": {
6194
+ "description": "Test ID to execute",
6195
+ "name": "testId",
6196
+ "required": false
6197
+ }
6198
+ },
6199
+ "description": "Execute a single test by ID or name",
6383
6200
  "examples": [
6384
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --condition Blocked"
6201
+ "<%= config.bin %> <%= command.id %> <test-id>",
6202
+ "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
6203
+ "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
6204
+ "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
6205
+ "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
6385
6206
  ],
6386
6207
  "flags": {
6387
- "subscription": {
6388
- "char": "s",
6389
- "description": "Subscription name",
6390
- "name": "subscription",
6391
- "required": true,
6208
+ "name": {
6209
+ "char": "n",
6210
+ "description": "Test name to execute",
6211
+ "name": "name",
6392
6212
  "hasDynamicHelp": false,
6393
6213
  "multiple": false,
6394
6214
  "type": "option"
6395
6215
  },
6396
- "condition": {
6397
- "description": "Only keys in this condition",
6398
- "name": "condition",
6216
+ "environment": {
6217
+ "char": "e",
6218
+ "description": "Environment context (dev, staging, prod)",
6219
+ "name": "environment",
6220
+ "hasDynamicHelp": false,
6221
+ "multiple": false,
6222
+ "type": "option"
6223
+ },
6224
+ "format": {
6225
+ "char": "f",
6226
+ "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.",
6227
+ "name": "format",
6399
6228
  "hasDynamicHelp": false,
6400
6229
  "multiple": false,
6401
6230
  "options": [
6402
- "Idle",
6403
- "InFlight",
6404
- "Blocked"
6231
+ "text",
6232
+ "json",
6233
+ "md",
6234
+ "human",
6235
+ "console",
6236
+ "markdown",
6237
+ "compact",
6238
+ "table"
6405
6239
  ],
6406
6240
  "type": "option"
6407
6241
  },
6408
- "cursor": {
6409
- "description": "nextCursor from a previous page",
6410
- "name": "cursor",
6242
+ "output": {
6243
+ "char": "o",
6244
+ "description": "Output file path",
6245
+ "name": "output",
6246
+ "hasDynamicHelp": false,
6247
+ "multiple": false,
6248
+ "type": "option"
6249
+ },
6250
+ "dry-run": {
6251
+ "description": "Validate without executing",
6252
+ "name": "dry-run",
6253
+ "allowNo": false,
6254
+ "type": "boolean"
6255
+ },
6256
+ "verbose": {
6257
+ "char": "v",
6258
+ "description": "Show detailed execution information",
6259
+ "name": "verbose",
6260
+ "allowNo": false,
6261
+ "type": "boolean"
6262
+ },
6263
+ "checks-module": {
6264
+ "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).",
6265
+ "name": "checks-module",
6266
+ "hasDynamicHelp": false,
6267
+ "multiple": false,
6268
+ "type": "option"
6269
+ },
6270
+ "rubric": {
6271
+ "description": "Rubric override: name or id, optionally @version (1.2.0 or a version id)",
6272
+ "name": "rubric",
6273
+ "hasDynamicHelp": false,
6274
+ "multiple": false,
6275
+ "type": "option"
6276
+ },
6277
+ "oracles-module": {
6278
+ "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.",
6279
+ "name": "oracles-module",
6280
+ "hasDynamicHelp": false,
6281
+ "multiple": false,
6282
+ "type": "option"
6283
+ }
6284
+ },
6285
+ "hasDynamicHelp": false,
6286
+ "hiddenAliases": [],
6287
+ "id": "test:run",
6288
+ "pluginAlias": "@memberjunction/cli",
6289
+ "pluginName": "@memberjunction/cli",
6290
+ "pluginType": "core",
6291
+ "strict": true,
6292
+ "enableJsonFlag": false,
6293
+ "isESM": true,
6294
+ "relativePath": [
6295
+ "dist",
6296
+ "commands",
6297
+ "test",
6298
+ "run.js"
6299
+ ]
6300
+ },
6301
+ "test:scripts": {
6302
+ "aliases": [],
6303
+ "args": {},
6304
+ "description": "Review and promote recorded replay scripts. A run that re-derives a test which already had a script stores the new one as pending rather than replacing what replay uses, so a UI change never rewrites the suite unnoticed. This is where you see the drift and decide.",
6305
+ "examples": [
6306
+ "<%= config.bin %> <%= command.id %>",
6307
+ "<%= config.bin %> <%= command.id %> --test \"T042 - Filter Grid\"",
6308
+ "<%= config.bin %> <%= command.id %> --promote --test \"T042 - Filter Grid\"",
6309
+ "<%= config.bin %> <%= command.id %> --promote --yes",
6310
+ "<%= config.bin %> <%= command.id %> --discard --test \"T042 - Filter Grid\""
6311
+ ],
6312
+ "flags": {
6313
+ "test": {
6314
+ "description": "Limit to one test, by name or ID",
6315
+ "name": "test",
6411
6316
  "hasDynamicHelp": false,
6412
6317
  "multiple": false,
6413
6318
  "type": "option"
6414
6319
  },
6415
- "page-size": {
6416
- "description": "Items per page (1–500)",
6417
- "name": "page-size",
6418
- "default": 50,
6419
- "hasDynamicHelp": false,
6420
- "multiple": false,
6421
- "type": "option"
6320
+ "promote": {
6321
+ "description": "Promote the pending script(s) into the slot replay uses",
6322
+ "exclusive": [
6323
+ "discard"
6324
+ ],
6325
+ "name": "promote",
6326
+ "allowNo": false,
6327
+ "type": "boolean"
6422
6328
  },
6423
- "json": {
6424
- "description": "Print JSON instead of a table",
6425
- "name": "json",
6329
+ "discard": {
6330
+ "description": "Drop the pending script(s), keeping the promoted one",
6331
+ "exclusive": [
6332
+ "promote"
6333
+ ],
6334
+ "name": "discard",
6335
+ "allowNo": false,
6336
+ "type": "boolean"
6337
+ },
6338
+ "yes": {
6339
+ "char": "y",
6340
+ "description": "Confirm a bulk --promote/--discard that was not narrowed with --test",
6341
+ "name": "yes",
6426
6342
  "allowNo": false,
6427
6343
  "type": "boolean"
6428
6344
  }
6429
6345
  },
6430
6346
  "hasDynamicHelp": false,
6431
6347
  "hiddenAliases": [],
6432
- "id": "queue:partitions",
6348
+ "id": "test:scripts",
6433
6349
  "pluginAlias": "@memberjunction/cli",
6434
6350
  "pluginName": "@memberjunction/cli",
6435
6351
  "pluginType": "core",
@@ -6439,122 +6355,116 @@
6439
6355
  "relativePath": [
6440
6356
  "dist",
6441
6357
  "commands",
6442
- "queue",
6443
- "partitions.js"
6358
+ "test",
6359
+ "scripts.js"
6444
6360
  ]
6445
6361
  },
6446
- "queue:publish": {
6362
+ "test:suite": {
6447
6363
  "aliases": [],
6448
- "args": {},
6449
- "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
6364
+ "args": {
6365
+ "suiteId": {
6366
+ "description": "Test suite ID to execute",
6367
+ "name": "suiteId",
6368
+ "required": false
6369
+ }
6370
+ },
6371
+ "description": "Execute a test suite",
6450
6372
  "examples": [
6451
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
6452
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
6453
- "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
6373
+ "<%= config.bin %> <%= command.id %> <suite-id>",
6374
+ "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
6375
+ "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
6376
+ "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
6454
6377
  ],
6455
6378
  "flags": {
6456
- "topic": {
6457
- "char": "t",
6458
- "description": "Topic name",
6459
- "name": "topic",
6460
- "required": true,
6379
+ "name": {
6380
+ "char": "n",
6381
+ "description": "Test suite name to execute",
6382
+ "name": "name",
6461
6383
  "hasDynamicHelp": false,
6462
6384
  "multiple": false,
6463
6385
  "type": "option"
6464
6386
  },
6465
- "payload": {
6466
- "char": "p",
6467
- "description": "Message payload as JSON",
6468
- "name": "payload",
6469
- "default": "{}",
6387
+ "format": {
6388
+ "char": "f",
6389
+ "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.",
6390
+ "name": "format",
6470
6391
  "hasDynamicHelp": false,
6471
6392
  "multiple": false,
6393
+ "options": [
6394
+ "text",
6395
+ "json",
6396
+ "md",
6397
+ "human",
6398
+ "console",
6399
+ "markdown",
6400
+ "compact",
6401
+ "table"
6402
+ ],
6472
6403
  "type": "option"
6473
6404
  },
6474
- "partition-key": {
6475
- "char": "k",
6476
- "description": "PartitionKey for Exclusive / Ordered subscriptions",
6477
- "name": "partition-key",
6405
+ "output": {
6406
+ "char": "o",
6407
+ "description": "Output file path",
6408
+ "name": "output",
6478
6409
  "hasDynamicHelp": false,
6479
6410
  "multiple": false,
6480
6411
  "type": "option"
6481
6412
  },
6482
- "dedup-key": {
6483
- "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
6484
- "name": "dedup-key",
6413
+ "verbose": {
6414
+ "char": "v",
6415
+ "description": "Show detailed execution information",
6416
+ "name": "verbose",
6417
+ "allowNo": false,
6418
+ "type": "boolean"
6419
+ },
6420
+ "delay": {
6421
+ "char": "d",
6422
+ "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
6423
+ "name": "delay",
6424
+ "default": 0,
6485
6425
  "hasDynamicHelp": false,
6486
6426
  "multiple": false,
6487
6427
  "type": "option"
6488
6428
  },
6489
- "attribute": {
6490
- "char": "a",
6491
- "description": "Message attribute as key=value (repeatable)",
6492
- "name": "attribute",
6429
+ "parallel": {
6430
+ "char": "p",
6431
+ "description": "Run tests in parallel with shared browser sessions",
6432
+ "name": "parallel",
6433
+ "allowNo": false,
6434
+ "type": "boolean"
6435
+ },
6436
+ "max-parallel": {
6437
+ "description": "Maximum number of parallel workers (default 4)",
6438
+ "name": "max-parallel",
6439
+ "default": 4,
6493
6440
  "hasDynamicHelp": false,
6494
- "multiple": true,
6441
+ "multiple": false,
6495
6442
  "type": "option"
6496
6443
  },
6497
- "count": {
6498
- "char": "n",
6499
- "description": "How many copies to publish in one batch",
6500
- "name": "count",
6501
- "default": 1,
6444
+ "rubric": {
6445
+ "description": "Rubric override for every test: name or id, optionally @version",
6446
+ "name": "rubric",
6502
6447
  "hasDynamicHelp": false,
6503
6448
  "multiple": false,
6504
6449
  "type": "option"
6505
6450
  },
6506
- "json": {
6507
- "description": "Print the publish results as JSON",
6508
- "name": "json",
6509
- "allowNo": false,
6510
- "type": "boolean"
6511
- }
6512
- },
6513
- "hasDynamicHelp": false,
6514
- "hiddenAliases": [],
6515
- "id": "queue:publish",
6516
- "pluginAlias": "@memberjunction/cli",
6517
- "pluginName": "@memberjunction/cli",
6518
- "pluginType": "core",
6519
- "strict": true,
6520
- "enableJsonFlag": false,
6521
- "isESM": true,
6522
- "relativePath": [
6523
- "dist",
6524
- "commands",
6525
- "queue",
6526
- "publish.js"
6527
- ]
6528
- },
6529
- "queue:replay": {
6530
- "aliases": [],
6531
- "args": {},
6532
- "description": "Replay one dead-lettered work-queue delivery",
6533
- "examples": [
6534
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
6535
- ],
6536
- "flags": {
6537
- "subscription": {
6538
- "char": "s",
6539
- "description": "Subscription name",
6540
- "name": "subscription",
6541
- "required": true,
6451
+ "flaky-check": {
6452
+ "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
6453
+ "name": "flaky-check",
6542
6454
  "hasDynamicHelp": false,
6543
6455
  "multiple": false,
6544
6456
  "type": "option"
6545
6457
  },
6546
- "delivery": {
6547
- "char": "d",
6548
- "description": "DeliveryID from `mj queue dead-letters`",
6549
- "name": "delivery",
6550
- "required": true,
6458
+ "checks-module": {
6459
+ "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).",
6460
+ "name": "checks-module",
6551
6461
  "hasDynamicHelp": false,
6552
6462
  "multiple": false,
6553
6463
  "type": "option"
6554
6464
  },
6555
- "note": {
6556
- "description": "Operator note stored with the resolution",
6557
- "name": "note",
6465
+ "oracles-module": {
6466
+ "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.",
6467
+ "name": "oracles-module",
6558
6468
  "hasDynamicHelp": false,
6559
6469
  "multiple": false,
6560
6470
  "type": "option"
@@ -6562,7 +6472,7 @@
6562
6472
  },
6563
6473
  "hasDynamicHelp": false,
6564
6474
  "hiddenAliases": [],
6565
- "id": "queue:replay",
6475
+ "id": "test:suite",
6566
6476
  "pluginAlias": "@memberjunction/cli",
6567
6477
  "pluginName": "@memberjunction/cli",
6568
6478
  "pluginType": "core",
@@ -6572,37 +6482,31 @@
6572
6482
  "relativePath": [
6573
6483
  "dist",
6574
6484
  "commands",
6575
- "queue",
6576
- "replay.js"
6485
+ "test",
6486
+ "suite.js"
6577
6487
  ]
6578
6488
  },
6579
- "queue:stats": {
6489
+ "test:usage": {
6580
6490
  "aliases": [],
6581
6491
  "args": {},
6582
- "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
6583
- "examples": [
6584
- "<%= config.bin %> <%= command.id %>",
6585
- "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
6586
- ],
6492
+ "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
6587
6493
  "flags": {
6588
- "subscription": {
6589
- "char": "s",
6590
- "description": "Subscription name; omit for every subscription",
6591
- "name": "subscription",
6494
+ "format": {
6495
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
6496
+ "name": "format",
6592
6497
  "hasDynamicHelp": false,
6593
6498
  "multiple": false,
6499
+ "options": [
6500
+ "text",
6501
+ "json",
6502
+ "md"
6503
+ ],
6594
6504
  "type": "option"
6595
- },
6596
- "json": {
6597
- "description": "Print JSON instead of a table",
6598
- "name": "json",
6599
- "allowNo": false,
6600
- "type": "boolean"
6601
6505
  }
6602
6506
  },
6603
6507
  "hasDynamicHelp": false,
6604
6508
  "hiddenAliases": [],
6605
- "id": "queue:stats",
6509
+ "id": "test:usage",
6606
6510
  "pluginAlias": "@memberjunction/cli",
6607
6511
  "pluginName": "@memberjunction/cli",
6608
6512
  "pluginType": "core",
@@ -6612,31 +6516,86 @@
6612
6516
  "relativePath": [
6613
6517
  "dist",
6614
6518
  "commands",
6615
- "queue",
6616
- "stats.js"
6519
+ "test",
6520
+ "usage.js"
6617
6521
  ]
6618
6522
  },
6619
- "queue:usage": {
6523
+ "test:validate": {
6620
6524
  "aliases": [],
6621
- "args": {},
6622
- "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
6525
+ "args": {
6526
+ "testId": {
6527
+ "description": "Test ID to validate",
6528
+ "name": "testId",
6529
+ "required": false
6530
+ }
6531
+ },
6532
+ "description": "Validate test definitions without executing",
6533
+ "examples": [
6534
+ "<%= config.bin %> <%= command.id %> <test-id>",
6535
+ "<%= config.bin %> <%= command.id %> --all",
6536
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
6537
+ "<%= config.bin %> <%= command.id %> --all --save-report",
6538
+ "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
6539
+ ],
6623
6540
  "flags": {
6541
+ "all": {
6542
+ "char": "a",
6543
+ "description": "Validate all tests",
6544
+ "name": "all",
6545
+ "allowNo": false,
6546
+ "type": "boolean"
6547
+ },
6548
+ "type": {
6549
+ "char": "t",
6550
+ "description": "Validate tests by type",
6551
+ "name": "type",
6552
+ "hasDynamicHelp": false,
6553
+ "multiple": false,
6554
+ "type": "option"
6555
+ },
6556
+ "save-report": {
6557
+ "description": "Save validation report to file",
6558
+ "name": "save-report",
6559
+ "allowNo": false,
6560
+ "type": "boolean"
6561
+ },
6624
6562
  "format": {
6625
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
6563
+ "char": "f",
6564
+ "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.",
6626
6565
  "name": "format",
6627
6566
  "hasDynamicHelp": false,
6628
6567
  "multiple": false,
6629
6568
  "options": [
6630
6569
  "text",
6631
6570
  "json",
6632
- "md"
6571
+ "md",
6572
+ "human",
6573
+ "console",
6574
+ "markdown",
6575
+ "compact",
6576
+ "table"
6633
6577
  ],
6634
6578
  "type": "option"
6579
+ },
6580
+ "output": {
6581
+ "char": "o",
6582
+ "description": "Output file path",
6583
+ "name": "output",
6584
+ "hasDynamicHelp": false,
6585
+ "multiple": false,
6586
+ "type": "option"
6587
+ },
6588
+ "verbose": {
6589
+ "char": "v",
6590
+ "description": "Show detailed information",
6591
+ "name": "verbose",
6592
+ "allowNo": false,
6593
+ "type": "boolean"
6635
6594
  }
6636
6595
  },
6637
6596
  "hasDynamicHelp": false,
6638
6597
  "hiddenAliases": [],
6639
- "id": "queue:usage",
6598
+ "id": "test:validate",
6640
6599
  "pluginAlias": "@memberjunction/cli",
6641
6600
  "pluginName": "@memberjunction/cli",
6642
6601
  "pluginType": "core",
@@ -6646,37 +6605,135 @@
6646
6605
  "relativePath": [
6647
6606
  "dist",
6648
6607
  "commands",
6649
- "queue",
6650
- "usage.js"
6608
+ "test",
6609
+ "validate.js"
6651
6610
  ]
6652
6611
  },
6653
- "queue:validate-bindings": {
6612
+ "update:claude": {
6654
6613
  "aliases": [],
6655
6614
  "args": {},
6656
- "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
6615
+ "description": "Update the Claude Code pack in the current directory.",
6657
6616
  "examples": [
6658
- "<%= config.bin %> <%= command.id %>",
6659
- "<%= config.bin %> <%= command.id %> --transport AWS-prod"
6617
+ "<%= config.bin %> update:claude",
6618
+ "<%= config.bin %> update:claude --check",
6619
+ "<%= config.bin %> update:claude --refresh-commands",
6620
+ "<%= config.bin %> update:claude --allow-major",
6621
+ "<%= config.bin %> update:claude --json"
6660
6622
  ],
6661
6623
  "flags": {
6662
- "transport": {
6663
- "char": "t",
6664
- "description": "Validate one transport's bindings against its resources",
6665
- "name": "transport",
6624
+ "dir": {
6625
+ "description": "Target directory",
6626
+ "name": "dir",
6627
+ "default": ".",
6666
6628
  "hasDynamicHelp": false,
6667
6629
  "multiple": false,
6668
6630
  "type": "option"
6669
6631
  },
6632
+ "major": {
6633
+ "description": "Force a specific MJ major (default: detected from package.json)",
6634
+ "name": "major",
6635
+ "hasDynamicHelp": false,
6636
+ "multiple": false,
6637
+ "type": "option"
6638
+ },
6639
+ "ref": {
6640
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
6641
+ "name": "ref",
6642
+ "hasDynamicHelp": false,
6643
+ "multiple": false,
6644
+ "type": "option"
6645
+ },
6646
+ "from": {
6647
+ "description": "Use a local pack source instead of fetching from GitHub",
6648
+ "name": "from",
6649
+ "hasDynamicHelp": false,
6650
+ "multiple": false,
6651
+ "type": "option"
6652
+ },
6653
+ "offline": {
6654
+ "description": "Forbid network; requires --from <path>",
6655
+ "name": "offline",
6656
+ "allowNo": false,
6657
+ "type": "boolean"
6658
+ },
6659
+ "dry-run": {
6660
+ "description": "Print what would be written; change nothing",
6661
+ "name": "dry-run",
6662
+ "allowNo": false,
6663
+ "type": "boolean"
6664
+ },
6665
+ "yes": {
6666
+ "char": "y",
6667
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
6668
+ "name": "yes",
6669
+ "allowNo": false,
6670
+ "type": "boolean"
6671
+ },
6672
+ "force": {
6673
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
6674
+ "name": "force",
6675
+ "allowNo": false,
6676
+ "type": "boolean"
6677
+ },
6678
+ "skip-commands": {
6679
+ "description": "Skip seeding .claude/commands/",
6680
+ "name": "skip-commands",
6681
+ "allowNo": false,
6682
+ "type": "boolean"
6683
+ },
6684
+ "skip-skills": {
6685
+ "description": "Skip seeding .claude/skills/",
6686
+ "name": "skip-skills",
6687
+ "allowNo": false,
6688
+ "type": "boolean"
6689
+ },
6690
+ "skip-settings": {
6691
+ "description": "Skip merging .claude/settings.json",
6692
+ "name": "skip-settings",
6693
+ "allowNo": false,
6694
+ "type": "boolean"
6695
+ },
6696
+ "check": {
6697
+ "description": "Compare local pack version to remote without writing anything",
6698
+ "name": "check",
6699
+ "allowNo": false,
6700
+ "type": "boolean"
6701
+ },
6702
+ "refresh-commands": {
6703
+ "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
6704
+ "name": "refresh-commands",
6705
+ "allowNo": false,
6706
+ "type": "boolean"
6707
+ },
6708
+ "refresh-skills": {
6709
+ "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
6710
+ "name": "refresh-skills",
6711
+ "allowNo": false,
6712
+ "type": "boolean"
6713
+ },
6714
+ "allow-major": {
6715
+ "description": "Allow the remote pack's major to differ from local MJ's major",
6716
+ "name": "allow-major",
6717
+ "allowNo": false,
6718
+ "type": "boolean"
6719
+ },
6670
6720
  "json": {
6671
- "description": "Print issues as JSON",
6721
+ "description": "Output as JSON (matches plan §7.5 schema)",
6672
6722
  "name": "json",
6673
6723
  "allowNo": false,
6674
6724
  "type": "boolean"
6725
+ },
6726
+ "verbose": {
6727
+ "char": "v",
6728
+ "description": "Show progress messages",
6729
+ "name": "verbose",
6730
+ "allowNo": false,
6731
+ "type": "boolean"
6675
6732
  }
6676
6733
  },
6677
6734
  "hasDynamicHelp": false,
6678
6735
  "hiddenAliases": [],
6679
- "id": "queue:validate-bindings",
6736
+ "id": "update:claude",
6680
6737
  "pluginAlias": "@memberjunction/cli",
6681
6738
  "pluginName": "@memberjunction/cli",
6682
6739
  "pluginType": "core",
@@ -6686,87 +6743,31 @@
6686
6743
  "relativePath": [
6687
6744
  "dist",
6688
6745
  "commands",
6689
- "queue",
6690
- "validate-bindings.js"
6746
+ "update",
6747
+ "claude.js"
6691
6748
  ]
6692
6749
  },
6693
- "queue:work": {
6750
+ "update:usage": {
6694
6751
  "aliases": [],
6695
6752
  "args": {},
6696
- "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
6697
- "examples": [
6698
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
6699
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
6700
- "<%= config.bin %> <%= command.id %> --subscription \"*\""
6701
- ],
6753
+ "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
6702
6754
  "flags": {
6703
- "subscription": {
6704
- "char": "s",
6705
- "description": "Subscription name, or '*' for every MJWorker subscription",
6706
- "name": "subscription",
6707
- "required": true,
6708
- "hasDynamicHelp": false,
6709
- "multiple": false,
6710
- "type": "option"
6711
- },
6712
- "once": {
6713
- "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
6714
- "name": "once",
6715
- "allowNo": false,
6716
- "type": "boolean"
6717
- },
6718
- "max": {
6719
- "dependsOn": [
6720
- "once"
6721
- ],
6722
- "description": "With --once: how many deliveries to receive",
6723
- "name": "max",
6724
- "default": 1,
6725
- "hasDynamicHelp": false,
6726
- "multiple": false,
6727
- "type": "option"
6728
- },
6729
- "idle-exit-ms": {
6730
- "dependsOn": [
6731
- "once"
6732
- ],
6733
- "description": "With --once: exit after this long with an empty queue",
6734
- "name": "idle-exit-ms",
6735
- "default": 5000,
6755
+ "format": {
6756
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
6757
+ "name": "format",
6736
6758
  "hasDynamicHelp": false,
6737
6759
  "multiple": false,
6738
- "type": "option"
6739
- },
6740
- "max-duration-ms": {
6741
- "dependsOn": [
6742
- "once"
6760
+ "options": [
6761
+ "text",
6762
+ "json",
6763
+ "md"
6743
6764
  ],
6744
- "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
6745
- "name": "max-duration-ms",
6746
- "hasDynamicHelp": false,
6747
- "multiple": false,
6748
- "type": "option"
6749
- },
6750
- "concurrency": {
6751
- "description": "Handlers in flight per subscription",
6752
- "name": "concurrency",
6753
- "default": 1,
6754
- "hasDynamicHelp": false,
6755
- "multiple": false,
6756
- "type": "option"
6757
- },
6758
- "shutdown-drain-ms": {
6759
- "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
6760
- "name": "shutdown-drain-ms",
6761
- "default": 30000,
6762
- "hasDynamicHelp": false,
6763
- "multiple": false,
6764
6765
  "type": "option"
6765
6766
  }
6766
6767
  },
6767
6768
  "hasDynamicHelp": false,
6768
6769
  "hiddenAliases": [],
6769
- "id": "queue:work",
6770
+ "id": "update:usage",
6770
6771
  "pluginAlias": "@memberjunction/cli",
6771
6772
  "pluginName": "@memberjunction/cli",
6772
6773
  "pluginType": "core",
@@ -6776,8 +6777,8 @@
6776
6777
  "relativePath": [
6777
6778
  "dist",
6778
6779
  "commands",
6779
- "queue",
6780
- "work.js"
6780
+ "update",
6781
+ "usage.js"
6781
6782
  ]
6782
6783
  },
6783
6784
  "user:clone": {
@@ -7081,6 +7082,7 @@
7081
7082
  "description": "Execute an AI agent with a prompt or start interactive chat",
7082
7083
  "examples": [
7083
7084
  "<%= config.bin %> <%= command.id %> -a \"Skip: Requirements Expert\" -p \"Create a dashboard for sales metrics\"",
7085
+ "<%= config.bin %> <%= command.id %> -a \"Customer Insight Agent\" -f ./prompt.txt",
7084
7086
  "<%= config.bin %> <%= command.id %> -a \"Child Component Generator Sub-agent\" --chat",
7085
7087
  "<%= config.bin %> <%= command.id %> -a \"Skip: Technical Design Expert\" -p \"Build a React component\" --verbose --timeout=600000"
7086
7088
  ],
@@ -7098,18 +7100,32 @@
7098
7100
  "char": "p",
7099
7101
  "description": "Prompt to execute",
7100
7102
  "exclusive": [
7101
- "chat"
7103
+ "chat",
7104
+ "prompt-file"
7102
7105
  ],
7103
7106
  "name": "prompt",
7104
7107
  "hasDynamicHelp": false,
7105
7108
  "multiple": false,
7106
7109
  "type": "option"
7107
7110
  },
7111
+ "prompt-file": {
7112
+ "char": "f",
7113
+ "description": "Path to a file containing the prompt to execute",
7114
+ "exclusive": [
7115
+ "chat",
7116
+ "prompt"
7117
+ ],
7118
+ "name": "prompt-file",
7119
+ "hasDynamicHelp": false,
7120
+ "multiple": false,
7121
+ "type": "option"
7122
+ },
7108
7123
  "chat": {
7109
7124
  "char": "c",
7110
7125
  "description": "Start interactive chat mode",
7111
7126
  "exclusive": [
7112
- "prompt"
7127
+ "prompt",
7128
+ "prompt-file"
7113
7129
  ],
7114
7130
  "name": "chat",
7115
7131
  "allowNo": false,
@@ -8222,5 +8238,5 @@
8222
8238
  ]
8223
8239
  }
8224
8240
  },
8225
- "version": "6.2.0-edge.5"
8241
+ "version": "6.2.0-edge.6"
8226
8242
  }