oxe-cc 1.2.1 → 1.3.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 (276) hide show
  1. package/.cursor/commands/oxe-ask.md +2 -2
  2. package/.cursor/commands/oxe-capabilities.md +2 -2
  3. package/.cursor/commands/oxe-checkpoint.md +2 -2
  4. package/.cursor/commands/oxe-compact.md +2 -2
  5. package/.cursor/commands/oxe-dashboard.md +2 -2
  6. package/.cursor/commands/oxe-debug.md +2 -2
  7. package/.cursor/commands/oxe-discuss.md +2 -2
  8. package/.cursor/commands/oxe-execute.md +5 -2
  9. package/.cursor/commands/oxe-forensics.md +2 -2
  10. package/.cursor/commands/oxe-help.md +2 -2
  11. package/.cursor/commands/oxe-loop.md +2 -2
  12. package/.cursor/commands/oxe-milestone.md +2 -2
  13. package/.cursor/commands/oxe-next.md +2 -2
  14. package/.cursor/commands/oxe-obs.md +2 -2
  15. package/.cursor/commands/oxe-plan-agent.md +2 -2
  16. package/.cursor/commands/oxe-plan.md +2 -2
  17. package/.cursor/commands/oxe-project.md +2 -2
  18. package/.cursor/commands/oxe-quick.md +2 -2
  19. package/.cursor/commands/oxe-research.md +2 -2
  20. package/.cursor/commands/oxe-retro.md +2 -2
  21. package/.cursor/commands/oxe-review-pr.md +2 -2
  22. package/.cursor/commands/oxe-route.md +2 -2
  23. package/.cursor/commands/oxe-scan.md +2 -2
  24. package/.cursor/commands/oxe-security.md +2 -2
  25. package/.cursor/commands/oxe-session.md +2 -2
  26. package/.cursor/commands/oxe-ship.md +2 -2
  27. package/.cursor/commands/oxe-skill.md +2 -2
  28. package/.cursor/commands/oxe-spec.md +2 -2
  29. package/.cursor/commands/oxe-ui-review.md +2 -2
  30. package/.cursor/commands/oxe-ui-spec.md +2 -2
  31. package/.cursor/commands/oxe-update.md +2 -2
  32. package/.cursor/commands/oxe-validate-gaps.md +2 -2
  33. package/.cursor/commands/oxe-verify.md +5 -2
  34. package/.cursor/commands/oxe-workstream.md +2 -2
  35. package/.cursor/commands/oxe.md +2 -2
  36. package/.github/copilot-instructions.md +13 -13
  37. package/.github/prompts/oxe-ask.prompt.md +2 -2
  38. package/.github/prompts/oxe-capabilities.prompt.md +2 -2
  39. package/.github/prompts/oxe-checkpoint.prompt.md +2 -2
  40. package/.github/prompts/oxe-compact.prompt.md +2 -2
  41. package/.github/prompts/oxe-dashboard.prompt.md +2 -2
  42. package/.github/prompts/oxe-debug.prompt.md +2 -2
  43. package/.github/prompts/oxe-discuss.prompt.md +2 -2
  44. package/.github/prompts/oxe-execute.prompt.md +5 -2
  45. package/.github/prompts/oxe-forensics.prompt.md +2 -2
  46. package/.github/prompts/oxe-help.prompt.md +2 -2
  47. package/.github/prompts/oxe-loop.prompt.md +2 -2
  48. package/.github/prompts/oxe-milestone.prompt.md +2 -2
  49. package/.github/prompts/oxe-next.prompt.md +2 -2
  50. package/.github/prompts/oxe-obs.prompt.md +2 -2
  51. package/.github/prompts/oxe-plan-agent.prompt.md +2 -2
  52. package/.github/prompts/oxe-plan.prompt.md +2 -2
  53. package/.github/prompts/oxe-project.prompt.md +2 -2
  54. package/.github/prompts/oxe-quick.prompt.md +2 -2
  55. package/.github/prompts/oxe-research.prompt.md +2 -2
  56. package/.github/prompts/oxe-retro.prompt.md +2 -2
  57. package/.github/prompts/oxe-review-pr.prompt.md +2 -2
  58. package/.github/prompts/oxe-route.prompt.md +2 -2
  59. package/.github/prompts/oxe-scan.prompt.md +2 -2
  60. package/.github/prompts/oxe-security.prompt.md +2 -2
  61. package/.github/prompts/oxe-session.prompt.md +2 -2
  62. package/.github/prompts/oxe-ship.prompt.md +2 -2
  63. package/.github/prompts/oxe-skill.prompt.md +2 -2
  64. package/.github/prompts/oxe-spec.prompt.md +2 -2
  65. package/.github/prompts/oxe-ui-review.prompt.md +2 -2
  66. package/.github/prompts/oxe-ui-spec.prompt.md +2 -2
  67. package/.github/prompts/oxe-update.prompt.md +2 -2
  68. package/.github/prompts/oxe-validate-gaps.prompt.md +2 -2
  69. package/.github/prompts/oxe-verify.prompt.md +5 -2
  70. package/.github/prompts/oxe-workstream.prompt.md +2 -2
  71. package/.github/prompts/oxe.prompt.md +2 -2
  72. package/CHANGELOG.md +52 -17
  73. package/README.md +610 -551
  74. package/bin/banner.txt +1 -1
  75. package/bin/lib/oxe-agent-install.cjs +69 -69
  76. package/bin/lib/oxe-azure.cjs +1445 -1445
  77. package/bin/lib/oxe-context-engine.cjs +867 -867
  78. package/bin/lib/oxe-dashboard.cjs +76 -28
  79. package/bin/lib/oxe-operational.cjs +2144 -1340
  80. package/bin/lib/oxe-project-health.cjs +483 -1
  81. package/bin/lib/oxe-runtime-semantics.cjs +12 -0
  82. package/bin/oxe-cc.js +554 -152
  83. package/commands/oxe/ask.md +2 -2
  84. package/commands/oxe/capabilities.md +2 -2
  85. package/commands/oxe/checkpoint.md +2 -2
  86. package/commands/oxe/compact.md +2 -2
  87. package/commands/oxe/dashboard.md +2 -2
  88. package/commands/oxe/debug.md +2 -2
  89. package/commands/oxe/discuss.md +2 -2
  90. package/commands/oxe/execute.md +5 -2
  91. package/commands/oxe/forensics.md +2 -2
  92. package/commands/oxe/help.md +2 -2
  93. package/commands/oxe/loop.md +2 -2
  94. package/commands/oxe/milestone.md +2 -2
  95. package/commands/oxe/next.md +2 -2
  96. package/commands/oxe/obs.md +2 -2
  97. package/commands/oxe/oxe.md +2 -2
  98. package/commands/oxe/plan-agent.md +2 -2
  99. package/commands/oxe/plan.md +2 -2
  100. package/commands/oxe/project.md +2 -2
  101. package/commands/oxe/quick.md +2 -2
  102. package/commands/oxe/research.md +2 -2
  103. package/commands/oxe/retro.md +2 -2
  104. package/commands/oxe/review-pr.md +2 -2
  105. package/commands/oxe/route.md +2 -2
  106. package/commands/oxe/scan.md +2 -2
  107. package/commands/oxe/security.md +2 -2
  108. package/commands/oxe/session.md +2 -2
  109. package/commands/oxe/ship.md +2 -2
  110. package/commands/oxe/skill.md +2 -2
  111. package/commands/oxe/spec.md +2 -2
  112. package/commands/oxe/ui-review.md +2 -2
  113. package/commands/oxe/ui-spec.md +2 -2
  114. package/commands/oxe/update.md +2 -2
  115. package/commands/oxe/validate-gaps.md +2 -2
  116. package/commands/oxe/verify.md +5 -2
  117. package/commands/oxe/workstream.md +2 -2
  118. package/lib/runtime/delivery/branch-manager.d.ts +1 -0
  119. package/lib/runtime/delivery/branch-manager.js +7 -0
  120. package/lib/runtime/delivery/ci-checks.js +34 -1
  121. package/lib/runtime/delivery/delivery-records.d.ts +34 -0
  122. package/lib/runtime/delivery/delivery-records.js +48 -0
  123. package/lib/runtime/delivery/index.d.ts +1 -0
  124. package/lib/runtime/delivery/index.js +1 -0
  125. package/lib/runtime/delivery/promotion-pipeline.d.ts +26 -2
  126. package/lib/runtime/delivery/promotion-pipeline.js +111 -14
  127. package/lib/runtime/gate/gate-manager.d.ts +41 -0
  128. package/lib/runtime/gate/gate-manager.js +108 -1
  129. package/lib/runtime/index.d.ts +2 -2
  130. package/lib/runtime/index.js +3 -1
  131. package/lib/runtime/models/gate-decision.d.ts +4 -1
  132. package/lib/runtime/models/workspace.d.ts +3 -0
  133. package/lib/runtime/plugins/capability-adapter.d.ts +12 -0
  134. package/lib/runtime/plugins/capability-adapter.js +204 -0
  135. package/lib/runtime/plugins/capability-matrix.d.ts +5 -0
  136. package/lib/runtime/plugins/capability-matrix.js +48 -17
  137. package/lib/runtime/plugins/index.d.ts +1 -0
  138. package/lib/runtime/plugins/index.js +1 -0
  139. package/lib/runtime/plugins/plugin-abi.d.ts +2 -0
  140. package/lib/runtime/plugins/plugin-manifest.d.ts +1 -1
  141. package/lib/runtime/plugins/plugin-manifest.js +6 -2
  142. package/lib/runtime/plugins/plugin-registry.d.ts +46 -0
  143. package/lib/runtime/plugins/plugin-registry.js +79 -2
  144. package/lib/runtime/policy/policy-engine.d.ts +19 -0
  145. package/lib/runtime/policy/policy-engine.js +76 -4
  146. package/lib/runtime/projection/projection-engine.d.ts +9 -1
  147. package/lib/runtime/projection/projection-engine.js +73 -3
  148. package/lib/runtime/scheduler/multi-agent-coordinator.d.ts +43 -1
  149. package/lib/runtime/scheduler/multi-agent-coordinator.js +151 -39
  150. package/lib/runtime/scheduler/run-journal.d.ts +1 -1
  151. package/lib/runtime/scheduler/scheduler.d.ts +19 -1
  152. package/lib/runtime/scheduler/scheduler.js +258 -13
  153. package/lib/runtime/verification/verification-compiler.d.ts +43 -0
  154. package/lib/runtime/verification/verification-compiler.js +137 -0
  155. package/lib/runtime/verification/verification-manifest.d.ts +9 -0
  156. package/lib/runtime/verification/verification-manifest.js +56 -6
  157. package/lib/runtime/workspace/strategies/ephemeral-container.d.ts +1 -0
  158. package/lib/runtime/workspace/strategies/ephemeral-container.js +4 -0
  159. package/lib/runtime/workspace/strategies/git-worktree.d.ts +1 -0
  160. package/lib/runtime/workspace/strategies/git-worktree.js +2 -0
  161. package/lib/runtime/workspace/strategies/inplace.d.ts +1 -0
  162. package/lib/runtime/workspace/strategies/inplace.js +2 -0
  163. package/lib/runtime/workspace/workspace-manager.d.ts +2 -1
  164. package/lib/sdk/README.md +9 -9
  165. package/lib/sdk/index.cjs +33 -24
  166. package/lib/sdk/index.d.ts +149 -14
  167. package/oxe/templates/ACTIVE-RUN.template.json +32 -32
  168. package/oxe/templates/CAPABILITIES.template.md +7 -7
  169. package/oxe/templates/CAPABILITY.template.md +45 -45
  170. package/oxe/templates/CHECKPOINTS.template.md +7 -7
  171. package/oxe/templates/EXECUTION-RUNTIME.template.md +68 -68
  172. package/oxe/templates/HYPOTHESES.template.md +33 -33
  173. package/oxe/templates/LESSONS-METRICS.template.json +13 -13
  174. package/oxe/templates/NOTES.template.md +16 -16
  175. package/oxe/templates/PLAN-REVIEW.template.md +31 -31
  176. package/oxe/templates/SESSION.template.md +34 -34
  177. package/oxe/templates/SKILL.template.md +26 -26
  178. package/oxe/templates/STATE.md +55 -55
  179. package/oxe/templates/WORKFLOW_AUTHORING.md +18 -18
  180. package/oxe/workflows/ask.md +96 -96
  181. package/oxe/workflows/capabilities.md +25 -25
  182. package/oxe/workflows/dashboard.md +33 -33
  183. package/oxe/workflows/discuss.md +12 -12
  184. package/oxe/workflows/execute.md +14 -0
  185. package/oxe/workflows/help.md +352 -352
  186. package/oxe/workflows/next.md +22 -22
  187. package/oxe/workflows/oxe.md +6 -6
  188. package/oxe/workflows/plan-agent.md +9 -9
  189. package/oxe/workflows/quick.md +10 -10
  190. package/oxe/workflows/references/reasoning-discovery.md +28 -28
  191. package/oxe/workflows/references/reasoning-execution.md +29 -29
  192. package/oxe/workflows/references/reasoning-planning.md +32 -32
  193. package/oxe/workflows/references/reasoning-review.md +29 -29
  194. package/oxe/workflows/references/reasoning-status.md +24 -24
  195. package/oxe/workflows/references/robustness-elevation.md +295 -295
  196. package/oxe/workflows/references/workflow-runtime-contracts.json +952 -930
  197. package/oxe/workflows/route.md +16 -16
  198. package/oxe/workflows/session.md +213 -213
  199. package/oxe/workflows/ship.md +142 -142
  200. package/oxe/workflows/skill.md +44 -44
  201. package/oxe/workflows/ui-review.md +36 -36
  202. package/oxe/workflows/verify-audit.md +73 -73
  203. package/oxe/workflows/verify.md +10 -0
  204. package/package.json +92 -92
  205. package/packages/runtime/package.json +17 -17
  206. package/packages/runtime/src/audit/audit-trail.ts +243 -243
  207. package/packages/runtime/src/audit/index.ts +2 -2
  208. package/packages/runtime/src/audit/policy-pack.ts +62 -62
  209. package/packages/runtime/src/compiler/graph-compiler.ts +245 -245
  210. package/packages/runtime/src/compiler/index.ts +1 -1
  211. package/packages/runtime/src/context/context-pack-builder.ts +259 -259
  212. package/packages/runtime/src/context/context-pack-store.ts +197 -197
  213. package/packages/runtime/src/context/context-profiles.ts +60 -60
  214. package/packages/runtime/src/context/index.ts +3 -3
  215. package/packages/runtime/src/decision/decision-engine.ts +174 -174
  216. package/packages/runtime/src/decision/decision-memo.ts +211 -211
  217. package/packages/runtime/src/decision/index.ts +2 -2
  218. package/packages/runtime/src/delivery/branch-manager.ts +91 -84
  219. package/packages/runtime/src/delivery/ci-checks.ts +285 -252
  220. package/packages/runtime/src/delivery/delivery-records.ts +75 -0
  221. package/packages/runtime/src/delivery/index.ts +5 -4
  222. package/packages/runtime/src/delivery/pr-manager.ts +112 -112
  223. package/packages/runtime/src/delivery/promotion-pipeline.ts +334 -180
  224. package/packages/runtime/src/events/bus.ts +92 -92
  225. package/packages/runtime/src/events/catalog.ts +29 -29
  226. package/packages/runtime/src/events/envelope.ts +14 -14
  227. package/packages/runtime/src/events/index.ts +3 -3
  228. package/packages/runtime/src/evidence/evidence-store.ts +130 -130
  229. package/packages/runtime/src/evidence/index.ts +1 -1
  230. package/packages/runtime/src/gate/gate-manager.ts +289 -137
  231. package/packages/runtime/src/gate/index.ts +1 -1
  232. package/packages/runtime/src/index.ts +41 -37
  233. package/packages/runtime/src/models/attempt.ts +19 -19
  234. package/packages/runtime/src/models/evidence.ts +21 -21
  235. package/packages/runtime/src/models/gate-decision.ts +25 -21
  236. package/packages/runtime/src/models/index.ts +8 -8
  237. package/packages/runtime/src/models/run.ts +24 -24
  238. package/packages/runtime/src/models/session.ts +11 -11
  239. package/packages/runtime/src/models/verification-result.ts +10 -10
  240. package/packages/runtime/src/models/work-item.ts +25 -25
  241. package/packages/runtime/src/models/workspace.ts +31 -28
  242. package/packages/runtime/src/plugins/capability-adapter.ts +206 -0
  243. package/packages/runtime/src/plugins/capability-matrix.ts +126 -83
  244. package/packages/runtime/src/plugins/index.ts +5 -4
  245. package/packages/runtime/src/plugins/plugin-abi.ts +97 -95
  246. package/packages/runtime/src/plugins/plugin-manifest.ts +118 -113
  247. package/packages/runtime/src/plugins/plugin-registry.ts +232 -124
  248. package/packages/runtime/src/policy/index.ts +1 -1
  249. package/packages/runtime/src/policy/policy-engine.ts +330 -244
  250. package/packages/runtime/src/projection/index.ts +1 -1
  251. package/packages/runtime/src/projection/projection-engine.ts +328 -249
  252. package/packages/runtime/src/reducers/debug-reducer.ts +36 -36
  253. package/packages/runtime/src/reducers/index.ts +2 -2
  254. package/packages/runtime/src/reducers/run-state-reducer.ts +269 -269
  255. package/packages/runtime/src/scheduler/agent-registry.ts +132 -132
  256. package/packages/runtime/src/scheduler/agent-roles.ts +109 -109
  257. package/packages/runtime/src/scheduler/index.ts +4 -4
  258. package/packages/runtime/src/scheduler/multi-agent-coordinator.ts +521 -333
  259. package/packages/runtime/src/scheduler/run-journal.ts +62 -62
  260. package/packages/runtime/src/scheduler/scheduler.ts +722 -441
  261. package/packages/runtime/src/verification/index.ts +2 -2
  262. package/packages/runtime/src/verification/verification-compiler.ts +436 -225
  263. package/packages/runtime/src/verification/verification-manifest.ts +252 -192
  264. package/packages/runtime/src/workspace/index.ts +5 -5
  265. package/packages/runtime/src/workspace/strategies/ephemeral-container.ts +126 -121
  266. package/packages/runtime/src/workspace/strategies/git-worktree.ts +79 -77
  267. package/packages/runtime/src/workspace/strategies/inplace.ts +38 -35
  268. package/packages/runtime/src/workspace/workspace-manager.ts +16 -15
  269. package/packages/runtime/tsconfig.json +17 -17
  270. package/vscode-extension/.vscodeignore +7 -7
  271. package/vscode-extension/oxe-agents-1.0.0.vsix +0 -0
  272. package/vscode-extension/package.json +185 -185
  273. package/vscode-extension/src/extension.js +310 -310
  274. package/vscode-extension/src/shared/contextLoader.js +137 -137
  275. package/vscode-extension/src/shared/contractBuilder.js +159 -159
  276. package/vscode-extension/src/shared/stateReader.js +101 -101
