@memberjunction/cli 6.3.0-edge.0 → 6.3.0-edge.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/commands/app/check-updates.d.ts +2 -2
  2. package/dist/commands/app/check-updates.d.ts.map +1 -1
  3. package/dist/commands/app/check-updates.js +8 -7
  4. package/dist/commands/app/check-updates.js.map +1 -1
  5. package/dist/commands/app/install.d.ts +2 -2
  6. package/dist/commands/app/install.d.ts.map +1 -1
  7. package/dist/commands/app/install.js +29 -18
  8. package/dist/commands/app/install.js.map +1 -1
  9. package/dist/commands/app/remove.d.ts.map +1 -1
  10. package/dist/commands/app/remove.js +3 -1
  11. package/dist/commands/app/remove.js.map +1 -1
  12. package/dist/commands/app/upgrade.d.ts +1 -0
  13. package/dist/commands/app/upgrade.d.ts.map +1 -1
  14. package/dist/commands/app/upgrade.js +6 -0
  15. package/dist/commands/app/upgrade.js.map +1 -1
  16. package/dist/commands/codegen/index.d.ts +1 -0
  17. package/dist/commands/codegen/index.d.ts.map +1 -1
  18. package/dist/commands/migrate/convert.d.ts.map +1 -1
  19. package/dist/commands/migrate/convert.js +6 -10
  20. package/dist/commands/migrate/convert.js.map +1 -1
  21. package/dist/commands/migrate/rebake.d.ts.map +1 -1
  22. package/dist/commands/migrate/rebake.js +3 -8
  23. package/dist/commands/migrate/rebake.js.map +1 -1
  24. package/dist/commands/queue/index.d.ts.map +1 -1
  25. package/dist/commands/queue/index.js +1 -0
  26. package/dist/commands/queue/index.js.map +1 -1
  27. package/dist/commands/queue/sweep.d.ts +13 -0
  28. package/dist/commands/queue/sweep.d.ts.map +1 -0
  29. package/dist/commands/queue/sweep.js +44 -0
  30. package/dist/commands/queue/sweep.js.map +1 -0
  31. package/dist/commands/queue/work.d.ts +21 -0
  32. package/dist/commands/queue/work.d.ts.map +1 -1
  33. package/dist/commands/queue/work.js +23 -3
  34. package/dist/commands/queue/work.js.map +1 -1
  35. package/dist/init-templates/citizen-builder/.env.example +4 -0
  36. package/dist/init-templates/citizen-builder/docker-compose.yml +7 -0
  37. package/dist/init-templates/citizen-builder/scripts/docker-entrypoint.sh +17 -1
  38. package/dist/lib/dev-workspace/prebundle.d.ts +3 -1
  39. package/dist/lib/dev-workspace/prebundle.d.ts.map +1 -1
  40. package/dist/lib/dev-workspace/prebundle.js +4 -3
  41. package/dist/lib/dev-workspace/prebundle.js.map +1 -1
  42. package/dist/tsconfig.tsbuildinfo +1 -0
  43. package/dist/utils/app-source-lookups.d.ts +19 -0
  44. package/dist/utils/app-source-lookups.d.ts.map +1 -0
  45. package/dist/utils/app-source-lookups.js +19 -0
  46. package/dist/utils/app-source-lookups.js.map +1 -0
  47. package/dist/utils/open-app-context.d.ts.map +1 -1
  48. package/dist/utils/open-app-context.js +6 -15
  49. package/dist/utils/open-app-context.js.map +1 -1
  50. package/oclif.manifest.json +902 -838
  51. package/package.json +28 -28
  52. package/regression-compose/docker-compose.bacpac-standalone.yml +4 -0
@@ -157,6 +157,101 @@
157
157
  "usage.js"
158
158
  ]
159
159
  },
160
+ "artifacts:reclassify": {
161
+ "aliases": [],
162
+ "args": {},
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.",
164
+ "examples": [
165
+ "<%= config.bin %> <%= command.id %>",
166
+ "<%= config.bin %> <%= command.id %> --apply --limit 50"
167
+ ],
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"
203
+ }
204
+ },
205
+ "hasDynamicHelp": false,
206
+ "hiddenAliases": [],
207
+ "id": "artifacts:reclassify",
208
+ "pluginAlias": "@memberjunction/cli",
209
+ "pluginName": "@memberjunction/cli",
210
+ "pluginType": "core",
211
+ "strict": true,
212
+ "enableJsonFlag": false,
213
+ "isESM": true,
214
+ "relativePath": [
215
+ "dist",
216
+ "commands",
217
+ "artifacts",
218
+ "reclassify.js"
219
+ ]
220
+ },
221
+ "artifacts:usage": {
222
+ "aliases": [],
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"
237
+ }
238
+ },
239
+ "hasDynamicHelp": false,
240
+ "hiddenAliases": [],
241
+ "id": "artifacts:usage",
242
+ "pluginAlias": "@memberjunction/cli",
243
+ "pluginName": "@memberjunction/cli",
244
+ "pluginType": "core",
245
+ "strict": true,
246
+ "enableJsonFlag": false,
247
+ "isESM": true,
248
+ "relativePath": [
249
+ "dist",
250
+ "commands",
251
+ "artifacts",
252
+ "usage.js"
253
+ ]
254
+ },
160
255
  "app:check-updates": {
161
256
  "aliases": [],
162
257
  "args": {},
@@ -275,19 +370,20 @@
275
370
  "aliases": [],
276
371
  "args": {
277
372
  "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).",
373
+ "description": "GitHub repository URL of the Open App, or a folder in this repository that has an mj-app.json (e.g. ./openapps/analytics). For a multi-app repo, append the in-repo path to the app (e.g. https://github.com/MemberJunction/Integrations/CRM/HubSpot).",
279
374
  "name": "source",
280
375
  "required": true
281
376
  }
282
377
  },
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.",
378
+ "description": "Install an MJ Open App from a GitHub repository or a folder in this repository.\n\nA folder path (for example ./openapps/analytics) installs the app from that folder. The folder must be inside the repository root, its version is the version in its mj-app.json, and its npm packages must be projects in this pnpm or yarn workspace (they are added as workspace:*).\n\nPrivate repositories need a GitHub credential. GitHub returns 404 (not 403) for a repo it will not show you, so without one an install fails as though the app or its version did not exist. Set GITHUB_TOKEN in the environment, or add the repo to openApps.github.tokens (or set openApps.github.token) in mj.config.cjs.",
284
379
  "examples": [
285
380
  "<%= config.bin %> app install https://github.com/acme/mj-crm",
286
381
  "<%= config.bin %> app install https://github.com/acme/mj-crm --version 1.2.0",
287
382
  "<%= config.bin %> app install https://github.com/acme/mj-crm --verbose",
288
383
  "<%= config.bin %> app install https://github.com/MemberJunction/Integrations/CRM/HubSpot",
289
384
  "<%= 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"
385
+ "GITHUB_TOKEN=$(gh auth token) <%= config.bin %> app install https://github.com/acme/private-app",
386
+ "<%= config.bin %> app install ./openapps/analytics"
291
387
  ],
292
388
  "flags": {
293
389
  "version": {
@@ -374,7 +470,7 @@
374
470
  "required": true
375
471
  }
376
472
  },
