@runa-ai/runa-cli 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/{build-V66FAQXB.js → build-HQMSVN6N.js} +3 -3
  2. package/dist/{check-LOMVIRHX.js → check-PCSQPYDM.js} +2 -2
  3. package/dist/{chunk-QM53IQHM.js → chunk-2QX7T24B.js} +1 -1
  4. package/dist/{chunk-XDCHRVE3.js → chunk-4XHZQRRK.js} +2 -2
  5. package/dist/{chunk-7B5C6U2K.js → chunk-A6A7JIRD.js} +35 -2
  6. package/dist/{chunk-Z4Z5DNW4.js → chunk-B3POLMII.js} +12 -0
  7. package/dist/chunk-CKRLVEIO.js +119 -0
  8. package/dist/{chunk-HD74F6W2.js → chunk-FWMGC5FP.js} +1 -0
  9. package/dist/{chunk-H2AHNI75.js → chunk-LCK2LGVR.js} +1 -1
  10. package/dist/{chunk-FHG3ILE4.js → chunk-OBYZDT2E.js} +38 -8
  11. package/dist/{chunk-AIP6MR42.js → chunk-PMXE5XOJ.js} +1 -1
  12. package/dist/{chunk-VM3IWOT5.js → chunk-QSEF4T3Y.js} +13 -5
  13. package/dist/{chunk-NPSRD26F.js → chunk-UHDAYPHH.js} +1 -1
  14. package/dist/{chunk-2APB25TT.js → chunk-VSH3IXDQ.js} +7 -3
  15. package/dist/{chunk-644FVGIQ.js → chunk-WPMR7RQ4.js} +9 -2
  16. package/dist/chunk-XVNDDHAF.js +65 -0
  17. package/dist/{risk-detector-plpgsql-HWKS4OLR.js → chunk-Y5ANTCKE.js} +3 -412
  18. package/dist/{chunk-SGJG3BKD.js → chunk-Z7A4BEWF.js} +1 -1
  19. package/dist/{ci-ZWRVWNFX.js → ci-Z4525QW6.js} +3095 -709
  20. package/dist/{cli-2JNBJUBB.js → cli-Q2XIQDRS.js} +72 -54
  21. package/dist/commands/ci/commands/ci-prod-db-operations.d.ts +6 -4
  22. package/dist/commands/ci/commands/ci-prod-types.d.ts +3 -0
  23. package/dist/commands/ci/commands/ci-prod-workflow.d.ts +1 -1
  24. package/dist/commands/ci/commands/ci-resolvers.d.ts +1 -1
  25. package/dist/commands/ci/commands/ci-supabase-local.d.ts +4 -0
  26. package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts +1 -1
  27. package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +15 -2
  28. package/dist/commands/ci/machine/actors/db/production-preview.d.ts +32 -4
  29. package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +30 -1
  30. package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +1 -0
  31. package/dist/commands/ci/machine/actors/finalize/index.d.ts +0 -1
  32. package/dist/commands/ci/machine/actors/index.d.ts +1 -1
  33. package/dist/commands/ci/machine/actors/setup/local.d.ts +2 -0
  34. package/dist/commands/ci/machine/actors/setup/pr-common.d.ts +3 -0
  35. package/dist/commands/ci/machine/actors/setup/pr-local.d.ts +2 -0
  36. package/dist/commands/ci/machine/commands/machine-runner.d.ts +6 -0
  37. package/dist/commands/ci/machine/commands/step-telemetry.d.ts +16 -0
  38. package/dist/commands/ci/machine/contract.d.ts +40 -0
  39. package/dist/commands/ci/machine/formatters/github-comment-types.d.ts +7 -2
  40. package/dist/commands/ci/machine/formatters/github-comment.d.ts +2 -1
  41. package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +2 -1
  42. package/dist/commands/ci/machine/formatters/sections/index.d.ts +1 -1
  43. package/dist/commands/ci/machine/formatters/sections/production-schema-status.d.ts +30 -0
  44. package/dist/commands/ci/machine/formatters/summary.d.ts +4 -4
  45. package/dist/commands/ci/machine/guards.d.ts +4 -0
  46. package/dist/commands/ci/machine/helpers.d.ts +33 -0
  47. package/dist/commands/ci/machine/machine-state-helpers.d.ts +1 -1
  48. package/dist/commands/ci/machine/machine.d.ts +71 -11
  49. package/dist/commands/ci/machine/types.d.ts +9 -0
  50. package/dist/commands/ci/utils/ci-diagnostics.d.ts +67 -0
  51. package/dist/commands/ci/utils/ci-summary.d.ts +118 -0
  52. package/dist/commands/ci/utils/db-url-utils.d.ts +4 -77
  53. package/dist/commands/ci/utils/github-api.d.ts +14 -0
  54. package/dist/commands/db/apply/contract.d.ts +73 -0
  55. package/dist/commands/db/apply/helpers/alter-statement-parsers.d.ts +95 -0
  56. package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +0 -61
  57. package/dist/commands/db/apply/helpers/function-plan-false-positive-filter.d.ts +36 -0
  58. package/dist/commands/db/apply/helpers/hazard-handler.d.ts +4 -4
  59. package/dist/commands/db/apply/helpers/index.d.ts +14 -5
  60. package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts +3 -1
  61. package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +69 -6
  62. package/dist/commands/db/apply/helpers/plan-ast.d.ts +56 -0
  63. package/dist/commands/db/apply/helpers/plan-check-filter.d.ts +26 -0
  64. package/dist/commands/db/apply/helpers/plan-drop-protection.d.ts +43 -0
  65. package/dist/commands/db/apply/helpers/plan-ordering.d.ts +6 -0
  66. package/dist/commands/db/apply/helpers/plan-statement-parser.d.ts +39 -0
  67. package/dist/commands/db/apply/helpers/plan-validator.d.ts +8 -40
  68. package/dist/commands/db/apply/helpers/retry-logic.d.ts +1 -10
  69. package/dist/commands/db/apply/helpers/temp-db-bootstrap.d.ts +18 -0
  70. package/dist/commands/db/apply/helpers/temp-db-dsn.d.ts +14 -0
  71. package/dist/commands/db/apply/machine.d.ts +56 -32
  72. package/dist/commands/db/commands/db-apply-error.d.ts +5 -0
  73. package/dist/commands/db/commands/db-apply.d.ts +2 -0
  74. package/dist/commands/db/commands/db-sync/directory-placement-check.d.ts +4 -0
  75. package/dist/commands/db/commands/db-sync/error-classifier.d.ts +1 -1
  76. package/dist/commands/db/commands/db-sync/plan-boundary-reconciliation.d.ts +3 -0
  77. package/dist/commands/db/commands/db-sync/precheck-helpers.d.ts +18 -0
  78. package/dist/commands/db/commands/db-sync/production-precheck.d.ts +15 -0
  79. package/dist/commands/db/commands/db-sync/risk-scan-collectors.d.ts +11 -0
  80. package/dist/commands/db/commands/db-sync.d.ts +11 -5
  81. package/dist/commands/db/sync/contract.d.ts +80 -0
  82. package/dist/commands/db/sync/machine.d.ts +60 -1
  83. package/dist/commands/db/types.d.ts +5 -0
  84. package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +2 -1
  85. package/dist/commands/db/utils/boundary-policy/types.d.ts +21 -0
  86. package/dist/commands/db/utils/boundary-policy-runtime.d.ts +12 -3
  87. package/dist/commands/db/utils/boundary-policy.d.ts +1 -1
  88. package/dist/commands/db/utils/db-target.d.ts +5 -3
  89. package/dist/commands/db/utils/declarative-dependency-collectors.d.ts +6 -0
  90. package/dist/commands/db/utils/declarative-dependency-contract.d.ts +78 -0
  91. package/dist/commands/db/utils/declarative-dependency-sql-utils.d.ts +49 -0
  92. package/dist/commands/db/utils/declarative-dependency-warning-governance.d.ts +24 -0
  93. package/dist/commands/db/utils/preflight-check.d.ts +1 -1
  94. package/dist/commands/db/utils/preflight-checks/declarative-dependency-checks.d.ts +4 -0
  95. package/dist/commands/db/utils/preflight-checks/idempotent-risk-checks.d.ts +4 -0
  96. package/dist/commands/db/utils/preflight-checks/schema-boundary-checks.d.ts +4 -0
  97. package/dist/commands/db/utils/preflight-checks/schema-risk-policy.d.ts +4 -0
  98. package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +12 -0
  99. package/dist/commands/db/utils/psql.d.ts +23 -0
  100. package/dist/commands/db/utils/sql-table-extractor.d.ts +42 -1
  101. package/dist/commands/env/commands/setup/types.d.ts +1 -0
  102. package/dist/commands/env/constants/local-supabase.d.ts +4 -1
  103. package/dist/commands/observability.d.ts +72 -0
  104. package/dist/commands/observability.helpers.d.ts +25 -0
  105. package/dist/commands/template-check/commands/template-check.d.ts +1 -0
  106. package/dist/commands/template-check/contract.d.ts +4 -3
  107. package/dist/commands/template-check/machine.d.ts +1 -1
  108. package/dist/commands/workflow/commands/deploy-production.d.ts +0 -1
  109. package/dist/constants/versions.d.ts +1 -1
  110. package/dist/{db-XULCILOU.js → db-BPQ2TEQM.js} +14618 -11273
  111. package/dist/{dev-5YXNPTCJ.js → dev-MLRKIP7F.js} +5 -5
  112. package/dist/{doctor-MZLOA53G.js → doctor-ROSWSMLH.js} +2 -2
  113. package/dist/{env-SS66PZ4B.js → env-WNHJVLOT.js} +37 -20
  114. package/dist/{env-HMMRSYCI.js → env-XPPACZM4.js} +2 -2
  115. package/dist/{env-files-2UIUYLLR.js → env-files-HRNUGZ5O.js} +1 -1
  116. package/dist/{error-handler-HEXBRNVV.js → error-handler-YRQWRDEF.js} +17 -0
  117. package/dist/{hotfix-YA3DGLOM.js → hotfix-Z5EGVSMH.js} +4 -4
  118. package/dist/index.js +4 -4
  119. package/dist/{init-ZIL6LRFO.js → init-S2ATHLJ6.js} +1 -1
  120. package/dist/{inject-test-attrs-P44BVTQS.js → inject-test-attrs-XN4I2AOR.js} +2 -2
  121. package/dist/internal/machines/index.d.ts +1 -1
  122. package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
  123. package/dist/{manifest-TMFLESHW.js → manifest-EGCAZ4TK.js} +1 -1
  124. package/dist/observability-CJA5UFIC.js +721 -0
  125. package/dist/{risk-detector-4U6ZJ2G5.js → risk-detector-VO5HJR4R.js} +1 -1
  126. package/dist/{risk-detector-core-TK4OAI3N.js → risk-detector-core-7WZJZ5ZI.js} +61 -3
  127. package/dist/risk-detector-plpgsql-ULV7NLDB.js +638 -0
  128. package/dist/{template-check-3P4HZXVY.js → template-check-BDFMT6ZO.js} +23 -6
  129. package/dist/{upgrade-NUK3ZBCL.js → upgrade-BDUWBRT5.js} +1 -1
  130. package/dist/utils/db-url-utils.d.ts +81 -0
  131. package/dist/validators/risk-detector-plpgsql.d.ts +3 -1
  132. package/dist/{vuln-check-2W7N5TA2.js → vuln-check-66RXX3TO.js} +1 -1
  133. package/dist/{vuln-checker-IQJ56RUV.js → vuln-checker-FFOGOJPT.js} +1 -1
  134. package/dist/{watch-PNTKZYFB.js → watch-ITYW57SL.js} +1 -1
  135. package/dist/{workflow-H75N4BXX.js → workflow-UZIZ2JUS.js} +2 -3
  136. package/package.json +3 -3
  137. package/dist/chunk-IBVVGH6X.js +0 -33
  138. package/dist/chunk-KWX3JHCY.js +0 -85
  139. package/dist/commands/ci/machine/actors/finalize/summary.d.ts +0 -32
