@memberjunction/cli 6.2.3 → 6.2.4

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.
@@ -157,77 +157,54 @@
157
157
  "usage.js"
158
158
  ]
159
159
  },
160
- "app:check-updates": {
160
+ "artifacts:reclassify": {
161
161
  "aliases": [],
162
162
  "args": {},
163
- "description": "Check for available upgrades for installed MJ Open Apps",
164
- "examples": [
165
- "<%= config.bin %> app check-updates"
166
- ],
167
- "flags": {},
168
- "hasDynamicHelp": false,
169
- "hiddenAliases": [],
170
- "id": "app:check-updates",
171
- "pluginAlias": "@memberjunction/cli",
172
- "pluginName": "@memberjunction/cli",
173
- "pluginType": "core",
174
- "strict": true,
175
- "enableJsonFlag": false,
176
- "isESM": true,
177
- "relativePath": [
178
- "dist",
179
- "commands",
180
- "app",
181
- "check-updates.js"
182
- ]
183
- },
184
- "app:disable": {
185
- "aliases": [],
186
- "args": {
187
- "name": {
188
- "description": "Name of the installed app to disable",
189
- "name": "name",
190
- "required": true
191
- }
192
- },
193
- "description": "Disable an installed MJ Open App without removing it",
163
+ "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
194
164
  "examples": [
195
- "<%= config.bin %> app disable acme-crm"
165
+ "<%= config.bin %> <%= command.id %>",
166
+ "<%= config.bin %> <%= command.id %> --apply --limit 50"
196
167
  ],
197
- "flags": {},
198
- "hasDynamicHelp": false,
199
- "hiddenAliases": [],
200
- "id": "app:disable",
201
- "pluginAlias": "@memberjunction/cli",
202
- "pluginName": "@memberjunction/cli",
203
- "pluginType": "core",
204
- "strict": true,
205
- "enableJsonFlag": false,
206
- "isESM": true,
207
- "relativePath": [
208
- "dist",
209
- "commands",
210
- "app",
211
- "disable.js"
212
- ]
213
- },
214
- "app:enable": {
215
- "aliases": [],
216
- "args": {
217
- "name": {
218
- "description": "Name of the installed app to enable",
219
- "name": "name",
220
- "required": true
168
+ "flags": {
169
+ "conversation-id": {
170
+ "description": "Scope to artifacts attached to the given conversation.",
171
+ "name": "conversation-id",
172
+ "hasDynamicHelp": false,
173
+ "multiple": false,
174
+ "type": "option"
175
+ },
176
+ "since": {
177
+ "description": "Scope to artifacts created on/after this ISO date.",
178
+ "name": "since",
179
+ "hasDynamicHelp": false,
180
+ "multiple": false,
181
+ "type": "option"
182
+ },
183
+ "limit": {
184
+ "description": "Maximum number of rows to inspect.",
185
+ "name": "limit",
186
+ "default": 100,
187
+ "hasDynamicHelp": false,
188
+ "multiple": false,
189
+ "type": "option"
190
+ },
191
+ "apply": {
192
+ "description": "Write changes. Without this flag, this command only reports what it would do.",
193
+ "name": "apply",
194
+ "allowNo": false,
195
+ "type": "boolean"
196
+ },
197
+ "verbose": {
198
+ "char": "v",
199
+ "description": "Print every candidate row, not just the summary.",
200
+ "name": "verbose",
201
+ "allowNo": false,
202
+ "type": "boolean"
221
203
  }
222
204
  },
223
- "description": "Re-enable a disabled MJ Open App",
224
- "examples": [
225
- "<%= config.bin %> app enable acme-crm"
226
- ],
227
- "flags": {},
228
205
  "hasDynamicHelp": false,
229
206
  "hiddenAliases": [],
230
- "id": "app:enable",
207
+ "id": "artifacts:reclassify",
231
208
  "pluginAlias": "@memberjunction/cli",
232
209
  "pluginName": "@memberjunction/cli",
233
210
  "pluginType": "core",
@@ -237,27 +214,31 @@
237
214
  "relativePath": [
238
215
  "dist",
239
216
  "commands",
240
- "app",
241
- "enable.js"
217
+ "artifacts",
218
+ "reclassify.js"
242
219
  ]
243
220
  },
244
- "app:info": {
221
+ "artifacts:usage": {
245
222
  "aliases": [],
246
- "args": {
247
- "name": {
248
- "description": "Name of the installed app",
249
- "name": "name",
250
- "required": true
223
+ "args": {},
224
+ "description": "Show usage, flags, examples, and runtime hints for every `mj artifacts` command.",
225
+ "flags": {
226
+ "format": {
227
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
228
+ "name": "format",
229
+ "hasDynamicHelp": false,
230
+ "multiple": false,
231
+ "options": [
232
+ "text",
233
+ "json",
234
+ "md"
235
+ ],
236
+ "type": "option"
251
237
  }
252
238
  },
253
- "description": "Show detailed information about an installed MJ Open App",
254
- "examples": [
255
- "<%= config.bin %> app info acme-crm"
256
- ],
257
- "flags": {},
258
239
  "hasDynamicHelp": false,
259
240
  "hiddenAliases": [],
260
- "id": "app:info",
241
+ "id": "artifacts:usage",
261
242
  "pluginAlias": "@memberjunction/cli",
262
243
  "pluginName": "@memberjunction/cli",
263
244
  "pluginType": "core",
@@ -267,59 +248,96 @@
267
248
  "relativePath": [
268
249
  "dist",
269
250
  "commands",
270
- "app",
271
- "info.js"
251
+ "artifacts",
252
+ "usage.js"
272
253
  ]
273
254
  },
274
- "app:install": {
255
+ "baseline:build": {
275
256
  "aliases": [],
276
- "args": {
277
- "source": {
278
- "description": "GitHub repository URL of the Open App. For a multi-app repo, append the in-repo path to the app (e.g. https://github.com/MemberJunction/Integrations/CRM/HubSpot).",
279
- "name": "source",
280
- "required": true
281
- }
282
- },
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.",
257
+ "args": {},
258
+ "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
284
259
  "examples": [
285
- "<%= config.bin %> app install https://github.com/acme/mj-crm",
286
- "<%= config.bin %> app install https://github.com/acme/mj-crm --version 1.2.0",
287
- "<%= config.bin %> app install https://github.com/acme/mj-crm --verbose",
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",
290
- "GITHUB_TOKEN=$(gh auth token) <%= config.bin %> app install https://github.com/acme/private-app"
260
+ "<%= config.bin %> <%= command.id %> --out ./migrations/v5/ # auto: within-major rebaseline",
261
+ "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --out ./migrations/v5/",
262
+ "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --out ./migrations/v6/ # explicit major-boundary",
263
+ "<%= config.bin %> <%= command.id %> --baseline-version 5.32 --database MJ_BL_Stack --out /tmp/baseline/"
291
264
  ],
292
265
  "flags": {
293
- "version": {
294
- "description": "Specific version to install (default: latest)",
295
- "name": "version",
266
+ "baseline-version": {
267
+ "description": "Baseline version stamp in Major.Minor format (literal x is appended for patch, matching the V-file convention). Omit to auto-detect from --source-dir (within-major rebaseline mode).",
268
+ "name": "baseline-version",
296
269
  "hasDynamicHelp": false,
297
270
  "multiple": false,
298
271
  "type": "option"
299
272
  },
300
- "verbose": {
301
- "char": "v",
302
- "description": "Show detailed output",
303
- "name": "verbose",
273
+ "source-dir": {
274
+ "description": "Migrations source directory (e.g. ./migrations/v5). Used to auto-detect the next baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ directory walked up from cwd.",
275
+ "name": "source-dir",
276
+ "hasDynamicHelp": false,
277
+ "multiple": false,
278
+ "type": "option"
279
+ },
280
+ "description": {
281
+ "description": "Human-readable description embedded in the file header.",
282
+ "name": "description",
283
+ "default": "MemberJunction Baseline",
284
+ "hasDynamicHelp": false,
285
+ "multiple": false,
286
+ "type": "option"
287
+ },
288
+ "database": {
289
+ "description": "Override database name (host/user/password come from MJ config).",
290
+ "name": "database",
291
+ "hasDynamicHelp": false,
292
+ "multiple": false,
293
+ "type": "option"
294
+ },
295
+ "out": {
296
+ "description": "Output directory. Filename is auto-generated.",
297
+ "name": "out",
298
+ "default": ".",
299
+ "hasDynamicHelp": false,
300
+ "multiple": false,
301
+ "type": "option"
302
+ },
303
+ "exclude-data": {
304
+ "description": "Comma-separated list of tables (schema-qualified or not) to skip data dump for.",
305
+ "name": "exclude-data",
306
+ "default": "",
307
+ "hasDynamicHelp": false,
308
+ "multiple": false,
309
+ "type": "option"
310
+ },
311
+ "batch-size": {
312
+ "description": "Rows per INSERT batch.",
313
+ "name": "batch-size",
314
+ "default": 1000,
315
+ "hasDynamicHelp": false,
316
+ "multiple": false,
317
+ "type": "option"
318
+ },
319
+ "no-data": {
320
+ "description": "Emit schema only, no data inserts.",
321
+ "name": "no-data",
304
322
  "allowNo": false,
305
323
  "type": "boolean"
306
324
  },
307
- "non-interactive": {
308
- "description": "Skip interactive setup prompts; post-install hooks use environment variables / defaults (for CI/headless installs)",
309
- "name": "non-interactive",
325
+ "verbose": {
326
+ "description": "Print per-object progress.",
327
+ "name": "verbose",
310
328
  "allowNo": false,
311
329
  "type": "boolean"
312
330
  },
313
- "dangerously-ignore-dbl-underscore-schema-rule": {
314
- "hidden": true,
315
- "name": "dangerously-ignore-dbl-underscore-schema-rule",
331
+ "dry-run": {
332
+ "description": "Print to stdout instead of writing a file.",
333
+ "name": "dry-run",
316
334
  "allowNo": false,
317
335
  "type": "boolean"
318
336
  }
319
337
  },
320
338
  "hasDynamicHelp": false,
321
339
  "hiddenAliases": [],
322
- "id": "app:install",
340
+ "id": "baseline:build",
323
341
  "pluginAlias": "@memberjunction/cli",
324
342
  "pluginName": "@memberjunction/cli",
325
343
  "pluginType": "core",
@@ -329,94 +347,114 @@
329
347
  "relativePath": [
330
348
  "dist",
331
349
  "commands",
332
- "app",
333
- "install.js"
350
+ "baseline",
351
+ "build.js"
334
352
  ]
335
353
  },
336
- "app:list": {
354
+ "baseline:compare": {
337
355
  "aliases": [],
338
356
  "args": {},
339
- "description": "List all installed MJ Open Apps",
357
+ "description": "Deterministically compare two databases object-by-object and row-by-row.",
340
358
  "examples": [
341
- "<%= config.bin %> app list"
359
+ "<%= config.bin %> <%= command.id %> --left MJ_BL_Stack --right MJ_BL_New",
360
+ "<%= config.bin %> <%= command.id %> --left A --right B --row-compare counts",
361
+ "<%= config.bin %> <%= command.id %> --left A --right B --fail-on-diff --out ./diffs/"
342
362
  ],
343
363
  "flags": {
344
- "verbose": {
345
- "char": "v",
346
- "description": "Show detailed output",
347
- "name": "verbose",
348
- "allowNo": false,
349
- "type": "boolean"
350
- }
351
- },
352
- "hasDynamicHelp": false,
353
- "hiddenAliases": [],
354
- "id": "app:list",
355
- "pluginAlias": "@memberjunction/cli",
356
- "pluginName": "@memberjunction/cli",
357
- "pluginType": "core",
358
- "strict": true,
359
- "enableJsonFlag": false,
360
- "isESM": true,
361
- "relativePath": [
362
- "dist",
363
- "commands",
364
- "app",
365
- "list.js"
366
- ]
367
- },
368
- "app:remove": {
369
- "aliases": [],
370
- "args": {
371
- "name": {
372
- "description": "Name of the installed app to remove",
373
- "name": "name",
374
- "required": true
375
- }
376
- },
377
- "description": "Remove an installed MJ Open App",
378
- "examples": [
379
- "<%= config.bin %> app remove acme-crm",
380
- "<%= config.bin %> app remove acme-crm --keep-data",
381
- "<%= config.bin %> app remove acme-crm --force"
382
- ],
383
- "flags": {
384
- "keep-data": {
385
- "description": "Keep the database schema and data",
386
- "name": "keep-data",
387
- "allowNo": false,
388
- "type": "boolean"
364
+ "left": {
365
+ "description": "Left database name (override).",
366
+ "name": "left",
367
+ "required": true,
368
+ "hasDynamicHelp": false,
369
+ "multiple": false,
370
+ "type": "option"
389
371
  },
390
- "force": {
391
- "description": "Force removal even if other apps depend on this one",
392
- "name": "force",
393
- "allowNo": false,
394
- "type": "boolean"
372
+ "right": {
373
+ "description": "Right database name (override).",
374
+ "name": "right",
375
+ "required": true,
376
+ "hasDynamicHelp": false,
377
+ "multiple": false,
378
+ "type": "option"
395
379
  },
396
- "yes": {
397
- "char": "y",
398
- "description": "Skip confirmation prompt",
399
- "name": "yes",
380
+ "dialect": {
381
+ "description": "Dialect of both DBs (must match).",
382
+ "name": "dialect",
383
+ "default": "mssql",
384
+ "hasDynamicHelp": false,
385
+ "multiple": false,
386
+ "options": [
387
+ "mssql",
388
+ "postgres"
389
+ ],
390
+ "type": "option"
391
+ },
392
+ "row-compare": {
393
+ "description": "Row comparison mode.",
394
+ "name": "row-compare",
395
+ "default": "full",
396
+ "hasDynamicHelp": false,
397
+ "multiple": false,
398
+ "options": [
399
+ "full",
400
+ "hash",
401
+ "counts",
402
+ "none"
403
+ ],
404
+ "type": "option"
405
+ },
406
+ "row-hash-algo": {
407
+ "description": "Hash algorithm when --row-compare hash.",
408
+ "name": "row-hash-algo",
409
+ "default": "sha256",
410
+ "hasDynamicHelp": false,
411
+ "multiple": false,
412
+ "options": [
413
+ "sha256",
414
+ "md5",
415
+ "checksum_agg"
416
+ ],
417
+ "type": "option"
418
+ },
419
+ "ignore": {
420
+ "description": "Regex of object names to skip.",
421
+ "name": "ignore",
422
+ "default": "^flyway_schema_history$",
423
+ "hasDynamicHelp": false,
424
+ "multiple": false,
425
+ "type": "option"
426
+ },
427
+ "sample-limit": {
428
+ "description": "Maximum row diffs to capture per table.",
429
+ "name": "sample-limit",
430
+ "default": 100,
431
+ "hasDynamicHelp": false,
432
+ "multiple": false,
433
+ "type": "option"
434
+ },
435
+ "out": {
436
+ "description": "Directory to write JSON + Markdown reports.",
437
+ "name": "out",
438
+ "hasDynamicHelp": false,
439
+ "multiple": false,
440
+ "type": "option"
441
+ },
442
+ "fail-on-diff": {
443
+ "description": "Exit non-zero if any diff is found.",
444
+ "name": "fail-on-diff",
400
445
  "allowNo": false,
401
446
  "type": "boolean"
402
447
  },
403
448
  "verbose": {
404
- "char": "v",
405
- "description": "Show detailed output",
449
+ "description": "Print per-phase progress.",
406
450
  "name": "verbose",
407
451
  "allowNo": false,
408
452
  "type": "boolean"
409
- },
410
- "dangerously-ignore-dbl-underscore-schema-rule": {
411
- "hidden": true,
412
- "name": "dangerously-ignore-dbl-underscore-schema-rule",
413
- "allowNo": false,
414
- "type": "boolean"
415
453
  }
416
454
  },
417
455
  "hasDynamicHelp": false,
418
456
  "hiddenAliases": [],
419
- "id": "app:remove",
457
+ "id": "baseline:compare",
420
458
  "pluginAlias": "@memberjunction/cli",
421
459
  "pluginName": "@memberjunction/cli",
422
460
  "pluginType": "core",
@@ -426,55 +464,119 @@
426
464
  "relativePath": [
427
465
  "dist",
428
466
  "commands",
429
- "app",
430
- "remove.js"
467
+ "baseline",
468
+ "compare.js"
431
469
  ]
432
470
  },
433
- "app:upgrade": {
471
+ "baseline:roundtrip": {
434
472
  "aliases": [],
435
- "args": {
436
- "name": {
437
- "description": "Name of the installed app to upgrade",
438
- "name": "name",
439
- "required": true
440
- }
441
- },
442
- "description": "Upgrade an installed MJ Open App to a newer version",
473
+ "args": {},
474
+ "description": "Build a baseline from a V-stack database, apply it to a fresh DB, and prove byte-equivalence.",
443
475
  "examples": [
444
- "<%= config.bin %> app upgrade acme-crm",
445
- "<%= config.bin %> app upgrade acme-crm --version 1.3.0"
476
+ "<%= config.bin %> <%= command.id %> --source MJ_BL_Stack --target MJ_BL_New # auto: within-major",
477
+ "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --source MJ_BL_Stack --target MJ_BL_New # explicit major-boundary",
478
+ "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --source MJ_BL_Stack --target MJ_BL_New"
446
479
  ],
447
480
  "flags": {
448
- "version": {
449
- "description": "Specific version to upgrade to (default: latest)",
450
- "name": "version",
481
+ "baseline-version": {
482
+ "description": "Major.Minor version stamp. Omit to auto-detect from --source-dir (within-major rebaseline).",
483
+ "name": "baseline-version",
451
484
  "hasDynamicHelp": false,
452
485
  "multiple": false,
453
486
  "type": "option"
454
487
  },
455
- "verbose": {
456
- "char": "v",
457
- "description": "Show detailed output",
458
- "name": "verbose",
488
+ "source-dir": {
489
+ "description": "Migrations source directory used to auto-detect baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ near cwd.",
490
+ "name": "source-dir",
491
+ "hasDynamicHelp": false,
492
+ "multiple": false,
493
+ "type": "option"
494
+ },
495
+ "description": {
496
+ "description": "Header description.",
497
+ "name": "description",
498
+ "default": "MemberJunction Baseline",
499
+ "hasDynamicHelp": false,
500
+ "multiple": false,
501
+ "type": "option"
502
+ },
503
+ "dialect": {
504
+ "description": "Dialect to test. PG path runs the converter via /pg-migrate first.",
505
+ "name": "dialect",
506
+ "default": "mssql",
507
+ "hasDynamicHelp": false,
508
+ "multiple": false,
509
+ "options": [
510
+ "mssql",
511
+ "postgres"
512
+ ],
513
+ "type": "option"
514
+ },
515
+ "source": {
516
+ "description": "Database name with the V-stack already applied (used as comparison gold standard).",
517
+ "name": "source",
518
+ "required": true,
519
+ "hasDynamicHelp": false,
520
+ "multiple": false,
521
+ "type": "option"
522
+ },
523
+ "target": {
524
+ "description": "Empty database name to apply the new baseline to.",
525
+ "name": "target",
526
+ "required": true,
527
+ "hasDynamicHelp": false,
528
+ "multiple": false,
529
+ "type": "option"
530
+ },
531
+ "out": {
532
+ "description": "Output directory for baseline file + reports.",
533
+ "name": "out",
534
+ "default": ".",
535
+ "hasDynamicHelp": false,
536
+ "multiple": false,
537
+ "type": "option"
538
+ },
539
+ "apply-cmd": {
540
+ "description": "Command template to apply the baseline. Tokens: {file} {database}. Defaults to sqlcmd.",
541
+ "name": "apply-cmd",
542
+ "hasDynamicHelp": false,
543
+ "multiple": false,
544
+ "type": "option"
545
+ },
546
+ "row-compare": {
547
+ "description": "Row compare mode passed to the comparator.",
548
+ "name": "row-compare",
549
+ "default": "full",
550
+ "hasDynamicHelp": false,
551
+ "multiple": false,
552
+ "options": [
553
+ "full",
554
+ "hash",
555
+ "counts",
556
+ "none"
557
+ ],
558
+ "type": "option"
559
+ },
560
+ "fail-on-diff": {
561
+ "name": "fail-on-diff",
459
562
  "allowNo": false,
460
563
  "type": "boolean"
461
564
  },
462
- "non-interactive": {
463
- "description": "Skip interactive prompts; post-upgrade hooks use environment variables / defaults (for CI/headless upgrades)",
464
- "name": "non-interactive",
565
+ "keep-target": {
566
+ "description": "Do not drop the target database after run (useful for debugging diffs).",
567
+ "name": "keep-target",
465
568
  "allowNo": false,
466
569
  "type": "boolean"
467
570
  },
468
- "dangerously-ignore-dbl-underscore-schema-rule": {
469
- "hidden": true,
470
- "name": "dangerously-ignore-dbl-underscore-schema-rule",
571
+ "verbose": {
572
+ "name": "verbose",
471
573
  "allowNo": false,
472
574
  "type": "boolean"
473
575
  }
474
576
  },
475
577
  "hasDynamicHelp": false,
476
578
  "hiddenAliases": [],
477
- "id": "app:upgrade",
579
+ "id": "baseline:roundtrip",
478
580
  "pluginAlias": "@memberjunction/cli",
479
581
  "pluginName": "@memberjunction/cli",
480
582
  "pluginType": "core",
@@ -484,14 +586,14 @@
484
586
  "relativePath": [
485
587
  "dist",
486
588
  "commands",
487
- "app",
488
- "upgrade.js"
589
+ "baseline",
590
+ "roundtrip.js"
489
591
  ]
490
592
  },
491
- "app:usage": {
593
+ "baseline:usage": {
492
594
  "aliases": [],
493
595
  "args": {},
494
- "description": "Show usage, flags, examples, and runtime hints for every `mj app` command.",
596
+ "description": "Show usage, flags, examples, and runtime hints for every `mj baseline` command.",
495
597
  "flags": {
496
598
  "format": {
497
599
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -508,7 +610,7 @@
508
610
  },
509
611
  "hasDynamicHelp": false,
510
612
  "hiddenAliases": [],
511
- "id": "app:usage",
613
+ "id": "baseline:usage",
512
614
  "pluginAlias": "@memberjunction/cli",
513
615
  "pluginName": "@memberjunction/cli",
514
616
  "pluginType": "core",
@@ -518,58 +620,69 @@
518
620
  "relativePath": [
519
621
  "dist",
520
622
  "commands",
521
- "app",
623
+ "baseline",
522
624
  "usage.js"
523
625
  ]
524
626
  },
525
- "artifacts:reclassify": {
627
+ "bump": {
526
628
  "aliases": [],
527
629
  "args": {},
528
- "description": "Upgrade-recovery utility for v5.35 artifact unification. Re-evaluates rows whose TypeID is the deleted JSON fallback but whose actual content does not parse as JSON. Normally a no-op: the v5.35 backfill migration handles this automatically. This command is only relevant when the migration ran BEFORE the artifact-type metadata (Generic Text / Generic Binary) was pushed via `mj sync push`, in which case the migration prints a notice telling you to run this. Reports \"no candidates\" once everything is reconciled. Dry-run by default; --apply writes through Record Changes.",
630
+ "description": "Bumps MemberJunction dependency versions",
529
631
  "examples": [
530
- "<%= config.bin %> <%= command.id %>",
531
- "<%= config.bin %> <%= command.id %> --apply --limit 50"
632
+ {
633
+ "command": "<%= config.bin %> <%= command.id %>",
634
+ "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
635
+ },
636
+ {
637
+ "command": "<%= config.bin %> <%= command.id %> -rdv",
638
+ "description": "Preview all recursive packages bumps without writing any changes."
639
+ },
640
+ {
641
+ "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
642
+ "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."
643
+ }
532
644
  ],
533
645
  "flags": {
534
- "conversation-id": {
535
- "description": "Scope to artifacts attached to the given conversation.",
536
- "name": "conversation-id",
537
- "hasDynamicHelp": false,
538
- "multiple": false,
539
- "type": "option"
646
+ "verbose": {
647
+ "char": "v",
648
+ "description": "Enable additional logging",
649
+ "name": "verbose",
650
+ "allowNo": false,
651
+ "type": "boolean"
540
652
  },
541
- "since": {
542
- "description": "Scope to artifacts created on/after this ISO date.",
543
- "name": "since",
544
- "hasDynamicHelp": false,
545
- "multiple": false,
546
- "type": "option"
653
+ "recursive": {
654
+ "char": "r",
655
+ "description": "Bump version in current directory and all subdirectories",
656
+ "name": "recursive",
657
+ "allowNo": false,
658
+ "type": "boolean"
547
659
  },
548
- "limit": {
549
- "description": "Maximum number of rows to inspect.",
550
- "name": "limit",
551
- "default": 100,
660
+ "tag": {
661
+ "char": "t",
662
+ "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
663
+ "name": "tag",
552
664
  "hasDynamicHelp": false,
553
665
  "multiple": false,
554
666
  "type": "option"
555
667
  },
556
- "apply": {
557
- "description": "Write changes. Without this flag, this command only reports what it would do.",
558
- "name": "apply",
668
+ "quiet": {
669
+ "char": "q",
670
+ "description": "Only output paths for updated packages",
671
+ "name": "quiet",
559
672
  "allowNo": false,
560
673
  "type": "boolean"
561
674
  },
562
- "verbose": {
563
- "char": "v",
564
- "description": "Print every candidate row, not just the summary.",
565
- "name": "verbose",
675
+ "dry": {
676
+ "char": "d",
677
+ "description": "Dry run, do not write changes to package.json files",
678
+ "name": "dry",
566
679
  "allowNo": false,
567
680
  "type": "boolean"
568
681
  }
569
682
  },
570
683
  "hasDynamicHelp": false,
571
684
  "hiddenAliases": [],
572
- "id": "artifacts:reclassify",
685
+ "id": "bump",
573
686
  "pluginAlias": "@memberjunction/cli",
574
687
  "pluginName": "@memberjunction/cli",
575
688
  "pluginType": "core",
@@ -579,14 +692,14 @@
579
692
  "relativePath": [
580
693
  "dist",
581
694
  "commands",
582
- "artifacts",
583
- "reclassify.js"
695
+ "bump",
696
+ "index.js"
584
697
  ]
585
698
  },
586
- "artifacts:usage": {
699
+ "bump:usage": {
587
700
  "aliases": [],
588
701
  "args": {},
589
- "description": "Show usage, flags, examples, and runtime hints for every `mj artifacts` command.",
702
+ "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
590
703
  "flags": {
591
704
  "format": {
592
705
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -603,7 +716,7 @@
603
716
  },
604
717
  "hasDynamicHelp": false,
605
718
  "hiddenAliases": [],
606
- "id": "artifacts:usage",
719
+ "id": "bump:usage",
607
720
  "pluginAlias": "@memberjunction/cli",
608
721
  "pluginName": "@memberjunction/cli",
609
722
  "pluginType": "core",
@@ -613,96 +726,83 @@
613
726
  "relativePath": [
614
727
  "dist",
615
728
  "commands",
616
- "artifacts",
729
+ "bump",
617
730
  "usage.js"
618
731
  ]
619
732
  },
620
- "baseline:build": {
733
+ "bundle": {
621
734
  "aliases": [],
622
735
  "args": {},
623
- "description": "Generate a deterministic baseline SQL script from the END-STATE of a migrated MSSQL database.",
736
+ "description": "Create a self-contained MemberJunction distribution zip for offline/air-gapped installs",
624
737
  "examples": [
625
- "<%= config.bin %> <%= command.id %> --out ./migrations/v5/ # auto: within-major rebaseline",
626
- "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --out ./migrations/v5/",
627
- "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --out ./migrations/v6/ # explicit major-boundary",
628
- "<%= config.bin %> <%= command.id %> --baseline-version 5.32 --database MJ_BL_Stack --out /tmp/baseline/"
738
+ "<%= config.bin %> <%= command.id %> --out ./mj-install.zip",
739
+ "<%= config.bin %> <%= command.id %> --tag v5.38.0 --out ./mj-install.zip",
740
+ "<%= config.bin %> <%= command.id %> --source . --out ./mj-install.zip",
741
+ "<%= config.bin %> <%= command.id %> --tag v5.38.0 --with-migrations --out ./mj-install.zip",
742
+ "<%= config.bin %> <%= command.id %> --with-migrations --db-platform postgresql --out ./mj-install.zip"
629
743
  ],
630
744
  "flags": {
631
- "baseline-version": {
632
- "description": "Baseline version stamp in Major.Minor format (literal x is appended for patch, matching the V-file convention). Omit to auto-detect from --source-dir (within-major rebaseline mode).",
633
- "name": "baseline-version",
634
- "hasDynamicHelp": false,
635
- "multiple": false,
636
- "type": "option"
637
- },
638
- "source-dir": {
639
- "description": "Migrations source directory (e.g. ./migrations/v5). Used to auto-detect the next baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ directory walked up from cwd.",
640
- "name": "source-dir",
641
- "hasDynamicHelp": false,
642
- "multiple": false,
643
- "type": "option"
644
- },
645
- "description": {
646
- "description": "Human-readable description embedded in the file header.",
647
- "name": "description",
648
- "default": "MemberJunction Baseline",
745
+ "out": {
746
+ "char": "o",
747
+ "description": "Output zip path",
748
+ "name": "out",
749
+ "required": true,
649
750
  "hasDynamicHelp": false,
650
751
  "multiple": false,
651
752
  "type": "option"
652
753
  },
653
- "database": {
654
- "description": "Override database name (host/user/password come from MJ config).",
655
- "name": "database",
754
+ "tag": {
755
+ "char": "t",
756
+ "description": "Release tag to bundle (e.g. v5.38.0). Defaults to the latest branch tip.",
757
+ "name": "tag",
656
758
  "hasDynamicHelp": false,
657
759
  "multiple": false,
658
760
  "type": "option"
659
761
  },
660
- "out": {
661
- "description": "Output directory. Filename is auto-generated.",
662
- "name": "out",
663
- "default": ".",
762
+ "source": {
763
+ "description": "Bundle from a local working-tree directory instead of fetching from the repo",
764
+ "name": "source",
664
765
  "hasDynamicHelp": false,
665
766
  "multiple": false,
666
767
  "type": "option"
667
768
  },
668
- "exclude-data": {
669
- "description": "Comma-separated list of tables (schema-qualified or not) to skip data dump for.",
670
- "name": "exclude-data",
671
- "default": "",
672
- "hasDynamicHelp": false,
673
- "multiple": false,
674
- "type": "option"
769
+ "with-migrations": {
770
+ "description": "Include the migration tree(s) so an air-gapped \"mj migrate\" can run offline. Ships both SQL Server and PostgreSQL trees by default.",
771
+ "name": "with-migrations",
772
+ "allowNo": false,
773
+ "type": "boolean"
675
774
  },
676
- "batch-size": {
677
- "description": "Rows per INSERT batch.",
678
- "name": "batch-size",
679
- "default": 1000,
775
+ "db-platform": {
776
+ "dependsOn": [
777
+ "with-migrations"
778
+ ],
779
+ "description": "With --with-migrations, ship only this platform's migration tree instead of both",
780
+ "name": "db-platform",
680
781
  "hasDynamicHelp": false,
681
782
  "multiple": false,
783
+ "options": [
784
+ "sqlserver",
785
+ "postgresql"
786
+ ],
682
787
  "type": "option"
683
788
  },
684
- "no-data": {
685
- "description": "Emit schema only, no data inserts.",
686
- "name": "no-data",
789
+ "no-claude-pack": {
790
+ "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/) from the bundle. By default the pack is included so air-gapped installs get the same out-of-the-box Claude experience as online installs.",
791
+ "name": "no-claude-pack",
687
792
  "allowNo": false,
688
793
  "type": "boolean"
689
794
  },
690
795
  "verbose": {
691
- "description": "Print per-object progress.",
796
+ "char": "v",
797
+ "description": "Show detailed output",
692
798
  "name": "verbose",
693
799
  "allowNo": false,
694
800
  "type": "boolean"
695
- },
696
- "dry-run": {
697
- "description": "Print to stdout instead of writing a file.",
698
- "name": "dry-run",
699
- "allowNo": false,
700
- "type": "boolean"
701
801
  }
702
802
  },
703
803
  "hasDynamicHelp": false,
704
804
  "hiddenAliases": [],
705
- "id": "baseline:build",
805
+ "id": "bundle",
706
806
  "pluginAlias": "@memberjunction/cli",
707
807
  "pluginName": "@memberjunction/cli",
708
808
  "pluginType": "core",
@@ -712,114 +812,31 @@
712
812
  "relativePath": [
713
813
  "dist",
714
814
  "commands",
715
- "baseline",
716
- "build.js"
815
+ "bundle",
816
+ "index.js"
717
817
  ]
718
818
  },
719
- "baseline:compare": {
819
+ "bundle:usage": {
720
820
  "aliases": [],
721
821
  "args": {},
722
- "description": "Deterministically compare two databases object-by-object and row-by-row.",
723
- "examples": [
724
- "<%= config.bin %> <%= command.id %> --left MJ_BL_Stack --right MJ_BL_New",
725
- "<%= config.bin %> <%= command.id %> --left A --right B --row-compare counts",
726
- "<%= config.bin %> <%= command.id %> --left A --right B --fail-on-diff --out ./diffs/"
727
- ],
822
+ "description": "Show usage, flags, examples, and runtime hints for every `mj bundle` command.",
728
823
  "flags": {
729
- "left": {
730
- "description": "Left database name (override).",
731
- "name": "left",
732
- "required": true,
733
- "hasDynamicHelp": false,
734
- "multiple": false,
735
- "type": "option"
736
- },
737
- "right": {
738
- "description": "Right database name (override).",
739
- "name": "right",
740
- "required": true,
741
- "hasDynamicHelp": false,
742
- "multiple": false,
743
- "type": "option"
744
- },
745
- "dialect": {
746
- "description": "Dialect of both DBs (must match).",
747
- "name": "dialect",
748
- "default": "mssql",
749
- "hasDynamicHelp": false,
750
- "multiple": false,
751
- "options": [
752
- "mssql",
753
- "postgres"
754
- ],
755
- "type": "option"
756
- },
757
- "row-compare": {
758
- "description": "Row comparison mode.",
759
- "name": "row-compare",
760
- "default": "full",
761
- "hasDynamicHelp": false,
762
- "multiple": false,
763
- "options": [
764
- "full",
765
- "hash",
766
- "counts",
767
- "none"
768
- ],
769
- "type": "option"
770
- },
771
- "row-hash-algo": {
772
- "description": "Hash algorithm when --row-compare hash.",
773
- "name": "row-hash-algo",
774
- "default": "sha256",
824
+ "format": {
825
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
826
+ "name": "format",
775
827
  "hasDynamicHelp": false,
776
828
  "multiple": false,
777
829
  "options": [
778
- "sha256",
779
- "md5",
780
- "checksum_agg"
830
+ "text",
831
+ "json",
832
+ "md"
781
833
  ],
782
834
  "type": "option"
783
- },
784
- "ignore": {
785
- "description": "Regex of object names to skip.",
786
- "name": "ignore",
787
- "default": "^flyway_schema_history$",
788
- "hasDynamicHelp": false,
789
- "multiple": false,
790
- "type": "option"
791
- },
792
- "sample-limit": {
793
- "description": "Maximum row diffs to capture per table.",
794
- "name": "sample-limit",
795
- "default": 100,
796
- "hasDynamicHelp": false,
797
- "multiple": false,
798
- "type": "option"
799
- },
800
- "out": {
801
- "description": "Directory to write JSON + Markdown reports.",
802
- "name": "out",
803
- "hasDynamicHelp": false,
804
- "multiple": false,
805
- "type": "option"
806
- },
807
- "fail-on-diff": {
808
- "description": "Exit non-zero if any diff is found.",
809
- "name": "fail-on-diff",
810
- "allowNo": false,
811
- "type": "boolean"
812
- },
813
- "verbose": {
814
- "description": "Print per-phase progress.",
815
- "name": "verbose",
816
- "allowNo": false,
817
- "type": "boolean"
818
835
  }
819
836
  },
820
837
  "hasDynamicHelp": false,
821
838
  "hiddenAliases": [],
822
- "id": "baseline:compare",
839
+ "id": "bundle:usage",
823
840
  "pluginAlias": "@memberjunction/cli",
824
841
  "pluginName": "@memberjunction/cli",
825
842
  "pluginType": "core",
@@ -829,119 +846,173 @@
829
846
  "relativePath": [
830
847
  "dist",
831
848
  "commands",
832
- "baseline",
833
- "compare.js"
849
+ "bundle",
850
+ "usage.js"
834
851
  ]
835
852
  },
836
- "baseline:roundtrip": {
853
+ "app:check-updates": {
837
854
  "aliases": [],
838
855
  "args": {},
839
- "description": "Build a baseline from a V-stack database, apply it to a fresh DB, and prove byte-equivalence.",
856
+ "description": "Check for available upgrades for installed MJ Open Apps",
840
857
  "examples": [
841
- "<%= config.bin %> <%= command.id %> --source MJ_BL_Stack --target MJ_BL_New # auto: within-major",
842
- "<%= config.bin %> <%= command.id %> --baseline-version 6.0 --source MJ_BL_Stack --target MJ_BL_New # explicit major-boundary",
843
- "<%= config.bin %> <%= command.id %> --source-dir ./migrations/v5 --source MJ_BL_Stack --target MJ_BL_New"
858
+ "<%= config.bin %> app check-updates"
844
859
  ],
845
- "flags": {
846
- "baseline-version": {
847
- "description": "Major.Minor version stamp. Omit to auto-detect from --source-dir (within-major rebaseline).",
848
- "name": "baseline-version",
849
- "hasDynamicHelp": false,
850
- "multiple": false,
851
- "type": "option"
852
- },
853
- "source-dir": {
854
- "description": "Migrations source directory used to auto-detect baseline version + timestamp when --baseline-version is omitted. Defaults to the highest migrations/v*/ near cwd.",
855
- "name": "source-dir",
856
- "hasDynamicHelp": false,
857
- "multiple": false,
858
- "type": "option"
859
- },
860
- "description": {
861
- "description": "Header description.",
862
- "name": "description",
863
- "default": "MemberJunction Baseline",
864
- "hasDynamicHelp": false,
865
- "multiple": false,
866
- "type": "option"
867
- },
868
- "dialect": {
869
- "description": "Dialect to test. PG path runs the converter via /pg-migrate first.",
870
- "name": "dialect",
871
- "default": "mssql",
872
- "hasDynamicHelp": false,
873
- "multiple": false,
874
- "options": [
875
- "mssql",
876
- "postgres"
877
- ],
878
- "type": "option"
879
- },
860
+ "flags": {},
861
+ "hasDynamicHelp": false,
862
+ "hiddenAliases": [],
863
+ "id": "app:check-updates",
864
+ "pluginAlias": "@memberjunction/cli",
865
+ "pluginName": "@memberjunction/cli",
866
+ "pluginType": "core",
867
+ "strict": true,
868
+ "enableJsonFlag": false,
869
+ "isESM": true,
870
+ "relativePath": [
871
+ "dist",
872
+ "commands",
873
+ "app",
874
+ "check-updates.js"
875
+ ]
876
+ },
877
+ "app:disable": {
878
+ "aliases": [],
879
+ "args": {
880
+ "name": {
881
+ "description": "Name of the installed app to disable",
882
+ "name": "name",
883
+ "required": true
884
+ }
885
+ },
886
+ "description": "Disable an installed MJ Open App without removing it",
887
+ "examples": [
888
+ "<%= config.bin %> app disable acme-crm"
889
+ ],
890
+ "flags": {},
891
+ "hasDynamicHelp": false,
892
+ "hiddenAliases": [],
893
+ "id": "app:disable",
894
+ "pluginAlias": "@memberjunction/cli",
895
+ "pluginName": "@memberjunction/cli",
896
+ "pluginType": "core",
897
+ "strict": true,
898
+ "enableJsonFlag": false,
899
+ "isESM": true,
900
+ "relativePath": [
901
+ "dist",
902
+ "commands",
903
+ "app",
904
+ "disable.js"
905
+ ]
906
+ },
907
+ "app:enable": {
908
+ "aliases": [],
909
+ "args": {
910
+ "name": {
911
+ "description": "Name of the installed app to enable",
912
+ "name": "name",
913
+ "required": true
914
+ }
915
+ },
916
+ "description": "Re-enable a disabled MJ Open App",
917
+ "examples": [
918
+ "<%= config.bin %> app enable acme-crm"
919
+ ],
920
+ "flags": {},
921
+ "hasDynamicHelp": false,
922
+ "hiddenAliases": [],
923
+ "id": "app:enable",
924
+ "pluginAlias": "@memberjunction/cli",
925
+ "pluginName": "@memberjunction/cli",
926
+ "pluginType": "core",
927
+ "strict": true,
928
+ "enableJsonFlag": false,
929
+ "isESM": true,
930
+ "relativePath": [
931
+ "dist",
932
+ "commands",
933
+ "app",
934
+ "enable.js"
935
+ ]
936
+ },
937
+ "app:info": {
938
+ "aliases": [],
939
+ "args": {
940
+ "name": {
941
+ "description": "Name of the installed app",
942
+ "name": "name",
943
+ "required": true
944
+ }
945
+ },
946
+ "description": "Show detailed information about an installed MJ Open App",
947
+ "examples": [
948
+ "<%= config.bin %> app info acme-crm"
949
+ ],
950
+ "flags": {},
951
+ "hasDynamicHelp": false,
952
+ "hiddenAliases": [],
953
+ "id": "app:info",
954
+ "pluginAlias": "@memberjunction/cli",
955
+ "pluginName": "@memberjunction/cli",
956
+ "pluginType": "core",
957
+ "strict": true,
958
+ "enableJsonFlag": false,
959
+ "isESM": true,
960
+ "relativePath": [
961
+ "dist",
962
+ "commands",
963
+ "app",
964
+ "info.js"
965
+ ]
966
+ },
967
+ "app:install": {
968
+ "aliases": [],
969
+ "args": {
880
970
  "source": {
881
- "description": "Database name with the V-stack already applied (used as comparison gold standard).",
971
+ "description": "GitHub repository URL of the Open App. For a multi-app repo, append the in-repo path to the app (e.g. https://github.com/MemberJunction/Integrations/CRM/HubSpot).",
882
972
  "name": "source",
883
- "required": true,
884
- "hasDynamicHelp": false,
885
- "multiple": false,
886
- "type": "option"
887
- },
888
- "target": {
889
- "description": "Empty database name to apply the new baseline to.",
890
- "name": "target",
891
- "required": true,
892
- "hasDynamicHelp": false,
893
- "multiple": false,
894
- "type": "option"
895
- },
896
- "out": {
897
- "description": "Output directory for baseline file + reports.",
898
- "name": "out",
899
- "default": ".",
900
- "hasDynamicHelp": false,
901
- "multiple": false,
902
- "type": "option"
903
- },
904
- "apply-cmd": {
905
- "description": "Command template to apply the baseline. Tokens: {file} {database}. Defaults to sqlcmd.",
906
- "name": "apply-cmd",
907
- "hasDynamicHelp": false,
908
- "multiple": false,
909
- "type": "option"
910
- },
911
- "row-compare": {
912
- "description": "Row compare mode passed to the comparator.",
913
- "name": "row-compare",
914
- "default": "full",
973
+ "required": true
974
+ }
975
+ },
976
+ "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.",
977
+ "examples": [
978
+ "<%= config.bin %> app install https://github.com/acme/mj-crm",
979
+ "<%= config.bin %> app install https://github.com/acme/mj-crm --version 1.2.0",
980
+ "<%= config.bin %> app install https://github.com/acme/mj-crm --verbose",
981
+ "<%= config.bin %> app install https://github.com/MemberJunction/Integrations/CRM/HubSpot",
982
+ "<%= config.bin %> app install https://github.com/acme/mj-crm --non-interactive",
983
+ "GITHUB_TOKEN=$(gh auth token) <%= config.bin %> app install https://github.com/acme/private-app"
984
+ ],
985
+ "flags": {
986
+ "version": {
987
+ "description": "Specific version to install (default: latest)",
988
+ "name": "version",
915
989
  "hasDynamicHelp": false,
916
990
  "multiple": false,
917
- "options": [
918
- "full",
919
- "hash",
920
- "counts",
921
- "none"
922
- ],
923
991
  "type": "option"
924
992
  },
925
- "fail-on-diff": {
926
- "name": "fail-on-diff",
993
+ "verbose": {
994
+ "char": "v",
995
+ "description": "Show detailed output",
996
+ "name": "verbose",
927
997
  "allowNo": false,
928
998
  "type": "boolean"
929
999
  },
930
- "keep-target": {
931
- "description": "Do not drop the target database after run (useful for debugging diffs).",
932
- "name": "keep-target",
1000
+ "non-interactive": {
1001
+ "description": "Skip interactive setup prompts; post-install hooks use environment variables / defaults (for CI/headless installs)",
1002
+ "name": "non-interactive",
933
1003
  "allowNo": false,
934
1004
  "type": "boolean"
935
1005
  },
936
- "verbose": {
937
- "name": "verbose",
1006
+ "dangerously-ignore-dbl-underscore-schema-rule": {
1007
+ "hidden": true,
1008
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
938
1009
  "allowNo": false,
939
1010
  "type": "boolean"
940
1011
  }
941
1012
  },
942
1013
  "hasDynamicHelp": false,
943
1014
  "hiddenAliases": [],
944
- "id": "baseline:roundtrip",
1015
+ "id": "app:install",
945
1016
  "pluginAlias": "@memberjunction/cli",
946
1017
  "pluginName": "@memberjunction/cli",
947
1018
  "pluginType": "core",
@@ -951,31 +1022,29 @@
951
1022
  "relativePath": [
952
1023
  "dist",
953
1024
  "commands",
954
- "baseline",
955
- "roundtrip.js"
1025
+ "app",
1026
+ "install.js"
956
1027
  ]
957
1028
  },
958
- "baseline:usage": {
1029
+ "app:list": {
959
1030
  "aliases": [],
960
1031
  "args": {},
961
- "description": "Show usage, flags, examples, and runtime hints for every `mj baseline` command.",
1032
+ "description": "List all installed MJ Open Apps",
1033
+ "examples": [
1034
+ "<%= config.bin %> app list"
1035
+ ],
962
1036
  "flags": {
963
- "format": {
964
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
965
- "name": "format",
966
- "hasDynamicHelp": false,
967
- "multiple": false,
968
- "options": [
969
- "text",
970
- "json",
971
- "md"
972
- ],
973
- "type": "option"
1037
+ "verbose": {
1038
+ "char": "v",
1039
+ "description": "Show detailed output",
1040
+ "name": "verbose",
1041
+ "allowNo": false,
1042
+ "type": "boolean"
974
1043
  }
975
1044
  },
976
1045
  "hasDynamicHelp": false,
977
1046
  "hiddenAliases": [],
978
- "id": "baseline:usage",
1047
+ "id": "app:list",
979
1048
  "pluginAlias": "@memberjunction/cli",
980
1049
  "pluginName": "@memberjunction/cli",
981
1050
  "pluginType": "core",
@@ -985,69 +1054,62 @@
985
1054
  "relativePath": [
986
1055
  "dist",
987
1056
  "commands",
988
- "baseline",
989
- "usage.js"
1057
+ "app",
1058
+ "list.js"
990
1059
  ]
991
1060
  },
992
- "bump": {
1061
+ "app:remove": {
993
1062
  "aliases": [],
994
- "args": {},
995
- "description": "Bumps MemberJunction dependency versions",
996
- "examples": [
997
- {
998
- "command": "<%= config.bin %> <%= command.id %>",
999
- "description": "Bump all @memberjunction/* dependencies in the current directory's package.json to the CLI version"
1000
- },
1001
- {
1002
- "command": "<%= config.bin %> <%= command.id %> -rdv",
1003
- "description": "Preview all recursive packages bumps without writing any changes."
1004
- },
1005
- {
1006
- "command": "<%= config.bin %> <%= command.id %> -rqt v2.10.0 | xargs -n1 -I{} npm install --prefix {}",
1007
- "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."
1063
+ "args": {
1064
+ "name": {
1065
+ "description": "Name of the installed app to remove",
1066
+ "name": "name",
1067
+ "required": true
1008
1068
  }
1069
+ },
1070
+ "description": "Remove an installed MJ Open App",
1071
+ "examples": [
1072
+ "<%= config.bin %> app remove acme-crm",
1073
+ "<%= config.bin %> app remove acme-crm --keep-data",
1074
+ "<%= config.bin %> app remove acme-crm --force"
1009
1075
  ],
1010
1076
  "flags": {
1011
- "verbose": {
1012
- "char": "v",
1013
- "description": "Enable additional logging",
1014
- "name": "verbose",
1077
+ "keep-data": {
1078
+ "description": "Keep the database schema and data",
1079
+ "name": "keep-data",
1015
1080
  "allowNo": false,
1016
1081
  "type": "boolean"
1017
1082
  },
1018
- "recursive": {
1019
- "char": "r",
1020
- "description": "Bump version in current directory and all subdirectories",
1021
- "name": "recursive",
1083
+ "force": {
1084
+ "description": "Force removal even if other apps depend on this one",
1085
+ "name": "force",
1022
1086
  "allowNo": false,
1023
1087
  "type": "boolean"
1024
1088
  },
1025
- "tag": {
1026
- "char": "t",
1027
- "description": "Version tag to bump target for bump (e.g. v2.10.0), defaults to the CLI version",
1028
- "name": "tag",
1029
- "hasDynamicHelp": false,
1030
- "multiple": false,
1031
- "type": "option"
1089
+ "yes": {
1090
+ "char": "y",
1091
+ "description": "Skip confirmation prompt",
1092
+ "name": "yes",
1093
+ "allowNo": false,
1094
+ "type": "boolean"
1032
1095
  },
1033
- "quiet": {
1034
- "char": "q",
1035
- "description": "Only output paths for updated packages",
1036
- "name": "quiet",
1096
+ "verbose": {
1097
+ "char": "v",
1098
+ "description": "Show detailed output",
1099
+ "name": "verbose",
1037
1100
  "allowNo": false,
1038
1101
  "type": "boolean"
1039
1102
  },
1040
- "dry": {
1041
- "char": "d",
1042
- "description": "Dry run, do not write changes to package.json files",
1043
- "name": "dry",
1103
+ "dangerously-ignore-dbl-underscore-schema-rule": {
1104
+ "hidden": true,
1105
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
1044
1106
  "allowNo": false,
1045
1107
  "type": "boolean"
1046
1108
  }
1047
1109
  },
1048
1110
  "hasDynamicHelp": false,
1049
1111
  "hiddenAliases": [],
1050
- "id": "bump",
1112
+ "id": "app:remove",
1051
1113
  "pluginAlias": "@memberjunction/cli",
1052
1114
  "pluginName": "@memberjunction/cli",
1053
1115
  "pluginType": "core",
@@ -1057,117 +1119,55 @@
1057
1119
  "relativePath": [
1058
1120
  "dist",
1059
1121
  "commands",
1060
- "bump",
1061
- "index.js"
1122
+ "app",
1123
+ "remove.js"
1062
1124
  ]
1063
1125
  },
1064
- "bump:usage": {
1126
+ "app:upgrade": {
1065
1127
  "aliases": [],
1066
- "args": {},
1067
- "description": "Show usage, flags, examples, and runtime hints for every `mj bump` command.",
1068
- "flags": {
1069
- "format": {
1070
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1071
- "name": "format",
1072
- "hasDynamicHelp": false,
1073
- "multiple": false,
1074
- "options": [
1075
- "text",
1076
- "json",
1077
- "md"
1078
- ],
1079
- "type": "option"
1128
+ "args": {
1129
+ "name": {
1130
+ "description": "Name of the installed app to upgrade",
1131
+ "name": "name",
1132
+ "required": true
1080
1133
  }
1081
1134
  },
1082
- "hasDynamicHelp": false,
1083
- "hiddenAliases": [],
1084
- "id": "bump:usage",
1085
- "pluginAlias": "@memberjunction/cli",
1086
- "pluginName": "@memberjunction/cli",
1087
- "pluginType": "core",
1088
- "strict": true,
1089
- "enableJsonFlag": false,
1090
- "isESM": true,
1091
- "relativePath": [
1092
- "dist",
1093
- "commands",
1094
- "bump",
1095
- "usage.js"
1096
- ]
1097
- },
1098
- "bundle": {
1099
- "aliases": [],
1100
- "args": {},
1101
- "description": "Create a self-contained MemberJunction distribution zip for offline/air-gapped installs",
1135
+ "description": "Upgrade an installed MJ Open App to a newer version",
1102
1136
  "examples": [
1103
- "<%= config.bin %> <%= command.id %> --out ./mj-install.zip",
1104
- "<%= config.bin %> <%= command.id %> --tag v5.38.0 --out ./mj-install.zip",
1105
- "<%= config.bin %> <%= command.id %> --source . --out ./mj-install.zip",
1106
- "<%= config.bin %> <%= command.id %> --tag v5.38.0 --with-migrations --out ./mj-install.zip",
1107
- "<%= config.bin %> <%= command.id %> --with-migrations --db-platform postgresql --out ./mj-install.zip"
1137
+ "<%= config.bin %> app upgrade acme-crm",
1138
+ "<%= config.bin %> app upgrade acme-crm --version 1.3.0"
1108
1139
  ],
1109
1140
  "flags": {
1110
- "out": {
1111
- "char": "o",
1112
- "description": "Output zip path",
1113
- "name": "out",
1114
- "required": true,
1115
- "hasDynamicHelp": false,
1116
- "multiple": false,
1117
- "type": "option"
1118
- },
1119
- "tag": {
1120
- "char": "t",
1121
- "description": "Release tag to bundle (e.g. v5.38.0). Defaults to the latest branch tip.",
1122
- "name": "tag",
1123
- "hasDynamicHelp": false,
1124
- "multiple": false,
1125
- "type": "option"
1126
- },
1127
- "source": {
1128
- "description": "Bundle from a local working-tree directory instead of fetching from the repo",
1129
- "name": "source",
1141
+ "version": {
1142
+ "description": "Specific version to upgrade to (default: latest)",
1143
+ "name": "version",
1130
1144
  "hasDynamicHelp": false,
1131
1145
  "multiple": false,
1132
1146
  "type": "option"
1133
1147
  },
1134
- "with-migrations": {
1135
- "description": "Include the migration tree(s) so an air-gapped \"mj migrate\" can run offline. Ships both SQL Server and PostgreSQL trees by default.",
1136
- "name": "with-migrations",
1148
+ "verbose": {
1149
+ "char": "v",
1150
+ "description": "Show detailed output",
1151
+ "name": "verbose",
1137
1152
  "allowNo": false,
1138
1153
  "type": "boolean"
1139
1154
  },
1140
- "db-platform": {
1141
- "dependsOn": [
1142
- "with-migrations"
1143
- ],
1144
- "description": "With --with-migrations, ship only this platform's migration tree instead of both",
1145
- "name": "db-platform",
1146
- "hasDynamicHelp": false,
1147
- "multiple": false,
1148
- "options": [
1149
- "sqlserver",
1150
- "postgresql"
1151
- ],
1152
- "type": "option"
1153
- },
1154
- "no-claude-pack": {
1155
- "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/) from the bundle. By default the pack is included so air-gapped installs get the same out-of-the-box Claude experience as online installs.",
1156
- "name": "no-claude-pack",
1155
+ "non-interactive": {
1156
+ "description": "Skip interactive prompts; post-upgrade hooks use environment variables / defaults (for CI/headless upgrades)",
1157
+ "name": "non-interactive",
1157
1158
  "allowNo": false,
1158
1159
  "type": "boolean"
1159
1160
  },
1160
- "verbose": {
1161
- "char": "v",
1162
- "description": "Show detailed output",
1163
- "name": "verbose",
1161
+ "dangerously-ignore-dbl-underscore-schema-rule": {
1162
+ "hidden": true,
1163
+ "name": "dangerously-ignore-dbl-underscore-schema-rule",
1164
1164
  "allowNo": false,
1165
1165
  "type": "boolean"
1166
1166
  }
1167
1167
  },
1168
1168
  "hasDynamicHelp": false,
1169
1169
  "hiddenAliases": [],
1170
- "id": "bundle",
1170
+ "id": "app:upgrade",
1171
1171
  "pluginAlias": "@memberjunction/cli",
1172
1172
  "pluginName": "@memberjunction/cli",
1173
1173
  "pluginType": "core",
@@ -1177,14 +1177,14 @@
1177
1177
  "relativePath": [
1178
1178
  "dist",
1179
1179
  "commands",
1180
- "bundle",
1181
- "index.js"
1180
+ "app",
1181
+ "upgrade.js"
1182
1182
  ]
1183
1183
  },
1184
- "bundle:usage": {
1184
+ "app:usage": {
1185
1185
  "aliases": [],
1186
1186
  "args": {},
1187
- "description": "Show usage, flags, examples, and runtime hints for every `mj bundle` command.",
1187
+ "description": "Show usage, flags, examples, and runtime hints for every `mj app` command.",
1188
1188
  "flags": {
1189
1189
  "format": {
1190
1190
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -1201,7 +1201,7 @@
1201
1201
  },
1202
1202
  "hasDynamicHelp": false,
1203
1203
  "hiddenAliases": [],
1204
- "id": "bundle:usage",
1204
+ "id": "app:usage",
1205
1205
  "pluginAlias": "@memberjunction/cli",
1206
1206
  "pluginName": "@memberjunction/cli",
1207
1207
  "pluginType": "core",
@@ -1211,7 +1211,7 @@
1211
1211
  "relativePath": [
1212
1212
  "dist",
1213
1213
  "commands",
1214
- "bundle",
1214
+ "app",
1215
1215
  "usage.js"
1216
1216
  ]
1217
1217
  },
@@ -1941,6 +1941,62 @@
1941
1941
  "usage.js"
1942
1942
  ]
1943
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
+ },
1944
2000
  "dbdoc:analyze": {
1945
2001
  "aliases": [],
1946
2002
  "args": {},
@@ -2470,15 +2526,83 @@
2470
2526
  "usage.js"
2471
2527
  ]
2472
2528
  },
2473
- "dev": {
2529
+ "doctor": {
2474
2530
  "aliases": [],
2475
2531
  "args": {},
2476
- "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.",
2477
- "flags": {},
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
+ ],
2542
+ "flags": {
2543
+ "dir": {
2544
+ "description": "Target directory to diagnose",
2545
+ "name": "dir",
2546
+ "default": ".",
2547
+ "hasDynamicHelp": false,
2548
+ "multiple": false,
2549
+ "type": "option"
2550
+ },
2551
+ "scope": {
2552
+ "description": "Diagnostic scope to filter by (install, runtime, ai, metadata, agent)",
2553
+ "name": "scope",
2554
+ "hasDynamicHelp": false,
2555
+ "multiple": false,
2556
+ "options": [
2557
+ "install",
2558
+ "runtime",
2559
+ "ai",
2560
+ "metadata",
2561
+ "agent"
2562
+ ],
2563
+ "type": "option"
2564
+ },
2565
+ "format": {
2566
+ "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.",
2567
+ "name": "format",
2568
+ "hasDynamicHelp": false,
2569
+ "multiple": false,
2570
+ "options": [
2571
+ "text",
2572
+ "json",
2573
+ "md",
2574
+ "human",
2575
+ "console",
2576
+ "markdown",
2577
+ "compact",
2578
+ "table"
2579
+ ],
2580
+ "type": "option"
2581
+ },
2582
+ "verbose": {
2583
+ "char": "v",
2584
+ "description": "Show detailed output including suggested fixes inline",
2585
+ "name": "verbose",
2586
+ "allowNo": false,
2587
+ "type": "boolean"
2588
+ },
2589
+ "report": {
2590
+ "char": "r",
2591
+ "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
2592
+ "name": "report",
2593
+ "allowNo": false,
2594
+ "type": "boolean"
2595
+ },
2596
+ "report_extended": {
2597
+ "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
2598
+ "name": "report_extended",
2599
+ "allowNo": false,
2600
+ "type": "boolean"
2601
+ }
2602
+ },
2478
2603
  "hasDynamicHelp": false,
2479
- "hidden": false,
2480
2604
  "hiddenAliases": [],
2481
- "id": "dev",
2605
+ "id": "doctor",
2482
2606
  "pluginAlias": "@memberjunction/cli",
2483
2607
  "pluginName": "@memberjunction/cli",
2484
2608
  "pluginType": "core",
@@ -2488,14 +2612,14 @@
2488
2612
  "relativePath": [
2489
2613
  "dist",
2490
2614
  "commands",
2491
- "dev",
2615
+ "doctor",
2492
2616
  "index.js"
2493
2617
  ]
2494
2618
  },
2495
- "dev:usage": {
2619
+ "doctor:usage": {
2496
2620
  "aliases": [],
2497
2621
  "args": {},
2498
- "description": "Show usage, flags, examples, and runtime hints for every `mj dev` command.",
2622
+ "description": "Show usage, flags, examples, and runtime hints for every `mj doctor` command.",
2499
2623
  "flags": {
2500
2624
  "format": {
2501
2625
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -2512,7 +2636,7 @@
2512
2636
  },
2513
2637
  "hasDynamicHelp": false,
2514
2638
  "hiddenAliases": [],
2515
- "id": "dev:usage",
2639
+ "id": "doctor:usage",
2516
2640
  "pluginAlias": "@memberjunction/cli",
2517
2641
  "pluginName": "@memberjunction/cli",
2518
2642
  "pluginType": "core",
@@ -2522,7 +2646,7 @@
2522
2646
  "relativePath": [
2523
2647
  "dist",
2524
2648
  "commands",
2525
- "dev",
2649
+ "doctor",
2526
2650
  "usage.js"
2527
2651
  ]
2528
2652
  },
@@ -2763,164 +2887,23 @@
2763
2887
  "type": "option"
2764
2888
  },
2765
2889
  "private-key": {
2766
- "description": "Base64 PKCS#8 X25519 private key for an encrypted MJDB envelope. The value is visible to other processes and stays in shell history; prefer --private-key-file or MJ_DIAG_PRIVATE_KEY",
2767
- "name": "private-key",
2768
- "hasDynamicHelp": false,
2769
- "multiple": false,
2770
- "type": "option"
2771
- },
2772
- "private-key-file": {
2773
- "description": "Path to a file that holds the base64 PKCS#8 X25519 private key for an encrypted MJDB envelope",
2774
- "name": "private-key-file",
2775
- "hasDynamicHelp": false,
2776
- "multiple": false,
2777
- "type": "option"
2778
- }
2779
- },
2780
- "hasDynamicHelp": false,
2781
- "hiddenAliases": [],
2782
- "id": "diag:slow",
2783
- "pluginAlias": "@memberjunction/cli",
2784
- "pluginName": "@memberjunction/cli",
2785
- "pluginType": "core",
2786
- "strict": true,
2787
- "enableJsonFlag": false,
2788
- "isESM": true,
2789
- "relativePath": [
2790
- "dist",
2791
- "commands",
2792
- "diag",
2793
- "slow.js"
2794
- ]
2795
- },
2796
- "diag:timeline": {
2797
- "aliases": [],
2798
- "args": {
2799
- "file": {
2800
- "description": "Path to the .mjdiag bundle archive",
2801
- "name": "file",
2802
- "required": true
2803
- }
2804
- },
2805
- "description": "Print a merged chronological timeline of client spans, server spans, SQL queries and breadcrumbs",
2806
- "flags": {
2807
- "limit": {
2808
- "char": "n",
2809
- "description": "Maximum number of timeline rows to display",
2810
- "name": "limit",
2811
- "default": 50,
2812
- "hasDynamicHelp": false,
2813
- "multiple": false,
2814
- "type": "option"
2815
- },
2816
- "private-key": {
2817
- "description": "Base64 PKCS#8 X25519 private key for an encrypted MJDB envelope. The value is visible to other processes and stays in shell history; prefer --private-key-file or MJ_DIAG_PRIVATE_KEY",
2818
- "name": "private-key",
2819
- "hasDynamicHelp": false,
2820
- "multiple": false,
2821
- "type": "option"
2822
- },
2823
- "private-key-file": {
2824
- "description": "Path to a file that holds the base64 PKCS#8 X25519 private key for an encrypted MJDB envelope",
2825
- "name": "private-key-file",
2826
- "hasDynamicHelp": false,
2827
- "multiple": false,
2828
- "type": "option"
2829
- }
2830
- },
2831
- "hasDynamicHelp": false,
2832
- "hiddenAliases": [],
2833
- "id": "diag:timeline",
2834
- "pluginAlias": "@memberjunction/cli",
2835
- "pluginName": "@memberjunction/cli",
2836
- "pluginType": "core",
2837
- "strict": true,
2838
- "enableJsonFlag": false,
2839
- "isESM": true,
2840
- "relativePath": [
2841
- "dist",
2842
- "commands",
2843
- "diag",
2844
- "timeline.js"
2845
- ]
2846
- },
2847
- "doctor": {
2848
- "aliases": [],
2849
- "args": {},
2850
- "description": "Diagnose a MemberJunction installation",
2851
- "examples": [
2852
- "<%= config.bin %> <%= command.id %>",
2853
- "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
2854
- "<%= config.bin %> <%= command.id %> --format json",
2855
- "<%= config.bin %> <%= command.id %> --scope ai",
2856
- "<%= config.bin %> <%= command.id %> --verbose",
2857
- "<%= config.bin %> <%= command.id %> --report",
2858
- "<%= config.bin %> <%= command.id %> --report_extended"
2859
- ],
2860
- "flags": {
2861
- "dir": {
2862
- "description": "Target directory to diagnose",
2863
- "name": "dir",
2864
- "default": ".",
2865
- "hasDynamicHelp": false,
2866
- "multiple": false,
2867
- "type": "option"
2868
- },
2869
- "scope": {
2870
- "description": "Diagnostic scope to filter by (install, runtime, ai, metadata, agent)",
2871
- "name": "scope",
2890
+ "description": "Base64 PKCS#8 X25519 private key for an encrypted MJDB envelope. The value is visible to other processes and stays in shell history; prefer --private-key-file or MJ_DIAG_PRIVATE_KEY",
2891
+ "name": "private-key",
2872
2892
  "hasDynamicHelp": false,
2873
2893
  "multiple": false,
2874
- "options": [
2875
- "install",
2876
- "runtime",
2877
- "ai",
2878
- "metadata",
2879
- "agent"
2880
- ],
2881
2894
  "type": "option"
2882
2895
  },
2883
- "format": {
2884
- "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.",
2885
- "name": "format",
2896
+ "private-key-file": {
2897
+ "description": "Path to a file that holds the base64 PKCS#8 X25519 private key for an encrypted MJDB envelope",
2898
+ "name": "private-key-file",
2886
2899
  "hasDynamicHelp": false,
2887
2900
  "multiple": false,
2888
- "options": [
2889
- "text",
2890
- "json",
2891
- "md",
2892
- "human",
2893
- "console",
2894
- "markdown",
2895
- "compact",
2896
- "table"
2897
- ],
2898
2901
  "type": "option"
2899
- },
2900
- "verbose": {
2901
- "char": "v",
2902
- "description": "Show detailed output including suggested fixes inline",
2903
- "name": "verbose",
2904
- "allowNo": false,
2905
- "type": "boolean"
2906
- },
2907
- "report": {
2908
- "char": "r",
2909
- "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
2910
- "name": "report",
2911
- "allowNo": false,
2912
- "type": "boolean"
2913
- },
2914
- "report_extended": {
2915
- "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
2916
- "name": "report_extended",
2917
- "allowNo": false,
2918
- "type": "boolean"
2919
2902
  }
2920
2903
  },
2921
2904
  "hasDynamicHelp": false,
2922
2905
  "hiddenAliases": [],
2923
- "id": "doctor",
2906
+ "id": "diag:slow",
2924
2907
  "pluginAlias": "@memberjunction/cli",
2925
2908
  "pluginName": "@memberjunction/cli",
2926
2909
  "pluginType": "core",
@@ -2930,31 +2913,48 @@
2930
2913
  "relativePath": [
2931
2914
  "dist",
2932
2915
  "commands",
2933
- "doctor",
2934
- "index.js"
2916
+ "diag",
2917
+ "slow.js"
2935
2918
  ]
2936
2919
  },
2937
- "doctor:usage": {
2920
+ "diag:timeline": {
2938
2921
  "aliases": [],
2939
- "args": {},
2940
- "description": "Show usage, flags, examples, and runtime hints for every `mj doctor` command.",
2922
+ "args": {
2923
+ "file": {
2924
+ "description": "Path to the .mjdiag bundle archive",
2925
+ "name": "file",
2926
+ "required": true
2927
+ }
2928
+ },
2929
+ "description": "Print a merged chronological timeline of client spans, server spans, SQL queries and breadcrumbs",
2941
2930
  "flags": {
2942
- "format": {
2943
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2944
- "name": "format",
2931
+ "limit": {
2932
+ "char": "n",
2933
+ "description": "Maximum number of timeline rows to display",
2934
+ "name": "limit",
2935
+ "default": 50,
2936
+ "hasDynamicHelp": false,
2937
+ "multiple": false,
2938
+ "type": "option"
2939
+ },
2940
+ "private-key": {
2941
+ "description": "Base64 PKCS#8 X25519 private key for an encrypted MJDB envelope. The value is visible to other processes and stays in shell history; prefer --private-key-file or MJ_DIAG_PRIVATE_KEY",
2942
+ "name": "private-key",
2943
+ "hasDynamicHelp": false,
2944
+ "multiple": false,
2945
+ "type": "option"
2946
+ },
2947
+ "private-key-file": {
2948
+ "description": "Path to a file that holds the base64 PKCS#8 X25519 private key for an encrypted MJDB envelope",
2949
+ "name": "private-key-file",
2945
2950
  "hasDynamicHelp": false,
2946
2951
  "multiple": false,
2947
- "options": [
2948
- "text",
2949
- "json",
2950
- "md"
2951
- ],
2952
2952
  "type": "option"
2953
2953
  }
2954
2954
  },
2955
2955
  "hasDynamicHelp": false,
2956
2956
  "hiddenAliases": [],
2957
- "id": "doctor:usage",
2957
+ "id": "diag:timeline",
2958
2958
  "pluginAlias": "@memberjunction/cli",
2959
2959
  "pluginName": "@memberjunction/cli",
2960
2960
  "pluginType": "core",
@@ -2964,8 +2964,8 @@
2964
2964
  "relativePath": [
2965
2965
  "dist",
2966
2966
  "commands",
2967
- "doctor",
2968
- "usage.js"
2967
+ "diag",
2968
+ "timeline.js"
2969
2969
  ]
2970
2970
  },
2971
2971
  "install:claude": {
@@ -3236,6 +3236,84 @@
3236
3236
  "usage.js"
3237
3237
  ]
3238
3238
  },
3239
+ "plugin:add": {
3240
+ "aliases": [],
3241
+ "args": {
3242
+ "package": {
3243
+ "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
3244
+ "name": "package",
3245
+ "required": true
3246
+ }
3247
+ },
3248
+ "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
3249
+ "examples": [
3250
+ "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
3251
+ "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
3252
+ ],
3253
+ "flags": {
3254
+ "format": {
3255
+ "description": "Output format",
3256
+ "name": "format",
3257
+ "default": "text",
3258
+ "hasDynamicHelp": false,
3259
+ "multiple": false,
3260
+ "options": [
3261
+ "text",
3262
+ "json"
3263
+ ],
3264
+ "type": "option"
3265
+ }
3266
+ },
3267
+ "hasDynamicHelp": false,
3268
+ "hiddenAliases": [],
3269
+ "id": "plugin:add",
3270
+ "pluginAlias": "@memberjunction/cli",
3271
+ "pluginName": "@memberjunction/cli",
3272
+ "pluginType": "core",
3273
+ "strict": true,
3274
+ "enableJsonFlag": false,
3275
+ "isESM": true,
3276
+ "relativePath": [
3277
+ "dist",
3278
+ "commands",
3279
+ "plugin",
3280
+ "add.js"
3281
+ ]
3282
+ },
3283
+ "plugin:usage": {
3284
+ "aliases": [],
3285
+ "args": {},
3286
+ "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
3287
+ "flags": {
3288
+ "format": {
3289
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3290
+ "name": "format",
3291
+ "hasDynamicHelp": false,
3292
+ "multiple": false,
3293
+ "options": [
3294
+ "text",
3295
+ "json",
3296
+ "md"
3297
+ ],
3298
+ "type": "option"
3299
+ }
3300
+ },
3301
+ "hasDynamicHelp": false,
3302
+ "hiddenAliases": [],
3303
+ "id": "plugin:usage",
3304
+ "pluginAlias": "@memberjunction/cli",
3305
+ "pluginName": "@memberjunction/cli",
3306
+ "pluginType": "core",
3307
+ "strict": true,
3308
+ "enableJsonFlag": false,
3309
+ "isESM": true,
3310
+ "relativePath": [
3311
+ "dist",
3312
+ "commands",
3313
+ "plugin",
3314
+ "usage.js"
3315
+ ]
3316
+ },
3239
3317
  "migrate:convert": {
3240
3318
  "aliases": [],
3241
3319
  "args": {},
@@ -3525,93 +3603,15 @@
3525
3603
  "type": "option"
3526
3604
  },
3527
3605
  "dry-run": {
3528
- "description": "Report what would be re-baked without writing files",
3529
- "name": "dry-run",
3530
- "allowNo": false,
3531
- "type": "boolean"
3532
- }
3533
- },
3534
- "hasDynamicHelp": false,
3535
- "hiddenAliases": [],
3536
- "id": "migrate:rebake",
3537
- "pluginAlias": "@memberjunction/cli",
3538
- "pluginName": "@memberjunction/cli",
3539
- "pluginType": "core",
3540
- "strict": true,
3541
- "enableJsonFlag": false,
3542
- "isESM": true,
3543
- "relativePath": [
3544
- "dist",
3545
- "commands",
3546
- "migrate",
3547
- "rebake.js"
3548
- ]
3549
- },
3550
- "migrate:usage": {
3551
- "aliases": [],
3552
- "args": {},
3553
- "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
3554
- "flags": {
3555
- "format": {
3556
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
3557
- "name": "format",
3558
- "hasDynamicHelp": false,
3559
- "multiple": false,
3560
- "options": [
3561
- "text",
3562
- "json",
3563
- "md"
3564
- ],
3565
- "type": "option"
3566
- }
3567
- },
3568
- "hasDynamicHelp": false,
3569
- "hiddenAliases": [],
3570
- "id": "migrate:usage",
3571
- "pluginAlias": "@memberjunction/cli",
3572
- "pluginName": "@memberjunction/cli",
3573
- "pluginType": "core",
3574
- "strict": true,
3575
- "enableJsonFlag": false,
3576
- "isESM": true,
3577
- "relativePath": [
3578
- "dist",
3579
- "commands",
3580
- "migrate",
3581
- "usage.js"
3582
- ]
3583
- },
3584
- "plugin:add": {
3585
- "aliases": [],
3586
- "args": {
3587
- "package": {
3588
- "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
3589
- "name": "package",
3590
- "required": true
3591
- }
3592
- },
3593
- "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
3594
- "examples": [
3595
- "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
3596
- "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
3597
- ],
3598
- "flags": {
3599
- "format": {
3600
- "description": "Output format",
3601
- "name": "format",
3602
- "default": "text",
3603
- "hasDynamicHelp": false,
3604
- "multiple": false,
3605
- "options": [
3606
- "text",
3607
- "json"
3608
- ],
3609
- "type": "option"
3606
+ "description": "Report what would be re-baked without writing files",
3607
+ "name": "dry-run",
3608
+ "allowNo": false,
3609
+ "type": "boolean"
3610
3610
  }
3611
3611
  },
3612
3612
  "hasDynamicHelp": false,
3613
3613
  "hiddenAliases": [],
3614
- "id": "plugin:add",
3614
+ "id": "migrate:rebake",
3615
3615
  "pluginAlias": "@memberjunction/cli",
3616
3616
  "pluginName": "@memberjunction/cli",
3617
3617
  "pluginType": "core",
@@ -3621,14 +3621,14 @@
3621
3621
  "relativePath": [
3622
3622
  "dist",
3623
3623
  "commands",
3624
- "plugin",
3625
- "add.js"
3624
+ "migrate",
3625
+ "rebake.js"
3626
3626
  ]
3627
3627
  },
3628
- "plugin:usage": {
3628
+ "migrate:usage": {
3629
3629
  "aliases": [],
3630
3630
  "args": {},
3631
- "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
3631
+ "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
3632
3632
  "flags": {
3633
3633
  "format": {
3634
3634
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -3645,7 +3645,7 @@
3645
3645
  },
3646
3646
  "hasDynamicHelp": false,
3647
3647
  "hiddenAliases": [],
3648
- "id": "plugin:usage",
3648
+ "id": "migrate:usage",
3649
3649
  "pluginAlias": "@memberjunction/cli",
3650
3650
  "pluginName": "@memberjunction/cli",
3651
3651
  "pluginType": "core",
@@ -3655,7 +3655,7 @@
3655
3655
  "relativePath": [
3656
3656
  "dist",
3657
3657
  "commands",
3658
- "plugin",
3658
+ "migrate",
3659
3659
  "usage.js"
3660
3660
  ]
3661
3661
  },
@@ -3969,250 +3969,17 @@
3969
3969
  "name": "format",
3970
3970
  "hasDynamicHelp": false,
3971
3971
  "multiple": false,
3972
- "options": [
3973
- "text",
3974
- "json",
3975
- "md"
3976
- ],
3977
- "type": "option"
3978
- }
3979
- },
3980
- "hasDynamicHelp": false,
3981
- "hiddenAliases": [],
3982
- "id": "querygen:usage",
3983
- "pluginAlias": "@memberjunction/cli",
3984
- "pluginName": "@memberjunction/cli",
3985
- "pluginType": "core",
3986
- "strict": true,
3987
- "enableJsonFlag": false,
3988
- "isESM": true,
3989
- "relativePath": [
3990
- "dist",
3991
- "commands",
3992
- "querygen",
3993
- "usage.js"
3994
- ]
3995
- },
3996
- "querygen:validate": {
3997
- "aliases": [],
3998
- "args": {},
3999
- "description": "Validate existing query templates",
4000
- "examples": [
4001
- "<%= config.bin %> <%= command.id %>",
4002
- "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
4003
- "<%= config.bin %> <%= command.id %> --verbose"
4004
- ],
4005
- "flags": {
4006
- "path": {
4007
- "char": "p",
4008
- "description": "Path to queries metadata file or directory",
4009
- "name": "path",
4010
- "default": "./metadata/queries",
4011
- "hasDynamicHelp": false,
4012
- "multiple": false,
4013
- "type": "option"
4014
- },
4015
- "verbose": {
4016
- "char": "v",
4017
- "description": "Verbose output",
4018
- "name": "verbose",
4019
- "allowNo": false,
4020
- "type": "boolean"
4021
- }
4022
- },
4023
- "hasDynamicHelp": false,
4024
- "hiddenAliases": [],
4025
- "id": "querygen:validate",
4026
- "pluginAlias": "@memberjunction/cli",
4027
- "pluginName": "@memberjunction/cli",
4028
- "pluginType": "core",
4029
- "strict": true,
4030
- "enableJsonFlag": false,
4031
- "isESM": true,
4032
- "relativePath": [
4033
- "dist",
4034
- "commands",
4035
- "querygen",
4036
- "validate.js"
4037
- ]
4038
- },
4039
- "queue:backlog": {
4040
- "aliases": [],
4041
- "args": {},
4042
- "description": "Show the autoscaler metric for one subscription: claimable pending plus in-flight deliveries",
4043
- "examples": [
4044
- "<%= config.bin %> <%= command.id %> --subscription venue-import",
4045
- "<%= config.bin %> <%= command.id %> --subscription venue-import --json"
4046
- ],
4047
- "flags": {
4048
- "subscription": {
4049
- "char": "s",
4050
- "description": "Subscription name",
4051
- "name": "subscription",
4052
- "required": true,
4053
- "hasDynamicHelp": false,
4054
- "multiple": false,
4055
- "type": "option"
4056
- },
4057
- "json": {
4058
- "description": "Print JSON instead of text",
4059
- "name": "json",
4060
- "allowNo": false,
4061
- "type": "boolean"
4062
- }
4063
- },
4064
- "hasDynamicHelp": false,
4065
- "hiddenAliases": [],
4066
- "id": "queue:backlog",
4067
- "pluginAlias": "@memberjunction/cli",
4068
- "pluginName": "@memberjunction/cli",
4069
- "pluginType": "core",
4070
- "strict": true,
4071
- "enableJsonFlag": false,
4072
- "isESM": true,
4073
- "relativePath": [
4074
- "dist",
4075
- "commands",
4076
- "queue",
4077
- "backlog.js"
4078
- ]
4079
- },
4080
- "queue:dead-letters": {
4081
- "aliases": [],
4082
- "args": {},
4083
- "description": "List a work-queue subscription's dead-lettered deliveries",
4084
- "examples": [
4085
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --page-size 20"
4086
- ],
4087
- "flags": {
4088
- "subscription": {
4089
- "char": "s",
4090
- "description": "Subscription name",
4091
- "name": "subscription",
4092
- "required": true,
4093
- "hasDynamicHelp": false,
4094
- "multiple": false,
4095
- "type": "option"
4096
- },
4097
- "cursor": {
4098
- "description": "nextCursor from a previous page",
4099
- "name": "cursor",
4100
- "hasDynamicHelp": false,
4101
- "multiple": false,
4102
- "type": "option"
4103
- },
4104
- "page-size": {
4105
- "description": "Items per page (1–500)",
4106
- "name": "page-size",
4107
- "default": 50,
4108
- "hasDynamicHelp": false,
4109
- "multiple": false,
4110
- "type": "option"
4111
- },
4112
- "json": {
4113
- "description": "Print JSON instead of a table",
4114
- "name": "json",
4115
- "allowNo": false,
4116
- "type": "boolean"
4117
- }
4118
- },
4119
- "hasDynamicHelp": false,
4120
- "hiddenAliases": [],
4121
- "id": "queue:dead-letters",
4122
- "pluginAlias": "@memberjunction/cli",
4123
- "pluginName": "@memberjunction/cli",
4124
- "pluginType": "core",
4125
- "strict": true,
4126
- "enableJsonFlag": false,
4127
- "isESM": true,
4128
- "relativePath": [
4129
- "dist",
4130
- "commands",
4131
- "queue",
4132
- "dead-letters.js"
4133
- ]
4134
- },
4135
- "queue:discard": {
4136
- "aliases": [],
4137
- "args": {},
4138
- "description": "Discard one pending or dead-lettered work-queue delivery, or cancel one that is in flight",
4139
- "examples": [
4140
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --reason \"bad batch, republished\""
4141
- ],
4142
- "flags": {
4143
- "subscription": {
4144
- "char": "s",
4145
- "description": "Subscription name",
4146
- "name": "subscription",
4147
- "required": true,
4148
- "hasDynamicHelp": false,
4149
- "multiple": false,
4150
- "type": "option"
4151
- },
4152
- "delivery": {
4153
- "char": "d",
4154
- "description": "DeliveryID to discard",
4155
- "name": "delivery",
4156
- "required": true,
4157
- "hasDynamicHelp": false,
4158
- "multiple": false,
4159
- "type": "option"
4160
- },
4161
- "reason": {
4162
- "char": "r",
4163
- "description": "Why the work is dropped (at most 1000 characters)",
4164
- "name": "reason",
4165
- "required": true,
4166
- "hasDynamicHelp": false,
4167
- "multiple": false,
4168
- "type": "option"
4169
- }
4170
- },
4171
- "hasDynamicHelp": false,
4172
- "hiddenAliases": [],
4173
- "id": "queue:discard",
4174
- "pluginAlias": "@memberjunction/cli",
4175
- "pluginName": "@memberjunction/cli",
4176
- "pluginType": "core",
4177
- "strict": true,
4178
- "enableJsonFlag": false,
4179
- "isESM": true,
4180
- "relativePath": [
4181
- "dist",
4182
- "commands",
4183
- "queue",
4184
- "discard.js"
4185
- ]
4186
- },
4187
- "queue:export-topology": {
4188
- "aliases": [],
4189
- "args": {},
4190
- "description": "Write the topology manifest for one transport (input to the Terraform module)",
4191
- "examples": [
4192
- "<%= config.bin %> <%= command.id %> --transport AWS-prod --output infrastructure/work-queue/manifest.json"
4193
- ],
4194
- "flags": {
4195
- "transport": {
4196
- "char": "t",
4197
- "description": "Transport name",
4198
- "name": "transport",
4199
- "required": true,
4200
- "hasDynamicHelp": false,
4201
- "multiple": false,
4202
- "type": "option"
4203
- },
4204
- "output": {
4205
- "char": "o",
4206
- "description": "File to write; stdout when omitted",
4207
- "name": "output",
4208
- "hasDynamicHelp": false,
4209
- "multiple": false,
3972
+ "options": [
3973
+ "text",
3974
+ "json",
3975
+ "md"
3976
+ ],
4210
3977
  "type": "option"
4211
3978
  }
4212
3979
  },
4213
3980
  "hasDynamicHelp": false,
4214
3981
  "hiddenAliases": [],
4215
- "id": "queue:export-topology",
3982
+ "id": "querygen:usage",
4216
3983
  "pluginAlias": "@memberjunction/cli",
4217
3984
  "pluginName": "@memberjunction/cli",
4218
3985
  "pluginType": "core",
@@ -4222,34 +3989,40 @@
4222
3989
  "relativePath": [
4223
3990
  "dist",
4224
3991
  "commands",
4225
- "queue",
4226
- "export-topology.js"
3992
+ "querygen",
3993
+ "usage.js"
4227
3994
  ]
4228
3995
  },
4229
- "queue:import-bindings": {
3996
+ "querygen:validate": {
4230
3997
  "aliases": [],
4231
- "args": {
4232
- "file": {
4233
- "description": "BindingImport JSON file",
4234
- "name": "file",
4235
- "required": true
4236
- }
4237
- },
4238
- "description": "Record cloud resource bindings (Terraform output) on work-queue topics and subscriptions",
3998
+ "args": {},
3999
+ "description": "Validate existing query templates",
4239
4000
  "examples": [
4240
- "terraform output -json mj_work_queue_bindings > bindings.json && <%= config.bin %> <%= command.id %> bindings.json"
4001
+ "<%= config.bin %> <%= command.id %>",
4002
+ "<%= config.bin %> <%= command.id %> --path ./metadata/queries",
4003
+ "<%= config.bin %> <%= command.id %> --verbose"
4241
4004
  ],
4242
4005
  "flags": {
4243
- "json": {
4244
- "description": "Print issues as JSON",
4245
- "name": "json",
4006
+ "path": {
4007
+ "char": "p",
4008
+ "description": "Path to queries metadata file or directory",
4009
+ "name": "path",
4010
+ "default": "./metadata/queries",
4011
+ "hasDynamicHelp": false,
4012
+ "multiple": false,
4013
+ "type": "option"
4014
+ },
4015
+ "verbose": {
4016
+ "char": "v",
4017
+ "description": "Verbose output",
4018
+ "name": "verbose",
4246
4019
  "allowNo": false,
4247
4020
  "type": "boolean"
4248
4021
  }
4249
4022
  },
4250
4023
  "hasDynamicHelp": false,
4251
4024
  "hiddenAliases": [],
4252
- "id": "queue:import-bindings",
4025
+ "id": "querygen:validate",
4253
4026
  "pluginAlias": "@memberjunction/cli",
4254
4027
  "pluginName": "@memberjunction/cli",
4255
4028
  "pluginType": "core",
@@ -4259,23 +4032,34 @@
4259
4032
  "relativePath": [
4260
4033
  "dist",
4261
4034
  "commands",
4262
- "queue",
4263
- "import-bindings.js"
4035
+ "querygen",
4036
+ "validate.js"
4264
4037
  ]
4265
4038
  },
4266
- "queue": {
4039
+ "rubric:diff": {
4267
4040
  "aliases": [],
4268
- "args": {},
4269
- "description": "Operate the durable work queue",
4270
- "examples": [
4271
- "<%= config.bin %> <%= command.id %> publish --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4272
- "<%= config.bin %> <%= command.id %> stats",
4273
- "<%= config.bin %> <%= command.id %> dead-letters --subscription email.unsubscribe"
4274
- ],
4041
+ "args": {
4042
+ "rubric": {
4043
+ "description": "Rubric name or id",
4044
+ "name": "rubric",
4045
+ "required": true
4046
+ },
4047
+ "from": {
4048
+ "description": "Version 1.2.0 or id",
4049
+ "name": "from",
4050
+ "required": true
4051
+ },
4052
+ "to": {
4053
+ "description": "Version 1.2.0 or id",
4054
+ "name": "to",
4055
+ "required": true
4056
+ }
4057
+ },
4058
+ "description": "Print the version bump between two rubric versions.",
4275
4059
  "flags": {},
4276
4060
  "hasDynamicHelp": false,
4277
4061
  "hiddenAliases": [],
4278
- "id": "queue",
4062
+ "id": "rubric:diff",
4279
4063
  "pluginAlias": "@memberjunction/cli",
4280
4064
  "pluginName": "@memberjunction/cli",
4281
4065
  "pluginType": "core",
@@ -4285,64 +4069,76 @@
4285
4069
  "relativePath": [
4286
4070
  "dist",
4287
4071
  "commands",
4288
- "queue",
4289
- "index.js"
4072
+ "rubric",
4073
+ "diff.js"
4290
4074
  ]
4291
4075
  },
4292
- "queue:partitions": {
4076
+ "rubric:evaluate": {
4293
4077
  "aliases": [],
4294
4078
  "args": {},
4295
- "description": "List a work-queue subscription's in-flight or blocked partition keys",
4296
- "examples": [
4297
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --condition Blocked"
4298
- ],
4079
+ "description": "Evaluate one record against a rubric. Does not publish.",
4299
4080
  "flags": {
4300
- "subscription": {
4301
- "char": "s",
4302
- "description": "Subscription name",
4303
- "name": "subscription",
4081
+ "rubric": {
4082
+ "description": "Rubric name or id, optionally @version",
4083
+ "name": "rubric",
4304
4084
  "required": true,
4305
4085
  "hasDynamicHelp": false,
4306
4086
  "multiple": false,
4307
4087
  "type": "option"
4308
4088
  },
4309
- "condition": {
4310
- "description": "Only keys in this condition",
4311
- "name": "condition",
4089
+ "entity": {
4090
+ "description": "Subject entity name",
4091
+ "name": "entity",
4092
+ "required": true,
4312
4093
  "hasDynamicHelp": false,
4313
4094
  "multiple": false,
4314
- "options": [
4315
- "Idle",
4316
- "InFlight",
4317
- "Blocked"
4318
- ],
4319
4095
  "type": "option"
4320
4096
  },
4321
- "cursor": {
4322
- "description": "nextCursor from a previous page",
4323
- "name": "cursor",
4097
+ "record": {
4098
+ "description": "Subject record id",
4099
+ "name": "record",
4100
+ "required": true,
4324
4101
  "hasDynamicHelp": false,
4325
4102
  "multiple": false,
4326
4103
  "type": "option"
4327
4104
  },
4328
- "page-size": {
4329
- "description": "Items per page (1–500)",
4330
- "name": "page-size",
4331
- "default": 50,
4105
+ "evaluator": {
4106
+ "description": "A registered evaluator: LLM, Decision, Agent, Deterministic, or a custom one",
4107
+ "name": "evaluator",
4108
+ "default": "LLM",
4332
4109
  "hasDynamicHelp": false,
4333
4110
  "multiple": false,
4334
4111
  "type": "option"
4335
4112
  },
4336
- "json": {
4337
- "description": "Print JSON instead of a table",
4338
- "name": "json",
4339
- "allowNo": false,
4340
- "type": "boolean"
4113
+ "prompt": {
4114
+ "description": "LLM: the judge prompt composed into Rubric Evaluator (default Rubric Evaluator - Default Judge). Decision: the decision prompt (default Default Decision)",
4115
+ "name": "prompt",
4116
+ "hasDynamicHelp": false,
4117
+ "multiple": false,
4118
+ "type": "option"
4119
+ },
4120
+ "model": {
4121
+ "description": "AI Model ID to pin. Otherwise the prompt's bindings choose",
4122
+ "name": "model",
4123
+ "hasDynamicHelp": false,
4124
+ "multiple": false,
4125
+ "type": "option"
4126
+ },
4127
+ "mode": {
4128
+ "description": "LLM only: SinglePass or PerCriterion",
4129
+ "name": "mode",
4130
+ "hasDynamicHelp": false,
4131
+ "multiple": false,
4132
+ "options": [
4133
+ "SinglePass",
4134
+ "PerCriterion"
4135
+ ],
4136
+ "type": "option"
4341
4137
  }
4342
4138
  },
4343
4139
  "hasDynamicHelp": false,
4344
4140
  "hiddenAliases": [],
4345
- "id": "queue:partitions",
4141
+ "id": "rubric:evaluate",
4346
4142
  "pluginAlias": "@memberjunction/cli",
4347
4143
  "pluginName": "@memberjunction/cli",
4348
4144
  "pluginType": "core",
@@ -4352,80 +4148,66 @@
4352
4148
  "relativePath": [
4353
4149
  "dist",
4354
4150
  "commands",
4355
- "queue",
4356
- "partitions.js"
4151
+ "rubric",
4152
+ "evaluate.js"
4357
4153
  ]
4358
4154
  },
4359
- "queue:publish": {
4155
+ "rubric": {
4360
4156
  "aliases": [],
4361
4157
  "args": {},
4362
- "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
4363
- "examples": [
4364
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4365
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
4366
- "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
4367
- ],
4368
- "flags": {
4369
- "topic": {
4370
- "char": "t",
4371
- "description": "Topic name",
4372
- "name": "topic",
4373
- "required": true,
4374
- "hasDynamicHelp": false,
4375
- "multiple": false,
4376
- "type": "option"
4377
- },
4378
- "payload": {
4379
- "char": "p",
4380
- "description": "Message payload as JSON",
4381
- "name": "payload",
4382
- "default": "{}",
4383
- "hasDynamicHelp": false,
4384
- "multiple": false,
4385
- "type": "option"
4386
- },
4387
- "partition-key": {
4388
- "char": "k",
4389
- "description": "PartitionKey for Exclusive / Ordered subscriptions",
4390
- "name": "partition-key",
4391
- "hasDynamicHelp": false,
4392
- "multiple": false,
4393
- "type": "option"
4394
- },
4395
- "dedup-key": {
4396
- "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
4397
- "name": "dedup-key",
4398
- "hasDynamicHelp": false,
4399
- "multiple": false,
4400
- "type": "option"
4401
- },
4402
- "attribute": {
4403
- "char": "a",
4404
- "description": "Message attribute as key=value (repeatable)",
4405
- "name": "attribute",
4406
- "hasDynamicHelp": false,
4407
- "multiple": true,
4408
- "type": "option"
4409
- },
4410
- "count": {
4411
- "char": "n",
4412
- "description": "How many copies to publish in one batch",
4413
- "name": "count",
4414
- "default": 1,
4415
- "hasDynamicHelp": false,
4416
- "multiple": false,
4417
- "type": "option"
4418
- },
4419
- "json": {
4420
- "description": "Print the publish results as JSON",
4421
- "name": "json",
4422
- "allowNo": false,
4423
- "type": "boolean"
4158
+ "description": "List, show, diff, validate, and evaluate rubrics.",
4159
+ "flags": {},
4160
+ "hasDynamicHelp": false,
4161
+ "hiddenAliases": [],
4162
+ "id": "rubric",
4163
+ "pluginAlias": "@memberjunction/cli",
4164
+ "pluginName": "@memberjunction/cli",
4165
+ "pluginType": "core",
4166
+ "strict": true,
4167
+ "enableJsonFlag": false,
4168
+ "isESM": true,
4169
+ "relativePath": [
4170
+ "dist",
4171
+ "commands",
4172
+ "rubric",
4173
+ "index.js"
4174
+ ]
4175
+ },
4176
+ "rubric:list": {
4177
+ "aliases": [],
4178
+ "args": {},
4179
+ "description": "List rubrics.",
4180
+ "flags": {},
4181
+ "hasDynamicHelp": false,
4182
+ "hiddenAliases": [],
4183
+ "id": "rubric:list",
4184
+ "pluginAlias": "@memberjunction/cli",
4185
+ "pluginName": "@memberjunction/cli",
4186
+ "pluginType": "core",
4187
+ "strict": true,
4188
+ "enableJsonFlag": false,
4189
+ "isESM": true,
4190
+ "relativePath": [
4191
+ "dist",
4192
+ "commands",
4193
+ "rubric",
4194
+ "list.js"
4195
+ ]
4196
+ },
4197
+ "rubric:show": {
4198
+ "aliases": [],
4199
+ "args": {
4200
+ "rubric": {
4201
+ "description": "Rubric name or id, optionally @version",
4202
+ "name": "rubric",
4203
+ "required": true
4424
4204
  }
4425
4205
  },
4206
+ "description": "Show a rubric version and its criteria.",
4207
+ "flags": {},
4426
4208
  "hasDynamicHelp": false,
4427
4209
  "hiddenAliases": [],
4428
- "id": "queue:publish",
4210
+ "id": "rubric:show",
4429
4211
  "pluginAlias": "@memberjunction/cli",
4430
4212
  "pluginName": "@memberjunction/cli",
4431
4213
  "pluginType": "core",
@@ -4435,16 +4217,44 @@
4435
4217
  "relativePath": [
4436
4218
  "dist",
4437
4219
  "commands",
4438
- "queue",
4439
- "publish.js"
4220
+ "rubric",
4221
+ "show.js"
4440
4222
  ]
4441
4223
  },
4442
- "queue:replay": {
4224
+ "rubric:validate": {
4225
+ "aliases": [],
4226
+ "args": {
4227
+ "file": {
4228
+ "description": "JSON snapshot file",
4229
+ "name": "file",
4230
+ "required": true
4231
+ }
4232
+ },
4233
+ "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
4234
+ "flags": {},
4235
+ "hasDynamicHelp": false,
4236
+ "hiddenAliases": [],
4237
+ "id": "rubric:validate",
4238
+ "pluginAlias": "@memberjunction/cli",
4239
+ "pluginName": "@memberjunction/cli",
4240
+ "pluginType": "core",
4241
+ "strict": true,
4242
+ "enableJsonFlag": false,
4243
+ "isESM": true,
4244
+ "relativePath": [
4245
+ "dist",
4246
+ "commands",
4247
+ "rubric",
4248
+ "validate.js"
4249
+ ]
4250
+ },
4251
+ "queue:backlog": {
4443
4252
  "aliases": [],
4444
4253
  "args": {},
4445
- "description": "Replay one dead-lettered work-queue delivery",
4254
+ "description": "Show the autoscaler metric for one subscription: claimable pending plus in-flight deliveries",
4446
4255
  "examples": [
4447
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
4256
+ "<%= config.bin %> <%= command.id %> --subscription venue-import",
4257
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --json"
4448
4258
  ],
4449
4259
  "flags": {
4450
4260
  "subscription": {
@@ -4456,26 +4266,16 @@
4456
4266
  "multiple": false,
4457
4267
  "type": "option"
4458
4268
  },
4459
- "delivery": {
4460
- "char": "d",
4461
- "description": "DeliveryID from `mj queue dead-letters`",
4462
- "name": "delivery",
4463
- "required": true,
4464
- "hasDynamicHelp": false,
4465
- "multiple": false,
4466
- "type": "option"
4467
- },
4468
- "note": {
4469
- "description": "Operator note stored with the resolution",
4470
- "name": "note",
4471
- "hasDynamicHelp": false,
4472
- "multiple": false,
4473
- "type": "option"
4269
+ "json": {
4270
+ "description": "Print JSON instead of text",
4271
+ "name": "json",
4272
+ "allowNo": false,
4273
+ "type": "boolean"
4474
4274
  }
4475
4275
  },
4476
4276
  "hasDynamicHelp": false,
4477
4277
  "hiddenAliases": [],
4478
- "id": "queue:replay",
4278
+ "id": "queue:backlog",
4479
4279
  "pluginAlias": "@memberjunction/cli",
4480
4280
  "pluginName": "@memberjunction/cli",
4481
4281
  "pluginType": "core",
@@ -4486,22 +4286,37 @@
4486
4286
  "dist",
4487
4287
  "commands",
4488
4288
  "queue",
4489
- "replay.js"
4289
+ "backlog.js"
4490
4290
  ]
4491
4291
  },
4492
- "queue:stats": {
4292
+ "queue:dead-letters": {
4493
4293
  "aliases": [],
4494
4294
  "args": {},
4495
- "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
4295
+ "description": "List a work-queue subscription's dead-lettered deliveries",
4496
4296
  "examples": [
4497
- "<%= config.bin %> <%= command.id %>",
4498
- "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
4297
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --page-size 20"
4499
4298
  ],
4500
4299
  "flags": {
4501
4300
  "subscription": {
4502
4301
  "char": "s",
4503
- "description": "Subscription name; omit for every subscription",
4302
+ "description": "Subscription name",
4504
4303
  "name": "subscription",
4304
+ "required": true,
4305
+ "hasDynamicHelp": false,
4306
+ "multiple": false,
4307
+ "type": "option"
4308
+ },
4309
+ "cursor": {
4310
+ "description": "nextCursor from a previous page",
4311
+ "name": "cursor",
4312
+ "hasDynamicHelp": false,
4313
+ "multiple": false,
4314
+ "type": "option"
4315
+ },
4316
+ "page-size": {
4317
+ "description": "Items per page (1–500)",
4318
+ "name": "page-size",
4319
+ "default": 50,
4505
4320
  "hasDynamicHelp": false,
4506
4321
  "multiple": false,
4507
4322
  "type": "option"
@@ -4515,7 +4330,7 @@
4515
4330
  },
4516
4331
  "hasDynamicHelp": false,
4517
4332
  "hiddenAliases": [],
4518
- "id": "queue:stats",
4333
+ "id": "queue:dead-letters",
4519
4334
  "pluginAlias": "@memberjunction/cli",
4520
4335
  "pluginName": "@memberjunction/cli",
4521
4336
  "pluginType": "core",
@@ -4526,30 +4341,48 @@
4526
4341
  "dist",
4527
4342
  "commands",
4528
4343
  "queue",
4529
- "stats.js"
4344
+ "dead-letters.js"
4530
4345
  ]
4531
4346
  },
4532
- "queue:usage": {
4347
+ "queue:discard": {
4533
4348
  "aliases": [],
4534
4349
  "args": {},
4535
- "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
4350
+ "description": "Discard one pending or dead-lettered work-queue delivery, or cancel one that is in flight",
4351
+ "examples": [
4352
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --reason \"bad batch, republished\""
4353
+ ],
4536
4354
  "flags": {
4537
- "format": {
4538
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4539
- "name": "format",
4355
+ "subscription": {
4356
+ "char": "s",
4357
+ "description": "Subscription name",
4358
+ "name": "subscription",
4359
+ "required": true,
4360
+ "hasDynamicHelp": false,
4361
+ "multiple": false,
4362
+ "type": "option"
4363
+ },
4364
+ "delivery": {
4365
+ "char": "d",
4366
+ "description": "DeliveryID to discard",
4367
+ "name": "delivery",
4368
+ "required": true,
4369
+ "hasDynamicHelp": false,
4370
+ "multiple": false,
4371
+ "type": "option"
4372
+ },
4373
+ "reason": {
4374
+ "char": "r",
4375
+ "description": "Why the work is dropped (at most 1000 characters)",
4376
+ "name": "reason",
4377
+ "required": true,
4540
4378
  "hasDynamicHelp": false,
4541
4379
  "multiple": false,
4542
- "options": [
4543
- "text",
4544
- "json",
4545
- "md"
4546
- ],
4547
4380
  "type": "option"
4548
4381
  }
4549
4382
  },
4550
4383
  "hasDynamicHelp": false,
4551
4384
  "hiddenAliases": [],
4552
- "id": "queue:usage",
4385
+ "id": "queue:discard",
4553
4386
  "pluginAlias": "@memberjunction/cli",
4554
4387
  "pluginName": "@memberjunction/cli",
4555
4388
  "pluginType": "core",
@@ -4560,36 +4393,38 @@
4560
4393
  "dist",
4561
4394
  "commands",
4562
4395
  "queue",
4563
- "usage.js"
4396
+ "discard.js"
4564
4397
  ]
4565
4398
  },
4566
- "queue:validate-bindings": {
4399
+ "queue:export-topology": {
4567
4400
  "aliases": [],
4568
4401
  "args": {},
4569
- "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
4402
+ "description": "Write the topology manifest for one transport (input to the Terraform module)",
4570
4403
  "examples": [
4571
- "<%= config.bin %> <%= command.id %>",
4572
- "<%= config.bin %> <%= command.id %> --transport AWS-prod"
4404
+ "<%= config.bin %> <%= command.id %> --transport AWS-prod --output infrastructure/work-queue/manifest.json"
4573
4405
  ],
4574
4406
  "flags": {
4575
4407
  "transport": {
4576
4408
  "char": "t",
4577
- "description": "Validate one transport's bindings against its resources",
4409
+ "description": "Transport name",
4578
4410
  "name": "transport",
4411
+ "required": true,
4579
4412
  "hasDynamicHelp": false,
4580
4413
  "multiple": false,
4581
4414
  "type": "option"
4582
4415
  },
4583
- "json": {
4584
- "description": "Print issues as JSON",
4585
- "name": "json",
4586
- "allowNo": false,
4587
- "type": "boolean"
4416
+ "output": {
4417
+ "char": "o",
4418
+ "description": "File to write; stdout when omitted",
4419
+ "name": "output",
4420
+ "hasDynamicHelp": false,
4421
+ "multiple": false,
4422
+ "type": "option"
4588
4423
  }
4589
4424
  },
4590
4425
  "hasDynamicHelp": false,
4591
4426
  "hiddenAliases": [],
4592
- "id": "queue:validate-bindings",
4427
+ "id": "queue:export-topology",
4593
4428
  "pluginAlias": "@memberjunction/cli",
4594
4429
  "pluginName": "@memberjunction/cli",
4595
4430
  "pluginType": "core",
@@ -4600,86 +4435,33 @@
4600
4435
  "dist",
4601
4436
  "commands",
4602
4437
  "queue",
4603
- "validate-bindings.js"
4438
+ "export-topology.js"
4604
4439
  ]
4605
4440
  },
4606
- "queue:work": {
4441
+ "queue:import-bindings": {
4607
4442
  "aliases": [],
4608
- "args": {},
4609
- "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
4443
+ "args": {
4444
+ "file": {
4445
+ "description": "BindingImport JSON file",
4446
+ "name": "file",
4447
+ "required": true
4448
+ }
4449
+ },
4450
+ "description": "Record cloud resource bindings (Terraform output) on work-queue topics and subscriptions",
4610
4451
  "examples": [
4611
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
4612
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
4613
- "<%= config.bin %> <%= command.id %> --subscription \"*\""
4452
+ "terraform output -json mj_work_queue_bindings > bindings.json && <%= config.bin %> <%= command.id %> bindings.json"
4614
4453
  ],
4615
4454
  "flags": {
4616
- "subscription": {
4617
- "char": "s",
4618
- "description": "Subscription name, or '*' for every MJWorker subscription",
4619
- "name": "subscription",
4620
- "required": true,
4621
- "hasDynamicHelp": false,
4622
- "multiple": false,
4623
- "type": "option"
4624
- },
4625
- "once": {
4626
- "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
4627
- "name": "once",
4455
+ "json": {
4456
+ "description": "Print issues as JSON",
4457
+ "name": "json",
4628
4458
  "allowNo": false,
4629
4459
  "type": "boolean"
4630
- },
4631
- "max": {
4632
- "dependsOn": [
4633
- "once"
4634
- ],
4635
- "description": "With --once: how many deliveries to receive",
4636
- "name": "max",
4637
- "default": 1,
4638
- "hasDynamicHelp": false,
4639
- "multiple": false,
4640
- "type": "option"
4641
- },
4642
- "idle-exit-ms": {
4643
- "dependsOn": [
4644
- "once"
4645
- ],
4646
- "description": "With --once: exit after this long with an empty queue",
4647
- "name": "idle-exit-ms",
4648
- "default": 5000,
4649
- "hasDynamicHelp": false,
4650
- "multiple": false,
4651
- "type": "option"
4652
- },
4653
- "max-duration-ms": {
4654
- "dependsOn": [
4655
- "once"
4656
- ],
4657
- "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
4658
- "name": "max-duration-ms",
4659
- "hasDynamicHelp": false,
4660
- "multiple": false,
4661
- "type": "option"
4662
- },
4663
- "concurrency": {
4664
- "description": "Handlers in flight per subscription",
4665
- "name": "concurrency",
4666
- "default": 1,
4667
- "hasDynamicHelp": false,
4668
- "multiple": false,
4669
- "type": "option"
4670
- },
4671
- "shutdown-drain-ms": {
4672
- "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
4673
- "name": "shutdown-drain-ms",
4674
- "default": 30000,
4675
- "hasDynamicHelp": false,
4676
- "multiple": false,
4677
- "type": "option"
4678
4460
  }
4679
4461
  },
4680
4462
  "hasDynamicHelp": false,
4681
4463
  "hiddenAliases": [],
4682
- "id": "queue:work",
4464
+ "id": "queue:import-bindings",
4683
4465
  "pluginAlias": "@memberjunction/cli",
4684
4466
  "pluginName": "@memberjunction/cli",
4685
4467
  "pluginType": "core",
@@ -4690,33 +4472,22 @@
4690
4472
  "dist",
4691
4473
  "commands",
4692
4474
  "queue",
4693
- "work.js"
4475
+ "import-bindings.js"
4694
4476
  ]
4695
4477
  },
4696
- "rubric:diff": {
4478
+ "queue": {
4697
4479
  "aliases": [],
4698
- "args": {
4699
- "rubric": {
4700
- "description": "Rubric name or id",
4701
- "name": "rubric",
4702
- "required": true
4703
- },
4704
- "from": {
4705
- "description": "Version 1.2.0 or id",
4706
- "name": "from",
4707
- "required": true
4708
- },
4709
- "to": {
4710
- "description": "Version 1.2.0 or id",
4711
- "name": "to",
4712
- "required": true
4713
- }
4714
- },
4715
- "description": "Print the version bump between two rubric versions.",
4480
+ "args": {},
4481
+ "description": "Operate the durable work queue",
4482
+ "examples": [
4483
+ "<%= config.bin %> <%= command.id %> publish --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4484
+ "<%= config.bin %> <%= command.id %> stats",
4485
+ "<%= config.bin %> <%= command.id %> dead-letters --subscription email.unsubscribe"
4486
+ ],
4716
4487
  "flags": {},
4717
4488
  "hasDynamicHelp": false,
4718
4489
  "hiddenAliases": [],
4719
- "id": "rubric:diff",
4490
+ "id": "queue",
4720
4491
  "pluginAlias": "@memberjunction/cli",
4721
4492
  "pluginName": "@memberjunction/cli",
4722
4493
  "pluginType": "core",
@@ -4726,76 +4497,147 @@
4726
4497
  "relativePath": [
4727
4498
  "dist",
4728
4499
  "commands",
4729
- "rubric",
4730
- "diff.js"
4500
+ "queue",
4501
+ "index.js"
4731
4502
  ]
4732
4503
  },
4733
- "rubric:evaluate": {
4504
+ "queue:partitions": {
4734
4505
  "aliases": [],
4735
4506
  "args": {},
4736
- "description": "Evaluate one record against a rubric. Does not publish.",
4507
+ "description": "List a work-queue subscription's in-flight or blocked partition keys",
4508
+ "examples": [
4509
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --condition Blocked"
4510
+ ],
4737
4511
  "flags": {
4738
- "rubric": {
4739
- "description": "Rubric name or id, optionally @version",
4740
- "name": "rubric",
4512
+ "subscription": {
4513
+ "char": "s",
4514
+ "description": "Subscription name",
4515
+ "name": "subscription",
4741
4516
  "required": true,
4742
4517
  "hasDynamicHelp": false,
4743
4518
  "multiple": false,
4744
4519
  "type": "option"
4745
4520
  },
4746
- "entity": {
4747
- "description": "Subject entity name",
4748
- "name": "entity",
4749
- "required": true,
4521
+ "condition": {
4522
+ "description": "Only keys in this condition",
4523
+ "name": "condition",
4750
4524
  "hasDynamicHelp": false,
4751
4525
  "multiple": false,
4526
+ "options": [
4527
+ "Idle",
4528
+ "InFlight",
4529
+ "Blocked"
4530
+ ],
4752
4531
  "type": "option"
4753
4532
  },
4754
- "record": {
4755
- "description": "Subject record id",
4756
- "name": "record",
4533
+ "cursor": {
4534
+ "description": "nextCursor from a previous page",
4535
+ "name": "cursor",
4536
+ "hasDynamicHelp": false,
4537
+ "multiple": false,
4538
+ "type": "option"
4539
+ },
4540
+ "page-size": {
4541
+ "description": "Items per page (1–500)",
4542
+ "name": "page-size",
4543
+ "default": 50,
4544
+ "hasDynamicHelp": false,
4545
+ "multiple": false,
4546
+ "type": "option"
4547
+ },
4548
+ "json": {
4549
+ "description": "Print JSON instead of a table",
4550
+ "name": "json",
4551
+ "allowNo": false,
4552
+ "type": "boolean"
4553
+ }
4554
+ },
4555
+ "hasDynamicHelp": false,
4556
+ "hiddenAliases": [],
4557
+ "id": "queue:partitions",
4558
+ "pluginAlias": "@memberjunction/cli",
4559
+ "pluginName": "@memberjunction/cli",
4560
+ "pluginType": "core",
4561
+ "strict": true,
4562
+ "enableJsonFlag": false,
4563
+ "isESM": true,
4564
+ "relativePath": [
4565
+ "dist",
4566
+ "commands",
4567
+ "queue",
4568
+ "partitions.js"
4569
+ ]
4570
+ },
4571
+ "queue:publish": {
4572
+ "aliases": [],
4573
+ "args": {},
4574
+ "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
4575
+ "examples": [
4576
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4577
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
4578
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
4579
+ ],
4580
+ "flags": {
4581
+ "topic": {
4582
+ "char": "t",
4583
+ "description": "Topic name",
4584
+ "name": "topic",
4757
4585
  "required": true,
4758
4586
  "hasDynamicHelp": false,
4759
4587
  "multiple": false,
4760
4588
  "type": "option"
4761
4589
  },
4762
- "evaluator": {
4763
- "description": "A registered evaluator: LLM, Decision, Agent, Deterministic, or a custom one",
4764
- "name": "evaluator",
4765
- "default": "LLM",
4590
+ "payload": {
4591
+ "char": "p",
4592
+ "description": "Message payload as JSON",
4593
+ "name": "payload",
4594
+ "default": "{}",
4766
4595
  "hasDynamicHelp": false,
4767
4596
  "multiple": false,
4768
4597
  "type": "option"
4769
4598
  },
4770
- "prompt": {
4771
- "description": "LLM: the judge prompt composed into Rubric Evaluator (default Rubric Evaluator - Default Judge). Decision: the decision prompt (default Default Decision)",
4772
- "name": "prompt",
4599
+ "partition-key": {
4600
+ "char": "k",
4601
+ "description": "PartitionKey for Exclusive / Ordered subscriptions",
4602
+ "name": "partition-key",
4773
4603
  "hasDynamicHelp": false,
4774
4604
  "multiple": false,
4775
4605
  "type": "option"
4776
4606
  },
4777
- "model": {
4778
- "description": "AI Model ID to pin. Otherwise the prompt's bindings choose",
4779
- "name": "model",
4607
+ "dedup-key": {
4608
+ "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
4609
+ "name": "dedup-key",
4780
4610
  "hasDynamicHelp": false,
4781
4611
  "multiple": false,
4782
4612
  "type": "option"
4783
4613
  },
4784
- "mode": {
4785
- "description": "LLM only: SinglePass or PerCriterion",
4786
- "name": "mode",
4614
+ "attribute": {
4615
+ "char": "a",
4616
+ "description": "Message attribute as key=value (repeatable)",
4617
+ "name": "attribute",
4618
+ "hasDynamicHelp": false,
4619
+ "multiple": true,
4620
+ "type": "option"
4621
+ },
4622
+ "count": {
4623
+ "char": "n",
4624
+ "description": "How many copies to publish in one batch",
4625
+ "name": "count",
4626
+ "default": 1,
4787
4627
  "hasDynamicHelp": false,
4788
4628
  "multiple": false,
4789
- "options": [
4790
- "SinglePass",
4791
- "PerCriterion"
4792
- ],
4793
4629
  "type": "option"
4630
+ },
4631
+ "json": {
4632
+ "description": "Print the publish results as JSON",
4633
+ "name": "json",
4634
+ "allowNo": false,
4635
+ "type": "boolean"
4794
4636
  }
4795
4637
  },
4796
4638
  "hasDynamicHelp": false,
4797
4639
  "hiddenAliases": [],
4798
- "id": "rubric:evaluate",
4640
+ "id": "queue:publish",
4799
4641
  "pluginAlias": "@memberjunction/cli",
4800
4642
  "pluginName": "@memberjunction/cli",
4801
4643
  "pluginType": "core",
@@ -4805,18 +4647,47 @@
4805
4647
  "relativePath": [
4806
4648
  "dist",
4807
4649
  "commands",
4808
- "rubric",
4809
- "evaluate.js"
4650
+ "queue",
4651
+ "publish.js"
4810
4652
  ]
4811
4653
  },
4812
- "rubric": {
4654
+ "queue:replay": {
4813
4655
  "aliases": [],
4814
4656
  "args": {},
4815
- "description": "List, show, diff, validate, and evaluate rubrics.",
4816
- "flags": {},
4657
+ "description": "Replay one dead-lettered work-queue delivery",
4658
+ "examples": [
4659
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
4660
+ ],
4661
+ "flags": {
4662
+ "subscription": {
4663
+ "char": "s",
4664
+ "description": "Subscription name",
4665
+ "name": "subscription",
4666
+ "required": true,
4667
+ "hasDynamicHelp": false,
4668
+ "multiple": false,
4669
+ "type": "option"
4670
+ },
4671
+ "delivery": {
4672
+ "char": "d",
4673
+ "description": "DeliveryID from `mj queue dead-letters`",
4674
+ "name": "delivery",
4675
+ "required": true,
4676
+ "hasDynamicHelp": false,
4677
+ "multiple": false,
4678
+ "type": "option"
4679
+ },
4680
+ "note": {
4681
+ "description": "Operator note stored with the resolution",
4682
+ "name": "note",
4683
+ "hasDynamicHelp": false,
4684
+ "multiple": false,
4685
+ "type": "option"
4686
+ }
4687
+ },
4817
4688
  "hasDynamicHelp": false,
4818
4689
  "hiddenAliases": [],
4819
- "id": "rubric",
4690
+ "id": "queue:replay",
4820
4691
  "pluginAlias": "@memberjunction/cli",
4821
4692
  "pluginName": "@memberjunction/cli",
4822
4693
  "pluginType": "core",
@@ -4826,18 +4697,37 @@
4826
4697
  "relativePath": [
4827
4698
  "dist",
4828
4699
  "commands",
4829
- "rubric",
4830
- "index.js"
4700
+ "queue",
4701
+ "replay.js"
4831
4702
  ]
4832
4703
  },
4833
- "rubric:list": {
4704
+ "queue:stats": {
4834
4705
  "aliases": [],
4835
4706
  "args": {},
4836
- "description": "List rubrics.",
4837
- "flags": {},
4707
+ "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
4708
+ "examples": [
4709
+ "<%= config.bin %> <%= command.id %>",
4710
+ "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
4711
+ ],
4712
+ "flags": {
4713
+ "subscription": {
4714
+ "char": "s",
4715
+ "description": "Subscription name; omit for every subscription",
4716
+ "name": "subscription",
4717
+ "hasDynamicHelp": false,
4718
+ "multiple": false,
4719
+ "type": "option"
4720
+ },
4721
+ "json": {
4722
+ "description": "Print JSON instead of a table",
4723
+ "name": "json",
4724
+ "allowNo": false,
4725
+ "type": "boolean"
4726
+ }
4727
+ },
4838
4728
  "hasDynamicHelp": false,
4839
4729
  "hiddenAliases": [],
4840
- "id": "rubric:list",
4730
+ "id": "queue:stats",
4841
4731
  "pluginAlias": "@memberjunction/cli",
4842
4732
  "pluginName": "@memberjunction/cli",
4843
4733
  "pluginType": "core",
@@ -4847,24 +4737,31 @@
4847
4737
  "relativePath": [
4848
4738
  "dist",
4849
4739
  "commands",
4850
- "rubric",
4851
- "list.js"
4740
+ "queue",
4741
+ "stats.js"
4852
4742
  ]
4853
4743
  },
4854
- "rubric:show": {
4744
+ "queue:usage": {
4855
4745
  "aliases": [],
4856
- "args": {
4857
- "rubric": {
4858
- "description": "Rubric name or id, optionally @version",
4859
- "name": "rubric",
4860
- "required": true
4746
+ "args": {},
4747
+ "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
4748
+ "flags": {
4749
+ "format": {
4750
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4751
+ "name": "format",
4752
+ "hasDynamicHelp": false,
4753
+ "multiple": false,
4754
+ "options": [
4755
+ "text",
4756
+ "json",
4757
+ "md"
4758
+ ],
4759
+ "type": "option"
4861
4760
  }
4862
4761
  },
4863
- "description": "Show a rubric version and its criteria.",
4864
- "flags": {},
4865
4762
  "hasDynamicHelp": false,
4866
4763
  "hiddenAliases": [],
4867
- "id": "rubric:show",
4764
+ "id": "queue:usage",
4868
4765
  "pluginAlias": "@memberjunction/cli",
4869
4766
  "pluginName": "@memberjunction/cli",
4870
4767
  "pluginType": "core",
@@ -4874,24 +4771,37 @@
4874
4771
  "relativePath": [
4875
4772
  "dist",
4876
4773
  "commands",
4877
- "rubric",
4878
- "show.js"
4774
+ "queue",
4775
+ "usage.js"
4879
4776
  ]
4880
4777
  },
4881
- "rubric:validate": {
4778
+ "queue:validate-bindings": {
4882
4779
  "aliases": [],
4883
- "args": {
4884
- "file": {
4885
- "description": "JSON snapshot file",
4886
- "name": "file",
4887
- "required": true
4780
+ "args": {},
4781
+ "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
4782
+ "examples": [
4783
+ "<%= config.bin %> <%= command.id %>",
4784
+ "<%= config.bin %> <%= command.id %> --transport AWS-prod"
4785
+ ],
4786
+ "flags": {
4787
+ "transport": {
4788
+ "char": "t",
4789
+ "description": "Validate one transport's bindings against its resources",
4790
+ "name": "transport",
4791
+ "hasDynamicHelp": false,
4792
+ "multiple": false,
4793
+ "type": "option"
4794
+ },
4795
+ "json": {
4796
+ "description": "Print issues as JSON",
4797
+ "name": "json",
4798
+ "allowNo": false,
4799
+ "type": "boolean"
4888
4800
  }
4889
4801
  },
4890
- "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
4891
- "flags": {},
4892
4802
  "hasDynamicHelp": false,
4893
4803
  "hiddenAliases": [],
4894
- "id": "rubric:validate",
4804
+ "id": "queue:validate-bindings",
4895
4805
  "pluginAlias": "@memberjunction/cli",
4896
4806
  "pluginName": "@memberjunction/cli",
4897
4807
  "pluginType": "core",
@@ -4901,98 +4811,87 @@
4901
4811
  "relativePath": [
4902
4812
  "dist",
4903
4813
  "commands",
4904
- "rubric",
4905
- "validate.js"
4814
+ "queue",
4815
+ "validate-bindings.js"
4906
4816
  ]
4907
4817
  },
4908
- "sql-audit": {
4818
+ "queue:work": {
4909
4819
  "aliases": [],
4910
4820
  "args": {},
4911
- "description": "Compare source and target databases for migration verification",
4821
+ "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
4912
4822
  "examples": [
4913
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
4914
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
4915
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
4823
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
4824
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
4825
+ "<%= config.bin %> <%= command.id %> --subscription \"*\""
4916
4826
  ],
4917
4827
  "flags": {
4918
- "source": {
4919
- "description": "Source database connection string (mssql://... or postgres://...)",
4920
- "name": "source",
4828
+ "subscription": {
4829
+ "char": "s",
4830
+ "description": "Subscription name, or '*' for every MJWorker subscription",
4831
+ "name": "subscription",
4921
4832
  "required": true,
4922
4833
  "hasDynamicHelp": false,
4923
4834
  "multiple": false,
4924
4835
  "type": "option"
4925
4836
  },
4926
- "target": {
4927
- "description": "Target database connection string (mssql://... or postgres://...)",
4928
- "name": "target",
4929
- "required": true,
4837
+ "once": {
4838
+ "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
4839
+ "name": "once",
4840
+ "allowNo": false,
4841
+ "type": "boolean"
4842
+ },
4843
+ "max": {
4844
+ "dependsOn": [
4845
+ "once"
4846
+ ],
4847
+ "description": "With --once: how many deliveries to receive",
4848
+ "name": "max",
4849
+ "default": 1,
4930
4850
  "hasDynamicHelp": false,
4931
4851
  "multiple": false,
4932
4852
  "type": "option"
4933
4853
  },
4934
- "source-schema": {
4935
- "description": "Source schema name",
4936
- "name": "source-schema",
4937
- "default": "__mj",
4854
+ "idle-exit-ms": {
4855
+ "dependsOn": [
4856
+ "once"
4857
+ ],
4858
+ "description": "With --once: exit after this long with an empty queue",
4859
+ "name": "idle-exit-ms",
4860
+ "default": 5000,
4938
4861
  "hasDynamicHelp": false,
4939
4862
  "multiple": false,
4940
4863
  "type": "option"
4941
4864
  },
4942
- "target-schema": {
4943
- "description": "Target schema name",
4944
- "name": "target-schema",
4945
- "default": "__mj",
4865
+ "max-duration-ms": {
4866
+ "dependsOn": [
4867
+ "once"
4868
+ ],
4869
+ "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
4870
+ "name": "max-duration-ms",
4946
4871
  "hasDynamicHelp": false,
4947
4872
  "multiple": false,
4948
4873
  "type": "option"
4949
4874
  },
4950
- "output": {
4951
- "char": "o",
4952
- "description": "Save report to file",
4953
- "name": "output",
4875
+ "concurrency": {
4876
+ "description": "Handlers in flight per subscription",
4877
+ "name": "concurrency",
4878
+ "default": 1,
4954
4879
  "hasDynamicHelp": false,
4955
4880
  "multiple": false,
4956
4881
  "type": "option"
4957
- }
4958
- },
4959
- "hasDynamicHelp": false,
4960
- "hiddenAliases": [],
4961
- "id": "sql-audit",
4962
- "pluginAlias": "@memberjunction/cli",
4963
- "pluginName": "@memberjunction/cli",
4964
- "pluginType": "core",
4965
- "strict": true,
4966
- "enableJsonFlag": false,
4967
- "isESM": true,
4968
- "relativePath": [
4969
- "dist",
4970
- "commands",
4971
- "sql-audit",
4972
- "index.js"
4973
- ]
4974
- },
4975
- "sql-audit:usage": {
4976
- "aliases": [],
4977
- "args": {},
4978
- "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
4979
- "flags": {
4980
- "format": {
4981
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4982
- "name": "format",
4882
+ },
4883
+ "shutdown-drain-ms": {
4884
+ "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
4885
+ "name": "shutdown-drain-ms",
4886
+ "default": 30000,
4983
4887
  "hasDynamicHelp": false,
4984
4888
  "multiple": false,
4985
- "options": [
4986
- "text",
4987
- "json",
4988
- "md"
4989
- ],
4990
4889
  "type": "option"
4991
4890
  }
4992
4891
  },
4993
4892
  "hasDynamicHelp": false,
4994
4893
  "hiddenAliases": [],
4995
- "id": "sql-audit:usage",
4894
+ "id": "queue:work",
4996
4895
  "pluginAlias": "@memberjunction/cli",
4997
4896
  "pluginName": "@memberjunction/cli",
4998
4897
  "pluginType": "core",
@@ -5002,8 +4901,8 @@
5002
4901
  "relativePath": [
5003
4902
  "dist",
5004
4903
  "commands",
5005
- "sql-audit",
5006
- "usage.js"
4904
+ "queue",
4905
+ "work.js"
5007
4906
  ]
5008
4907
  },
5009
4908
  "sql-convert": {
@@ -5125,6 +5024,107 @@
5125
5024
  "usage.js"
5126
5025
  ]
5127
5026
  },
5027
+ "sql-audit": {
5028
+ "aliases": [],
5029
+ "args": {},
5030
+ "description": "Compare source and target databases for migration verification",
5031
+ "examples": [
5032
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
5033
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
5034
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
5035
+ ],
5036
+ "flags": {
5037
+ "source": {
5038
+ "description": "Source database connection string (mssql://... or postgres://...)",
5039
+ "name": "source",
5040
+ "required": true,
5041
+ "hasDynamicHelp": false,
5042
+ "multiple": false,
5043
+ "type": "option"
5044
+ },
5045
+ "target": {
5046
+ "description": "Target database connection string (mssql://... or postgres://...)",
5047
+ "name": "target",
5048
+ "required": true,
5049
+ "hasDynamicHelp": false,
5050
+ "multiple": false,
5051
+ "type": "option"
5052
+ },
5053
+ "source-schema": {
5054
+ "description": "Source schema name",
5055
+ "name": "source-schema",
5056
+ "default": "__mj",
5057
+ "hasDynamicHelp": false,
5058
+ "multiple": false,
5059
+ "type": "option"
5060
+ },
5061
+ "target-schema": {
5062
+ "description": "Target schema name",
5063
+ "name": "target-schema",
5064
+ "default": "__mj",
5065
+ "hasDynamicHelp": false,
5066
+ "multiple": false,
5067
+ "type": "option"
5068
+ },
5069
+ "output": {
5070
+ "char": "o",
5071
+ "description": "Save report to file",
5072
+ "name": "output",
5073
+ "hasDynamicHelp": false,
5074
+ "multiple": false,
5075
+ "type": "option"
5076
+ }
5077
+ },
5078
+ "hasDynamicHelp": false,
5079
+ "hiddenAliases": [],
5080
+ "id": "sql-audit",
5081
+ "pluginAlias": "@memberjunction/cli",
5082
+ "pluginName": "@memberjunction/cli",
5083
+ "pluginType": "core",
5084
+ "strict": true,
5085
+ "enableJsonFlag": false,
5086
+ "isESM": true,
5087
+ "relativePath": [
5088
+ "dist",
5089
+ "commands",
5090
+ "sql-audit",
5091
+ "index.js"
5092
+ ]
5093
+ },
5094
+ "sql-audit:usage": {
5095
+ "aliases": [],
5096
+ "args": {},
5097
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
5098
+ "flags": {
5099
+ "format": {
5100
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5101
+ "name": "format",
5102
+ "hasDynamicHelp": false,
5103
+ "multiple": false,
5104
+ "options": [
5105
+ "text",
5106
+ "json",
5107
+ "md"
5108
+ ],
5109
+ "type": "option"
5110
+ }
5111
+ },
5112
+ "hasDynamicHelp": false,
5113
+ "hiddenAliases": [],
5114
+ "id": "sql-audit:usage",
5115
+ "pluginAlias": "@memberjunction/cli",
5116
+ "pluginName": "@memberjunction/cli",
5117
+ "pluginType": "core",
5118
+ "strict": true,
5119
+ "enableJsonFlag": false,
5120
+ "isESM": true,
5121
+ "relativePath": [
5122
+ "dist",
5123
+ "commands",
5124
+ "sql-audit",
5125
+ "usage.js"
5126
+ ]
5127
+ },
5128
5128
  "standards:adopt": {
5129
5129
  "aliases": [],
5130
5130
  "args": {},
@@ -8703,5 +8703,5 @@
8703
8703
  ]
8704
8704
  }
8705
8705
  },
8706
- "version": "6.2.3"
8706
+ "version": "6.2.4"
8707
8707
  }