package/bin/oxe-cc.js CHANGED
@@ -1643,6 +1643,70 @@ function runStatusFull(target) {
1643
1643
  console.log(` ${c ? dim : ''}Run:${c ? reset : ''} ${ar.run_id || '—'} ${c ? dim : ''}Estado:${c ? reset : ''} ${ar.status || '—'} ${c ? dim : ''}Onda:${c ? reset : ''} ${ar.current_wave != null ? ar.current_wave : '—'}`);
1644
1644
  }
1645
1645
 
1646
+ if (
1647
+ report.runtimeMode ||
1648
+ report.providerCatalog ||
1649
+ (report.activeRun && (report.verificationSummary || report.pendingGates || report.quotaSummary || report.auditSummary || report.promotionSummary || report.policyDecisionSummary)) ||
1650
+ (report.pendingGates && report.pendingGates.total > 0)
1651
+ ) {
1652
+ console.log(`\n ${c ? yellow : ''}Runtime enterprise${c ? reset : ''}`);
1653
+ if (report.runtimeMode) {
1654
+ console.log(` ${c ? dim : ''}Runtime mode:${c ? reset : ''} ${report.runtimeMode.runtime_mode || 'legacy'}${report.runtimeMode.enterprise_available === false ? ' (engine indisponível)' : ''}`);
1655
+ }
1656
+ if (report.fallbackMode) {
1657
+ console.log(` ${c ? dim : ''}Fallback:${c ? reset : ''} ${report.fallbackMode}${report.runtimeMode && report.runtimeMode.reason ? ` · ${report.runtimeMode.reason}` : ''}`);
1658
+ }
1659
+ if (report.verificationSummary) {
1660
+ console.log(` ${c ? dim : ''}Verification:${c ? reset : ''} total ${report.verificationSummary.total} · pass ${report.verificationSummary.pass} · fail ${report.verificationSummary.fail} · error ${report.verificationSummary.error}`);
1661
+ }
1662
+ if (report.residualRiskSummary) {
1663
+ console.log(` ${c ? dim : ''}Residual risks:${c ? reset : ''} total ${report.residualRiskSummary.total} · high/critical ${report.residualRiskSummary.highOrCritical}`);
1664
+ }
1665
+ if (report.evidenceCoverage) {
1666
+ console.log(` ${c ? dim : ''}Evidence coverage:${c ? reset : ''} ${report.evidenceCoverage.coverage_percent}% (${report.evidenceCoverage.checks_with_evidence}/${report.evidenceCoverage.total_checks})`);
1667
+ }
1668
+ if (report.pendingGates) {
1669
+ console.log(` ${c ? dim : ''}Pending gates:${c ? reset : ''} ${report.pendingGates.pending.length} (stale ${report.pendingGates.stalePending.length}) · SLA ${report.pendingGates.gateSlaHours || 24}h`);
1670
+ }
1671
+ if (report.policyDecisionSummary) {
1672
+ console.log(` ${c ? dim : ''}Policy decisions:${c ? reset : ''} total ${report.policyDecisionSummary.total} · denied ${report.policyDecisionSummary.denied} · gated ${report.policyDecisionSummary.gated} · override sem razão ${report.policyDecisionSummary.overridesWithoutRationale}`);
1673
+ }
1674
+ if (report.policyCoverage) {
1675
+ console.log(` ${c ? dim : ''}Policy coverage:${c ? reset : ''} ${report.policyCoverage.coveragePercent}% · mutations ${report.policyCoverage.coveredMutations}/${report.policyCoverage.mutationNodes}`);
1676
+ }
1677
+ if (report.quotaSummary) {
1678
+ const consumed = report.quotaSummary.consumed || {};
1679
+ const limits = report.quotaSummary.limits || {};
1680
+ console.log(` ${c ? dim : ''}Quotas:${c ? reset : ''} work items ${consumed.workItems ?? 0}/${limits.maxWorkItemsPerRun ?? '∞'} · mutations ${consumed.mutations ?? 0}/${limits.maxMutationsPerRun ?? '∞'} · retries ${consumed.retries ?? 0}/${limits.maxRetriesPerRun ?? '∞'}`);
1681
+ }
1682
+ if (report.auditSummary) {
1683
+ console.log(` ${c ? dim : ''}Audit trail:${c ? reset : ''} run ${report.auditSummary.runEntries} · warn ${report.auditSummary.warn} · critical ${report.auditSummary.critical}`);
1684
+ }
1685
+ if (report.promotionSummary) {
1686
+ console.log(` ${c ? dim : ''}Promotion:${c ? reset : ''} ${report.promotionSummary.status || '—'} · target ${report.promotionSummary.targetKind || '—'} · remote ${report.promotionSummary.remote || '—'}`);
1687
+ }
1688
+ if (report.promotionReadiness) {
1689
+ console.log(` ${c ? dim : ''}Promotion readiness:${c ? reset : ''} ${report.promotionReadiness.status || 'unknown'}${Array.isArray(report.promotionReadiness.blockers) && report.promotionReadiness.blockers.length ? ` · blockers ${report.promotionReadiness.blockers.join(', ')}` : ''}`);
1690
+ }
1691
+ if (report.recoveryState) {
1692
+ console.log(` ${c ? dim : ''}Recovery:${c ? reset : ''} ${report.recoveryState.status || 'unknown'} · recoveries ${report.recoveryState.recoverCount ?? 0} · issues ${Array.isArray(report.recoveryState.issues) ? report.recoveryState.issues.length : 0}`);
1693
+ }
1694
+ if (report.multiAgent) {
1695
+ const agents = Array.isArray(report.multiAgent.agents) ? report.multiAgent.agents.length : 0;
1696
+ const handoffs = Array.isArray(report.multiAgent.handoffs) ? report.multiAgent.handoffs.length : 0;
1697
+ const ownership = Array.isArray(report.multiAgent.ownership) ? report.multiAgent.ownership.length : 0;
1698
+ console.log(` ${c ? dim : ''}Multi-agent:${c ? reset : ''} ${report.multiAgent.enabled ? (report.multiAgent.mode || 'active') : 'disabled'} · agentes ${agents} · ownership ${ownership} · handoffs ${handoffs}`);
1699
+ }
1700
+ if (report.providerCatalog) {
1701
+ const summary = report.providerCatalog.summary || {};
1702
+ const pluginsCount = summary.pluginsCount ?? summary.total_plugins ?? (Array.isArray(summary.plugins) ? summary.plugins.length : 0);
1703
+ const toolProviders = summary.toolProviders ?? summary.tool_providers ?? 0;
1704
+ const verifierProviders = summary.verifierProviders ?? summary.verifier_providers ?? 0;
1705
+ const loadErrors = summary.loadErrors ?? summary.load_errors ?? (Array.isArray(report.providerCatalog.load_errors) ? report.providerCatalog.load_errors.length : 0);
1706
+ console.log(` ${c ? dim : ''}Provider catalog:${c ? reset : ''} plugins ${pluginsCount} · tools ${toolProviders} · verifiers ${verifierProviders} · load errors ${loadErrors}`);
1707
+ }
1708
+ }
1709
+
1646
1710
  if (report.contextQuality || report.semanticsDrift) {
1647
1711
  const primaryWorkflow = report.contextQuality && report.contextQuality.primaryWorkflow ? report.contextQuality.primaryWorkflow : 'dashboard';
1648
1712
  const primaryScore = report.contextQuality && report.contextQuality.primaryScore != null ? report.contextQuality.primaryScore : null;
@@ -1688,7 +1752,7 @@ function runStatus(target, opts = {}) {
1688
1752
  if (opts.json) {
1689
1753
  /** @type {Record<string, unknown>} */
1690
1754
  const payload = {
1691
- oxeStatusSchema: 3,
1755
+ oxeStatusSchema: 5,
1692
1756
  projectRoot: path.resolve(target),
1693
1757
  nextStep: report.next.step,
1694
1758
  cursorCmd: report.next.cursorCmd,
@@ -1703,8 +1767,26 @@ function runStatus(target, opts = {}) {
1703
1767
  staleCompact: report.staleCompact,
1704
1768
  planSelfEvaluation: report.planSelfEvaluation,
1705
1769
  planReviewStatus: report.planReviewStatus,
1706
- activeRun: report.activeRun,
1707
- eventsSummary: report.eventsSummary,
1770
+ activeRun: report.activeRun,
1771
+ eventsSummary: report.eventsSummary,
1772
+ runtimeMode: report.runtimeMode,
1773
+ fallbackMode: report.fallbackMode,
1774
+ gateSla: report.pendingGates ? report.pendingGates.gateSlaHours || 24 : 24,
1775
+ staleGateCount: report.pendingGates ? report.pendingGates.staleGateCount || 0 : 0,
1776
+ verificationSummary: report.verificationSummary,
1777
+ residualRiskSummary: report.residualRiskSummary,
1778
+ evidenceCoverage: report.evidenceCoverage,
1779
+ pendingGates: report.pendingGates,
1780
+ gateQueue: report.gateQueue,
1781
+ policyDecisionSummary: report.policyDecisionSummary,
1782
+ policyCoverage: report.policyCoverage,
1783
+ quotaSummary: report.quotaSummary,
1784
+ auditSummary: report.auditSummary,
1785
+ promotionSummary: report.promotionSummary,
1786
+ promotionReadiness: report.promotionReadiness,
1787
+ recoveryState: report.recoveryState,
1788
+ multiAgent: report.multiAgent || null,
1789
+ providerCatalog: report.providerCatalog,
1708
1790
  memoryLayers: report.memoryLayers,
1709
1791
  azureActive: report.azureActive,
1710
1792
  azure: report.azure,
@@ -1721,6 +1803,7 @@ function runStatus(target, opts = {}) {
1721
1803
  phaseWarnings: report.phaseWarn,
1722
1804
  runtimeWarnings: report.runtimeWarn,
1723
1805
  reviewWarnings: report.reviewWarn,
1806
+ enterpriseWarnings: report.enterpriseWarn,
1724
1807
  capabilityWarnings: report.capabilityWarn,
1725
1808
  investigationWarnings: report.investigationWarn,
1726
1809
  sessionWarnings: report.sessionWarn,
@@ -2125,7 +2208,7 @@ ${green}Uso:${reset}
2125
2208
  npx oxe-cc init-oxe [opções] [pasta-do-projeto]
2126
2209
  npx oxe-cc context <build|inspect> [opções] [pasta-do-projeto]
2127
2210
  npx oxe-cc dashboard [opções] [pasta-do-projeto]
2128
- npx oxe-cc runtime <status|start|pause|resume|replay|compile|project|ci> [opções] [pasta-do-projeto]
2211
+ npx oxe-cc runtime <status|start|pause|resume|replay|compile|verify|project|ci|promote|recover|gates> [opções] [pasta-do-projeto]
2129
2212
  npx oxe-cc azure <status|doctor|auth|sync|find|servicebus|eventgrid|sql|operations> [opções] [pasta-do-projeto]
2130
2213
  npx oxe-cc capabilities <list|install|remove|update> [opções] [id]
2131
2214
  npx oxe-cc uninstall [opções] [pasta-do-projeto]
@@ -2167,24 +2250,36 @@ ${green}context${reset} (Context Engine V2: seleção, compressão e inspeção
2167
2250
  --json saída estruturada em JSON
2168
2251
  --dir <pasta> raiz do projeto (padrão: diretório atual)
2169
2252
 
2170
- ${green}runtime${reset} (controle operacional explícito do ACTIVE-RUN)
2171
- status mostra o run ativo resolvido para a sessão atual
2172
- start cria um novo run com tracing inicial
2173
- pause pausa o run ativo e preserva o cursor
2174
- resume retoma o run ativo
2175
- replay marca replay parcial por onda ou tarefa
2176
- compile compila PLAN/SPEC em ExecutionGraph formal + verification suite
2177
- project projeta markdowns derivados do estado canônico
2178
- ci executa checks do runtime e persiste o resultado na run
2179
- --session <sessions/sNNN-slug> força sessão específica
2180
- --wave <número> fixa onda atual/cursor
2181
- --task <Tn> fixa tarefa atual/cursor
2182
- --mode <complete|wave|task> modo operacional do cursor
2183
- --reason <texto> motivo explícito da transição
2184
- --run <run_id> (replay|ci) filtra um run específico
2185
- --from <event_id> (replay) começa em um event_id específico
2186
- --write (replay) gera REPLAY-SESSION.md
2187
- --dir <pasta> raiz do projeto (padrão: diretório atual)
2253
+ ${green}runtime${reset} (controle operacional explícito do ACTIVE-RUN)
2254
+ status mostra o run ativo resolvido para a sessão atual
2255
+ start cria um novo run com tracing inicial
2256
+ pause pausa o run ativo e preserva o cursor
2257
+ resume retoma o run ativo
2258
+ replay marca replay parcial por onda ou tarefa
2259
+ compile compila PLAN/SPEC em ExecutionGraph formal + verification suite
2260
+ verify executa a suite enterprise, coleta evidência e projeta VERIFY.md
2261
+ project projeta markdowns derivados do estado canônico
2262
+ ci executa checks do runtime e persiste o resultado na run
2263
+ promote promove remotamente a run ativa (pr_draft|branch_push)
2264
+ recover reidrata estado canônico/journal/gates/policy da run ativa
2265
+ gates <list|show|resolve> fila operacional de gates pendentes e resoluções auditáveis
2266
+ --session <sessions/sNNN-slug> força sessão específica
2267
+ --wave <número> fixa onda atual/cursor
2268
+ --task <Tn> fixa tarefa atual/cursor
2269
+ --mode <complete|wave|task> modo operacional do cursor
2270
+ --reason <texto> motivo explícito da transição
2271
+ --run <run_id> (replay|ci) filtra um run específico
2272
+ --from <event_id> (replay) começa em um event_id específico
2273
+ --write (replay) gera REPLAY-SESSION.md
2274
+ --gate <gate_id> (gates show|resolve) gate alvo
2275
+ --decision <approve|reject|waive> (gates resolve) decisão aplicada
2276
+ --actor <id> (gates resolve) ator responsável
2277
+ --target <pr_draft|branch_push> (promote) alvo remoto; padrão pr_draft
2278
+ --remote <nome> (promote) remote git; padrão origin
2279
+ --base <branch> (promote) branch/ref base; padrão main
2280
+ --minimum-coverage <0-100> (promote) cobertura mínima exigida; padrão 100
2281
+ --timeout <ms> (verify) timeout por check
2282
+ --dir <pasta> raiz do projeto (padrão: diretório atual)
2188
2283
 
2189
2284
  ${green}azure${reset} (provider Azure nativo via Azure CLI no Windows)
2190
2285
  status estado compacto: CLI, login, subscription, inventário, pendências
@@ -3306,7 +3401,7 @@ function parseCapabilitiesArgs(argv) {
3306
3401
  */
3307
3402
 
3308
3403
  /**
3309
- * @typedef {{ help: boolean, dir: string, action: string, activeSession: string|null, wave: number|null, task: string, mode: string, reason: string, parseError: boolean, unknownFlag: string }} RuntimeOpts
3404
+ * @typedef {{ help: boolean, dir: string, action: string, subAction: string, activeSession: string|null, wave: number|null, task: string, mode: string, reason: string, runId: string, fromEventId: string, writeReport: boolean, gateId: string, decision: string, actor: string, targetKind: string, remote: string, baseBranch: string, minimumCoverage: number|null, timeoutMs: number|null, jsonOutput: boolean, gateStatus: string, gateScope: string, parseError: boolean, unknownFlag: string }} RuntimeOpts
3310
3405
  */
3311
3406
 
3312
3407
  /**
@@ -3435,6 +3530,7 @@ function parseRuntimeArgs(argv) {
3435
3530
  help: false,
3436
3531
  dir: process.cwd(),
3437
3532
  action: 'status',
3533
+ subAction: '',
3438
3534
  activeSession: null,
3439
3535
  wave: null,
3440
3536
  task: '',
@@ -3443,6 +3539,17 @@ function parseRuntimeArgs(argv) {
3443
3539
  runId: '',
3444
3540
  fromEventId: '',
3445
3541
  writeReport: false,
3542
+ gateId: '',
3543
+ decision: '',
3544
+ actor: '',
3545
+ targetKind: '',
3546
+ remote: '',
3547
+ baseBranch: '',
3548
+ minimumCoverage: null,
3549
+ timeoutMs: null,
3550
+ jsonOutput: false,
3551
+ gateStatus: '',
3552
+ gateScope: '',
3446
3553
  parseError: false,
3447
3554
  unknownFlag: '',
3448
3555
  };
@@ -3459,6 +3566,17 @@ function parseRuntimeArgs(argv) {
3459
3566
  else if (a === '--run' && argv[i + 1]) out.runId = String(argv[++i]);
3460
3567
  else if (a === '--from' && argv[i + 1]) out.fromEventId = String(argv[++i]);
3461
3568
  else if (a === '--write') out.writeReport = true;
3569
+ else if (a === '--gate' && argv[i + 1]) out.gateId = String(argv[++i]);
3570
+ else if (a === '--decision' && argv[i + 1]) out.decision = String(argv[++i]);
3571
+ else if (a === '--actor' && argv[i + 1]) out.actor = String(argv[++i]);
3572
+ else if (a === '--target' && argv[i + 1]) out.targetKind = String(argv[++i]);
3573
+ else if (a === '--remote' && argv[i + 1]) out.remote = String(argv[++i]);
3574
+ else if (a === '--base' && argv[i + 1]) out.baseBranch = String(argv[++i]);
3575
+ else if (a === '--minimum-coverage' && argv[i + 1]) out.minimumCoverage = Number(argv[++i]);
3576
+ else if (a === '--timeout' && argv[i + 1]) out.timeoutMs = Number(argv[++i]);
3577
+ else if (a === '--status' && argv[i + 1]) out.gateStatus = String(argv[++i]);
3578
+ else if (a === '--scope' && argv[i + 1]) out.gateScope = String(argv[++i]);
3579
+ else if (a === '--json') out.jsonOutput = true;
3462
3580
  else if (!a.startsWith('-')) positionals.push(a);
3463
3581
  else {
3464
3582
  out.parseError = true;
@@ -3467,8 +3585,15 @@ function parseRuntimeArgs(argv) {
3467
3585
  }
3468
3586
  }
3469
3587
  if (positionals[0]) out.action = positionals[0];
3470
- if (positionals[1]) out.dir = path.resolve(positionals[1]);
3588
+ if (out.action === 'gates') {
3589
+ if (positionals[1]) out.subAction = positionals[1];
3590
+ if (positionals[2]) out.dir = path.resolve(positionals[2]);
3591
+ } else {
3592
+ if (positionals[1]) out.dir = path.resolve(positionals[1]);
3593
+ }
3471
3594
  if (Number.isNaN(out.wave)) out.wave = null;
3595
+ if (Number.isNaN(out.minimumCoverage)) out.minimumCoverage = null;
3596
+ if (Number.isNaN(out.timeoutMs)) out.timeoutMs = null;
3472
3597
  return out;
3473
3598
  }
3474
3599
 
@@ -3713,11 +3838,11 @@ async function runDashboard(opts) {
3713
3838
  /**
3714
3839
  * @param {RuntimeOpts} opts
3715
3840
  */
3716
- async function runRuntime(opts) {
3717
- const c = useAnsiColors();
3718
- printSection('OXE ▸ runtime');
3719
- if (!fs.existsSync(opts.dir)) {
3720
- console.error(`${yellow}Diretório não encontrado: ${opts.dir}${reset}`);
3841
+ async function runRuntime(opts) {
3842
+ const c = useAnsiColors();
3843
+ printSection('OXE ▸ runtime');
3844
+ if (!fs.existsSync(opts.dir)) {
3845
+ console.error(`${yellow}Diretório não encontrado: ${opts.dir}${reset}`);
3721
3846
  process.exit(1);
3722
3847
  }
3723
3848
  bootstrapOxe(opts.dir, { dryRun: false, force: false });
@@ -3728,134 +3853,411 @@ async function runRuntime(opts) {
3728
3853
  console.log(` ${c ? green : ''}Projeto:${c ? reset : ''} ${c ? cyan : ''}${opts.dir}${c ? reset : ''}`);
3729
3854
  console.log(` ${c ? green : ''}Sessão:${c ? reset : ''} ${c ? cyan : ''}${activeSession || 'modo legado'}${c ? reset : ''}`);
3730
3855
 
3731
- if (opts.action === 'status') {
3732
- const current = oxeOperational.readRunState(opts.dir, activeSession);
3733
- if (!current) {
3734
- console.log(` ${yellow}Nenhum ACTIVE-RUN encontrado.${reset}`);
3735
- return;
3736
- }
3737
- console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${current.run_id}`);
3738
- console.log(` ${c ? green : ''}Estado:${c ? reset : ''} ${current.status}`);
3739
- console.log(` ${c ? green : ''}Cursor:${c ? reset : ''} onda=${current.cursor && current.cursor.wave != null ? current.cursor.wave : '—'} tarefa=${current.cursor && current.cursor.task ? current.cursor.task : '—'} modo=${current.cursor && current.cursor.mode ? current.cursor.mode : '—'}`);
3740
- console.log(` ${c ? green : ''}Arquivo:${c ? reset : ''} ${path.join(p.runsDir, `${current.run_id}.json`)}`);
3741
- if (current.compiled_graph && current.compiled_graph.metadata) {
3742
- console.log(` ${c ? green : ''}Graph:${c ? reset : ''} ${current.compiled_graph.metadata.node_count || 0} nós · ${current.compiled_graph.metadata.wave_count || 0} ondas`);
3743
- }
3744
- if (current.canonical_state && current.canonical_state.summary) {
3745
- console.log(` ${c ? green : ''}Canonical:${c ? reset : ''} work_items=${current.canonical_state.summary.work_item_count || 0} · attempts=${current.canonical_state.summary.attempt_count || 0}`);
3746
- }
3747
- if (current.ci_checks && current.ci_checks.summary) {
3748
- console.log(` ${c ? green : ''}CI:${c ? reset : ''} pass=${current.ci_checks.summary.pass || 0} fail=${current.ci_checks.summary.fail || 0} skip=${current.ci_checks.summary.skip || 0} error=${current.ci_checks.summary.error || 0}`);
3749
- }
3750
- if (current.projections && current.projections.generated_at) {
3751
- console.log(` ${c ? green : ''}Projection:${c ? reset : ''} ${current.projections.generated_at}`);
3752
- }
3753
- return;
3754
- }
3755
-
3756
- if (opts.action === 'replay' && !opts.task) {
3757
- const report = oxeOperational.replayEvents(opts.dir, activeSession, {
3758
- runId: opts.runId || undefined,
3759
- fromEventId: opts.fromEventId || undefined,
3760
- waveId: opts.wave != null ? opts.wave : undefined,
3761
- writeReport: opts.writeReport || false,
3762
- });
3856
+ if (opts.action === 'status') {
3857
+ const current = oxeOperational.readRunState(opts.dir, activeSession);
3858
+ if (!current) {
3859
+ if (opts.jsonOutput) console.log(JSON.stringify({ run: null, status: 'absent' }, null, 2));
3860
+ else console.log(` ${yellow}Nenhum ACTIVE-RUN encontrado.${reset}`);
3861
+ return;
3862
+ }
3863
+ const report = oxeHealth.buildHealthReport(opts.dir);
3864
+ const gates = oxeOperational.readRuntimeGates
3865
+ ? oxeOperational.readRuntimeGates(opts.dir, activeSession, { runId: current.run_id })
3866
+ : null;
3867
+ const runtimeMode = oxeOperational.buildRuntimeModeStatus
3868
+ ? oxeOperational.buildRuntimeModeStatus(current)
3869
+ : null;
3870
+ const multiAgent = oxeOperational.readRuntimeMultiAgentStatus
3871
+ ? oxeOperational.readRuntimeMultiAgentStatus(opts.dir, activeSession, { runId: current.run_id })
3872
+ : null;
3873
+ if (opts.jsonOutput) {
3874
+ console.log(
3875
+ JSON.stringify(
3876
+ {
3877
+ run: current,
3878
+ runtimeMode,
3879
+ gateQueue: gates,
3880
+ gateSla: gates ? gates.gateSlaHours || 24 : 24,
3881
+ staleGateCount: gates ? gates.staleCount || 0 : 0,
3882
+ policyCoverage: report.policyCoverage || null,
3883
+ promotionReadiness: report.promotionReadiness || null,
3884
+ recoveryState: report.recoveryState || null,
3885
+ providerCatalog: report.providerCatalog || null,
3886
+ multiAgent: multiAgent || null,
3887
+ },
3888
+ null,
3889
+ 2
3890
+ )
3891
+ );
3892
+ return;
3893
+ }
3894
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${current.run_id}`);
3895
+ console.log(` ${c ? green : ''}Estado:${c ? reset : ''} ${current.status}`);
3896
+ console.log(` ${c ? green : ''}Cursor:${c ? reset : ''} onda=${current.cursor && current.cursor.wave != null ? current.cursor.wave : '—'} tarefa=${current.cursor && current.cursor.task ? current.cursor.task : '—'} modo=${current.cursor && current.cursor.mode ? current.cursor.mode : '—'}`);
3897
+ console.log(` ${c ? green : ''}Arquivo:${c ? reset : ''} ${path.join(p.runsDir, `${current.run_id}.json`)}`);
3898
+ if (current.compiled_graph && current.compiled_graph.metadata) {
3899
+ console.log(` ${c ? green : ''}Graph:${c ? reset : ''} ${current.compiled_graph.metadata.node_count || 0} nós · ${current.compiled_graph.metadata.wave_count || 0} ondas`);
3900
+ }
3901
+ if (current.canonical_state && current.canonical_state.summary) {
3902
+ console.log(` ${c ? green : ''}Canonical:${c ? reset : ''} work_items=${current.canonical_state.summary.work_item_count || 0} · attempts=${current.canonical_state.summary.attempt_count || 0}`);
3903
+ }
3904
+ if (current.ci_checks && current.ci_checks.summary) {
3905
+ console.log(` ${c ? green : ''}CI:${c ? reset : ''} pass=${current.ci_checks.summary.pass || 0} fail=${current.ci_checks.summary.fail || 0} skip=${current.ci_checks.summary.skip || 0} error=${current.ci_checks.summary.error || 0}`);
3906
+ }
3907
+ if (current.projections && current.projections.generated_at) {
3908
+ console.log(` ${c ? green : ''}Projection:${c ? reset : ''} ${current.projections.generated_at}`);
3909
+ }
3910
+ if (gates) {
3911
+ console.log(` ${c ? green : ''}Gates:${c ? reset : ''} ${gates.pending.length} pendente(s) · stale ${gates.stalePending.length} · SLA ${gates.gateSlaHours || 24}h`);
3912
+ }
3913
+ if (runtimeMode) {
3914
+ console.log(` ${c ? green : ''}Runtime:${c ? reset : ''} ${runtimeMode.runtime_mode || 'legacy'} · fallback=${runtimeMode.fallback_mode || 'none'}`);
3915
+ }
3916
+ if (report.policyCoverage) {
3917
+ console.log(` ${c ? green : ''}Policy coverage:${c ? reset : ''} ${report.policyCoverage.coveragePercent}% · uncovered=${report.policyCoverage.uncoveredMutations}`);
3918
+ }
3919
+ if (report.promotionReadiness) {
3920
+ console.log(` ${c ? green : ''}Promotion readiness:${c ? reset : ''} ${report.promotionReadiness.status}${Array.isArray(report.promotionReadiness.blockers) && report.promotionReadiness.blockers.length ? ` · ${report.promotionReadiness.blockers.join(', ')}` : ''}`);
3921
+ }
3922
+ if (report.recoveryState) {
3923
+ console.log(` ${c ? green : ''}Recovery:${c ? reset : ''} ${report.recoveryState.status} · recoveries=${report.recoveryState.recoverCount ?? 0} · issues=${Array.isArray(report.recoveryState.issues) ? report.recoveryState.issues.length : 0}`);
3924
+ }
3925
+ if (multiAgent) {
3926
+ console.log(` ${c ? green : ''}Multi-agent:${c ? reset : ''} ${multiAgent.enabled ? (multiAgent.mode || 'active') : 'disabled'} · agentes=${Array.isArray(multiAgent.agents) ? multiAgent.agents.length : 0} · ownership=${Array.isArray(multiAgent.ownership) ? multiAgent.ownership.length : 0}`);
3927
+ }
3928
+ if (report.providerCatalog && report.providerCatalog.summary) {
3929
+ const summary = report.providerCatalog.summary;
3930
+ const pluginsCount = summary.pluginsCount ?? summary.total_plugins ?? (Array.isArray(summary.plugins) ? summary.plugins.length : 0);
3931
+ const toolProviders = summary.toolProviders ?? summary.tool_providers ?? 0;
3932
+ const verifierProviders = summary.verifierProviders ?? summary.verifier_providers ?? 0;
3933
+ const loadErrors = summary.loadErrors ?? summary.load_errors ?? (Array.isArray(report.providerCatalog.load_errors) ? report.providerCatalog.load_errors.length : 0);
3934
+ console.log(` ${c ? green : ''}Providers:${c ? reset : ''} plugins=${pluginsCount} tools=${toolProviders} verifiers=${verifierProviders} load_errors=${loadErrors}`);
3935
+ }
3936
+ return;
3937
+ }
3938
+
3939
+ if (opts.action === 'gates') {
3940
+ const sub = opts.subAction || 'list';
3941
+ const current = oxeOperational.readRunState(opts.dir, activeSession);
3942
+ const runId = opts.runId || (current && current.run_id) || '';
3943
+ if (sub === 'list') {
3944
+ const gates = oxeOperational.readRuntimeGates(opts.dir, activeSession, {
3945
+ runId: runId || null,
3946
+ status: opts.gateStatus || 'all',
3947
+ scope: opts.gateScope || null,
3948
+ task: opts.task || null,
3949
+ });
3950
+ if (opts.jsonOutput) {
3951
+ console.log(JSON.stringify(gates, null, 2));
3952
+ return;
3953
+ }
3954
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${runId || '—'}`);
3955
+ console.log(` ${c ? green : ''}Gates:${c ? reset : ''} total=${gates.total} pendentes=${gates.pending.length} stale=${gates.stalePending.length} resolvidos<24h=${gates.resolvedRecent.length} SLA=${gates.gateSlaHours || 24}h`);
3956
+ console.log(` ${c ? green : ''}Filtros:${c ? reset : ''} status=${gates.filters.status || 'all'} scope=${gates.filters.scope || '—'} task=${gates.filters.workItemId || '—'}`);
3957
+ for (const gate of gates.pending) {
3958
+ const ageHours = gate.requested_at ? Math.max(0, Math.round((Date.now() - Date.parse(gate.requested_at)) / 36e5)) : null;
3959
+ console.log(` ${yellow}PENDING${reset} ${gate.gate_id} · ${gate.scope} · ${gate.work_item_id || 'run'} · ${gate.action || '—'}${ageHours != null ? ` · age ${ageHours}h` : ''}`);
3960
+ }
3961
+ for (const gate of gates.resolvedRecent) {
3962
+ console.log(` ${green}RESOLVED${reset} ${gate.gate_id} · ${gate.scope} · ${gate.decision || '—'} · ${gate.actor || '—'}`);
3963
+ }
3964
+ return;
3965
+ }
3966
+ if (sub === 'show') {
3967
+ if (!opts.gateId) {
3968
+ console.error(`${red}Use --gate <gate_id> com runtime gates show${reset}`);
3969
+ process.exit(1);
3970
+ }
3971
+ const gates = oxeOperational.readRuntimeGates(opts.dir, activeSession, { runId: runId || null });
3972
+ const gate = gates.all.find((entry) => entry.gate_id === opts.gateId);
3973
+ if (!gate) {
3974
+ console.error(`${red}Gate não encontrado: ${opts.gateId}${reset}`);
3975
+ process.exit(1);
3976
+ }
3977
+ if (opts.jsonOutput) {
3978
+ console.log(JSON.stringify(gate, null, 2));
3979
+ return;
3980
+ }
3981
+ console.log(` ${c ? green : ''}Gate:${c ? reset : ''} ${gate.gate_id}`);
3982
+ console.log(` ${c ? green : ''}Status:${c ? reset : ''} ${gate.status || 'pending'}`);
3983
+ console.log(` ${c ? green : ''}Escopo:${c ? reset : ''} ${gate.scope || '—'} · action=${gate.action || '—'} · work_item=${gate.work_item_id || 'run'}`);
3984
+ console.log(` ${c ? green : ''}Ator:${c ? reset : ''} ${gate.actor || '—'} · decisão=${gate.decision || '—'}`);
3985
+ console.log(` ${c ? green : ''}Motivo:${c ? reset : ''} ${gate.reason || gate.context && gate.context.description || '—'}`);
3986
+ if (Array.isArray(gate.resolution_history) && gate.resolution_history.length) {
3987
+ console.log(` ${c ? green : ''}Histórico:${c ? reset : ''}`);
3988
+ for (const item of gate.resolution_history) {
3989
+ console.log(` • ${item.timestamp || '—'} · ${item.actor || '—'} · ${item.decision || '—'}${item.reason ? ` · ${item.reason}` : ''}`);
3990
+ }
3991
+ }
3992
+ return;
3993
+ }
3994
+ if (sub === 'resolve') {
3995
+ if (!opts.gateId || !opts.decision || !opts.actor) {
3996
+ console.error(`${red}Use --gate, --decision e --actor com runtime gates resolve${reset}`);
3997
+ process.exit(1);
3998
+ }
3999
+ if ((opts.decision === 'reject' || opts.decision === 'waive') && !opts.reason) {
4000
+ console.error(`${red}Reject/waive exigem --reason explícito.${reset}`);
4001
+ process.exit(1);
4002
+ }
4003
+ try {
4004
+ const resolved = await oxeOperational.resolveRuntimeGate(opts.dir, activeSession, {
4005
+ runId: runId || null,
4006
+ gateId: opts.gateId,
4007
+ decision: opts.decision,
4008
+ actor: opts.actor,
4009
+ reason: opts.reason || '',
4010
+ });
4011
+ if (opts.jsonOutput) {
4012
+ console.log(JSON.stringify(resolved, null, 2));
4013
+ return;
4014
+ }
4015
+ console.log(` ${c ? green : ''}✓${c ? reset : ''} Gate resolvido.`);
4016
+ console.log(` ${c ? green : ''}Gate:${c ? reset : ''} ${resolved.gate.gate_id}`);
4017
+ console.log(` ${c ? green : ''}Decisão:${c ? reset : ''} ${resolved.gate.decision}`);
4018
+ console.log(` ${c ? green : ''}Ator:${c ? reset : ''} ${resolved.gate.actor}`);
4019
+ console.log(` ${c ? green : ''}Impacto:${c ? reset : ''} pendentes=${resolved.impact.pendingRemaining} stale=${resolved.impact.staleRemaining}`);
4020
+ return;
4021
+ } catch (err) {
4022
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao resolver gate.'}${reset}`);
4023
+ process.exit(1);
4024
+ }
4025
+ }
4026
+ console.error(`${red}Subcomando runtime gates desconhecido: ${sub}${reset}`);
4027
+ process.exit(1);
4028
+ }
4029
+
4030
+ if (opts.action === 'replay' && !opts.task) {
4031
+ const report = opts.jsonOutput
4032
+ ? oxeOperational.replayRuntimeState(opts.dir, activeSession, {
4033
+ runId: opts.runId || undefined,
4034
+ fromEventId: opts.fromEventId || undefined,
4035
+ waveId: opts.wave != null ? opts.wave : undefined,
4036
+ writeReport: opts.writeReport || false,
4037
+ })
4038
+ : oxeOperational.replayEvents(opts.dir, activeSession, {
4039
+ runId: opts.runId || undefined,
4040
+ fromEventId: opts.fromEventId || undefined,
4041
+ waveId: opts.wave != null ? opts.wave : undefined,
4042
+ writeReport: opts.writeReport || false,
4043
+ });
4044
+ if (opts.jsonOutput) {
4045
+ console.log(JSON.stringify(report, null, 2));
4046
+ return;
4047
+ }
3763
4048
  console.log(` ${c ? green : ''}Total eventos:${c ? reset : ''} ${report.totalEvents}`);
3764
4049
  console.log(` ${c ? green : ''}Duração:${c ? reset : ''} ${report.duration_ms != null ? `${(report.duration_ms / 1000).toFixed(1)}s` : '—'}`);
3765
4050
  console.log(` ${c ? green : ''}Ondas:${c ? reset : ''} ${report.waveIds.join(', ') || '—'}`);
3766
4051
  console.log(` ${c ? green : ''}Tarefas:${c ? reset : ''} ${report.taskSequence.join(', ') || '—'}`);
3767
4052
  console.log(` ${c ? green : ''}Falhas:${c ? reset : ''} ${report.failureEvents.length}`);
3768
- if (report.totalEvents > 0) {
3769
- console.log('');
3770
- const dim = c ? '\x1b[2m' : '';
3771
- console.log(` ${dim}# Tipo Wave Task Delta Timestamp${c ? reset : ''}`);
3772
- for (let i = 0; i < Math.min(report.events.length, 50); i++) {
3773
- const e = report.events[i];
3774
- const delta = i > 0 ? `+${(e._delta_ms / 1000).toFixed(1)}s` : '—';
3775
- const num = String(i + 1).padStart(3);
3776
- const type = String(e.type).padEnd(22).slice(0, 22);
3777
- const wave = String(e.wave_id || '—').padEnd(7).slice(0, 7);
3778
- const task = String(e.task_id || e.work_item_id || '—').padEnd(7).slice(0, 7);
3779
- const deltaStr = delta.padStart(10);
3780
- console.log(` ${num} ${type} ${wave} ${task} ${deltaStr} ${e.timestamp}`);
3781
- }
4053
+ if (report.totalEvents > 0) {
4054
+ console.log('');
4055
+ const dim = c ? '\x1b[2m' : '';
4056
+ console.log(` ${dim}# Tipo Wave Task Delta Timestamp${c ? reset : ''}`);
4057
+ for (let i = 0; i < Math.min(report.events.length, 50); i++) {
4058
+ const e = report.events[i];
4059
+ const delta = i > 0 ? `+${(e._delta_ms / 1000).toFixed(1)}s` : '—';
4060
+ const num = String(i + 1).padStart(3);
4061
+ const type = String(e.type).padEnd(22).slice(0, 22);
4062
+ const wave = String(e.wave_id || '—').padEnd(7).slice(0, 7);
4063
+ const task = String(e.task_id || e.work_item_id || '—').padEnd(7).slice(0, 7);
4064
+ const deltaStr = delta.padStart(10);
4065
+ console.log(` ${num} ${type} ${wave} ${task} ${deltaStr} ${e.timestamp}`);
4066
+ }
3782
4067
  if (report.events.length > 50) {
3783
4068
  console.log(` … (${report.events.length - 50} mais)`);
3784
4069
  }
3785
4070
  }
3786
4071
  if (report._reportPath) {
3787
4072
  console.log(`\n ${c ? green : ''}Relatório:${c ? reset : ''} ${report._reportPath}`);
3788
- }
3789
- return;
3790
- }
3791
-
3792
- if (opts.action === 'compile') {
3793
- try {
3794
- const compiled = oxeOperational.compileExecutionGraphFromArtifacts(opts.dir, activeSession);
3795
- const suite = oxeOperational.compileVerificationSuiteFromArtifacts(opts.dir, activeSession, {
3796
- runState: compiled.run,
3797
- });
3798
- console.log(` ${c ? green : ''}✓${c ? reset : ''} Runtime compilado.`);
3799
- console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${compiled.run.run_id}`);
3800
- console.log(` ${c ? green : ''}Graph:${c ? reset : ''} ${compiled.graph.metadata.node_count} nó(s) · ${compiled.graph.metadata.wave_count} onda(s)`);
3801
- console.log(` ${c ? green : ''}Checks:${c ? reset : ''} ${Array.isArray(suite.suite.checks) ? suite.suite.checks.length : 0}`);
3802
- if (compiled.validationErrors.length) {
3803
- console.log(` ${yellow}Validation:${reset} ${compiled.validationErrors.join(' | ')}`);
3804
- }
3805
- console.log(` ${c ? green : ''}Arquivo:${c ? reset : ''} ${path.join(p.runsDir, `${compiled.run.run_id}.json`)}`);
3806
- return;
3807
- } catch (err) {
3808
- console.error(`${red}${err && err.message ? err.message : 'Falha ao compilar o runtime.'}${reset}`);
3809
- process.exit(1);
3810
- }
3811
- }
3812
-
3813
- if (opts.action === 'project') {
3814
- try {
3815
- const projected = oxeOperational.projectRuntimeArtifacts(opts.dir, activeSession, { write: true });
3816
- console.log(` ${c ? green : ''}✓${c ? reset : ''} Projeções geradas a partir do estado canônico.`);
3817
- console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${projected.run.run_id}`);
3818
- console.log(` ${c ? green : ''}STATE:${c ? reset : ''} ${projected.paths.state}`);
3819
- console.log(` ${c ? green : ''}PLAN:${c ? reset : ''} ${projected.paths.plan}`);
3820
- console.log(` ${c ? green : ''}VERIFY:${c ? reset : ''} ${projected.paths.verify}`);
3821
- console.log(` ${c ? green : ''}RUN-SUMMARY:${c ? reset : ''} ${projected.paths.runSummary}`);
3822
- console.log(` ${c ? green : ''}PR-SUMMARY:${c ? reset : ''} ${projected.paths.prSummary}`);
3823
- return;
3824
- } catch (err) {
3825
- console.error(`${red}${err && err.message ? err.message : 'Falha ao projetar artefatos do runtime.'}${reset}`);
3826
- process.exit(1);
3827
- }
3828
- }
3829
-
3830
- if (opts.action === 'ci') {
3831
- try {
3832
- const report = await oxeOperational.runRuntimeCiChecks(opts.dir, activeSession, {
3833
- runId: opts.runId || undefined,
3834
- });
3835
- console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${report.runId || '—'}`);
3836
- for (const result of report.results) {
3837
- const color = result.status === 'pass'
3838
- ? green
3839
- : result.status === 'skip'
3840
- ? dim
3841
- : red;
3842
- console.log(` ${c ? color : ''}${result.status.toUpperCase()}${c ? reset : ''} ${result.check} · ${result.message}`);
3843
- }
3844
- console.log(` ${c ? green : ''}Resumo:${c ? reset : ''} pass=${report.summary.pass} fail=${report.summary.fail} skip=${report.summary.skip} error=${report.summary.error}`);
3845
- if (!report.summary.allPassed) {
3846
- process.exitCode = 1;
3847
- }
3848
- return;
3849
- } catch (err) {
3850
- console.error(`${red}${err && err.message ? err.message : 'Falha ao executar checks do runtime.'}${reset}`);
3851
- process.exit(1);
3852
- }
3853
- }
3854
-
3855
- try {
3856
- const next = oxeOperational.applyRuntimeAction(opts.dir, activeSession, {
3857
- action: opts.action,
3858
- wave: opts.wave,
4073
+ }
4074
+ return;
4075
+ }
4076
+
4077
+ if (opts.action === 'compile') {
4078
+ try {
4079
+ const compiled = oxeOperational.compileExecutionGraphFromArtifacts(opts.dir, activeSession);
4080
+ const suite = oxeOperational.compileVerificationSuiteFromArtifacts(opts.dir, activeSession, {
4081
+ runState: compiled.run,
4082
+ });
4083
+ console.log(` ${c ? green : ''}✓${c ? reset : ''} Runtime compilado.`);
4084
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${compiled.run.run_id}`);
4085
+ console.log(` ${c ? green : ''}Graph:${c ? reset : ''} ${compiled.graph.metadata.node_count} nó(s) · ${compiled.graph.metadata.wave_count} onda(s)`);
4086
+ console.log(` ${c ? green : ''}Checks:${c ? reset : ''} ${Array.isArray(suite.suite.checks) ? suite.suite.checks.length : 0}`);
4087
+ if (compiled.validationErrors.length) {
4088
+ console.log(` ${yellow}Validation:${reset} ${compiled.validationErrors.join(' | ')}`);
4089
+ }
4090
+ console.log(` ${c ? green : ''}Arquivo:${c ? reset : ''} ${path.join(p.runsDir, `${compiled.run.run_id}.json`)}`);
4091
+ return;
4092
+ } catch (err) {
4093
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao compilar o runtime.'}${reset}`);
4094
+ process.exit(1);
4095
+ }
4096
+ }
4097
+
4098
+ if (opts.action === 'verify') {
4099
+ try {
4100
+ const verified = await oxeOperational.runRuntimeVerify(opts.dir, activeSession, {
4101
+ runId: opts.runId || undefined,
4102
+ task: opts.task || undefined,
4103
+ workItemId: opts.task || undefined,
4104
+ timeoutMs: opts.timeoutMs || undefined,
4105
+ });
4106
+ if (opts.jsonOutput) {
4107
+ console.log(JSON.stringify(verified, null, 2));
4108
+ return;
4109
+ }
4110
+ console.log(` ${c ? green : ''}✓${c ? reset : ''} Runtime verify executado.`);
4111
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${verified.run.run_id}`);
4112
+ console.log(` ${c ? green : ''}Status:${c ? reset : ''} ${verified.report.status}`);
4113
+ if (verified.report.manifest && verified.report.manifest.summary) {
4114
+ console.log(` ${c ? green : ''}Checks:${c ? reset : ''} total=${verified.report.manifest.summary.total} pass=${verified.report.manifest.summary.pass} fail=${verified.report.manifest.summary.fail} error=${verified.report.manifest.summary.error}`);
4115
+ }
4116
+ if (verified.report.evidence_coverage) {
4117
+ console.log(` ${c ? green : ''}Coverage:${c ? reset : ''} ${verified.report.evidence_coverage.coverage_percent}%`);
4118
+ }
4119
+ if (verified.report.gaps.length) {
4120
+ for (const gap of verified.report.gaps) {
4121
+ console.log(` ${yellow}GAP${reset} ${gap}`);
4122
+ }
4123
+ }
4124
+ console.log(` ${c ? green : ''}VERIFY:${c ? reset : ''} ${verified.projected.paths.verify}`);
4125
+ return;
4126
+ } catch (err) {
4127
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao executar runtime verify.'}${reset}`);
4128
+ process.exit(1);
4129
+ }
4130
+ }
4131
+
4132
+ if (opts.action === 'project') {
4133
+ try {
4134
+ const projected = oxeOperational.projectRuntimeArtifacts(opts.dir, activeSession, { write: true });
4135
+ console.log(` ${c ? green : ''}✓${c ? reset : ''} Projeções geradas a partir do estado canônico.`);
4136
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${projected.run.run_id}`);
4137
+ console.log(` ${c ? green : ''}STATE:${c ? reset : ''} ${projected.paths.state}`);
4138
+ console.log(` ${c ? green : ''}PLAN:${c ? reset : ''} ${projected.paths.plan}`);
4139
+ console.log(` ${c ? green : ''}VERIFY:${c ? reset : ''} ${projected.paths.verify}`);
4140
+ console.log(` ${c ? green : ''}RUN-SUMMARY:${c ? reset : ''} ${projected.paths.runSummary}`);
4141
+ console.log(` ${c ? green : ''}PR-SUMMARY:${c ? reset : ''} ${projected.paths.prSummary}`);
4142
+ return;
4143
+ } catch (err) {
4144
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao projetar artefatos do runtime.'}${reset}`);
4145
+ process.exit(1);
4146
+ }
4147
+ }
4148
+
4149
+ if (opts.action === 'ci') {
4150
+ try {
4151
+ const report = await oxeOperational.runRuntimeCiChecks(opts.dir, activeSession, {
4152
+ runId: opts.runId || undefined,
4153
+ });
4154
+ if (opts.jsonOutput) {
4155
+ console.log(JSON.stringify(report, null, 2));
4156
+ if (!report.summary.allPassed) process.exitCode = 1;
4157
+ return;
4158
+ }
4159
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${report.runId || '—'}`);
4160
+ for (const result of report.results) {
4161
+ const color = result.status === 'pass'
4162
+ ? green
4163
+ : result.status === 'skip'
4164
+ ? dim
4165
+ : red;
4166
+ console.log(` ${c ? color : ''}${result.status.toUpperCase()}${c ? reset : ''} ${result.check} · ${result.message}`);
4167
+ }
4168
+ console.log(` ${c ? green : ''}Resumo:${c ? reset : ''} pass=${report.summary.pass} fail=${report.summary.fail} skip=${report.summary.skip} error=${report.summary.error}`);
4169
+ if (!report.summary.allPassed) {
4170
+ process.exitCode = 1;
4171
+ }
4172
+ return;
4173
+ } catch (err) {
4174
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao executar checks do runtime.'}${reset}`);
4175
+ process.exit(1);
4176
+ }
4177
+ }
4178
+
4179
+ if (opts.action === 'promote') {
4180
+ try {
4181
+ const promoted = await oxeOperational.runRuntimePromotion(opts.dir, activeSession, {
4182
+ runId: opts.runId || undefined,
4183
+ targetKind: opts.targetKind || 'pr_draft',
4184
+ remote: opts.remote || 'origin',
4185
+ baseBranch: opts.baseBranch || 'main',
4186
+ minimumCoverage: opts.minimumCoverage == null ? 100 : opts.minimumCoverage,
4187
+ });
4188
+ if (opts.jsonOutput) {
4189
+ console.log(JSON.stringify(promoted, null, 2));
4190
+ return;
4191
+ }
4192
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${promoted.run.run_id}`);
4193
+ console.log(` ${c ? green : ''}Commit:${c ? reset : ''} ${promoted.commitRecord.commit_sha || '—'} · ${promoted.commitRecord.status}`);
4194
+ console.log(` ${c ? green : ''}Promotion:${c ? reset : ''} ${promoted.promotion.target_kind} · ${promoted.promotion.status}`);
4195
+ if (promoted.promotion.pr_url) {
4196
+ console.log(` ${c ? green : ''}PR:${c ? reset : ''} ${promoted.promotion.pr_url}`);
4197
+ }
4198
+ if (Array.isArray(promoted.promotion.reasons) && promoted.promotion.reasons.length) {
4199
+ for (const reason of promoted.promotion.reasons) {
4200
+ console.log(` ${yellow}BLOCKER${reset} ${reason}`);
4201
+ }
4202
+ }
4203
+ return;
4204
+ } catch (err) {
4205
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao promover a run.'}${reset}`);
4206
+ process.exit(1);
4207
+ }
4208
+ }
4209
+
4210
+ if (opts.action === 'recover') {
4211
+ try {
4212
+ const recovered = oxeOperational.recoverRuntimeState(opts.dir, activeSession, {
4213
+ runId: opts.runId || undefined,
4214
+ });
4215
+ if (opts.jsonOutput) {
4216
+ console.log(JSON.stringify(recovered, null, 2));
4217
+ return;
4218
+ }
4219
+ console.log(` ${c ? green : ''}✓${c ? reset : ''} Runtime recover concluído.`);
4220
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${recovered.run.run_id}`);
4221
+ console.log(` ${c ? green : ''}Estado:${c ? reset : ''} ${recovered.run.status}`);
4222
+ console.log(` ${c ? green : ''}Journal:${c ? reset : ''} ${recovered.journal.scheduler_state}`);
4223
+ console.log(` ${c ? green : ''}Órfãos:${c ? reset : ''} ${(recovered.recoverySummary.orphan_work_items || []).join(', ') || '—'}`);
4224
+ return;
4225
+ } catch (err) {
4226
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao executar recover.'}${reset}`);
4227
+ process.exit(1);
4228
+ }
4229
+ }
4230
+
4231
+ if (opts.action === 'agents') {
4232
+ const sub = opts.subAction || 'status';
4233
+ if (sub !== 'status') {
4234
+ console.error(`${red}Subcomando runtime agents desconhecido: ${sub}${reset}`);
4235
+ process.exit(1);
4236
+ }
4237
+ const current = oxeOperational.readRunState(opts.dir, activeSession);
4238
+ const runId = opts.runId || (current && current.run_id) || '';
4239
+ const multiAgent = oxeOperational.readRuntimeMultiAgentStatus
4240
+ ? oxeOperational.readRuntimeMultiAgentStatus(opts.dir, activeSession, { runId: runId || null })
4241
+ : null;
4242
+ if (opts.jsonOutput) {
4243
+ console.log(JSON.stringify(multiAgent, null, 2));
4244
+ return;
4245
+ }
4246
+ if (!multiAgent) {
4247
+ console.log(` ${yellow}Multi-agent indisponível para o escopo atual.${reset}`);
4248
+ return;
4249
+ }
4250
+ console.log(` ${c ? green : ''}Run:${c ? reset : ''} ${multiAgent.runId || '—'}`);
4251
+ console.log(` ${c ? green : ''}Modo:${c ? reset : ''} ${multiAgent.enabled ? (multiAgent.mode || 'active') : 'disabled'}`);
4252
+ console.log(` ${c ? green : ''}Isolamento:${c ? reset : ''} ${multiAgent.workspaceIsolationEnforced ? 'enforced' : 'shared/disabled'}`);
4253
+ console.log(` ${c ? green : ''}Agentes:${c ? reset : ''} ${Array.isArray(multiAgent.agents) ? multiAgent.agents.length : 0} · ownership=${Array.isArray(multiAgent.ownership) ? multiAgent.ownership.length : 0} · handoffs=${Array.isArray(multiAgent.handoffs) ? multiAgent.handoffs.length : 0}`);
4254
+ return;
4255
+ }
4256
+
4257
+ try {
4258
+ const next = oxeOperational.applyRuntimeAction(opts.dir, activeSession, {
4259
+ action: opts.action,
4260
+ wave: opts.wave,
3859
4261
  task: opts.task || null,
3860
4262
  mode: opts.mode || null,
3861
4263
  reason: opts.reason || '',
@@ -4508,12 +4910,12 @@ async function main() {
4508
4910
  console.error(`${yellow}Diretório não encontrado: ${runtime.dir}${reset}`);
4509
4911
  process.exit(1);
4510
4912
  }
4511
- runRuntime(runtime).catch((err) => {
4512
- console.error(`${red}${err && err.message ? err.message : 'Falha ao executar runtime.'}${reset}`);
4513
- process.exit(1);
4514
- });
4515
- return;
4516
- }
4913
+ runRuntime(runtime).catch((err) => {
4914
+ console.error(`${red}${err && err.message ? err.message : 'Falha ao executar runtime.'}${reset}`);
4915
+ process.exit(1);
4916
+ });
4917
+ return;
4918
+ }
4517
4919
 
4518
4920
  if (command === 'plugins') {
4519
4921
  printBanner();