377
- "description": "Remove an installed MJ Open App",
473
+ "description": "Remove an installed MJ Open App.\n\nAn app installed from a folder in this repository is removed with the migrations and teardown scripts in that folder, so the folder must be at the installed version, also with --keep-data. If the folder was deleted or changed, restore it from git first (for example: git checkout <commit> -- openapps/<name>), then run remove again. Nothing is changed until the folder is at the installed version.",
378
474
  "examples": [
379
475
  "<%= config.bin %> app remove acme-crm",
380
476
  "<%= config.bin %> app remove acme-crm --keep-data",
@@ -442,7 +538,8 @@
442
538
  "description": "Upgrade an installed MJ Open App to a newer version",
443
539
  "examples": [
444
540
  "<%= config.bin %> app upgrade acme-crm",
445
- "<%= config.bin %> app upgrade acme-crm --version 1.3.0"
541
+ "<%= config.bin %> app upgrade acme-crm --version 1.3.0",
542
+ "<%= config.bin %> app upgrade analytics --reapply"
446
543
  ],
447
544
  "flags": {
448
545
  "version": {
@@ -452,6 +549,12 @@
452
549
  "multiple": false,
453
550
  "type": "option"
454
551
  },
552
+ "reapply": {
553
+ "description": "Run the upgrade even when the app is already at the target version. Applies new migrations, packages, config and hooks from a local app folder without a version bump. A lower version is still refused.",
554
+ "name": "reapply",
555
+ "allowNo": false,
556
+ "type": "boolean"
557
+ },
455
558
  "verbose": {
456
559
  "char": "v",
457
560
  "description": "Show detailed output",
@@ -522,101 +625,6 @@
522
625
  "usage.js"
523
626
  ]
524
627
  },
525
- "artifacts:reclassify": {
526
- "aliases": [],
527
- "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.",
529
- "examples": [
530
- "<%= config.bin %> <%= command.id %>",
531
- "<%= config.bin %> <%= command.id %> --apply --limit 50"
532
- ],
533
- "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"
540
- },
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"
547
- },
548
- "limit": {
549
- "description": "Maximum number of rows to inspect.",
550
- "name": "limit",
551
- "default": 100,
552
- "hasDynamicHelp": false,
553
- "multiple": false,
554
- "type": "option"
555
- },
556
- "apply": {
557
- "description": "Write changes. Without this flag, this command only reports what it would do.",
558
- "name": "apply",
559
- "allowNo": false,
560
- "type": "boolean"
561
- },
562
- "verbose": {
563
- "char": "v",
564
- "description": "Print every candidate row, not just the summary.",
565
- "name": "verbose",
566
- "allowNo": false,
567
- "type": "boolean"
568
- }
569
- },
570
- "hasDynamicHelp": false,
571
- "hiddenAliases": [],
572
- "id": "artifacts:reclassify",
573
- "pluginAlias": "@memberjunction/cli",
574
- "pluginName": "@memberjunction/cli",
575
- "pluginType": "core",
576
- "strict": true,
577
- "enableJsonFlag": false,
578
- "isESM": true,
579
- "relativePath": [
580
- "dist",
581
- "commands",
582
- "artifacts",
583
- "reclassify.js"
584
- ]
585
- },
586
- "artifacts:usage": {
587
- "aliases": [],
588
- "args": {},
589
- "description": "Show usage, flags, examples, and runtime hints for every `mj artifacts` command.",
590
- "flags": {
591
- "format": {
592
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
593
- "name": "format",
594
- "hasDynamicHelp": false,
595
- "multiple": false,
596
- "options": [
597
- "text",
598
- "json",
599
- "md"
600
- ],
601
- "type": "option"
602
- }
603
- },
604
- "hasDynamicHelp": false,
605
- "hiddenAliases": [],
606
- "id": "artifacts:usage",
607
- "pluginAlias": "@memberjunction/cli",
608
- "pluginName": "@memberjunction/cli",
609
- "pluginType": "core",
610
- "strict": true,
611
- "enableJsonFlag": false,
612
- "isESM": true,
613
- "relativePath": [
614
- "dist",
615
- "commands",
616
- "artifacts",
617
- "usage.js"
618
- ]
619
- },
620
628
  "baseline:build": {
621
629
  "aliases": [],
622
630
  "args": {},
@@ -1606,7 +1614,7 @@
1606
1614
  "codegen": {
1607
1615
  "aliases": [],
1608
1616
  "args": {},
1609
- "description": "Run the full MemberJunction code generation pipeline.\n\nAnalyzes your database schema, updates MemberJunction metadata, and generates\nsynchronized code across the stack: SQL objects, TypeScript entities, Angular\nforms, GraphQL resolvers, Action subclasses, and DB schema JSON.\n\nUse --skipdb to regenerate code from existing metadata only; --skipfiles to run\ndatabase-side operations only. --force-advanced-gen re-runs the LLM-driven\nadvanced generation for ALL entities (bypasses changed-entity scoping).",
1617
+ "description": "Run the full MemberJunction code generation pipeline.\n\nAnalyzes your database schema, updates MemberJunction metadata, and generates\nsynchronized code across the stack: SQL objects, TypeScript entities, Angular\nforms, GraphQL resolvers, Action subclasses, and DB schema JSON.\n\nUse --skipdb to regenerate code from existing metadata only; --skipfiles to run\ndatabase-side operations only. --force-advanced-gen re-runs the LLM-driven\nadvanced generation for ALL entities (bypasses changed-entity scoping).\n--all-schemas re-emits the generated files of every schema, not only schemas\nwith a new or modified entity.",
1610
1618
  "flags": {
1611
1619
  "format": {
1612
1620
  "description": "Output format: text (human), json (machine-readable), md (Markdown-fenced). Defaults to text on a terminal and json when stdout is piped.",
@@ -1679,6 +1687,12 @@
1679
1687
  "multiple": false,
1680
1688
  "type": "option"
1681
1689
  },
1690
+ "all-schemas": {
1691
+ "description": "Re-emit generated files for every schema, not only schemas with a new or modified entity. Files are still written only when their content changes. Same as fileEmit.dirtySchemaOnly: false in mj.config.cjs, for this run.",
1692
+ "name": "all-schemas",
1693
+ "allowNo": false,
1694
+ "type": "boolean"
1695
+ },
1682
1696
  "skip-commands": {
1683
1697
  "description": "Skip running BEFORE and AFTER shell commands configured in mj.config. Can also be set with MJ_CODEGEN_SKIP_COMMANDS=1.",
1684
1698
  "name": "skip-commands",
@@ -1712,6 +1726,10 @@
1712
1726
  {
1713
1727
  "command": "<%= config.bin %> <%= command.id %> --format=json",
1714
1728
  "description": "Emit a machine-readable result for an agent"
1729
+ },
1730
+ {
1731
+ "command": "<%= config.bin %> <%= command.id %> --all-schemas",
1732
+ "description": "Re-emit generated files for every schema (e.g. after rebuilding a database from migrations)"
1715
1733
  }
1716
1734
  ],
1717
1735
  "Usage": {
@@ -1740,6 +1758,11 @@
1740
1758
  "type": "boolean",
1741
1759
  "description": "Disable AI-driven advanced generation (same as MJ_CODEGEN_NO_AI=1)"
1742
1760
  },
1761
+ {
1762
+ "name": "--all-schemas",
1763
+ "type": "boolean",
1764
+ "description": "Re-emit generated files for every schema (same as fileEmit.dirtySchemaOnly: false)"
1765
+ },
1743
1766
  {
1744
1767
  "name": "--skip-commands",
1745
1768
  "type": "boolean",
@@ -1764,6 +1787,7 @@
1764
1787
  "examples": [
1765
1788
  "mj codegen",
1766
1789
  "mj codegen --skipdb",
1790
+ "mj codegen --all-schemas",
1767
1791
  "mj codegen --skip-commands",
1768
1792
  "mj codegen --format=json"
1769
1793
  ],
@@ -4101,34 +4125,30 @@
4101
4125
  "validate.js"
4102
4126
  ]
4103
4127
  },
4104
- "queue:backlog": {
4128
+ "rubric:diff": {
4105
4129
  "aliases": [],
4106
- "args": {},
4107
- "description": "Show the autoscaler metric for one subscription: claimable pending plus in-flight deliveries",
4108
- "examples": [
4109
- "<%= config.bin %> <%= command.id %> --subscription venue-import",
4110
- "<%= config.bin %> <%= command.id %> --subscription venue-import --json"
4111
- ],
4112
- "flags": {
4113
- "subscription": {
4114
- "char": "s",
4115
- "description": "Subscription name",
4116
- "name": "subscription",
4117
- "required": true,
4118
- "hasDynamicHelp": false,
4119
- "multiple": false,
4120
- "type": "option"
4130
+ "args": {
4131
+ "rubric": {
4132
+ "description": "Rubric name or id",
4133
+ "name": "rubric",
4134
+ "required": true
4121
4135
  },
4122
- "json": {
4123
- "description": "Print JSON instead of text",
4124
- "name": "json",
4125
- "allowNo": false,
4126
- "type": "boolean"
4136
+ "from": {
4137
+ "description": "Version 1.2.0 or id",
4138
+ "name": "from",
4139
+ "required": true
4140
+ },
4141
+ "to": {
4142
+ "description": "Version 1.2.0 or id",
4143
+ "name": "to",
4144
+ "required": true
4127
4145
  }
4128
4146
  },
4147
+ "description": "Print the version bump between two rubric versions.",
4148
+ "flags": {},
4129
4149
  "hasDynamicHelp": false,
4130
4150
  "hiddenAliases": [],
4131
- "id": "queue:backlog",
4151
+ "id": "rubric:diff",
4132
4152
  "pluginAlias": "@memberjunction/cli",
4133
4153
  "pluginName": "@memberjunction/cli",
4134
4154
  "pluginType": "core",
@@ -4138,52 +4158,76 @@
4138
4158
  "relativePath": [
4139
4159
  "dist",
4140
4160
  "commands",
4141
- "queue",
4142
- "backlog.js"
4161
+ "rubric",
4162
+ "diff.js"
4143
4163
  ]
4144
4164
  },
4145
- "queue:dead-letters": {
4165
+ "rubric:evaluate": {
4146
4166
  "aliases": [],
4147
4167
  "args": {},
4148
- "description": "List a work-queue subscription's dead-lettered deliveries",
4149
- "examples": [
4150
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --page-size 20"
4151
- ],
4168
+ "description": "Evaluate one record against a rubric. Does not publish.",
4152
4169
  "flags": {
4153
- "subscription": {
4154
- "char": "s",
4155
- "description": "Subscription name",
4156
- "name": "subscription",
4170
+ "rubric": {
4171
+ "description": "Rubric name or id, optionally @version",
4172
+ "name": "rubric",
4157
4173
  "required": true,
4158
4174
  "hasDynamicHelp": false,
4159
4175
  "multiple": false,
4160
4176
  "type": "option"
4161
4177
  },
4162
- "cursor": {
4163
- "description": "nextCursor from a previous page",
4164
- "name": "cursor",
4178
+ "entity": {
4179
+ "description": "Subject entity name",
4180
+ "name": "entity",
4181
+ "required": true,
4165
4182
  "hasDynamicHelp": false,
4166
4183
  "multiple": false,
4167
4184
  "type": "option"
4168
4185
  },
4169
- "page-size": {
4170
- "description": "Items per page (1–500)",
4171
- "name": "page-size",
4172
- "default": 50,
4186
+ "record": {
4187
+ "description": "Subject record id",
4188
+ "name": "record",
4189
+ "required": true,
4173
4190
  "hasDynamicHelp": false,
4174
4191
  "multiple": false,
4175
4192
  "type": "option"
4176
4193
  },
4177
- "json": {
4178
- "description": "Print JSON instead of a table",
4179
- "name": "json",
4180
- "allowNo": false,
4181
- "type": "boolean"
4194
+ "evaluator": {
4195
+ "description": "A registered evaluator: LLM, Decision, Agent, Deterministic, or a custom one",
4196
+ "name": "evaluator",
4197
+ "default": "LLM",
4198
+ "hasDynamicHelp": false,
4199
+ "multiple": false,
4200
+ "type": "option"
4201
+ },
4202
+ "prompt": {
4203
+ "description": "LLM: the judge prompt composed into Rubric Evaluator (default Rubric Evaluator - Default Judge). Decision: the decision prompt (default Default Decision)",
4204
+ "name": "prompt",
4205
+ "hasDynamicHelp": false,
4206
+ "multiple": false,
4207
+ "type": "option"
4208
+ },
4209
+ "model": {
4210
+ "description": "AI Model ID to pin. Otherwise the prompt's bindings choose",
4211
+ "name": "model",
4212
+ "hasDynamicHelp": false,
4213
+ "multiple": false,
4214
+ "type": "option"
4215
+ },
4216
+ "mode": {
4217
+ "description": "LLM only: SinglePass or PerCriterion",
4218
+ "name": "mode",
4219
+ "hasDynamicHelp": false,
4220
+ "multiple": false,
4221
+ "options": [
4222
+ "SinglePass",
4223
+ "PerCriterion"
4224
+ ],
4225
+ "type": "option"
4182
4226
  }
4183
4227
  },
4184
4228
  "hasDynamicHelp": false,
4185
4229
  "hiddenAliases": [],
4186
- "id": "queue:dead-letters",
4230
+ "id": "rubric:evaluate",
4187
4231
  "pluginAlias": "@memberjunction/cli",
4188
4232
  "pluginName": "@memberjunction/cli",
4189
4233
  "pluginType": "core",
@@ -4193,49 +4237,18 @@
4193
4237
  "relativePath": [
4194
4238
  "dist",
4195
4239
  "commands",
4196
- "queue",
4197
- "dead-letters.js"
4240
+ "rubric",
4241
+ "evaluate.js"
4198
4242
  ]
4199
4243
  },
4200
- "queue:discard": {
4244
+ "rubric": {
4201
4245
  "aliases": [],
4202
4246
  "args": {},
4203
- "description": "Discard one pending or dead-lettered work-queue delivery, or cancel one that is in flight",
4204
- "examples": [
4205
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --reason \"bad batch, republished\""
4206
- ],
4207
- "flags": {
4208
- "subscription": {
4209
- "char": "s",
4210
- "description": "Subscription name",
4211
- "name": "subscription",
4212
- "required": true,
4213
- "hasDynamicHelp": false,
4214
- "multiple": false,
4215
- "type": "option"
4216
- },
4217
- "delivery": {
4218
- "char": "d",
4219
- "description": "DeliveryID to discard",
4220
- "name": "delivery",
4221
- "required": true,
4222
- "hasDynamicHelp": false,
4223
- "multiple": false,
4224
- "type": "option"
4225
- },
4226
- "reason": {
4227
- "char": "r",
4228
- "description": "Why the work is dropped (at most 1000 characters)",
4229
- "name": "reason",
4230
- "required": true,
4231
- "hasDynamicHelp": false,
4232
- "multiple": false,
4233
- "type": "option"
4234
- }
4235
- },
4247
+ "description": "List, show, diff, validate, and evaluate rubrics.",
4248
+ "flags": {},
4236
4249
  "hasDynamicHelp": false,
4237
4250
  "hiddenAliases": [],
4238
- "id": "queue:discard",
4251
+ "id": "rubric",
4239
4252
  "pluginAlias": "@memberjunction/cli",
4240
4253
  "pluginName": "@memberjunction/cli",
4241
4254
  "pluginType": "core",
@@ -4245,39 +4258,18 @@
4245
4258
  "relativePath": [
4246
4259
  "dist",
4247
4260
  "commands",
4248
- "queue",
4249
- "discard.js"
4261
+ "rubric",
4262
+ "index.js"
4250
4263
  ]
4251
4264
  },
4252
- "queue:export-topology": {
4265
+ "rubric:list": {
4253
4266
  "aliases": [],
4254
4267
  "args": {},
4255
- "description": "Write the topology manifest for one transport (input to the Terraform module)",
4256
- "examples": [
4257
- "<%= config.bin %> <%= command.id %> --transport AWS-prod --output infrastructure/work-queue/manifest.json"
4258
- ],
4259
- "flags": {
4260
- "transport": {
4261
- "char": "t",
4262
- "description": "Transport name",
4263
- "name": "transport",
4264
- "required": true,
4265
- "hasDynamicHelp": false,
4266
- "multiple": false,
4267
- "type": "option"
4268
- },
4269
- "output": {
4270
- "char": "o",
4271
- "description": "File to write; stdout when omitted",
4272
- "name": "output",
4273
- "hasDynamicHelp": false,
4274
- "multiple": false,
4275
- "type": "option"
4276
- }
4277
- },
4268
+ "description": "List rubrics.",
4269
+ "flags": {},
4278
4270
  "hasDynamicHelp": false,
4279
4271
  "hiddenAliases": [],
4280
- "id": "queue:export-topology",
4272
+ "id": "rubric:list",
4281
4273
  "pluginAlias": "@memberjunction/cli",
4282
4274
  "pluginName": "@memberjunction/cli",
4283
4275
  "pluginType": "core",
@@ -4287,34 +4279,24 @@
4287
4279
  "relativePath": [
4288
4280
  "dist",
4289
4281
  "commands",
4290
- "queue",
4291
- "export-topology.js"
4282
+ "rubric",
4283
+ "list.js"
4292
4284
  ]
4293
4285
  },
4294
- "queue:import-bindings": {
4286
+ "rubric:show": {
4295
4287
  "aliases": [],
4296
4288
  "args": {
4297
- "file": {
4298
- "description": "BindingImport JSON file",
4299
- "name": "file",
4289
+ "rubric": {
4290
+ "description": "Rubric name or id, optionally @version",
4291
+ "name": "rubric",
4300
4292
  "required": true
4301
4293
  }
4302
4294
  },
4303
- "description": "Record cloud resource bindings (Terraform output) on work-queue topics and subscriptions",
4304
- "examples": [
4305
- "terraform output -json mj_work_queue_bindings > bindings.json && <%= config.bin %> <%= command.id %> bindings.json"
4306
- ],
4307
- "flags": {
4308
- "json": {
4309
- "description": "Print issues as JSON",
4310
- "name": "json",
4311
- "allowNo": false,
4312
- "type": "boolean"
4313
- }
4314
- },
4295
+ "description": "Show a rubric version and its criteria.",
4296
+ "flags": {},
4315
4297
  "hasDynamicHelp": false,
4316
4298
  "hiddenAliases": [],
4317
- "id": "queue:import-bindings",
4299
+ "id": "rubric:show",
4318
4300
  "pluginAlias": "@memberjunction/cli",
4319
4301
  "pluginName": "@memberjunction/cli",
4320
4302
  "pluginType": "core",
@@ -4324,23 +4306,24 @@
4324
4306
  "relativePath": [
4325
4307
  "dist",
4326
4308
  "commands",
4327
- "queue",
4328
- "import-bindings.js"
4309
+ "rubric",
4310
+ "show.js"
4329
4311
  ]
4330
4312
  },
4331
- "queue": {
4313
+ "rubric:validate": {
4332
4314
  "aliases": [],
4333
- "args": {},
4334
- "description": "Operate the durable work queue",
4335
- "examples": [
4336
- "<%= config.bin %> <%= command.id %> publish --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4337
- "<%= config.bin %> <%= command.id %> stats",
4338
- "<%= config.bin %> <%= command.id %> dead-letters --subscription email.unsubscribe"
4339
- ],
4315
+ "args": {
4316
+ "file": {
4317
+ "description": "JSON snapshot file",
4318
+ "name": "file",
4319
+ "required": true
4320
+ }
4321
+ },
4322
+ "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
4340
4323
  "flags": {},
4341
4324
  "hasDynamicHelp": false,
4342
4325
  "hiddenAliases": [],
4343
- "id": "queue",
4326
+ "id": "rubric:validate",
4344
4327
  "pluginAlias": "@memberjunction/cli",
4345
4328
  "pluginName": "@memberjunction/cli",
4346
4329
  "pluginType": "core",
@@ -4350,64 +4333,64 @@
4350
4333
  "relativePath": [
4351
4334
  "dist",
4352
4335
  "commands",
4353
- "queue",
4354
- "index.js"
4336
+ "rubric",
4337
+ "validate.js"
4355
4338
  ]
4356
4339
  },
4357
- "queue:partitions": {
4340
+ "sql-audit": {
4358
4341
  "aliases": [],
4359
4342
  "args": {},
4360
- "description": "List a work-queue subscription's in-flight or blocked partition keys",
4343
+ "description": "Compare source and target databases for migration verification",
4361
4344
  "examples": [
4362
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --condition Blocked"
4345
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
4346
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
4347
+ "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
4363
4348
  ],
4364
4349
  "flags": {
4365
- "subscription": {
4366
- "char": "s",
4367
- "description": "Subscription name",
4368
- "name": "subscription",
4350
+ "source": {
4351
+ "description": "Source database connection string (mssql://... or postgres://...)",
4352
+ "name": "source",
4369
4353
  "required": true,
4370
4354
  "hasDynamicHelp": false,
4371
4355
  "multiple": false,
4372
4356
  "type": "option"
4373
4357
  },
4374
- "condition": {
4375
- "description": "Only keys in this condition",
4376
- "name": "condition",
4358
+ "target": {
4359
+ "description": "Target database connection string (mssql://... or postgres://...)",
4360
+ "name": "target",
4361
+ "required": true,
4377
4362
  "hasDynamicHelp": false,
4378
4363
  "multiple": false,
4379
- "options": [
4380
- "Idle",
4381
- "InFlight",
4382
- "Blocked"
4383
- ],
4384
4364
  "type": "option"
4385
4365
  },
4386
- "cursor": {
4387
- "description": "nextCursor from a previous page",
4388
- "name": "cursor",
4366
+ "source-schema": {
4367
+ "description": "Source schema name",
4368
+ "name": "source-schema",
4369
+ "default": "__mj",
4389
4370
  "hasDynamicHelp": false,
4390
4371
  "multiple": false,
4391
4372
  "type": "option"
4392
4373
  },
4393
- "page-size": {
4394
- "description": "Items per page (1–500)",
4395
- "name": "page-size",
4396
- "default": 50,
4374
+ "target-schema": {
4375
+ "description": "Target schema name",
4376
+ "name": "target-schema",
4377
+ "default": "__mj",
4397
4378
  "hasDynamicHelp": false,
4398
4379
  "multiple": false,
4399
4380
  "type": "option"
4400
4381
  },
4401
- "json": {
4402
- "description": "Print JSON instead of a table",
4403
- "name": "json",
4404
- "allowNo": false,
4405
- "type": "boolean"
4382
+ "output": {
4383
+ "char": "o",
4384
+ "description": "Save report to file",
4385
+ "name": "output",
4386
+ "hasDynamicHelp": false,
4387
+ "multiple": false,
4388
+ "type": "option"
4406
4389
  }
4407
4390
  },
4408
4391
  "hasDynamicHelp": false,
4409
4392
  "hiddenAliases": [],
4410
- "id": "queue:partitions",
4393
+ "id": "sql-audit",
4411
4394
  "pluginAlias": "@memberjunction/cli",
4412
4395
  "pluginName": "@memberjunction/cli",
4413
4396
  "pluginType": "core",
@@ -4417,80 +4400,31 @@
4417
4400
  "relativePath": [
4418
4401
  "dist",
4419
4402
  "commands",
4420
- "queue",
4421
- "partitions.js"
4403
+ "sql-audit",
4404
+ "index.js"
4422
4405
  ]
4423
4406
  },
4424
- "queue:publish": {
4407
+ "sql-audit:usage": {
4425
4408
  "aliases": [],
4426
4409
  "args": {},
4427
- "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
4428
- "examples": [
4429
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4430
- "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
4431
- "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
4432
- ],
4410
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
4433
4411
  "flags": {
4434
- "topic": {
4435
- "char": "t",
4436
- "description": "Topic name",
4437
- "name": "topic",
4438
- "required": true,
4439
- "hasDynamicHelp": false,
4440
- "multiple": false,
4441
- "type": "option"
4442
- },
4443
- "payload": {
4444
- "char": "p",
4445
- "description": "Message payload as JSON",
4446
- "name": "payload",
4447
- "default": "{}",
4448
- "hasDynamicHelp": false,
4449
- "multiple": false,
4450
- "type": "option"
4451
- },
4452
- "partition-key": {
4453
- "char": "k",
4454
- "description": "PartitionKey for Exclusive / Ordered subscriptions",
4455
- "name": "partition-key",
4456
- "hasDynamicHelp": false,
4457
- "multiple": false,
4458
- "type": "option"
4459
- },
4460
- "dedup-key": {
4461
- "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
4462
- "name": "dedup-key",
4463
- "hasDynamicHelp": false,
4464
- "multiple": false,
4465
- "type": "option"
4466
- },
4467
- "attribute": {
4468
- "char": "a",
4469
- "description": "Message attribute as key=value (repeatable)",
4470
- "name": "attribute",
4471
- "hasDynamicHelp": false,
4472
- "multiple": true,
4473
- "type": "option"
4474
- },
4475
- "count": {
4476
- "char": "n",
4477
- "description": "How many copies to publish in one batch",
4478
- "name": "count",
4479
- "default": 1,
4412
+ "format": {
4413
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4414
+ "name": "format",
4480
4415
  "hasDynamicHelp": false,
4481
4416
  "multiple": false,
4417
+ "options": [
4418
+ "text",
4419
+ "json",
4420
+ "md"
4421
+ ],
4482
4422
  "type": "option"
4483
- },
4484
- "json": {
4485
- "description": "Print the publish results as JSON",
4486
- "name": "json",
4487
- "allowNo": false,
4488
- "type": "boolean"
4489
4423
  }
4490
4424
  },
4491
4425
  "hasDynamicHelp": false,
4492
4426
  "hiddenAliases": [],
4493
- "id": "queue:publish",
4427
+ "id": "sql-audit:usage",
4494
4428
  "pluginAlias": "@memberjunction/cli",
4495
4429
  "pluginName": "@memberjunction/cli",
4496
4430
  "pluginType": "core",
@@ -4500,87 +4434,82 @@
4500
4434
  "relativePath": [
4501
4435
  "dist",
4502
4436
  "commands",
4503
- "queue",
4504
- "publish.js"
4437
+ "sql-audit",
4438
+ "usage.js"
4505
4439
  ]
4506
4440
  },
4507
- "queue:replay": {
4441
+ "sql-convert": {
4508
4442
  "aliases": [],
4509
- "args": {},
4510
- "description": "Replay one dead-lettered work-queue delivery",
4443
+ "args": {
4444
+ "source": {
4445
+ "description": "Source SQL file path",
4446
+ "name": "source",
4447
+ "required": true
4448
+ }
4449
+ },
4450
+ "description": "Convert SQL files between database dialects using rule-based BatchConverter engine",
4511
4451
  "examples": [
4512
- "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
4452
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres",
4453
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --output converted.sql",
4454
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --schema my_schema",
4455
+ "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --no-header --verbose"
4513
4456
  ],
4514
4457
  "flags": {
4515
- "subscription": {
4516
- "char": "s",
4517
- "description": "Subscription name",
4518
- "name": "subscription",
4458
+ "from": {
4459
+ "description": "Source SQL dialect",
4460
+ "name": "from",
4519
4461
  "required": true,
4520
4462
  "hasDynamicHelp": false,
4521
4463
  "multiple": false,
4522
4464
  "type": "option"
4523
4465
  },
4524
- "delivery": {
4525
- "char": "d",
4526
- "description": "DeliveryID from `mj queue dead-letters`",
4527
- "name": "delivery",
4466
+ "to": {
4467
+ "description": "Target SQL dialect",
4468
+ "name": "to",
4528
4469
  "required": true,
4529
4470
  "hasDynamicHelp": false,
4530
4471
  "multiple": false,
4531
4472
  "type": "option"
4532
4473
  },
4533
- "note": {
4534
- "description": "Operator note stored with the resolution",
4535
- "name": "note",
4474
+ "output": {
4475
+ "char": "o",
4476
+ "description": "Output file path (default: <source>.converted.<ext>)",
4477
+ "name": "output",
4536
4478
  "hasDynamicHelp": false,
4537
4479
  "multiple": false,
4538
4480
  "type": "option"
4539
- }
4540
- },
4541
- "hasDynamicHelp": false,
4542
- "hiddenAliases": [],
4543
- "id": "queue:replay",
4544
- "pluginAlias": "@memberjunction/cli",
4545
- "pluginName": "@memberjunction/cli",
4546
- "pluginType": "core",
4547
- "strict": true,
4548
- "enableJsonFlag": false,
4549
- "isESM": true,
4550
- "relativePath": [
4551
- "dist",
4552
- "commands",
4553
- "queue",
4554
- "replay.js"
4555
- ]
4556
- },
4557
- "queue:stats": {
4558
- "aliases": [],
4559
- "args": {},
4560
- "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
4561
- "examples": [
4562
- "<%= config.bin %> <%= command.id %>",
4563
- "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
4564
- ],
4565
- "flags": {
4566
- "subscription": {
4567
- "char": "s",
4568
- "description": "Subscription name; omit for every subscription",
4569
- "name": "subscription",
4481
+ },
4482
+ "schema": {
4483
+ "description": "Target schema name",
4484
+ "name": "schema",
4485
+ "default": "__mj",
4570
4486
  "hasDynamicHelp": false,
4571
4487
  "multiple": false,
4572
4488
  "type": "option"
4573
4489
  },
4574
- "json": {
4575
- "description": "Print JSON instead of a table",
4576
- "name": "json",
4490
+ "no-header": {
4491
+ "description": "Skip PG header (extensions, schema, implicit cast)",
4492
+ "name": "no-header",
4493
+ "allowNo": false,
4494
+ "type": "boolean"
4495
+ },
4496
+ "no-post-process": {
4497
+ "description": "Skip post-processing pass",
4498
+ "name": "no-post-process",
4499
+ "allowNo": false,
4500
+ "type": "boolean"
4501
+ },
4502
+ "verbose": {
4503
+ "char": "v",
4504
+ "description": "Show per-statement progress and detailed report",
4505
+ "name": "verbose",
4577
4506
  "allowNo": false,
4578
4507
  "type": "boolean"
4579
4508
  }
4580
4509
  },
4581
4510
  "hasDynamicHelp": false,
4582
4511
  "hiddenAliases": [],
4583
- "id": "queue:stats",
4512
+ "id": "sql-convert",
4584
4513
  "pluginAlias": "@memberjunction/cli",
4585
4514
  "pluginName": "@memberjunction/cli",
4586
4515
  "pluginType": "core",
@@ -4590,14 +4519,14 @@
4590
4519
  "relativePath": [
4591
4520
  "dist",
4592
4521
  "commands",
4593
- "queue",
4594
- "stats.js"
4522
+ "sql-convert",
4523
+ "index.js"
4595
4524
  ]
4596
4525
  },
4597
- "queue:usage": {
4526
+ "sql-convert:usage": {
4598
4527
  "aliases": [],
4599
4528
  "args": {},
4600
- "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
4529
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sql-convert` command.",
4601
4530
  "flags": {
4602
4531
  "format": {
4603
4532
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -4614,7 +4543,7 @@
4614
4543
  },
4615
4544
  "hasDynamicHelp": false,
4616
4545
  "hiddenAliases": [],
4617
- "id": "queue:usage",
4546
+ "id": "sql-convert:usage",
4618
4547
  "pluginAlias": "@memberjunction/cli",
4619
4548
  "pluginName": "@memberjunction/cli",
4620
4549
  "pluginType": "core",
@@ -4624,29 +4553,30 @@
4624
4553
  "relativePath": [
4625
4554
  "dist",
4626
4555
  "commands",
4627
- "queue",
4556
+ "sql-convert",
4628
4557
  "usage.js"
4629
4558
  ]
4630
4559
  },
4631
- "queue:validate-bindings": {
4560
+ "queue:backlog": {
4632
4561
  "aliases": [],
4633
4562
  "args": {},
4634
- "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
4563
+ "description": "Show the autoscaler metric for one subscription: claimable pending plus in-flight deliveries",
4635
4564
  "examples": [
4636
- "<%= config.bin %> <%= command.id %>",
4637
- "<%= config.bin %> <%= command.id %> --transport AWS-prod"
4565
+ "<%= config.bin %> <%= command.id %> --subscription venue-import",
4566
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --json"
4638
4567
  ],
4639
4568
  "flags": {
4640
- "transport": {
4641
- "char": "t",
4642
- "description": "Validate one transport's bindings against its resources",
4643
- "name": "transport",
4569
+ "subscription": {
4570
+ "char": "s",
4571
+ "description": "Subscription name",
4572
+ "name": "subscription",
4573
+ "required": true,
4644
4574
  "hasDynamicHelp": false,
4645
4575
  "multiple": false,
4646
4576
  "type": "option"
4647
4577
  },
4648
4578
  "json": {
4649
- "description": "Print issues as JSON",
4579
+ "description": "Print JSON instead of text",
4650
4580
  "name": "json",
4651
4581
  "allowNo": false,
4652
4582
  "type": "boolean"
@@ -4654,7 +4584,7 @@
4654
4584
  },
4655
4585
  "hasDynamicHelp": false,
4656
4586
  "hiddenAliases": [],
4657
- "id": "queue:validate-bindings",
4587
+ "id": "queue:backlog",
4658
4588
  "pluginAlias": "@memberjunction/cli",
4659
4589
  "pluginName": "@memberjunction/cli",
4660
4590
  "pluginType": "core",
@@ -4665,86 +4595,51 @@
4665
4595
  "dist",
4666
4596
  "commands",
4667
4597
  "queue",
4668
- "validate-bindings.js"
4598
+ "backlog.js"
4669
4599
  ]
4670
4600
  },
4671
- "queue:work": {
4601
+ "queue:dead-letters": {
4672
4602
  "aliases": [],
4673
4603
  "args": {},
4674
- "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
4604
+ "description": "List a work-queue subscription's dead-lettered deliveries",
4675
4605
  "examples": [
4676
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
4677
- "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
4678
- "<%= config.bin %> <%= command.id %> --subscription \"*\""
4606
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --page-size 20"
4679
4607
  ],
4680
4608
  "flags": {
4681
4609
  "subscription": {
4682
4610
  "char": "s",
4683
- "description": "Subscription name, or '*' for every MJWorker subscription",
4611
+ "description": "Subscription name",
4684
4612
  "name": "subscription",
4685
4613
  "required": true,
4686
4614
  "hasDynamicHelp": false,
4687
4615
  "multiple": false,
4688
4616
  "type": "option"
4689
4617
  },
4690
- "once": {
4691
- "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
4692
- "name": "once",
4693
- "allowNo": false,
4694
- "type": "boolean"
4695
- },
4696
- "max": {
4697
- "dependsOn": [
4698
- "once"
4699
- ],
4700
- "description": "With --once: how many deliveries to receive",
4701
- "name": "max",
4702
- "default": 1,
4703
- "hasDynamicHelp": false,
4704
- "multiple": false,
4705
- "type": "option"
4706
- },
4707
- "idle-exit-ms": {
4708
- "dependsOn": [
4709
- "once"
4710
- ],
4711
- "description": "With --once: exit after this long with an empty queue",
4712
- "name": "idle-exit-ms",
4713
- "default": 5000,
4714
- "hasDynamicHelp": false,
4715
- "multiple": false,
4716
- "type": "option"
4717
- },
4718
- "max-duration-ms": {
4719
- "dependsOn": [
4720
- "once"
4721
- ],
4722
- "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
4723
- "name": "max-duration-ms",
4618
+ "cursor": {
4619
+ "description": "nextCursor from a previous page",
4620
+ "name": "cursor",
4724
4621
  "hasDynamicHelp": false,
4725
4622
  "multiple": false,
4726
4623
  "type": "option"
4727
4624
  },
4728
- "concurrency": {
4729
- "description": "Handlers in flight per subscription",
4730
- "name": "concurrency",
4731
- "default": 1,
4625
+ "page-size": {
4626
+ "description": "Items per page (1–500)",
4627
+ "name": "page-size",
4628
+ "default": 50,
4732
4629
  "hasDynamicHelp": false,
4733
4630
  "multiple": false,
4734
4631
  "type": "option"
4735
4632
  },
4736
- "shutdown-drain-ms": {
4737
- "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
4738
- "name": "shutdown-drain-ms",
4739
- "default": 30000,
4740
- "hasDynamicHelp": false,
4741
- "multiple": false,
4742
- "type": "option"
4633
+ "json": {
4634
+ "description": "Print JSON instead of a table",
4635
+ "name": "json",
4636
+ "allowNo": false,
4637
+ "type": "boolean"
4743
4638
  }
4744
4639
  },
4745
4640
  "hasDynamicHelp": false,
4746
4641
  "hiddenAliases": [],
4747
- "id": "queue:work",
4642
+ "id": "queue:dead-letters",
4748
4643
  "pluginAlias": "@memberjunction/cli",
4749
4644
  "pluginName": "@memberjunction/cli",
4750
4645
  "pluginType": "core",
@@ -4755,33 +4650,48 @@
4755
4650
  "dist",
4756
4651
  "commands",
4757
4652
  "queue",
4758
- "work.js"
4653
+ "dead-letters.js"
4759
4654
  ]
4760
4655
  },
4761
- "rubric:diff": {
4656
+ "queue:discard": {
4762
4657
  "aliases": [],
4763
- "args": {
4764
- "rubric": {
4765
- "description": "Rubric name or id",
4766
- "name": "rubric",
4767
- "required": true
4658
+ "args": {},
4659
+ "description": "Discard one pending or dead-lettered work-queue delivery, or cancel one that is in flight",
4660
+ "examples": [
4661
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --reason \"bad batch, republished\""
4662
+ ],
4663
+ "flags": {
4664
+ "subscription": {
4665
+ "char": "s",
4666
+ "description": "Subscription name",
4667
+ "name": "subscription",
4668
+ "required": true,
4669
+ "hasDynamicHelp": false,
4670
+ "multiple": false,
4671
+ "type": "option"
4768
4672
  },
4769
- "from": {
4770
- "description": "Version 1.2.0 or id",
4771
- "name": "from",
4772
- "required": true
4673
+ "delivery": {
4674
+ "char": "d",
4675
+ "description": "DeliveryID to discard",
4676
+ "name": "delivery",
4677
+ "required": true,
4678
+ "hasDynamicHelp": false,
4679
+ "multiple": false,
4680
+ "type": "option"
4773
4681
  },
4774
- "to": {
4775
- "description": "Version 1.2.0 or id",
4776
- "name": "to",
4777
- "required": true
4682
+ "reason": {
4683
+ "char": "r",
4684
+ "description": "Why the work is dropped (at most 1000 characters)",
4685
+ "name": "reason",
4686
+ "required": true,
4687
+ "hasDynamicHelp": false,
4688
+ "multiple": false,
4689
+ "type": "option"
4778
4690
  }
4779
4691
  },
4780
- "description": "Print the version bump between two rubric versions.",
4781
- "flags": {},
4782
4692
  "hasDynamicHelp": false,
4783
4693
  "hiddenAliases": [],
4784
- "id": "rubric:diff",
4694
+ "id": "queue:discard",
4785
4695
  "pluginAlias": "@memberjunction/cli",
4786
4696
  "pluginName": "@memberjunction/cli",
4787
4697
  "pluginType": "core",
@@ -4791,76 +4701,39 @@
4791
4701
  "relativePath": [
4792
4702
  "dist",
4793
4703
  "commands",
4794
- "rubric",
4795
- "diff.js"
4704
+ "queue",
4705
+ "discard.js"
4796
4706
  ]
4797
4707
  },
4798
- "rubric:evaluate": {
4708
+ "queue:export-topology": {
4799
4709
  "aliases": [],
4800
4710
  "args": {},
4801
- "description": "Evaluate one record against a rubric. Does not publish.",
4711
+ "description": "Write the topology manifest for one transport (input to the Terraform module)",
4712
+ "examples": [
4713
+ "<%= config.bin %> <%= command.id %> --transport AWS-prod --output infrastructure/work-queue/manifest.json"
4714
+ ],
4802
4715
  "flags": {
4803
- "rubric": {
4804
- "description": "Rubric name or id, optionally @version",
4805
- "name": "rubric",
4806
- "required": true,
4807
- "hasDynamicHelp": false,
4808
- "multiple": false,
4809
- "type": "option"
4810
- },
4811
- "entity": {
4812
- "description": "Subject entity name",
4813
- "name": "entity",
4814
- "required": true,
4815
- "hasDynamicHelp": false,
4816
- "multiple": false,
4817
- "type": "option"
4818
- },
4819
- "record": {
4820
- "description": "Subject record id",
4821
- "name": "record",
4716
+ "transport": {
4717
+ "char": "t",
4718
+ "description": "Transport name",
4719
+ "name": "transport",
4822
4720
  "required": true,
4823
4721
  "hasDynamicHelp": false,
4824
4722
  "multiple": false,
4825
4723
  "type": "option"
4826
4724
  },
4827
- "evaluator": {
4828
- "description": "A registered evaluator: LLM, Decision, Agent, Deterministic, or a custom one",
4829
- "name": "evaluator",
4830
- "default": "LLM",
4831
- "hasDynamicHelp": false,
4832
- "multiple": false,
4833
- "type": "option"
4834
- },
4835
- "prompt": {
4836
- "description": "LLM: the judge prompt composed into Rubric Evaluator (default Rubric Evaluator - Default Judge). Decision: the decision prompt (default Default Decision)",
4837
- "name": "prompt",
4838
- "hasDynamicHelp": false,
4839
- "multiple": false,
4840
- "type": "option"
4841
- },
4842
- "model": {
4843
- "description": "AI Model ID to pin. Otherwise the prompt's bindings choose",
4844
- "name": "model",
4845
- "hasDynamicHelp": false,
4846
- "multiple": false,
4847
- "type": "option"
4848
- },
4849
- "mode": {
4850
- "description": "LLM only: SinglePass or PerCriterion",
4851
- "name": "mode",
4725
+ "output": {
4726
+ "char": "o",
4727
+ "description": "File to write; stdout when omitted",
4728
+ "name": "output",
4852
4729
  "hasDynamicHelp": false,
4853
4730
  "multiple": false,
4854
- "options": [
4855
- "SinglePass",
4856
- "PerCriterion"
4857
- ],
4858
4731
  "type": "option"
4859
4732
  }
4860
4733
  },
4861
4734
  "hasDynamicHelp": false,
4862
4735
  "hiddenAliases": [],
4863
- "id": "rubric:evaluate",
4736
+ "id": "queue:export-topology",
4864
4737
  "pluginAlias": "@memberjunction/cli",
4865
4738
  "pluginName": "@memberjunction/cli",
4866
4739
  "pluginType": "core",
@@ -4870,18 +4743,34 @@
4870
4743
  "relativePath": [
4871
4744
  "dist",
4872
4745
  "commands",
4873
- "rubric",
4874
- "evaluate.js"
4746
+ "queue",
4747
+ "export-topology.js"
4875
4748
  ]
4876
4749
  },
4877
- "rubric": {
4750
+ "queue:import-bindings": {
4878
4751
  "aliases": [],
4879
- "args": {},
4880
- "description": "List, show, diff, validate, and evaluate rubrics.",
4881
- "flags": {},
4752
+ "args": {
4753
+ "file": {
4754
+ "description": "BindingImport JSON file",
4755
+ "name": "file",
4756
+ "required": true
4757
+ }
4758
+ },
4759
+ "description": "Record cloud resource bindings (Terraform output) on work-queue topics and subscriptions",
4760
+ "examples": [
4761
+ "terraform output -json mj_work_queue_bindings > bindings.json && <%= config.bin %> <%= command.id %> bindings.json"
4762
+ ],
4763
+ "flags": {
4764
+ "json": {
4765
+ "description": "Print issues as JSON",
4766
+ "name": "json",
4767
+ "allowNo": false,
4768
+ "type": "boolean"
4769
+ }
4770
+ },
4882
4771
  "hasDynamicHelp": false,
4883
4772
  "hiddenAliases": [],
4884
- "id": "rubric",
4773
+ "id": "queue:import-bindings",
4885
4774
  "pluginAlias": "@memberjunction/cli",
4886
4775
  "pluginName": "@memberjunction/cli",
4887
4776
  "pluginType": "core",
@@ -4891,18 +4780,23 @@
4891
4780
  "relativePath": [
4892
4781
  "dist",
4893
4782
  "commands",
4894
- "rubric",
4895
- "index.js"
4783
+ "queue",
4784
+ "import-bindings.js"
4896
4785
  ]
4897
4786
  },
4898
- "rubric:list": {
4787
+ "queue": {
4899
4788
  "aliases": [],
4900
4789
  "args": {},
4901
- "description": "List rubrics.",
4790
+ "description": "Operate the durable work queue",
4791
+ "examples": [
4792
+ "<%= config.bin %> <%= command.id %> publish --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4793
+ "<%= config.bin %> <%= command.id %> stats",
4794
+ "<%= config.bin %> <%= command.id %> dead-letters --subscription email.unsubscribe"
4795
+ ],
4902
4796
  "flags": {},
4903
4797
  "hasDynamicHelp": false,
4904
4798
  "hiddenAliases": [],
4905
- "id": "rubric:list",
4799
+ "id": "queue",
4906
4800
  "pluginAlias": "@memberjunction/cli",
4907
4801
  "pluginName": "@memberjunction/cli",
4908
4802
  "pluginType": "core",
@@ -4912,24 +4806,64 @@
4912
4806
  "relativePath": [
4913
4807
  "dist",
4914
4808
  "commands",
4915
- "rubric",
4916
- "list.js"
4809
+ "queue",
4810
+ "index.js"
4917
4811
  ]
4918
4812
  },
4919
- "rubric:show": {
4813
+ "queue:partitions": {
4920
4814
  "aliases": [],
4921
- "args": {
4922
- "rubric": {
4923
- "description": "Rubric name or id, optionally @version",
4924
- "name": "rubric",
4925
- "required": true
4815
+ "args": {},
4816
+ "description": "List a work-queue subscription's in-flight or blocked partition keys",
4817
+ "examples": [
4818
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --condition Blocked"
4819
+ ],
4820
+ "flags": {
4821
+ "subscription": {
4822
+ "char": "s",
4823
+ "description": "Subscription name",
4824
+ "name": "subscription",
4825
+ "required": true,
4826
+ "hasDynamicHelp": false,
4827
+ "multiple": false,
4828
+ "type": "option"
4829
+ },
4830
+ "condition": {
4831
+ "description": "Only keys in this condition",
4832
+ "name": "condition",
4833
+ "hasDynamicHelp": false,
4834
+ "multiple": false,
4835
+ "options": [
4836
+ "Idle",
4837
+ "InFlight",
4838
+ "Blocked"
4839
+ ],
4840
+ "type": "option"
4841
+ },
4842
+ "cursor": {
4843
+ "description": "nextCursor from a previous page",
4844
+ "name": "cursor",
4845
+ "hasDynamicHelp": false,
4846
+ "multiple": false,
4847
+ "type": "option"
4848
+ },
4849
+ "page-size": {
4850
+ "description": "Items per page (1–500)",
4851
+ "name": "page-size",
4852
+ "default": 50,
4853
+ "hasDynamicHelp": false,
4854
+ "multiple": false,
4855
+ "type": "option"
4856
+ },
4857
+ "json": {
4858
+ "description": "Print JSON instead of a table",
4859
+ "name": "json",
4860
+ "allowNo": false,
4861
+ "type": "boolean"
4926
4862
  }
4927
4863
  },
4928
- "description": "Show a rubric version and its criteria.",
4929
- "flags": {},
4930
4864
  "hasDynamicHelp": false,
4931
4865
  "hiddenAliases": [],
4932
- "id": "rubric:show",
4866
+ "id": "queue:partitions",
4933
4867
  "pluginAlias": "@memberjunction/cli",
4934
4868
  "pluginName": "@memberjunction/cli",
4935
4869
  "pluginType": "core",
@@ -4939,24 +4873,80 @@
4939
4873
  "relativePath": [
4940
4874
  "dist",
4941
4875
  "commands",
4942
- "rubric",
4943
- "show.js"
4876
+ "queue",
4877
+ "partitions.js"
4944
4878
  ]
4945
4879
  },
4946
- "rubric:validate": {
4880
+ "queue:publish": {
4947
4881
  "aliases": [],
4948
- "args": {
4949
- "file": {
4950
- "description": "JSON snapshot file",
4951
- "name": "file",
4952
- "required": true
4882
+ "args": {},
4883
+ "description": "Publish messages to a work-queue topic from this machine through MJ code (no API key needed)",
4884
+ "examples": [
4885
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"name\":\"Paul\"}'",
4886
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --payload '{\"sleepMs\":60000}' --partition-key customer-42",
4887
+ "<%= config.bin %> <%= command.id %> --topic samples.hello --count 5 --partition-key k1 --attribute source=demo"
4888
+ ],
4889
+ "flags": {
4890
+ "topic": {
4891
+ "char": "t",
4892
+ "description": "Topic name",
4893
+ "name": "topic",
4894
+ "required": true,
4895
+ "hasDynamicHelp": false,
4896
+ "multiple": false,
4897
+ "type": "option"
4898
+ },
4899
+ "payload": {
4900
+ "char": "p",
4901
+ "description": "Message payload as JSON",
4902
+ "name": "payload",
4903
+ "default": "{}",
4904
+ "hasDynamicHelp": false,
4905
+ "multiple": false,
4906
+ "type": "option"
4907
+ },
4908
+ "partition-key": {
4909
+ "char": "k",
4910
+ "description": "PartitionKey for Exclusive / Ordered subscriptions",
4911
+ "name": "partition-key",
4912
+ "hasDynamicHelp": false,
4913
+ "multiple": false,
4914
+ "type": "option"
4915
+ },
4916
+ "dedup-key": {
4917
+ "description": "DeduplicationKey: a repeat within the topic TTL is reported as Duplicate",
4918
+ "name": "dedup-key",
4919
+ "hasDynamicHelp": false,
4920
+ "multiple": false,
4921
+ "type": "option"
4922
+ },
4923
+ "attribute": {
4924
+ "char": "a",
4925
+ "description": "Message attribute as key=value (repeatable)",
4926
+ "name": "attribute",
4927
+ "hasDynamicHelp": false,
4928
+ "multiple": true,
4929
+ "type": "option"
4930
+ },
4931
+ "count": {
4932
+ "char": "n",
4933
+ "description": "How many copies to publish in one batch",
4934
+ "name": "count",
4935
+ "default": 1,
4936
+ "hasDynamicHelp": false,
4937
+ "multiple": false,
4938
+ "type": "option"
4939
+ },
4940
+ "json": {
4941
+ "description": "Print the publish results as JSON",
4942
+ "name": "json",
4943
+ "allowNo": false,
4944
+ "type": "boolean"
4953
4945
  }
4954
4946
  },
4955
- "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
4956
- "flags": {},
4957
4947
  "hasDynamicHelp": false,
4958
4948
  "hiddenAliases": [],
4959
- "id": "rubric:validate",
4949
+ "id": "queue:publish",
4960
4950
  "pluginAlias": "@memberjunction/cli",
4961
4951
  "pluginName": "@memberjunction/cli",
4962
4952
  "pluginType": "core",
@@ -4966,64 +4956,87 @@
4966
4956
  "relativePath": [
4967
4957
  "dist",
4968
4958
  "commands",
4969
- "rubric",
4970
- "validate.js"
4959
+ "queue",
4960
+ "publish.js"
4971
4961
  ]
4972
4962
  },
4973
- "sql-audit": {
4963
+ "queue:replay": {
4974
4964
  "aliases": [],
4975
4965
  "args": {},
4976
- "description": "Compare source and target databases for migration verification",
4966
+ "description": "Replay one dead-lettered work-queue delivery",
4977
4967
  "examples": [
4978
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\"",
4979
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --output report.txt",
4980
- "<%= config.bin %> sql-audit --source \"mssql://sa:pass@host/db\" --target \"postgres://user:pass@host:5432/db\" --source-schema __mj --target-schema __mj"
4968
+ "<%= config.bin %> <%= command.id %> --subscription integration.apply --delivery <id> --note \"mapping fixed\""
4981
4969
  ],
4982
4970
  "flags": {
4983
- "source": {
4984
- "description": "Source database connection string (mssql://... or postgres://...)",
4985
- "name": "source",
4971
+ "subscription": {
4972
+ "char": "s",
4973
+ "description": "Subscription name",
4974
+ "name": "subscription",
4986
4975
  "required": true,
4987
4976
  "hasDynamicHelp": false,
4988
4977
  "multiple": false,
4989
4978
  "type": "option"
4990
4979
  },
4991
- "target": {
4992
- "description": "Target database connection string (mssql://... or postgres://...)",
4993
- "name": "target",
4980
+ "delivery": {
4981
+ "char": "d",
4982
+ "description": "DeliveryID from `mj queue dead-letters`",
4983
+ "name": "delivery",
4994
4984
  "required": true,
4995
4985
  "hasDynamicHelp": false,
4996
4986
  "multiple": false,
4997
4987
  "type": "option"
4998
4988
  },
4999
- "source-schema": {
5000
- "description": "Source schema name",
5001
- "name": "source-schema",
5002
- "default": "__mj",
4989
+ "note": {
4990
+ "description": "Operator note stored with the resolution",
4991
+ "name": "note",
5003
4992
  "hasDynamicHelp": false,
5004
4993
  "multiple": false,
5005
4994
  "type": "option"
5006
- },
5007
- "target-schema": {
5008
- "description": "Target schema name",
5009
- "name": "target-schema",
5010
- "default": "__mj",
4995
+ }
4996
+ },
4997
+ "hasDynamicHelp": false,
4998
+ "hiddenAliases": [],
4999
+ "id": "queue:replay",
5000
+ "pluginAlias": "@memberjunction/cli",
5001
+ "pluginName": "@memberjunction/cli",
5002
+ "pluginType": "core",
5003
+ "strict": true,
5004
+ "enableJsonFlag": false,
5005
+ "isESM": true,
5006
+ "relativePath": [
5007
+ "dist",
5008
+ "commands",
5009
+ "queue",
5010
+ "replay.js"
5011
+ ]
5012
+ },
5013
+ "queue:stats": {
5014
+ "aliases": [],
5015
+ "args": {},
5016
+ "description": "Show pending, in-flight and dead-lettered counts for work-queue subscriptions",
5017
+ "examples": [
5018
+ "<%= config.bin %> <%= command.id %>",
5019
+ "<%= config.bin %> <%= command.id %> --subscription email.unsubscribe --json"
5020
+ ],
5021
+ "flags": {
5022
+ "subscription": {
5023
+ "char": "s",
5024
+ "description": "Subscription name; omit for every subscription",
5025
+ "name": "subscription",
5011
5026
  "hasDynamicHelp": false,
5012
5027
  "multiple": false,
5013
5028
  "type": "option"
5014
5029
  },
5015
- "output": {
5016
- "char": "o",
5017
- "description": "Save report to file",
5018
- "name": "output",
5019
- "hasDynamicHelp": false,
5020
- "multiple": false,
5021
- "type": "option"
5030
+ "json": {
5031
+ "description": "Print JSON instead of a table",
5032
+ "name": "json",
5033
+ "allowNo": false,
5034
+ "type": "boolean"
5022
5035
  }
5023
5036
  },
5024
5037
  "hasDynamicHelp": false,
5025
5038
  "hiddenAliases": [],
5026
- "id": "sql-audit",
5039
+ "id": "queue:stats",
5027
5040
  "pluginAlias": "@memberjunction/cli",
5028
5041
  "pluginName": "@memberjunction/cli",
5029
5042
  "pluginType": "core",
@@ -5033,14 +5046,38 @@
5033
5046
  "relativePath": [
5034
5047
  "dist",
5035
5048
  "commands",
5036
- "sql-audit",
5037
- "index.js"
5049
+ "queue",
5050
+ "stats.js"
5038
5051
  ]
5039
5052
  },
5040
- "sql-audit:usage": {
5053
+ "queue:sweep": {
5054
+ "aliases": [],
5055
+ "args": {},
5056
+ "description": "Run one work-queue sweeper pass (lease expiry, retention, dedup purge) and print what it did",
5057
+ "examples": [
5058
+ "<%= config.bin %> <%= command.id %>"
5059
+ ],
5060
+ "flags": {},
5061
+ "hasDynamicHelp": false,
5062
+ "hiddenAliases": [],
5063
+ "id": "queue:sweep",
5064
+ "pluginAlias": "@memberjunction/cli",
5065
+ "pluginName": "@memberjunction/cli",
5066
+ "pluginType": "core",
5067
+ "strict": true,
5068
+ "enableJsonFlag": false,
5069
+ "isESM": true,
5070
+ "relativePath": [
5071
+ "dist",
5072
+ "commands",
5073
+ "queue",
5074
+ "sweep.js"
5075
+ ]
5076
+ },
5077
+ "queue:usage": {
5041
5078
  "aliases": [],
5042
5079
  "args": {},
5043
- "description": "Show usage, flags, examples, and runtime hints for every `mj sql-audit` command.",
5080
+ "description": "Show usage, flags, examples, and runtime hints for every `mj queue` command.",
5044
5081
  "flags": {
5045
5082
  "format": {
5046
5083
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -5057,7 +5094,7 @@
5057
5094
  },
5058
5095
  "hasDynamicHelp": false,
5059
5096
  "hiddenAliases": [],
5060
- "id": "sql-audit:usage",
5097
+ "id": "queue:usage",
5061
5098
  "pluginAlias": "@memberjunction/cli",
5062
5099
  "pluginName": "@memberjunction/cli",
5063
5100
  "pluginType": "core",
@@ -5067,82 +5104,37 @@
5067
5104
  "relativePath": [
5068
5105
  "dist",
5069
5106
  "commands",
5070
- "sql-audit",
5107
+ "queue",
5071
5108
  "usage.js"
5072
5109
  ]
5073
5110
  },
5074
- "sql-convert": {
5111
+ "queue:validate-bindings": {
5075
5112
  "aliases": [],
5076
- "args": {
5077
- "source": {
5078
- "description": "Source SQL file path",
5079
- "name": "source",
5080
- "required": true
5081
- }
5082
- },
5083
- "description": "Convert SQL files between database dialects using rule-based BatchConverter engine",
5113
+ "args": {},
5114
+ "description": "Validate work-queue topology and cloud bindings; exits 1 on any error",
5084
5115
  "examples": [
5085
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres",
5086
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --output converted.sql",
5087
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --schema my_schema",
5088
- "<%= config.bin %> sql-convert ./migration.sql --from tsql --to postgres --no-header --verbose"
5116
+ "<%= config.bin %> <%= command.id %>",
5117
+ "<%= config.bin %> <%= command.id %> --transport AWS-prod"
5089
5118
  ],
5090
5119
  "flags": {
5091
- "from": {
5092
- "description": "Source SQL dialect",
5093
- "name": "from",
5094
- "required": true,
5095
- "hasDynamicHelp": false,
5096
- "multiple": false,
5097
- "type": "option"
5098
- },
5099
- "to": {
5100
- "description": "Target SQL dialect",
5101
- "name": "to",
5102
- "required": true,
5103
- "hasDynamicHelp": false,
5104
- "multiple": false,
5105
- "type": "option"
5106
- },
5107
- "output": {
5108
- "char": "o",
5109
- "description": "Output file path (default: <source>.converted.<ext>)",
5110
- "name": "output",
5111
- "hasDynamicHelp": false,
5112
- "multiple": false,
5113
- "type": "option"
5114
- },
5115
- "schema": {
5116
- "description": "Target schema name",
5117
- "name": "schema",
5118
- "default": "__mj",
5120
+ "transport": {
5121
+ "char": "t",
5122
+ "description": "Validate one transport's bindings against its resources",
5123
+ "name": "transport",
5119
5124
  "hasDynamicHelp": false,
5120
5125
  "multiple": false,
5121
5126
  "type": "option"
5122
5127
  },
5123
- "no-header": {
5124
- "description": "Skip PG header (extensions, schema, implicit cast)",
5125
- "name": "no-header",
5126
- "allowNo": false,
5127
- "type": "boolean"
5128
- },
5129
- "no-post-process": {
5130
- "description": "Skip post-processing pass",
5131
- "name": "no-post-process",
5132
- "allowNo": false,
5133
- "type": "boolean"
5134
- },
5135
- "verbose": {
5136
- "char": "v",
5137
- "description": "Show per-statement progress and detailed report",
5138
- "name": "verbose",
5128
+ "json": {
5129
+ "description": "Print issues as JSON",
5130
+ "name": "json",
5139
5131
  "allowNo": false,
5140
5132
  "type": "boolean"
5141
5133
  }
5142
5134
  },
5143
5135
  "hasDynamicHelp": false,
5144
5136
  "hiddenAliases": [],
5145
- "id": "sql-convert",
5137
+ "id": "queue:validate-bindings",
5146
5138
  "pluginAlias": "@memberjunction/cli",
5147
5139
  "pluginName": "@memberjunction/cli",
5148
5140
  "pluginType": "core",
@@ -5152,31 +5144,103 @@
5152
5144
  "relativePath": [
5153
5145
  "dist",
5154
5146
  "commands",
5155
- "sql-convert",
5156
- "index.js"
5147
+ "queue",
5148
+ "validate-bindings.js"
5157
5149
  ]
5158
5150
  },
5159
- "sql-convert:usage": {
5151
+ "queue:work": {
5160
5152
  "aliases": [],
5161
5153
  "args": {},
5162
- "description": "Show usage, flags, examples, and runtime hints for every `mj sql-convert` command.",
5154
+ "description": "Run work-queue subscriptions in this process: once for a container job, or until stopped",
5155
+ "examples": [
5156
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once",
5157
+ "<%= config.bin %> <%= command.id %> --subscription venue-import --once --max 5 --concurrency 2 --max-duration-ms 3300000",
5158
+ "<%= config.bin %> <%= command.id %> --subscription \"*\""
5159
+ ],
5163
5160
  "flags": {
5164
- "format": {
5165
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5166
- "name": "format",
5161
+ "subscription": {
5162
+ "char": "s",
5163
+ "description": "Subscription name, or '*' for every MJWorker subscription",
5164
+ "name": "subscription",
5165
+ "required": true,
5167
5166
  "hasDynamicHelp": false,
5168
5167
  "multiple": false,
5169
- "options": [
5170
- "text",
5171
- "json",
5172
- "md"
5168
+ "type": "option"
5169
+ },
5170
+ "once": {
5171
+ "description": "Receive up to --max deliveries, drain and exit (container-job mode)",
5172
+ "name": "once",
5173
+ "allowNo": false,
5174
+ "type": "boolean"
5175
+ },
5176
+ "max": {
5177
+ "dependsOn": [
5178
+ "once"
5179
+ ],
5180
+ "description": "With --once: how many deliveries to receive",
5181
+ "name": "max",
5182
+ "default": 1,
5183
+ "hasDynamicHelp": false,
5184
+ "multiple": false,
5185
+ "type": "option"
5186
+ },
5187
+ "idle-exit-ms": {
5188
+ "dependsOn": [
5189
+ "once"
5190
+ ],
5191
+ "description": "With --once: exit after this long with an empty queue",
5192
+ "name": "idle-exit-ms",
5193
+ "default": 5000,
5194
+ "hasDynamicHelp": false,
5195
+ "multiple": false,
5196
+ "type": "option"
5197
+ },
5198
+ "max-duration-ms": {
5199
+ "dependsOn": [
5200
+ "once"
5173
5201
  ],
5202
+ "description": "With --once: stop claiming after this long and drain (keep it below the scheduler's job deadline)",
5203
+ "name": "max-duration-ms",
5204
+ "hasDynamicHelp": false,
5205
+ "multiple": false,
5206
+ "type": "option"
5207
+ },
5208
+ "concurrency": {
5209
+ "description": "Handlers in flight per subscription",
5210
+ "name": "concurrency",
5211
+ "default": 1,
5212
+ "hasDynamicHelp": false,
5213
+ "multiple": false,
5214
+ "type": "option"
5215
+ },
5216
+ "shutdown-drain-ms": {
5217
+ "description": "How long in-flight handlers get to finish on exit; the drain can take twice this",
5218
+ "name": "shutdown-drain-ms",
5219
+ "default": 30000,
5220
+ "hasDynamicHelp": false,
5221
+ "multiple": false,
5222
+ "type": "option"
5223
+ },
5224
+ "sweeper-interval-ms": {
5225
+ "description": "Without --once: how often to run the sweeper (lease expiry, retention, dedup purge); 0 turns it off",
5226
+ "name": "sweeper-interval-ms",
5227
+ "default": 300000,
5228
+ "hasDynamicHelp": false,
5229
+ "multiple": false,
5230
+ "type": "option"
5231
+ },
5232
+ "reconcile-interval-ms": {
5233
+ "description": "Without --once: how often to re-plan subscriptions; 0 turns it off",
5234
+ "name": "reconcile-interval-ms",
5235
+ "default": 30000,
5236
+ "hasDynamicHelp": false,
5237
+ "multiple": false,
5174
5238
  "type": "option"
5175
5239
  }
5176
5240
  },
5177
5241
  "hasDynamicHelp": false,
5178
5242
  "hiddenAliases": [],
5179
- "id": "sql-convert:usage",
5243
+ "id": "queue:work",
5180
5244
  "pluginAlias": "@memberjunction/cli",
5181
5245
  "pluginName": "@memberjunction/cli",
5182
5246
  "pluginType": "core",
@@ -5186,8 +5250,8 @@
5186
5250
  "relativePath": [
5187
5251
  "dist",
5188
5252
  "commands",
5189
- "sql-convert",
5190
- "usage.js"
5253
+ "queue",
5254
+ "work.js"
5191
5255
  ]
5192
5256
  },
5193
5257
  "standards:adopt": {
@@ -5305,30 +5369,100 @@
5305
5369
  "hasDynamicHelp": false,
5306
5370
  "multiple": false,
5307
5371
  "type": "option"
5308
- },
5309
- "check": {
5310
- "description": "Only run these check ids.",
5311
- "name": "check",
5312
- "hasDynamicHelp": false,
5313
- "multiple": true,
5314
- "type": "option"
5315
- },
5316
- "strict": {
5317
- "description": "Treat warnings as errors. Use in CI once a newly adopted check is clean.",
5318
- "name": "strict",
5319
- "allowNo": false,
5320
- "type": "boolean"
5321
- },
5322
- "quiet": {
5323
- "description": "Print only the summary line.",
5324
- "name": "quiet",
5325
- "allowNo": false,
5326
- "type": "boolean"
5372
+ },
5373
+ "check": {
5374
+ "description": "Only run these check ids.",
5375
+ "name": "check",
5376
+ "hasDynamicHelp": false,
5377
+ "multiple": true,
5378
+ "type": "option"
5379
+ },
5380
+ "strict": {
5381
+ "description": "Treat warnings as errors. Use in CI once a newly adopted check is clean.",
5382
+ "name": "strict",
5383
+ "allowNo": false,
5384
+ "type": "boolean"
5385
+ },
5386
+ "quiet": {
5387
+ "description": "Print only the summary line.",
5388
+ "name": "quiet",
5389
+ "allowNo": false,
5390
+ "type": "boolean"
5391
+ }
5392
+ },
5393
+ "hasDynamicHelp": false,
5394
+ "hiddenAliases": [],
5395
+ "id": "standards:check",
5396
+ "pluginAlias": "@memberjunction/cli",
5397
+ "pluginName": "@memberjunction/cli",
5398
+ "pluginType": "core",
5399
+ "strict": true,
5400
+ "enableJsonFlag": false,
5401
+ "isESM": true,
5402
+ "relativePath": [
5403
+ "dist",
5404
+ "commands",
5405
+ "standards",
5406
+ "check.js"
5407
+ ]
5408
+ },
5409
+ "standards:list": {
5410
+ "aliases": [],
5411
+ "args": {},
5412
+ "description": "List every MemberJunction standard and this repository’s stance on it",
5413
+ "flags": {
5414
+ "cwd": {
5415
+ "description": "Repository root. Defaults to the current directory.",
5416
+ "name": "cwd",
5417
+ "hasDynamicHelp": false,
5418
+ "multiple": false,
5419
+ "type": "option"
5420
+ },
5421
+ "verbose": {
5422
+ "char": "v",
5423
+ "description": "Include the full description of each standard.",
5424
+ "name": "verbose",
5425
+ "allowNo": false,
5426
+ "type": "boolean"
5427
+ }
5428
+ },
5429
+ "hasDynamicHelp": false,
5430
+ "hiddenAliases": [],
5431
+ "id": "standards:list",
5432
+ "pluginAlias": "@memberjunction/cli",
5433
+ "pluginName": "@memberjunction/cli",
5434
+ "pluginType": "core",
5435
+ "strict": true,
5436
+ "enableJsonFlag": false,
5437
+ "isESM": true,
5438
+ "relativePath": [
5439
+ "dist",
5440
+ "commands",
5441
+ "standards",
5442
+ "list.js"
5443
+ ]
5444
+ },
5445
+ "standards:usage": {
5446
+ "aliases": [],
5447
+ "args": {},
5448
+ "description": "Show usage, flags, examples, and runtime hints for every `mj standards` command.",
5449
+ "flags": {
5450
+ "format": {
5451
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5452
+ "name": "format",
5453
+ "hasDynamicHelp": false,
5454
+ "multiple": false,
5455
+ "options": [
5456
+ "text",
5457
+ "json",
5458
+ "md"
5459
+ ],
5460
+ "type": "option"
5327
5461
  }
5328
5462
  },
5329
5463
  "hasDynamicHelp": false,
5330
5464
  "hiddenAliases": [],
5331
- "id": "standards:check",
5465
+ "id": "standards:usage",
5332
5466
  "pluginAlias": "@memberjunction/cli",
5333
5467
  "pluginName": "@memberjunction/cli",
5334
5468
  "pluginType": "core",
@@ -5339,32 +5473,95 @@
5339
5473
  "dist",
5340
5474
  "commands",
5341
5475
  "standards",
5342
- "check.js"
5476
+ "usage.js"
5343
5477
  ]
5344
5478
  },
5345
- "standards:list": {
5479
+ "translate-sql": {
5346
5480
  "aliases": [],
5347
5481
  "args": {},
5348
- "description": "List every MemberJunction standard and this repository’s stance on it",
5482
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
5483
+ "examples": [
5484
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
5485
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
5486
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
5487
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
5488
+ ],
5349
5489
  "flags": {
5350
- "cwd": {
5351
- "description": "Repository root. Defaults to the current directory.",
5352
- "name": "cwd",
5490
+ "from": {
5491
+ "description": "Source SQL dialect",
5492
+ "name": "from",
5493
+ "required": true,
5353
5494
  "hasDynamicHelp": false,
5354
5495
  "multiple": false,
5496
+ "options": [
5497
+ "sqlserver",
5498
+ "postgresql"
5499
+ ],
5355
5500
  "type": "option"
5356
5501
  },
5357
- "verbose": {
5358
- "char": "v",
5359
- "description": "Include the full description of each standard.",
5360
- "name": "verbose",
5502
+ "to": {
5503
+ "description": "Target SQL dialect",
5504
+ "name": "to",
5505
+ "required": true,
5506
+ "hasDynamicHelp": false,
5507
+ "multiple": false,
5508
+ "options": [
5509
+ "sqlserver",
5510
+ "postgresql"
5511
+ ],
5512
+ "type": "option"
5513
+ },
5514
+ "scope": {
5515
+ "description": "What to scan for translation",
5516
+ "name": "scope",
5517
+ "default": "all",
5518
+ "hasDynamicHelp": false,
5519
+ "multiple": false,
5520
+ "options": [
5521
+ "queries",
5522
+ "views",
5523
+ "filters",
5524
+ "all"
5525
+ ],
5526
+ "type": "option"
5527
+ },
5528
+ "sql": {
5529
+ "description": "Translate a single SQL fragment (inline mode)",
5530
+ "name": "sql",
5531
+ "hasDynamicHelp": false,
5532
+ "multiple": false,
5533
+ "type": "option"
5534
+ },
5535
+ "dry-run": {
5536
+ "description": "Show what would be translated without making changes",
5537
+ "name": "dry-run",
5538
+ "allowNo": false,
5539
+ "type": "boolean"
5540
+ },
5541
+ "review": {
5542
+ "description": "Generate review report only (no writes to database)",
5543
+ "name": "review",
5544
+ "allowNo": false,
5545
+ "type": "boolean"
5546
+ },
5547
+ "output": {
5548
+ "char": "o",
5549
+ "description": "Output directory for the translation report",
5550
+ "name": "output",
5551
+ "hasDynamicHelp": false,
5552
+ "multiple": false,
5553
+ "type": "option"
5554
+ },
5555
+ "force": {
5556
+ "description": "Re-translate even if platform variants already exist",
5557
+ "name": "force",
5361
5558
  "allowNo": false,
5362
5559
  "type": "boolean"
5363
5560
  }
5364
5561
  },
5365
5562
  "hasDynamicHelp": false,
5366
5563
  "hiddenAliases": [],
5367
- "id": "standards:list",
5564
+ "id": "translate-sql",
5368
5565
  "pluginAlias": "@memberjunction/cli",
5369
5566
  "pluginName": "@memberjunction/cli",
5370
5567
  "pluginType": "core",
@@ -5374,14 +5571,14 @@
5374
5571
  "relativePath": [
5375
5572
  "dist",
5376
5573
  "commands",
5377
- "standards",
5378
- "list.js"
5574
+ "translate-sql",
5575
+ "index.js"
5379
5576
  ]
5380
5577
  },
5381
- "standards:usage": {
5578
+ "translate-sql:usage": {
5382
5579
  "aliases": [],
5383
5580
  "args": {},
5384
- "description": "Show usage, flags, examples, and runtime hints for every `mj standards` command.",
5581
+ "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
5385
5582
  "flags": {
5386
5583
  "format": {
5387
5584
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -5398,7 +5595,7 @@
5398
5595
  },
5399
5596
  "hasDynamicHelp": false,
5400
5597
  "hiddenAliases": [],
5401
- "id": "standards:usage",
5598
+ "id": "translate-sql:usage",
5402
5599
  "pluginAlias": "@memberjunction/cli",
5403
5600
  "pluginName": "@memberjunction/cli",
5404
5601
  "pluginType": "core",
@@ -5408,7 +5605,7 @@
5408
5605
  "relativePath": [
5409
5606
  "dist",
5410
5607
  "commands",
5411
- "standards",
5608
+ "translate-sql",
5412
5609
  "usage.js"
5413
5610
  ]
5414
5611
  },
@@ -7006,139 +7203,6 @@
7006
7203
  "validate.js"
7007
7204
  ]
7008
7205
  },
7009
- "translate-sql": {
7010
- "aliases": [],
7011
- "args": {},
7012
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
7013
- "examples": [
7014
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
7015
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
7016
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
7017
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
7018
- ],
7019
- "flags": {
7020
- "from": {
7021
- "description": "Source SQL dialect",
7022
- "name": "from",
7023
- "required": true,
7024
- "hasDynamicHelp": false,
7025
- "multiple": false,
7026
- "options": [
7027
- "sqlserver",
7028
- "postgresql"
7029
- ],
7030
- "type": "option"
7031
- },
7032
- "to": {
7033
- "description": "Target SQL dialect",
7034
- "name": "to",
7035
- "required": true,
7036
- "hasDynamicHelp": false,
7037
- "multiple": false,
7038
- "options": [
7039
- "sqlserver",
7040
- "postgresql"
7041
- ],
7042
- "type": "option"
7043
- },
7044
- "scope": {
7045
- "description": "What to scan for translation",
7046
- "name": "scope",
7047
- "default": "all",
7048
- "hasDynamicHelp": false,
7049
- "multiple": false,
7050
- "options": [
7051
- "queries",
7052
- "views",
7053
- "filters",
7054
- "all"
7055
- ],
7056
- "type": "option"
7057
- },
7058
- "sql": {
7059
- "description": "Translate a single SQL fragment (inline mode)",
7060
- "name": "sql",
7061
- "hasDynamicHelp": false,
7062
- "multiple": false,
7063
- "type": "option"
7064
- },
7065
- "dry-run": {
7066
- "description": "Show what would be translated without making changes",
7067
- "name": "dry-run",
7068
- "allowNo": false,
7069
- "type": "boolean"
7070
- },
7071
- "review": {
7072
- "description": "Generate review report only (no writes to database)",
7073
- "name": "review",
7074
- "allowNo": false,
7075
- "type": "boolean"
7076
- },
7077
- "output": {
7078
- "char": "o",
7079
- "description": "Output directory for the translation report",
7080
- "name": "output",
7081
- "hasDynamicHelp": false,
7082
- "multiple": false,
7083
- "type": "option"
7084
- },
7085
- "force": {
7086
- "description": "Re-translate even if platform variants already exist",
7087
- "name": "force",
7088
- "allowNo": false,
7089
- "type": "boolean"
7090
- }
7091
- },
7092
- "hasDynamicHelp": false,
7093
- "hiddenAliases": [],
7094
- "id": "translate-sql",
7095
- "pluginAlias": "@memberjunction/cli",
7096
- "pluginName": "@memberjunction/cli",
7097
- "pluginType": "core",
7098
- "strict": true,
7099
- "enableJsonFlag": false,
7100
- "isESM": true,
7101
- "relativePath": [
7102
- "dist",
7103
- "commands",
7104
- "translate-sql",
7105
- "index.js"
7106
- ]
7107
- },
7108
- "translate-sql:usage": {
7109
- "aliases": [],
7110
- "args": {},
7111
- "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
7112
- "flags": {
7113
- "format": {
7114
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
7115
- "name": "format",
7116
- "hasDynamicHelp": false,
7117
- "multiple": false,
7118
- "options": [
7119
- "text",
7120
- "json",
7121
- "md"
7122
- ],
7123
- "type": "option"
7124
- }
7125
- },
7126
- "hasDynamicHelp": false,
7127
- "hiddenAliases": [],
7128
- "id": "translate-sql:usage",
7129
- "pluginAlias": "@memberjunction/cli",
7130
- "pluginName": "@memberjunction/cli",
7131
- "pluginType": "core",
7132
- "strict": true,
7133
- "enableJsonFlag": false,
7134
- "isESM": true,
7135
- "relativePath": [
7136
- "dist",
7137
- "commands",
7138
- "translate-sql",
7139
- "usage.js"
7140
- ]
7141
- },
7142
7206
  "update:claude": {
7143
7207
  "aliases": [],
7144
7208
  "args": {},
@@ -8768,5 +8832,5 @@
8768
8832
  ]
8769
8833
  }
8770
8834
  },
8771
- "version": "6.3.0-edge.0"
8835
+ "version": "6.3.0-edge.1"
8772
8836
  }