@runa-ai/runa-cli 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{build-BXUJKYHC.js → build-V66FAQXB.js} +152 -163
  2. package/dist/{cache-H63JKFYH.js → cache-N7WNPEYF.js} +2 -3
  3. package/dist/check-LOMVIRHX.js +12 -0
  4. package/dist/{chunk-HPYJPB5Y.js → chunk-2APB25TT.js} +44 -10
  5. package/dist/chunk-3WDV32GA.js +33 -0
  6. package/dist/chunk-5FT3F36G.js +59 -0
  7. package/dist/{chunk-7QV7U6NI.js → chunk-6FAU4IGR.js} +2 -1
  8. package/dist/{chunk-CE3DEYFT.js → chunk-7B5C6U2K.js} +2 -208
  9. package/dist/{chunk-GOGRLQNP.js → chunk-AIP6MR42.js} +1 -1
  10. package/dist/chunk-FHG3ILE4.js +2011 -0
  11. package/dist/{chunk-22CS6EMA.js → chunk-H2AHNI75.js} +1 -1
  12. package/dist/{chunk-UU55OH7P.js → chunk-KE6QJBZG.js} +2 -3
  13. package/dist/{check-6AB5NGWK.js → chunk-QM53IQHM.js} +14 -12
  14. package/dist/{chunk-RRGQCUKT.js → chunk-WJXC4MVY.js} +30 -3
  15. package/dist/chunk-XDCHRVE3.js +215 -0
  16. package/dist/{chunk-P7U52PBY.js → chunk-Z4Z5DNW4.js} +49 -2
  17. package/dist/{ci-V3PIG2GI.js → ci-ZWRVWNFX.js} +1108 -132
  18. package/dist/cli/contract-output.d.ts +1 -0
  19. package/dist/{cli-GFRZCJQR.js → cli-2JNBJUBB.js} +216 -173
  20. package/dist/commands/build/actors/validate.d.ts +2 -0
  21. package/dist/commands/check/commands/check.d.ts +8 -3
  22. package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +9 -6
  23. package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +55 -0
  24. package/dist/commands/ci/machine/actors/db/schema-stats.d.ts +11 -0
  25. package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +9 -1
  26. package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts +3 -3
  27. package/dist/commands/ci/machine/types.d.ts +2 -0
  28. package/dist/commands/ci/utils/execa-helpers.d.ts +1 -0
  29. package/dist/commands/db/commands/db-sync/error-classifier.d.ts +9 -0
  30. package/dist/commands/dev/actors/index.d.ts +5 -0
  31. package/dist/commands/dev/actors/tables-manifest.d.ts +16 -0
  32. package/dist/commands/dev/contract.d.ts +1 -1
  33. package/dist/commands/dev/guards.d.ts +24 -0
  34. package/dist/commands/dev/machine.d.ts +22 -3
  35. package/dist/commands/dev/types.d.ts +2 -0
  36. package/dist/commands/doctor.d.ts +9 -0
  37. package/dist/commands/inject-test-attrs/defaults.d.ts +9 -0
  38. package/dist/commands/utils/machine-state-logging.d.ts +20 -0
  39. package/dist/commands/utils/repo-root.d.ts +2 -0
  40. package/dist/{db-HR7CREX2.js → db-XULCILOU.js} +440 -2216
  41. package/dist/{dev-A7RW6XQV.js → dev-5YXNPTCJ.js} +168 -49
  42. package/dist/doctor-MZLOA53G.js +44 -0
  43. package/dist/{env-B47Z4747.js → env-SS66PZ4B.js} +6 -7
  44. package/dist/{env-files-K2C7O7L5.js → env-files-2UIUYLLR.js} +2 -2
  45. package/dist/{error-handler-4EYSDOSE.js → error-handler-HEXBRNVV.js} +2 -2
  46. package/dist/{hotfix-CULKKMGS.js → hotfix-YA3DGLOM.js} +3 -3
  47. package/dist/index.js +4 -4
  48. package/dist/{init-ELK5QCWR.js → init-ZIL6LRFO.js} +5 -6
  49. package/dist/{inject-test-attrs-Y5UD5P7Q.js → inject-test-attrs-P44BVTQS.js} +5 -18
  50. package/dist/{link-C43JRZWY.js → link-VSNDVZZD.js} +2 -3
  51. package/dist/manifest-TMFLESHW.js +19 -0
  52. package/dist/{risk-detector-BXUY2WKS.js → risk-detector-4U6ZJ2G5.js} +1 -1
  53. package/dist/{risk-detector-core-O7I7SPR7.js → risk-detector-core-TK4OAI3N.js} +2 -2
  54. package/dist/{risk-detector-plpgsql-SGMVKYJP.js → risk-detector-plpgsql-HWKS4OLR.js} +37 -7
  55. package/dist/{status-IJ4ZWHMX.js → status-UTKS63AB.js} +2 -3
  56. package/dist/{telemetry-FN7V727Y.js → telemetry-P56UBLZ2.js} +2 -3
  57. package/dist/{template-check-PNG5NQ5H.js → template-check-3P4HZXVY.js} +40 -29
  58. package/dist/{test-QYXE5UVW.js → test-V4KQL574.js} +34 -10
  59. package/dist/{test-gen-QPWOIEHU.js → test-gen-FS4CEY3P.js} +2 -3
  60. package/dist/{upgrade-3SLWVNAC.js → upgrade-NUK3ZBCL.js} +18 -6
  61. package/dist/{validate-SM4PXPS7.js → validate-CAAW4Y44.js} +2 -3
  62. package/dist/{vuln-check-TYQNEFS7.js → vuln-check-2W7N5TA2.js} +3 -4
  63. package/dist/{vuln-checker-2QXGN5YT.js → vuln-checker-IQJ56RUV.js} +413 -140
  64. package/dist/{watch-UCDVOQAH.js → watch-PNTKZYFB.js} +1 -1
  65. package/dist/{workflow-ZB5Q2PFY.js → workflow-H75N4BXX.js} +3 -4
  66. package/package.json +2 -2
  67. package/dist/chunk-JT5SUTWE.js +0 -9
  68. package/dist/chunk-M47WJJVS.js +0 -71
  69. package/dist/manifest-2NOQ2IMK.js +0 -32
  70. package/dist/{chunk-MNPMZERI.js → chunk-644FVGIQ.js} +1 -1
  71. package/dist/{chunk-XJBQINSA.js → chunk-SGJG3BKD.js} +1 -1