@@ -2,7 +2,7 @@
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-AIP6MR42.js';
5
+ import { CLI_VERSION, HAS_ADMIN_COMMAND } from './chunk-PMXE5XOJ.js';
6
6
  import { emitDefaultSuccessIfNeeded } from './chunk-WJXC4MVY.js';
7
7
  import { parseOutputFormat, setOutputFormat, getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
8
8
  import { init_esm_shims } from './chunk-VRXHCR5K.js';
@@ -145,7 +145,7 @@ function isTestCommand(requested) {
145
145
  async function registerProjectLifecycleCommands(program, requested, loadAllCommands) {
146
146
  if (!loadAllCommands && requested) {
147
147
  if (requested === "init") {
148
- const { initCommand: initCommand2 } = await import('./init-ZIL6LRFO.js');
148
+ const { initCommand: initCommand2 } = await import('./init-S2ATHLJ6.js');
149
149
  program.addCommand(initCommand2);
150
150
  return;
151
151
  }
@@ -155,7 +155,7 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
155
155
  return;
156
156
  }
157
157
  if (requested === "upgrade") {
158
- const { upgradeCommand: upgradeCommand2 } = await import('./upgrade-NUK3ZBCL.js');
158
+ const { upgradeCommand: upgradeCommand2 } = await import('./upgrade-BDUWBRT5.js');
159
159
  program.addCommand(upgradeCommand2);
160
160
  return;
161
161
  }
@@ -165,12 +165,12 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
165
165
  return;
166
166
  }
167
167
  if (requested === "build") {
168
- const { buildCommand: buildCommand2 } = await import('./build-V66FAQXB.js');
168
+ const { buildCommand: buildCommand2 } = await import('./build-HQMSVN6N.js');
169
169
  program.addCommand(buildCommand2);
170
170
  return;
171
171
  }
172
172
  if (requested === "dev") {
173
- const { devCommand: devCommand2 } = await import('./dev-5YXNPTCJ.js');
173
+ const { devCommand: devCommand2 } = await import('./dev-MLRKIP7F.js');
174
174
  program.addCommand(devCommand2);
175
175
  return;
176
176
  }
@@ -183,12 +183,12 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
183
183
  { buildCommand },
184
184
  { devCommand }
185
185
  ] = await Promise.all([
186
- import('./init-ZIL6LRFO.js'),
186
+ import('./init-S2ATHLJ6.js'),
187
187
  import('./prepare-32DOVHTE.js'),
188
- import('./upgrade-NUK3ZBCL.js'),
188
+ import('./upgrade-BDUWBRT5.js'),
189
189
  import('./validate-CAAW4Y44.js'),
190
- import('./build-V66FAQXB.js'),
191
- import('./dev-5YXNPTCJ.js')
190
+ import('./build-HQMSVN6N.js'),
191
+ import('./dev-MLRKIP7F.js')
192
192
  ]);
193
193
  program.addCommand(initCommand);
194
194
  program.addCommand(prepareCommand);
@@ -208,12 +208,12 @@ var TEST_GENERATION_COMMANDS = /* @__PURE__ */ new Set([
208
208
  ]);
209
209
  async function addSingleTestCommand(program, requested) {
210
210
  if (requested === "manifest") {
211
- const { manifestCommand } = await import('./manifest-TMFLESHW.js');
211
+ const { manifestCommand } = await import('./manifest-EGCAZ4TK.js');
212
212
  program.addCommand(manifestCommand);
213
213
  return true;
214
214
  }
215
215
  if (requested === "inject-test-attrs") {
216
- const { injectTestAttrsCommand } = await import('./inject-test-attrs-P44BVTQS.js');
216
+ const { injectTestAttrsCommand } = await import('./inject-test-attrs-XN4I2AOR.js');
217
217
  program.addCommand(injectTestAttrsCommand);
218
218
  return true;
219
219
  }
@@ -293,8 +293,8 @@ async function registerAllTestCommands(program) {
293
293
  const [testModule, testGenModule, injectModule, manifestModule] = await Promise.all([
294
294
  import('./test-V4KQL574.js'),
295
295
  import('./test-gen-FS4CEY3P.js'),
296
- import('./inject-test-attrs-P44BVTQS.js'),
297
- import('./manifest-TMFLESHW.js')
296
+ import('./inject-test-attrs-XN4I2AOR.js'),
297
+ import('./manifest-EGCAZ4TK.js')
298
298
  ]);
299
299
  const { injectTestAttrsCommand } = injectModule;
300
300
  const { manifestCommand } = manifestModule;
@@ -388,35 +388,8 @@ async function registerTestCommands(program, requested, loadAllCommands) {
388
388
  }
389
389
  async function registerStatusCheckAndUtilityCommands(program, requested, loadAllCommands) {
390
390
  if (!loadAllCommands && requested) {
391
- if (requested === "status") {
392
- const { statusCommand: statusCommand2 } = await import('./status-UTKS63AB.js');
393
- program.addCommand(statusCommand2);
394
- return;
395
- }
396
- if (requested === "check") {
397
- const { checkCommand: checkCommand2 } = await import('./check-LOMVIRHX.js');
398
- program.addCommand(checkCommand2.name("check"));
399
- return;
400
- }
401
- if (requested === "doctor") {
402
- const { doctorCommand: doctorCommand2 } = await import('./doctor-MZLOA53G.js');
403
- program.addCommand(doctorCommand2);
404
- return;
405
- }
406
- if (requested === "cache") {
407
- const { cacheCommand: cacheCommand2 } = await import('./cache-N7WNPEYF.js');
408
- program.addCommand(cacheCommand2);
409
- return;
410
- }
411
- if (requested === "telemetry") {
412
- const { telemetryCommand: telemetryCommand2 } = await import('./telemetry-P56UBLZ2.js');
413
- program.addCommand(telemetryCommand2);
414
- return;
415
- }
416
- if (requested === "link" || requested === "unlink") {
417
- const { linkCommand: linkCommand2, unlinkCommand: unlinkCommand2 } = await import('./link-VSNDVZZD.js');
418
- program.addCommand(linkCommand2);
419
- program.addCommand(unlinkCommand2);
391
+ const handled = await registerFocusedStatusUtilityCommand(program, requested);
392
+ if (handled) {
420
393
  return;
421
394
  }
422
395
  }
@@ -426,13 +399,15 @@ async function registerStatusCheckAndUtilityCommands(program, requested, loadAll
426
399
  { doctorCommand },
427
400
  { cacheCommand },
428
401
  { telemetryCommand },
402
+ { observabilityCommand },
429
403
  { linkCommand, unlinkCommand }
430
404
  ] = await Promise.all([
431
405
  import('./status-UTKS63AB.js'),
432
- import('./check-LOMVIRHX.js'),
433
- import('./doctor-MZLOA53G.js'),
406
+ import('./check-PCSQPYDM.js'),
407
+ import('./doctor-ROSWSMLH.js'),
434
408
  import('./cache-N7WNPEYF.js'),
435
409
  import('./telemetry-P56UBLZ2.js'),
410
+ import('./observability-CJA5UFIC.js'),
436
411
  import('./link-VSNDVZZD.js')
437
412
  ]);
438
413
  program.addCommand(statusCommand);
@@ -440,15 +415,58 @@ async function registerStatusCheckAndUtilityCommands(program, requested, loadAll
440
415
  program.addCommand(doctorCommand);
441
416
  program.addCommand(cacheCommand);
442
417
  program.addCommand(telemetryCommand);
418
+ program.addCommand(observabilityCommand);
443
419
  program.addCommand(linkCommand);
444
420
  program.addCommand(unlinkCommand);
445
421
  }
422
+ async function registerFocusedStatusUtilityCommand(program, requested) {
423
+ if (!requested) {
424
+ return false;
425
+ }
426
+ if (requested === "status") {
427
+ const { statusCommand } = await import('./status-UTKS63AB.js');
428
+ program.addCommand(statusCommand);
429
+ return true;
430
+ }
431
+ if (requested === "check") {
432
+ const { checkCommand } = await import('./check-PCSQPYDM.js');
433
+ program.addCommand(checkCommand.name("check"));
434
+ return true;
435
+ }
436
+ if (requested === "doctor") {
437
+ const { doctorCommand } = await import('./doctor-ROSWSMLH.js');
438
+ program.addCommand(doctorCommand);
439
+ return true;
440
+ }
441
+ if (requested === "cache") {
442
+ const { cacheCommand } = await import('./cache-N7WNPEYF.js');
443
+ program.addCommand(cacheCommand);
444
+ return true;
445
+ }
446
+ if (requested === "telemetry") {
447
+ const { telemetryCommand } = await import('./telemetry-P56UBLZ2.js');
448
+ program.addCommand(telemetryCommand);
449
+ return true;
450
+ }
451
+ if (requested === "observability") {
452
+ const { observabilityCommand } = await import('./observability-CJA5UFIC.js');
453
+ program.addCommand(observabilityCommand);
454
+ return true;
455
+ }
456
+ if (requested === "link" || requested === "unlink") {
457
+ const { linkCommand, unlinkCommand } = await import('./link-VSNDVZZD.js');
458
+ program.addCommand(linkCommand);
459
+ program.addCommand(unlinkCommand);
460
+ return true;
461
+ }
462
+ return false;
463
+ }
446
464
  async function registerCiCommand(program) {
447
- const { ciCommand } = await import('./ci-ZWRVWNFX.js');
465
+ const { ciCommand } = await import('./ci-Z4525QW6.js');
448
466
  program.addCommand(ciCommand);
449
467
  }
450
468
  async function registerDbCommand(program) {
451
- const { dbCommand } = await import('./db-XULCILOU.js');
469
+ const { dbCommand } = await import('./db-BPQ2TEQM.js');
452
470
  program.addCommand(dbCommand);
453
471
  }
454
472
  async function registerServicesCommand(program) {
@@ -456,11 +474,11 @@ async function registerServicesCommand(program) {
456
474
  program.addCommand(servicesCommand);
457
475
  }
458
476
  async function registerEnvCommand(program) {
459
- const { envCommand } = await import('./env-SS66PZ4B.js');
477
+ const { envCommand } = await import('./env-WNHJVLOT.js');
460
478
  program.addCommand(envCommand);
461
479
  }
462
480
  async function registerHotfixCommand(program) {
463
- const { hotfixCommand } = await import('./hotfix-YA3DGLOM.js');
481
+ const { hotfixCommand } = await import('./hotfix-Z5EGVSMH.js');
464
482
  program.addCommand(hotfixCommand);
465
483
  }
466
484
  async function registerSdkCommand(program) {
@@ -472,19 +490,19 @@ async function registerUiCommand(program) {
472
490
  program.addCommand(uiCommand);
473
491
  }
474
492
  async function registerWatchCommand(program) {
475
- const { watchCommand } = await import('./watch-PNTKZYFB.js');
493
+ const { watchCommand } = await import('./watch-ITYW57SL.js');
476
494
  program.addCommand(watchCommand);
477
495
  }
478
496
  async function registerWorkflowCommand(program) {
479
- const { workflowCommand } = await import('./workflow-H75N4BXX.js');
497
+ const { workflowCommand } = await import('./workflow-UZIZ2JUS.js');
480
498
  program.addCommand(workflowCommand);
481
499
  }
482
500
  async function registerVulnCheckCommand(program) {
483
- const { vulnCheckCommand } = await import('./vuln-check-2W7N5TA2.js');
501
+ const { vulnCheckCommand } = await import('./vuln-check-66RXX3TO.js');
484
502
  program.addCommand(vulnCheckCommand);
485
503
  }
486
504
  async function registerTemplateCheckCommand(program) {
487
- const { templateCheckCommand } = await import('./template-check-3P4HZXVY.js');
505
+ const { templateCheckCommand } = await import('./template-check-BDFMT6ZO.js');
488
506
  program.addCommand(templateCheckCommand);
489
507
  }
490
508
  async function registerSessionCommands(program) {
@@ -689,14 +707,14 @@ async function executeProgram(program) {
689
707
  const isHelpOrVersion = argv.includes("--help") || argv.includes("-h") || argv.includes("--version") || argv.includes("-V");
690
708
  if (!isHelpOrVersion && shouldRunRuntimeBootstrap(argv)) {
691
709
  const [{ loadEnvFiles }, { enforceLicenseInCI }] = await Promise.all([
692
- import('./env-files-2UIUYLLR.js'),
710
+ import('./env-files-HRNUGZ5O.js'),
693
711
  import('./license-OB7GVJQ2.js')
694
712
  ]);
695
713
  loadEnvFiles({
696
714
  silent: true
697
715
  });
698
716
  await enforceLicenseInCI();
699
- await import('./env-HMMRSYCI.js');
717
+ await import('./env-XPPACZM4.js');
700
718
  }
701
719
  await program.parseAsync(process.argv);
702
720
  }
@@ -62,9 +62,9 @@ export declare function showSchemaDiff(repoRoot: string, tmpDir: string): Promis
62
62
  * Honors RUNA_SKIP_SCHEMA_RISK environment variable.
63
63
  * Provides actionable error messages for initial deployment scenarios.
64
64
  */
65
- export declare function detectRisks(repoRoot: string, tmpDir: string): Promise<void>;
66
- export declare function snapshotCreate(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string, commit: string): Promise<void>;
67
- export declare function snapshotRestoreLatest(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string): Promise<void>;
65
+ export declare function detectRisks(repoRoot: string, tmpDir: string, timeoutMs?: number): Promise<void>;
66
+ export declare function snapshotCreate(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string, commit: string, timeoutMs?: number): Promise<void>;
67
+ export declare function snapshotRestoreLatest(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string, timeoutMs?: number): Promise<void>;
68
68
  /**
69
69
  * Schema apply options
70
70
  */
@@ -102,7 +102,9 @@ export interface SchemaApplyResult {
102
102
  /** Execution metrics (optional) */
103
103
  metrics?: SchemaApplyMetrics;
104
104
  }
105
- export declare function applyProductionSchema(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string, productionDbUrl: string, options?: SchemaApplyOptions): Promise<SchemaApplyResult>;
105
+ export declare function applyProductionSchema(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string, productionDbUrl: string, options?: SchemaApplyOptions & {
106
+ timeoutMs?: number;
107
+ }): Promise<SchemaApplyResult>;
106
108
  export declare function auditRecord(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string, params: {
107
109
  commit: string;
108
110
  author: string;
@@ -21,6 +21,9 @@ export declare const CiProdApplyActionOptionsSchema: z.ZodObject<{
21
21
  allowDataLoss: z.ZodOptional<z.ZodBoolean>;
22
22
  confirmAuthzUpdate: z.ZodOptional<z.ZodBoolean>;
23
23
  maxLockWaitMs: z.ZodOptional<z.ZodNumber>;
24
+ riskTimeoutMs: z.ZodOptional<z.ZodNumber>;
25
+ snapshotTimeoutMs: z.ZodOptional<z.ZodNumber>;
26
+ applyTimeoutMs: z.ZodOptional<z.ZodNumber>;
24
27
  }, z.core.$strict>;
25
28
  export type CiProdApplyActionOptions = z.infer<typeof CiProdApplyActionOptionsSchema>;
26
29
  //# sourceMappingURL=ci-prod-types.d.ts.map
@@ -1,4 +1,4 @@
1
- import { type createCLILogger } from '@runa-ai/runa';
1
+ import type { createCLILogger } from '@runa-ai/runa/cli-runtime';
2
2
  import type { CiSummary } from '../utils/ci-summary.js';
3
3
  import type { ProdApplyInputs } from './ci-prod-utils.js';
4
4
  import type { CiProdApplyActionOptions } from './ci-prod-types.js';
@@ -11,7 +11,7 @@
11
11
  * - This module used to be named `ci-pr-resolvers.ts`. It is now shared across CI commands.
12
12
  */
13
13
  import type { CiSummary } from '../utils/ci-summary.js';
14
- export type CiPrPhase = 'all' | 'test';
14
+ export type CiPrPhase = 'all' | 'blocking' | 'observability' | 'test';
15
15
  export type CiDbMode = 'auto' | 'local';
16
16
  export type CiPrProfile = 'runa-strict' | 'pj-stable';
17
17
  export type CiPrPolicy = {
@@ -6,6 +6,7 @@
6
6
  * Note:
7
7
  * - This module used to be named `ci-pr-supabase-local.ts`. It is now shared across CI commands.
8
8
  */
9
+ import type { SupabaseResolutionDiagnostics } from '../utils/ci-diagnostics.js';
9
10
  /**
10
11
  * Pre-flight check for port conflicts before starting Supabase.
11
12
  * Warns if DB port is already occupied by another Supabase instance.
@@ -14,6 +15,7 @@ export declare function checkSupabasePortConflicts(repoRoot: string): Promise<vo
14
15
  export declare function startSupabaseLocal(params: {
15
16
  repoRoot: string;
16
17
  tmpDir: string;
18
+ skipStart?: boolean;
17
19
  }): Promise<void>;
18
20
  export declare function stopSupabaseLocal(params: {
19
21
  repoRoot: string;
@@ -42,9 +44,11 @@ export declare const DEFAULT_LOCAL_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV
42
44
  export declare function resolveLocalSupabaseEnv(params: {
43
45
  repoRoot: string;
44
46
  tmpDir: string;
47
+ assumeReady?: boolean;
45
48
  }): Promise<{
46
49
  supabaseUrl: string;
47
50
  anonKey: string;
51
+ diagnostics: SupabaseResolutionDiagnostics;
48
52
  }>;
49
53
  export declare function setupLocalDbRolesIfDrizzle(params: {
50
54
  repoRoot: string;
@@ -23,7 +23,7 @@ export interface BuildAndPlaywrightInput {
23
23
  }
24
24
  export interface BuildAndPlaywrightOutput {
25
25
  buildPassed: boolean;
26
- manifestGenerated: boolean;
26
+ manifestGenerated: boolean | null;
27
27
  playwrightInstalled: boolean;
28
28
  buildError?: string;
29
29
  manifestError?: string;
@@ -5,7 +5,7 @@
5
5
  * Pattern: Fine-grained actor for single step
6
6
  *
7
7
  * Comparison strategy:
8
- * - Reference stats: Build a temporary reference DB from repo SQL, then query it
8
+ * - Reference stats: Build a temporary reference DB from repo SQL, or reuse the synced CI DB
9
9
  * - CI stats: Query CI database (Docker Supabase or Branch DB)
10
10
  * - Production stats: Query Production DB (if GH_DATABASE_URL_ADMIN set)
11
11
  *
@@ -15,7 +15,8 @@
15
15
  *
16
16
  * Results are used for PR comment Schema Status table.
17
17
  */
18
- import { type SchemaStatsSnapshot } from './schema-stats.js';
18
+ import { type EnvironmentSchemaStats, type ExpectedDriftEntry, type SchemaStatsSnapshot } from './schema-stats.js';
19
+ export type ReferenceStatsStrategy = 'rebuild' | 'reuse-ci';
19
20
  export interface CollectSchemaStatsInput {
20
21
  /** Repository root (used to build a reference DB from repo SQL) */
21
22
  repoRoot: string;
@@ -23,8 +24,14 @@ export interface CollectSchemaStatsInput {
23
24
  referenceDbUrl: string | null;
24
25
  /** CI database URL (Docker Supabase or Branch DB) */
25
26
  ciDbUrl: string | null;
27
+ /** How to resolve the reference schema snapshot */
28
+ referenceStrategy?: ReferenceStatsStrategy;
26
29
  /** Whether to query production (requires GH_DATABASE_URL_ADMIN) */
27
30
  queryProduction: boolean;
31
+ /** Collect CI semantic diff snapshots (expensive, optional in PR CI) */
32
+ includeCiSemantic?: boolean;
33
+ /** Expected drift entries used to decide whether semantic comparison is still necessary */
34
+ expectedDrift?: ExpectedDriftEntry[];
28
35
  /** Temporary directory for logs */
29
36
  tmpDir: string;
30
37
  }
@@ -32,6 +39,12 @@ export interface CollectSchemaStatsOutput {
32
39
  /** Schema statistics snapshot */
33
40
  schemaStats: SchemaStatsSnapshot;
34
41
  }
42
+ export declare function shouldCollectProductionSemanticSnapshot(params: {
43
+ reference: EnvironmentSchemaStats;
44
+ production: EnvironmentSchemaStats | null;
45
+ expectedDrift?: ExpectedDriftEntry[];
46
+ }): boolean;
47
+ export declare function shouldCollectCiSemanticSnapshot(reference: EnvironmentSchemaStats, ci: EnvironmentSchemaStats): boolean;
35
48
  /**
36
49
  * Collect schema statistics from all environments.
37
50
  * All environments use the same DB query logic for consistent comparison.
@@ -4,31 +4,59 @@
4
4
  * Purpose: Run dry-run against production to preview schema changes
5
5
  * Pattern: Fine-grained actor for single step
6
6
  *
7
- * Runs `runa db apply production --check` to preview what SQL would be
7
+ * Runs `runa db apply production --check --compare-only` to preview what SQL would be
8
8
  * applied to production. Results are shown in PR comment.
9
9
  *
10
10
  * Prerequisites:
11
11
  * - GH_DATABASE_URL_ADMIN must be set (postgres role, DDL capable)
12
- * - Falls back to GH_DATABASE_URL if _ADMIN not set
13
12
  */
14
13
  import type { ProductionPreview } from '../../types.js';
15
14
  export interface ProductionPreviewInput {
16
15
  repoRoot: string;
17
16
  tmpDir: string;
18
- /** Whether to execute (skip if GH_DATABASE_URL_ADMIN/GH_DATABASE_URL not set) */
17
+ /** Whether to execute (skip if GH_DATABASE_URL_ADMIN is not set) */
19
18
  shouldExecute: boolean;
20
19
  }
21
20
  export interface ProductionPreviewOutput {
22
21
  preview: ProductionPreview;
23
22
  }
23
+ export type SchemaChangeState = 'changes' | 'no-changes' | 'unknown';
24
+ /**
25
+ * Strip ANSI escape codes from string.
26
+ * Covers: colors, bold, underline, cursor movement, etc.
27
+ */
28
+ export declare function stripAnsi(text: string): string;
29
+ interface StructuredPreviewResult {
30
+ planSql: string | null;
31
+ filteredPlanSql: string | null;
32
+ hazards: string[];
33
+ hasChanges: boolean;
34
+ checkOnly: boolean;
35
+ metrics?: {
36
+ totalMs?: number;
37
+ idempotentMs?: number;
38
+ applyMs?: number;
39
+ };
40
+ }
41
+ export declare function tryParseStructuredOutput(stdout: string): StructuredPreviewResult | null;
42
+ /**
43
+ * Detect whether db apply --check output indicates schema changes.
44
+ *
45
+ * Important:
46
+ * - "No changes were applied (check mode)" is always true in check mode and MUST NOT
47
+ * be treated as "schema changes = none".
48
+ * - We prefer explicit change/no-change summary lines from db apply output.
49
+ */
50
+ export declare function detectSchemaChangeState(fullOutput: string): SchemaChangeState;
24
51
  /**
25
52
  * Run production schema preview (dry-run).
26
53
  *
27
- * Uses `runa db apply production --check` to show what SQL would be applied
54
+ * Uses `runa db apply production --check --compare-only` to show what SQL would be applied
28
55
  * to production without actually applying changes.
29
56
  *
30
57
  * @param input - Preview parameters
31
58
  * @returns ProductionPreview with planSql, hazards, and hasChanges
32
59
  */
33
60
  export declare const productionPreviewActor: import("xstate").PromiseActorLogic<ProductionPreviewOutput, ProductionPreviewInput, import("xstate").EventObject>;
61
+ export {};
34
62
  //# sourceMappingURL=production-preview.d.ts.map
@@ -11,7 +11,7 @@
11
11
  * - Indexes (definition, uniqueness, predicate)
12
12
  * - Triggers (definition)
13
13
  */
14
- export type CanonicalSchemaObjectKind = 'table' | 'function' | 'policy' | 'index' | 'trigger';
14
+ export type CanonicalSchemaObjectKind = 'table' | 'function' | 'policy' | 'index' | 'trigger' | 'schema_acl' | 'schema_comment' | 'table_acl' | 'table_comment' | 'function_acl' | 'function_comment';
15
15
  export interface CanonicalSchemaObject {
16
16
  kind: CanonicalSchemaObjectKind;
17
17
  schema: string;
@@ -36,6 +36,12 @@ export interface CanonicalSchemaDiff {
36
36
  changed: CanonicalSchemaObjectPair[];
37
37
  renamed: CanonicalSchemaObjectPair[];
38
38
  }
39
+ export interface CanonicalDriftClassification {
40
+ kinds: CanonicalSchemaObjectKind[];
41
+ structural: boolean;
42
+ securityMetadata: boolean;
43
+ descriptiveMetadata: boolean;
44
+ }
39
45
  export interface SchemaSemanticSummary {
40
46
  hasChanges: boolean;
41
47
  changedKinds: CanonicalSchemaObjectKind[];
@@ -48,8 +54,31 @@ export interface SchemaSemanticSummary {
48
54
  }
49
55
  export type CanonicalDiffBySchema = Record<string, SchemaSemanticSummary>;
50
56
  export declare function createUnavailableCanonicalSnapshot(error: string): CanonicalSchemaSnapshot;
57
+ interface TableColumnRow {
58
+ schema_name: string;
59
+ table_name: string;
60
+ attnum: number;
61
+ column_name: string;
62
+ data_type: string;
63
+ not_null: boolean;
64
+ default_expr?: string | null;
65
+ identity_kind?: string | null;
66
+ generated_kind?: string | null;
67
+ }
68
+ interface CanonicalTableColumnPayload {
69
+ name: string;
70
+ type: string;
71
+ notNull: boolean;
72
+ default: string;
73
+ identity: string;
74
+ generated: string;
75
+ }
76
+ export declare function createCanonicalTableColumnPayload(row: Pick<TableColumnRow, 'column_name' | 'data_type' | 'not_null' | 'default_expr' | 'identity_kind' | 'generated_kind'>): CanonicalTableColumnPayload;
77
+ export declare function sortCanonicalTableColumns(columns: readonly CanonicalTableColumnPayload[]): CanonicalTableColumnPayload[];
51
78
  export declare function getCanonicalSchemaSnapshot(databaseUrl: string): Promise<CanonicalSchemaSnapshot>;
52
79
  export declare function compareCanonicalSnapshots(reference: CanonicalSchemaSnapshot, target: CanonicalSchemaSnapshot): CanonicalSchemaDiff;
53
80
  export declare function summarizeCanonicalDiffBySchema(diff: CanonicalSchemaDiff): CanonicalDiffBySchema;
54
81
  export declare function hasCanonicalChanges(diff: CanonicalSchemaDiff): boolean;
82
+ export declare function classifyCanonicalDiff(diff: CanonicalSchemaDiff): CanonicalDriftClassification;
83
+ export {};
55
84
  //# sourceMappingURL=schema-canonical-diff.d.ts.map
@@ -32,6 +32,7 @@ export interface SyncSchemaInput {
32
32
  databaseUrl: string;
33
33
  mode: CiMode;
34
34
  skipCodegen?: boolean;
35
+ skipPostCheck?: boolean;
35
36
  }
36
37
  export interface SyncSchemaOutput {
37
38
  applied: boolean;
@@ -5,5 +5,4 @@
5
5
  * Pattern: Barrel export for clean imports
6
6
  */
7
7
  export { type AddLabelsInput, type AddLabelsOutput, addLabelsActor, buildWorkflowRunUrl, type FindPrInput, type FindPrOutput, findPrActor, type RepoContext, resolveRepoContextFromEnv, type UpsertCommentInput, type UpsertCommentOutput, upsertCommentActor, } from './github.js';
8
- export { type CiLayerStatus, CiLayerStatusSchema, type CiStepStatus, CiStepStatusSchema, type CiSummary, CiSummarySchema, type LayerBlockingLevel, LayerBlockingLevelSchema, type WriteSummaryInput, type WriteSummaryOutput, writeSummaryActor, } from './summary.js';
9
8
  //# sourceMappingURL=index.d.ts.map
@@ -8,7 +8,7 @@
8
8
  * - db/*: Database operations (reset, sync, seeds, roles, pgtap, pull-production)
9
9
  * - build/*: Build operations (static-checks, app-build, app-start, playwright)
10
10
  * - test/*: Test operations (capabilities, run-layers)
11
- * - finalize/*: Finalization (summary, github)
11
+ * - finalize/*: Finalization (github reporting)
12
12
  */
13
13
  export * from './build/index.js';
14
14
  export * from './db/index.js';
@@ -12,6 +12,7 @@
12
12
  *
13
13
  * Used only in ci-local mode (runa ci local).
14
14
  */
15
+ import type { CiDiagnostics } from '../../../utils/ci-diagnostics.js';
15
16
  export interface LocalSetupInput {
16
17
  targetDir?: string;
17
18
  layer?: string;
@@ -29,6 +30,7 @@ export interface LocalSetupOutput {
29
30
  supabaseUrl: string;
30
31
  anonKey: string;
31
32
  layers: number[];
33
+ diagnostics?: CiDiagnostics;
32
34
  error?: string;
33
35
  }
34
36
  /**
@@ -14,6 +14,7 @@
14
14
  * - resolvePolicy: Resolve CI policy from config or defaults
15
15
  * - detectApp: Detect app configuration for E2E tests
16
16
  */
17
+ import type { CiDiagnostics } from '../../../utils/ci-diagnostics.js';
17
18
  import type { ExpectedDriftEntry } from '../../actors/db/schema-stats.js';
18
19
  import type { CiPrPolicy, DetectedApp, PrContext, RepoKind } from '../../types.js';
19
20
  /**
@@ -96,6 +97,7 @@ export interface PrSetupBaseInput {
96
97
  config?: unknown;
97
98
  verbose?: boolean;
98
99
  layers?: number[];
100
+ skipPlaywrightInstall?: boolean;
99
101
  githubRef?: string;
100
102
  githubEventAction?: string;
101
103
  githubSha?: string;
@@ -117,6 +119,7 @@ export interface PrSetupBaseOutput {
117
119
  anonKey: string;
118
120
  layers: number[];
119
121
  expectedDrift: ExpectedDriftEntry[];
122
+ diagnostics?: CiDiagnostics;
120
123
  error?: string;
121
124
  }
122
125
  /**
@@ -7,6 +7,8 @@
7
7
  import type { PrSetupBaseInput, PrSetupBaseOutput } from './pr-common.js';
8
8
  export interface PrLocalSetupInput extends PrSetupBaseInput {
9
9
  databaseUrl?: string;
10
+ skipLocalDbStart?: boolean;
11
+ assumeSupabaseReady?: boolean;
10
12
  }
11
13
  export interface PrLocalSetupOutput extends PrSetupBaseOutput {
12
14
  }
@@ -10,8 +10,14 @@
10
10
  * - Fire-and-forget pattern (non-blocking)
11
11
  */
12
12
  import type { CLILogger } from '@runa-ai/runa';
13
+ import { type CiStep, type StepTimings } from '../formatters/github-comment.js';
13
14
  import { type CiSnapshot } from '../machine.js';
14
15
  import type { CiInput, CiOutput, LayerResult } from '../types.js';
16
+ export declare function resolveStepForState(state: string): CiStep | undefined;
17
+ /**
18
+ * Get completed steps based on current step.
19
+ */
20
+ export declare function getCompletedSteps(currentStep: CiStep, stepTimings?: StepTimings): CiStep[];
15
21
  /**
16
22
  * State change callback type.
17
23
  */
@@ -0,0 +1,16 @@
1
+ import type { StepSummary } from '../contract.js';
2
+ import type { CiContext } from '../types.js';
3
+ export declare function getCanonicalStepId(statePath: string): string | null;
4
+ export declare function getStepOrderFromStatePath(statePath: string): number;
5
+ export declare function pickPrimaryStatePath(statePaths: string[], previousStatePath?: string): string | undefined;
6
+ export interface StepTelemetryTracker {
7
+ transition: (statePaths: string[], nowMs?: number) => void;
8
+ finalize: (params: {
9
+ context: CiContext;
10
+ succeeded: boolean;
11
+ failedStatePath?: string | null;
12
+ nowMs?: number;
13
+ }) => Record<string, StepSummary>;
14
+ }
15
+ export declare function createStepTelemetryTracker(): StepTelemetryTracker;
16
+ //# sourceMappingURL=step-telemetry.d.ts.map