@@ -1,4 +1,5 @@
1
1
  import type { Command } from 'commander';
2
2
  export declare function markJsonEmitted(): void;
3
+ export declare function writeJsonEnvelope(payload: string): void;
3
4
  export declare function emitDefaultSuccessIfNeeded(cmd: Command): void;
4
5
  //# sourceMappingURL=contract-output.d.ts.map
@@ -2,9 +2,8 @@
2
2
  import { createRequire } from 'module';
3
3
  import { enableNonInteractiveMode } from './chunk-6Y3LAUGL.js';
4
4
  import { getRequestedCommandNameFromArgv } from './chunk-UWWSAPDR.js';
5
- import { CLI_VERSION, HAS_ADMIN_COMMAND } from './chunk-GOGRLQNP.js';
6
- import { emitDefaultSuccessIfNeeded } from './chunk-RRGQCUKT.js';
7
- import './chunk-JT5SUTWE.js';
5
+ import { CLI_VERSION, HAS_ADMIN_COMMAND } from './chunk-AIP6MR42.js';
6
+ import { emitDefaultSuccessIfNeeded } from './chunk-WJXC4MVY.js';
8
7
  import { parseOutputFormat, setOutputFormat, getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
9
8
  import { init_esm_shims } from './chunk-VRXHCR5K.js';
10
9
  import { CLIError } from '@runa-ai/runa/cli-runtime';
@@ -116,6 +115,14 @@ function applyEarlyGlobalFlags(argv) {
116
115
  }
117
116
 
118
117
  // src/cli/index.ts
118
+ function pickCommands(commands) {
119
+ return commands.filter((command) => {
120
+ if (!(command instanceof Command)) {
121
+ return false;
122
+ }
123
+ return true;
124
+ });
125
+ }
119
126
  function normalizeRequestedCommandName(value) {
120
127
  if (!value) return null;
121
128
  const trimmed = value.trim();
@@ -138,7 +145,7 @@ function isTestCommand(requested) {
138
145
  async function registerProjectLifecycleCommands(program, requested, loadAllCommands) {
139
146
  if (!loadAllCommands && requested) {
140
147
  if (requested === "init") {
141
- const { initCommand: initCommand2 } = await import('./init-ELK5QCWR.js');
148
+ const { initCommand: initCommand2 } = await import('./init-ZIL6LRFO.js');
142
149
  program.addCommand(initCommand2);
143
150
  return;
144
151
  }
@@ -148,22 +155,22 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
148
155
  return;
149
156
  }
150
157
  if (requested === "upgrade") {
151
- const { upgradeCommand: upgradeCommand2 } = await import('./upgrade-3SLWVNAC.js');
158
+ const { upgradeCommand: upgradeCommand2 } = await import('./upgrade-NUK3ZBCL.js');
152
159
  program.addCommand(upgradeCommand2);
153
160
  return;
154
161
  }
155
162
  if (requested === "validate") {
156
- const { validateCommand: validateCommand2 } = await import('./validate-SM4PXPS7.js');
163
+ const { validateCommand: validateCommand2 } = await import('./validate-CAAW4Y44.js');
157
164
  program.addCommand(validateCommand2);
158
165
  return;
159
166
  }
160
167
  if (requested === "build") {
161
- const { buildCommand: buildCommand2 } = await import('./build-BXUJKYHC.js');
168
+ const { buildCommand: buildCommand2 } = await import('./build-V66FAQXB.js');
162
169
  program.addCommand(buildCommand2);
163
170
  return;
164
171
  }
165
172
  if (requested === "dev") {
166
- const { devCommand: devCommand2 } = await import('./dev-A7RW6XQV.js');
173
+ const { devCommand: devCommand2 } = await import('./dev-5YXNPTCJ.js');
167
174
  program.addCommand(devCommand2);
168
175
  return;
169
176
  }
@@ -176,12 +183,12 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
176
183
  { buildCommand },
177
184
  { devCommand }
178
185
  ] = await Promise.all([
179
- import('./init-ELK5QCWR.js'),
186
+ import('./init-ZIL6LRFO.js'),
180
187
  import('./prepare-32DOVHTE.js'),
181
- import('./upgrade-3SLWVNAC.js'),
182
- import('./validate-SM4PXPS7.js'),
183
- import('./build-BXUJKYHC.js'),
184
- import('./dev-A7RW6XQV.js')
188
+ import('./upgrade-NUK3ZBCL.js'),
189
+ import('./validate-CAAW4Y44.js'),
190
+ import('./build-V66FAQXB.js'),
191
+ import('./dev-5YXNPTCJ.js')
185
192
  ]);
186
193
  program.addCommand(initCommand);
187
194
  program.addCommand(prepareCommand);
@@ -199,132 +206,111 @@ var TEST_GENERATION_COMMANDS = /* @__PURE__ */ new Set([
199
206
  "test:security:generate",
200
207
  "test:unit:generate"
201
208
  ]);
202
- async function registerTestCommands(program, requested, loadAllCommands) {
203
- if (!loadAllCommands && requested) {
204
- if (requested === "manifest") {
205
- const { manifestCommand: manifestCommand2 } = await import('./manifest-2NOQ2IMK.js');
206
- program.addCommand(manifestCommand2);
207
- return;
208
- }
209
- if (requested === "inject-test-attrs") {
210
- const { injectTestAttrsCommand: injectTestAttrsCommand2 } = await import('./inject-test-attrs-Y5UD5P7Q.js');
211
- program.addCommand(injectTestAttrsCommand2);
212
- return;
213
- }
214
- if (TEST_GENERATION_COMMANDS.has(requested)) {
215
- const testGenModule2 = await import('./test-gen-QPWOIEHU.js');
216
- const {
217
- dbTestUpdateGoldenCommand: dbTestUpdateGoldenCommand2,
218
- testApiGenerateCommand: testApiGenerateCommand2,
219
- testComponentGenerateCommand: testComponentGenerateCommand2,
220
- testE2EGenerateCommand: testE2EGenerateCommand2,
221
- testE2EScaffoldCommand: testE2EScaffoldCommand2,
222
- testSecurityGenerateCommand: testSecurityGenerateCommand2,
223
- testUnitGenerateCommand: testUnitGenerateCommand2
224
- } = testGenModule2;
225
- if (requested === "db:test:update-golden") {
226
- program.addCommand(dbTestUpdateGoldenCommand2);
227
- }
228
- if (requested === "test:api:gen") {
229
- program.addCommand(testApiGenerateCommand2);
230
- }
231
- if (requested === "test:component:gen") {
232
- program.addCommand(testComponentGenerateCommand2);
233
- }
234
- if (requested === "test:e2e:generate") {
235
- program.addCommand(testE2EGenerateCommand2);
236
- }
237
- if (requested === "test:e2e:scaffold") {
238
- program.addCommand(testE2EScaffoldCommand2);
239
- }
240
- if (requested === "test:security:generate") {
241
- program.addCommand(testSecurityGenerateCommand2);
242
- }
243
- if (requested === "test:unit:generate") {
244
- program.addCommand(testUnitGenerateCommand2);
245
- }
246
- return;
247
- }
248
- if (requested === "test" || requested.startsWith("test:")) {
249
- const testModule2 = await import('./test-QYXE5UVW.js');
250
- const {
251
- testApiCommand: testApiCommand2,
252
- testBrowserCommand: testBrowserCommand2,
253
- // Legacy commands (backward compat)
254
- testCommand: testCommand2,
255
- testDbCommand: testDbCommand2,
256
- testE2ECommand: testE2ECommand2,
257
- // New naming scheme (2025-01)
258
- testFastCommand: testFastCommand2,
259
- testIntegrationCommand: testIntegrationCommand2,
260
- // Canonical layer commands
261
- testLayer0Command: testLayer0Command2,
262
- testLayer1Command: testLayer1Command2,
263
- testLayer2Command: testLayer2Command2,
264
- testLayer3Command: testLayer3Command2,
265
- testLayer4Command: testLayer4Command2,
266
- // Note: Layer 5 Flow E2E was merged into Layer 1 XState Unit Tests
267
- testLintCommand: testLintCommand2,
268
- testLogicCommand: testLogicCommand2,
269
- testOWASPGenerateCommand: testOWASPGenerateCommand2,
270
- testSchemaCommand: testSchemaCommand2,
271
- testServiceCommand: testServiceCommand2,
272
- testStaticCommand: testStaticCommand2
273
- } = testModule2;
274
- const candidates = [
275
- testCommand2,
276
- testDbCommand2,
277
- testE2ECommand2,
278
- testFastCommand2,
279
- testLintCommand2,
280
- testLogicCommand2,
281
- testSchemaCommand2,
282
- testApiCommand2,
283
- testBrowserCommand2,
284
- testLayer0Command2,
285
- testLayer1Command2,
286
- testLayer2Command2,
287
- testLayer3Command2,
288
- testLayer4Command2,
289
- testStaticCommand2,
290
- testServiceCommand2,
291
- testIntegrationCommand2,
292
- testOWASPGenerateCommand2
293
- ];
294
- const requestedCommand = candidates.find((cmd) => cmd.name() === requested);
295
- if (requestedCommand) {
296
- program.addCommand(requestedCommand);
297
- } else {
298
- for (const cmd of candidates) {
299
- program.addCommand(cmd);
300
- }
301
- }
302
- return;
303
- }
209
+ async function addSingleTestCommand(program, requested) {
210
+ if (requested === "manifest") {
211
+ const { manifestCommand } = await import('./manifest-TMFLESHW.js');
212
+ program.addCommand(manifestCommand);
213
+ return true;
304
214
  }
305
- const [testModule, testGenModule, { injectTestAttrsCommand }, { manifestCommand }] = await Promise.all([
306
- import('./test-QYXE5UVW.js'),
307
- import('./test-gen-QPWOIEHU.js'),
308
- import('./inject-test-attrs-Y5UD5P7Q.js'),
309
- import('./manifest-2NOQ2IMK.js')
310
- ]);
215
+ if (requested === "inject-test-attrs") {
216
+ const { injectTestAttrsCommand } = await import('./inject-test-attrs-P44BVTQS.js');
217
+ program.addCommand(injectTestAttrsCommand);
218
+ return true;
219
+ }
220
+ if (!TEST_GENERATION_COMMANDS.has(requested)) return false;
221
+ const testGenModule = await import('./test-gen-FS4CEY3P.js');
222
+ const commandMap = {
223
+ "db:test:update-golden": testGenModule.dbTestUpdateGoldenCommand,
224
+ "test:api:gen": testGenModule.testApiGenerateCommand,
225
+ "test:component:gen": testGenModule.testComponentGenerateCommand,
226
+ "test:e2e:generate": testGenModule.testE2EGenerateCommand,
227
+ "test:e2e:scaffold": testGenModule.testE2EScaffoldCommand,
228
+ "test:security:generate": testGenModule.testSecurityGenerateCommand,
229
+ "test:unit:generate": testGenModule.testUnitGenerateCommand
230
+ };
231
+ const command = commandMap[requested];
232
+ if (!command) return false;
233
+ program.addCommand(command);
234
+ return true;
235
+ }
236
+ async function registerFocusedTestCommand(program, requested) {
237
+ const testModule = await import('./test-V4KQL574.js');
311
238
  const {
239
+ testCommand,
240
+ testDbCommand,
241
+ testE2ECommand,
312
242
  testApiCommand,
313
243
  testBrowserCommand,
314
- // Legacy commands (backward compat)
244
+ testFastCommand,
245
+ testIntegrationCommand,
246
+ testLayer0Command,
247
+ testLayer1Command,
248
+ testLayer2Command,
249
+ testLayer3Command,
250
+ testLayer4Command,
251
+ // Note: Layer 5 Flow E2E was merged into Layer 1 XState Unit Tests
252
+ testLintCommand,
253
+ testLogicCommand,
254
+ testOWASPGenerateCommand,
255
+ testSchemaCommand,
256
+ testServiceCommand,
257
+ testStaticCommand
258
+ } = testModule;
259
+ const candidates = pickCommands([
315
260
  testCommand,
316
261
  testDbCommand,
317
262
  testE2ECommand,
318
- // New naming scheme (2025-01)
263
+ testFastCommand,
264
+ testLintCommand,
265
+ testLogicCommand,
266
+ testSchemaCommand,
267
+ testApiCommand,
268
+ testBrowserCommand,
269
+ testLayer0Command,
270
+ testLayer1Command,
271
+ testLayer2Command,
272
+ testLayer3Command,
273
+ testLayer4Command,
274
+ testStaticCommand,
275
+ testServiceCommand,
276
+ testIntegrationCommand,
277
+ testOWASPGenerateCommand
278
+ ]);
279
+ const matched = candidates.find((command) => command.name() === requested);
280
+ if (matched) {
281
+ program.addCommand(matched);
282
+ return true;
283
+ }
284
+ if (!requested.startsWith("test:") && requested !== "test") {
285
+ return false;
286
+ }
287
+ for (const command of candidates) {
288
+ program.addCommand(command);
289
+ }
290
+ return true;
291
+ }
292
+ async function registerAllTestCommands(program) {
293
+ const [testModule, testGenModule, injectModule, manifestModule] = await Promise.all([
294
+ import('./test-V4KQL574.js'),
295
+ import('./test-gen-FS4CEY3P.js'),
296
+ import('./inject-test-attrs-P44BVTQS.js'),
297
+ import('./manifest-TMFLESHW.js')
298
+ ]);
299
+ const { injectTestAttrsCommand } = injectModule;
300
+ const { manifestCommand } = manifestModule;
301
+ const {
302
+ testCommand,
303
+ testApiCommand,
304
+ testBrowserCommand,
305
+ testDbCommand,
306
+ testE2ECommand,
319
307
  testFastCommand,
320
308
  testIntegrationCommand,
321
- // Canonical layer commands
322
309
  testLayer0Command,
323
310
  testLayer1Command,
324
311
  testLayer2Command,
325
312
  testLayer3Command,
326
313
  testLayer4Command,
327
- // Note: Layer 5 Flow E2E was merged into Layer 1 XState Unit Tests
328
314
  testLintCommand,
329
315
  testLogicCommand,
330
316
  testOWASPGenerateCommand,
@@ -341,58 +327,94 @@ async function registerTestCommands(program, requested, loadAllCommands) {
341
327
  testSecurityGenerateCommand,
342
328
  testUnitGenerateCommand
343
329
  } = testGenModule;
344
- program.addCommand(testFastCommand);
345
- program.addCommand(testDbCommand);
346
- program.addCommand(testE2ECommand);
347
- program.addCommand(testLintCommand);
348
- program.addCommand(testLogicCommand);
349
- program.addCommand(testSchemaCommand);
350
- program.addCommand(testApiCommand);
351
- program.addCommand(testBrowserCommand);
352
- program.addCommand(testLayer0Command);
353
- program.addCommand(testLayer1Command);
354
- program.addCommand(testLayer2Command);
355
- program.addCommand(testLayer3Command);
356
- program.addCommand(testLayer4Command);
357
- program.addCommand(testStaticCommand);
358
- program.addCommand(testServiceCommand);
359
- program.addCommand(testIntegrationCommand);
360
- program.addCommand(testUnitGenerateCommand);
361
- program.addCommand(testE2EGenerateCommand);
362
- program.addCommand(testSecurityGenerateCommand);
363
- program.addCommand(testOWASPGenerateCommand);
364
- program.addCommand(testApiGenerateCommand);
365
- program.addCommand(testComponentGenerateCommand);
366
- program.addCommand(dbTestUpdateGoldenCommand);
367
- program.addCommand(testCommand);
368
- program.addCommand(testE2EScaffoldCommand);
369
- program.addCommand(injectTestAttrsCommand);
370
- program.addCommand(manifestCommand);
330
+ const allCommands = pickCommands([
331
+ testFastCommand,
332
+ testDbCommand,
333
+ testE2ECommand,
334
+ testLintCommand,
335
+ testLogicCommand,
336
+ testSchemaCommand,
337
+ testApiCommand,
338
+ testBrowserCommand,
339
+ testLayer0Command,
340
+ testLayer1Command,
341
+ testLayer2Command,
342
+ testLayer3Command,
343
+ testLayer4Command,
344
+ testStaticCommand,
345
+ testServiceCommand,
346
+ testIntegrationCommand,
347
+ testUnitGenerateCommand,
348
+ testE2EGenerateCommand,
349
+ testSecurityGenerateCommand,
350
+ testOWASPGenerateCommand,
351
+ testApiGenerateCommand,
352
+ testComponentGenerateCommand,
353
+ dbTestUpdateGoldenCommand,
354
+ testE2EScaffoldCommand,
355
+ testCommand,
356
+ injectTestAttrsCommand,
357
+ manifestCommand
358
+ ]);
359
+ for (const command of allCommands) {
360
+ program.addCommand(command);
361
+ }
362
+ }
363
+ async function registerTestCommands(program, requested, loadAllCommands) {
364
+ if (!loadAllCommands && requested) {
365
+ const addedSingle = await addSingleTestCommand(program, requested);
366
+ if (addedSingle) {
367
+ return;
368
+ }
369
+ if (requested === "test" || requested.startsWith("test:")) {
370
+ const addedFocused = await registerFocusedTestCommand(program, requested);
371
+ if (addedFocused) {
372
+ return;
373
+ }
374
+ return;
375
+ }
376
+ return;
377
+ }
378
+ if (loadAllCommands) {
379
+ await registerAllTestCommands(program);
380
+ return;
381
+ }
382
+ if (!requested || isTestCommand(requested)) {
383
+ const commandToLoad = requested ?? "test";
384
+ await registerFocusedTestCommand(program, commandToLoad);
385
+ return;
386
+ }
387
+ await registerAllTestCommands(program);
371
388
  }
372
389
  async function registerStatusCheckAndUtilityCommands(program, requested, loadAllCommands) {
373
390
  if (!loadAllCommands && requested) {
374
391
  if (requested === "status") {
375
- const { statusCommand: statusCommand2 } = await import('./status-IJ4ZWHMX.js');
392
+ const { statusCommand: statusCommand2 } = await import('./status-UTKS63AB.js');
376
393
  program.addCommand(statusCommand2);
377
394
  return;
378
395
  }
379
396
  if (requested === "check") {
380
- const { checkCommand: checkCommand2 } = await import('./check-6AB5NGWK.js');
397
+ const { checkCommand: checkCommand2 } = await import('./check-LOMVIRHX.js');
381
398
  program.addCommand(checkCommand2.name("check"));
382
399
  return;
383
400
  }
401
+ if (requested === "doctor") {
402
+ const { doctorCommand: doctorCommand2 } = await import('./doctor-MZLOA53G.js');
403
+ program.addCommand(doctorCommand2);
404
+ return;
405
+ }
384
406
  if (requested === "cache") {
385
- const { cacheCommand: cacheCommand2 } = await import('./cache-H63JKFYH.js');
407
+ const { cacheCommand: cacheCommand2 } = await import('./cache-N7WNPEYF.js');
386
408
  program.addCommand(cacheCommand2);
387
409
  return;
388
410
  }
389
411
  if (requested === "telemetry") {
390
- const { telemetryCommand: telemetryCommand2 } = await import('./telemetry-FN7V727Y.js');
412
+ const { telemetryCommand: telemetryCommand2 } = await import('./telemetry-P56UBLZ2.js');
391
413
  program.addCommand(telemetryCommand2);
392
414
  return;
393
415
  }
394
416
  if (requested === "link" || requested === "unlink") {
395
- const { linkCommand: linkCommand2, unlinkCommand: unlinkCommand2 } = await import('./link-C43JRZWY.js');
417
+ const { linkCommand: linkCommand2, unlinkCommand: unlinkCommand2 } = await import('./link-VSNDVZZD.js');
396
418
  program.addCommand(linkCommand2);
397
419
  program.addCommand(unlinkCommand2);
398
420
  return;
@@ -401,29 +423,32 @@ async function registerStatusCheckAndUtilityCommands(program, requested, loadAll
401
423
  const [
402
424
  { statusCommand },
403
425
  { checkCommand },
426
+ { doctorCommand },
404
427
  { cacheCommand },
405
428
  { telemetryCommand },
406
429
  { linkCommand, unlinkCommand }
407
430
  ] = await Promise.all([
408
- import('./status-IJ4ZWHMX.js'),
409
- import('./check-6AB5NGWK.js'),
410
- import('./cache-H63JKFYH.js'),
411
- import('./telemetry-FN7V727Y.js'),
412
- import('./link-C43JRZWY.js')
431
+ import('./status-UTKS63AB.js'),
432
+ import('./check-LOMVIRHX.js'),
433
+ import('./doctor-MZLOA53G.js'),
434
+ import('./cache-N7WNPEYF.js'),
435
+ import('./telemetry-P56UBLZ2.js'),
436
+ import('./link-VSNDVZZD.js')
413
437
  ]);
414
438
  program.addCommand(statusCommand);
415
439
  program.addCommand(checkCommand.name("check"));
440
+ program.addCommand(doctorCommand);
416
441
  program.addCommand(cacheCommand);
417
442
  program.addCommand(telemetryCommand);
418
443
  program.addCommand(linkCommand);
419
444
  program.addCommand(unlinkCommand);
420
445
  }
421
446
  async function registerCiCommand(program) {
422
- const { ciCommand } = await import('./ci-V3PIG2GI.js');
447
+ const { ciCommand } = await import('./ci-ZWRVWNFX.js');
423
448
  program.addCommand(ciCommand);
424
449
  }
425
450
  async function registerDbCommand(program) {
426
- const { dbCommand } = await import('./db-HR7CREX2.js');
451
+ const { dbCommand } = await import('./db-XULCILOU.js');
427
452
  program.addCommand(dbCommand);
428
453
  }
429
454
  async function registerServicesCommand(program) {
@@ -431,11 +456,11 @@ async function registerServicesCommand(program) {
431
456
  program.addCommand(servicesCommand);
432
457
  }
433
458
  async function registerEnvCommand(program) {
434
- const { envCommand } = await import('./env-B47Z4747.js');
459
+ const { envCommand } = await import('./env-SS66PZ4B.js');
435
460
  program.addCommand(envCommand);
436
461
  }
437
462
  async function registerHotfixCommand(program) {
438
- const { hotfixCommand } = await import('./hotfix-CULKKMGS.js');
463
+ const { hotfixCommand } = await import('./hotfix-YA3DGLOM.js');
439
464
  program.addCommand(hotfixCommand);
440
465
  }
441
466
  async function registerSdkCommand(program) {
@@ -447,19 +472,19 @@ async function registerUiCommand(program) {
447
472
  program.addCommand(uiCommand);
448
473
  }
449
474
  async function registerWatchCommand(program) {
450
- const { watchCommand } = await import('./watch-UCDVOQAH.js');
475
+ const { watchCommand } = await import('./watch-PNTKZYFB.js');
451
476
  program.addCommand(watchCommand);
452
477
  }
453
478
  async function registerWorkflowCommand(program) {
454
- const { workflowCommand } = await import('./workflow-ZB5Q2PFY.js');
479
+ const { workflowCommand } = await import('./workflow-H75N4BXX.js');
455
480
  program.addCommand(workflowCommand);
456
481
  }
457
482
  async function registerVulnCheckCommand(program) {
458
- const { vulnCheckCommand } = await import('./vuln-check-TYQNEFS7.js');
483
+ const { vulnCheckCommand } = await import('./vuln-check-2W7N5TA2.js');
459
484
  program.addCommand(vulnCheckCommand);
460
485
  }
461
486
  async function registerTemplateCheckCommand(program) {
462
- const { templateCheckCommand } = await import('./template-check-PNG5NQ5H.js');
487
+ const { templateCheckCommand } = await import('./template-check-3P4HZXVY.js');
463
488
  program.addCommand(templateCheckCommand);
464
489
  }
465
490
  async function registerSessionCommands(program) {
@@ -478,7 +503,15 @@ var COMMAND_GROUPS = [
478
503
  register: registerTestCommands
479
504
  },
480
505
  {
481
- shouldRegister: (requested) => isRequestedCommand(requested, ["status", "check", "cache", "telemetry", "link", "unlink"]),
506
+ shouldRegister: (requested) => isRequestedCommand(requested, [
507
+ "status",
508
+ "check",
509
+ "doctor",
510
+ "cache",
511
+ "telemetry",
512
+ "link",
513
+ "unlink"
514
+ ]),
482
515
  register: registerStatusCheckAndUtilityCommands
483
516
  },
484
517
  {
@@ -530,9 +563,15 @@ var COMMAND_GROUPS = [
530
563
  register: registerSessionCommands
531
564
  }
532
565
  ];
566
+ function shouldLoadAllCommands(requested, loadAllCommands) {
567
+ if (loadAllCommands === true || requested === null) {
568
+ return true;
569
+ }
570
+ return !COMMAND_GROUPS.some((group) => group.shouldRegister(requested));
571
+ }
533
572
  async function registerSelectedCommands(program, options) {
534
573
  const requested = normalizeRequestedCommandName(options.requestedCommandName);
535
- const shouldLoadAll = options.loadAllCommands === true || requested === null;
574
+ const shouldLoadAll = shouldLoadAllCommands(requested, options.loadAllCommands);
536
575
  for (const group of COMMAND_GROUPS) {
537
576
  if (shouldLoadAll || group.shouldRegister(requested)) {
538
577
  await group.register(program, requested, shouldLoadAll);
@@ -542,6 +581,7 @@ async function registerSelectedCommands(program, options) {
542
581
  var RUNTIME_BOOTSTRAP_OPTIONAL_COMMANDS = /* @__PURE__ */ new Set([
543
582
  "cache",
544
583
  "check",
584
+ "doctor",
545
585
  "inject-test-attrs",
546
586
  "link",
547
587
  "manifest",
@@ -552,6 +592,9 @@ var RUNTIME_BOOTSTRAP_OPTIONAL_COMMANDS = /* @__PURE__ */ new Set([
552
592
  function shouldRunRuntimeBootstrap(argv) {
553
593
  const requested = getRequestedCommandNameFromArgv(argv);
554
594
  if (!requested) return true;
595
+ if (!COMMAND_GROUPS.some((group) => group.shouldRegister(requested))) {
596
+ return false;
597
+ }
555
598
  if (RUNTIME_BOOTSTRAP_OPTIONAL_COMMANDS.has(requested)) {
556
599
  return false;
557
600
  }
@@ -646,7 +689,7 @@ async function executeProgram(program) {
646
689
  const isHelpOrVersion = argv.includes("--help") || argv.includes("-h") || argv.includes("--version") || argv.includes("-V");
647
690
  if (!isHelpOrVersion && shouldRunRuntimeBootstrap(argv)) {
648
691
  const [{ loadEnvFiles }, { enforceLicenseInCI }] = await Promise.all([
649
- import('./env-files-K2C7O7L5.js'),
692
+ import('./env-files-2UIUYLLR.js'),
650
693
  import('./license-OB7GVJQ2.js')
651
694
  ]);
652
695
  loadEnvFiles({
@@ -11,12 +11,14 @@
11
11
  export interface ValidateInput {
12
12
  repoRoot: string;
13
13
  skipManifest: boolean;
14
+ skipTables: boolean;
14
15
  }
15
16
  export interface ValidateOutput {
16
17
  passed: boolean;
17
18
  checks: {
18
19
  buildOutputs: boolean;
19
20
  manifests: boolean;
21
+ tables: boolean;
20
22
  };
21
23
  warnings: string[];
22
24
  error?: string;
@@ -13,14 +13,19 @@
13
13
  * - 1: Critical issues found (blocks operations)
14
14
  */
15
15
  import { Command } from 'commander';
16
- interface CheckOptions {
16
+ export interface CheckOptions {
17
17
  scope?: 'all' | 'build' | 'ci' | 'deploy' | 'testing' | 'layer1' | 'layer2' | 'layer3' | 'layer4';
18
18
  fix?: boolean;
19
19
  verbose?: boolean;
20
20
  dryRun?: boolean;
21
21
  cwd?: string;
22
22
  }
23
- declare function runCheckAction(options: CheckOptions): Promise<void>;
24
- export { runCheckAction as runCheckCommand };
23
+ interface RunCheckCommandOptions {
24
+ command: Command;
25
+ loggerName: string;
26
+ deprecationNotice?: string;
27
+ }
28
+ export declare function runCheckCommand(options: CheckOptions, runOptions: RunCheckCommandOptions): Promise<void>;
25
29
  export declare const checkCommand: Command;
30
+ export {};
26
31
  //# sourceMappingURL=check.d.ts.map
@@ -1,12 +1,11 @@
1
1
  /**
2
2
  * AI HINT: Collect Schema Stats Actor
3
3
  *
4
- * Purpose: Collect schema statistics from Local, CI, and Production databases
4
+ * Purpose: Collect schema statistics from Reference, CI, and Production databases
5
5
  * Pattern: Fine-grained actor for single step
6
6
  *
7
- * All environments use the same DB query logic for consistent comparison:
8
- * - Local stats: Query local Supabase DB (Docker)
9
- * Note: Schema files include both declarative/*.sql AND idempotent/*.sql
7
+ * Comparison strategy:
8
+ * - Reference stats: Build a temporary reference DB from repo SQL, then query it
10
9
  * - CI stats: Query CI database (Docker Supabase or Branch DB)
11
10
  * - Production stats: Query Production DB (if GH_DATABASE_URL_ADMIN set)
12
11
  *
@@ -18,12 +17,16 @@
18
17
  */
19
18
  import { type SchemaStatsSnapshot } from './schema-stats.js';
20
19
  export interface CollectSchemaStatsInput {
21
- /** Local database URL (Docker Supabase) */
22
- localDbUrl: string | null;
20
+ /** Repository root (used to build a reference DB from repo SQL) */
21
+ repoRoot: string;
22
+ /** Reference source DB URL (used to create/drop temp DB) */
23
+ referenceDbUrl: string | null;
23
24
  /** CI database URL (Docker Supabase or Branch DB) */
24
25
  ciDbUrl: string | null;
25
26
  /** Whether to query production (requires GH_DATABASE_URL_ADMIN) */
26
27
  queryProduction: boolean;
28
+ /** Temporary directory for logs */
29
+ tmpDir: string;
27
30
  }
28
31
  export interface CollectSchemaStatsOutput {
29
32
  /** Schema statistics snapshot */