@revisium/orchestrator 0.1.0-alpha.4 → 0.1.0-alpha.6

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 (465) hide show
  1. package/README.md +149 -1
  2. package/control-plane/bootstrap.config.json +1 -0
  3. package/control-plane/default-playbook/catalog/pipelines.json +289 -52
  4. package/control-plane/default-playbook/catalog/roles.json +9 -0
  5. package/control-plane/default-playbook/prompts/analyst.md +3 -1
  6. package/control-plane/default-playbook/prompts/reviewer.md +2 -2
  7. package/control-plane/default-playbook/prompts/triager.md +51 -0
  8. package/control-plane/default-playbook/prompts/watcher.md +2 -2
  9. package/dist/api/graphql-api/filters/agent-observability-exception.filter.js +24 -0
  10. package/dist/api/graphql-api/filters/agent-observability-exception.filter.js.map +1 -0
  11. package/dist/api/graphql-api/filters/graphql-validation-exception.filter.js +36 -0
  12. package/dist/api/graphql-api/filters/graphql-validation-exception.filter.js.map +1 -0
  13. package/dist/api/graphql-api/graphql-api.module.js +77 -0
  14. package/dist/api/graphql-api/graphql-api.module.js.map +1 -0
  15. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.js +296 -0
  16. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.js.map +1 -0
  17. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-mappers.js +64 -0
  18. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-mappers.js.map +1 -0
  19. package/dist/api/graphql-api/graphql-ws/constants.js +11 -0
  20. package/dist/api/graphql-api/graphql-ws/constants.js.map +1 -0
  21. package/dist/api/graphql-api/graphql-ws/pubsub.module.js +32 -0
  22. package/dist/api/graphql-api/graphql-ws/pubsub.module.js.map +1 -0
  23. package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js +101 -0
  24. package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js.map +1 -0
  25. package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js +115 -0
  26. package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js.map +1 -0
  27. package/dist/api/graphql-api/graphql-ws/subscription-mappers.js +85 -0
  28. package/dist/api/graphql-api/graphql-ws/subscription-mappers.js.map +1 -0
  29. package/dist/api/graphql-api/graphql-ws/ws.js +22 -0
  30. package/dist/api/graphql-api/graphql-ws/ws.js.map +1 -0
  31. package/dist/api/graphql-api/inbox/inbox-subscription.resolver.js +56 -0
  32. package/dist/api/graphql-api/inbox/inbox-subscription.resolver.js.map +1 -0
  33. package/dist/api/graphql-api/inbox/inbox.resolver.js +125 -0
  34. package/dist/api/graphql-api/inbox/inbox.resolver.js.map +1 -0
  35. package/dist/api/graphql-api/inbox/inputs/answer-question.input.js +33 -0
  36. package/dist/api/graphql-api/inbox/inputs/answer-question.input.js.map +1 -0
  37. package/dist/api/graphql-api/inbox/inputs/gate-decision.input.js +27 -0
  38. package/dist/api/graphql-api/inbox/inputs/gate-decision.input.js.map +1 -0
  39. package/dist/api/graphql-api/inbox/inputs/list-inbox.input.js +28 -0
  40. package/dist/api/graphql-api/inbox/inputs/list-inbox.input.js.map +1 -0
  41. package/dist/api/graphql-api/inbox/inputs/resolve-inbox-item.input.js +38 -0
  42. package/dist/api/graphql-api/inbox/inputs/resolve-inbox-item.input.js.map +1 -0
  43. package/dist/api/graphql-api/inbox/model/gate-risk.model.js +53 -0
  44. package/dist/api/graphql-api/inbox/model/gate-risk.model.js.map +1 -0
  45. package/dist/api/graphql-api/inbox/model/inbox-connection.model.js +16 -0
  46. package/dist/api/graphql-api/inbox/model/inbox-connection.model.js.map +1 -0
  47. package/dist/api/graphql-api/inbox/model/inbox-item.model.js +88 -0
  48. package/dist/api/graphql-api/inbox/model/inbox-item.model.js.map +1 -0
  49. package/dist/api/graphql-api/inbox/model/inbox-resolution.model.js +48 -0
  50. package/dist/api/graphql-api/inbox/model/inbox-resolution.model.js.map +1 -0
  51. package/dist/api/graphql-api/method/inputs/list-method.input.js +15 -0
  52. package/dist/api/graphql-api/method/inputs/list-method.input.js.map +1 -0
  53. package/dist/api/graphql-api/method/method.resolver.js +90 -0
  54. package/dist/api/graphql-api/method/method.resolver.js.map +1 -0
  55. package/dist/api/graphql-api/method/model/alternative-role-group.model.js +32 -0
  56. package/dist/api/graphql-api/method/model/alternative-role-group.model.js.map +1 -0
  57. package/dist/api/graphql-api/method/model/pipeline-connection.model.js +16 -0
  58. package/dist/api/graphql-api/method/model/pipeline-connection.model.js.map +1 -0
  59. package/dist/api/graphql-api/method/model/pipeline.model.js +69 -0
  60. package/dist/api/graphql-api/method/model/pipeline.model.js.map +1 -0
  61. package/dist/api/graphql-api/method/model/playbook-connection.model.js +16 -0
  62. package/dist/api/graphql-api/method/model/playbook-connection.model.js.map +1 -0
  63. package/dist/api/graphql-api/method/model/playbook.model.js +47 -0
  64. package/dist/api/graphql-api/method/model/playbook.model.js.map +1 -0
  65. package/dist/api/graphql-api/method/model/role-connection.model.js +16 -0
  66. package/dist/api/graphql-api/method/model/role-connection.model.js.map +1 -0
  67. package/dist/api/graphql-api/method/model/role.model.js +98 -0
  68. package/dist/api/graphql-api/method/model/role.model.js.map +1 -0
  69. package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js +52 -0
  70. package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js.map +1 -0
  71. package/dist/api/graphql-api/pr/model/pr-readiness.model.js +403 -0
  72. package/dist/api/graphql-api/pr/model/pr-readiness.model.js.map +1 -0
  73. package/dist/api/graphql-api/pr/pr.resolver.js +76 -0
  74. package/dist/api/graphql-api/pr/pr.resolver.js.map +1 -0
  75. package/dist/api/graphql-api/registerGraphqlEnums.js +9 -0
  76. package/dist/api/graphql-api/registerGraphqlEnums.js.map +1 -0
  77. package/dist/api/graphql-api/runs/inputs/create-run.input.js +63 -0
  78. package/dist/api/graphql-api/runs/inputs/create-run.input.js.map +1 -0
  79. package/dist/api/graphql-api/runs/inputs/get-agent-log.input.js +48 -0
  80. package/dist/api/graphql-api/runs/inputs/get-agent-log.input.js.map +1 -0
  81. package/dist/api/graphql-api/runs/inputs/get-run-attempts.input.js +32 -0
  82. package/dist/api/graphql-api/runs/inputs/get-run-attempts.input.js.map +1 -0
  83. package/dist/api/graphql-api/runs/inputs/get-run-events.input.js +28 -0
  84. package/dist/api/graphql-api/runs/inputs/get-run-events.input.js.map +1 -0
  85. package/dist/api/graphql-api/runs/inputs/list-runs.input.js +23 -0
  86. package/dist/api/graphql-api/runs/inputs/list-runs.input.js.map +1 -0
  87. package/dist/api/graphql-api/runs/inputs/simulate-route.input.js +43 -0
  88. package/dist/api/graphql-api/runs/inputs/simulate-route.input.js.map +1 -0
  89. package/dist/api/graphql-api/runs/model/agent-activity.model.js +367 -0
  90. package/dist/api/graphql-api/runs/model/agent-activity.model.js.map +1 -0
  91. package/dist/api/graphql-api/runs/model/create-run-result.model.js +53 -0
  92. package/dist/api/graphql-api/runs/model/create-run-result.model.js.map +1 -0
  93. package/dist/api/graphql-api/runs/model/run-attempt.model.js +114 -0
  94. package/dist/api/graphql-api/runs/model/run-attempt.model.js.map +1 -0
  95. package/dist/api/graphql-api/runs/model/run-connection.model.js +16 -0
  96. package/dist/api/graphql-api/runs/model/run-connection.model.js.map +1 -0
  97. package/dist/api/graphql-api/runs/model/run-cost.model.js +67 -0
  98. package/dist/api/graphql-api/runs/model/run-cost.model.js.map +1 -0
  99. package/dist/api/graphql-api/runs/model/run-digest.model.js +41 -0
  100. package/dist/api/graphql-api/runs/model/run-digest.model.js.map +1 -0
  101. package/dist/api/graphql-api/runs/model/run-event-connection.model.js +16 -0
  102. package/dist/api/graphql-api/runs/model/run-event-connection.model.js.map +1 -0
  103. package/dist/api/graphql-api/runs/model/run-event.model.js +58 -0
  104. package/dist/api/graphql-api/runs/model/run-event.model.js.map +1 -0
  105. package/dist/api/graphql-api/runs/model/run-progress.model.js +33 -0
  106. package/dist/api/graphql-api/runs/model/run-progress.model.js.map +1 -0
  107. package/dist/api/graphql-api/runs/model/run-workflow.model.js +287 -0
  108. package/dist/api/graphql-api/runs/model/run-workflow.model.js.map +1 -0
  109. package/dist/api/graphql-api/runs/model/run.model.js +57 -0
  110. package/dist/api/graphql-api/runs/model/run.model.js.map +1 -0
  111. package/dist/api/graphql-api/runs/model/usage.model.js +32 -0
  112. package/dist/api/graphql-api/runs/model/usage.model.js.map +1 -0
  113. package/dist/api/graphql-api/runs/run-digest.resolver.js +40 -0
  114. package/dist/api/graphql-api/runs/run-digest.resolver.js.map +1 -0
  115. package/dist/api/graphql-api/runs/run-events.resolver.js +45 -0
  116. package/dist/api/graphql-api/runs/run-events.resolver.js.map +1 -0
  117. package/dist/api/graphql-api/runs/run-progress.resolver.js +53 -0
  118. package/dist/api/graphql-api/runs/run-progress.resolver.js.map +1 -0
  119. package/dist/api/graphql-api/runs/runs-subscription.resolver.js +124 -0
  120. package/dist/api/graphql-api/runs/runs-subscription.resolver.js.map +1 -0
  121. package/dist/api/graphql-api/runs/runs.resolver.js +165 -0
  122. package/dist/api/graphql-api/runs/runs.resolver.js.map +1 -0
  123. package/dist/api/graphql-api/share/graphql-param-types.js +6 -0
  124. package/dist/api/graphql-api/share/graphql-param-types.js.map +1 -0
  125. package/dist/api/graphql-api/share/inputs/connection.input.js +27 -0
  126. package/dist/api/graphql-api/share/inputs/connection.input.js.map +1 -0
  127. package/dist/api/graphql-api/share/inputs/run-subscription.input.js +22 -0
  128. package/dist/api/graphql-api/share/inputs/run-subscription.input.js.map +1 -0
  129. package/dist/api/graphql-api/share/model/paginated.model.js +75 -0
  130. package/dist/api/graphql-api/share/model/paginated.model.js.map +1 -0
  131. package/dist/api/graphql-api/system/model/daemon-status.model.js +47 -0
  132. package/dist/api/graphql-api/system/model/daemon-status.model.js.map +1 -0
  133. package/dist/api/graphql-api/system/model/doctor-result.model.js +33 -0
  134. package/dist/api/graphql-api/system/model/doctor-result.model.js.map +1 -0
  135. package/dist/api/graphql-api/system/model/project.model.js +37 -0
  136. package/dist/api/graphql-api/system/model/project.model.js.map +1 -0
  137. package/dist/api/graphql-api/system/model/repository-context.model.js +70 -0
  138. package/dist/api/graphql-api/system/model/repository-context.model.js.map +1 -0
  139. package/dist/api/graphql-api/system/model/repository-validation.model.js +62 -0
  140. package/dist/api/graphql-api/system/model/repository-validation.model.js.map +1 -0
  141. package/dist/api/graphql-api/system/model/system-status.model.js +29 -0
  142. package/dist/api/graphql-api/system/model/system-status.model.js.map +1 -0
  143. package/dist/api/graphql-api/system/system.resolver.js +83 -0
  144. package/dist/api/graphql-api/system/system.resolver.js.map +1 -0
  145. package/dist/cli/commands/doctor-report.js +39 -0
  146. package/dist/cli/commands/doctor-report.js.map +1 -0
  147. package/dist/cli/commands/lifecycle.js +237 -0
  148. package/dist/cli/commands/lifecycle.js.map +1 -0
  149. package/dist/cli/commands/mcp.js +46 -8
  150. package/dist/cli/commands/mcp.js.map +1 -1
  151. package/dist/cli/commands/revisium-helpers.js +2 -2
  152. package/dist/cli/index.js +5 -29
  153. package/dist/cli/index.js.map +1 -1
  154. package/dist/cli/program.js +7 -21
  155. package/dist/cli/program.js.map +1 -1
  156. package/dist/config.js +57 -5
  157. package/dist/config.js.map +1 -1
  158. package/dist/control-plane/bootstrap.js +93 -0
  159. package/dist/control-plane/bootstrap.js.map +1 -0
  160. package/dist/control-plane/change-notifications.js +35 -0
  161. package/dist/control-plane/change-notifications.js.map +1 -0
  162. package/dist/control-plane/data-access.js +10 -3
  163. package/dist/control-plane/data-access.js.map +1 -1
  164. package/dist/control-plane/inbox.js +5 -31
  165. package/dist/control-plane/inbox.js.map +1 -1
  166. package/dist/control-plane/index.js +1 -1
  167. package/dist/control-plane/index.js.map +1 -1
  168. package/dist/control-plane/resolve-cwd.js +76 -8
  169. package/dist/control-plane/resolve-cwd.js.map +1 -1
  170. package/dist/control-plane/schema-migration.js +7 -11
  171. package/dist/control-plane/schema-migration.js.map +1 -1
  172. package/dist/control-plane/seed-default-playbook.js +23 -0
  173. package/dist/control-plane/seed-default-playbook.js.map +1 -1
  174. package/dist/control-plane/steps.js +15 -349
  175. package/dist/control-plane/steps.js.map +1 -1
  176. package/dist/e2e/kit/agents.js +43 -8
  177. package/dist/e2e/kit/agents.js.map +1 -1
  178. package/dist/e2e/kit/assertions.js +57 -14
  179. package/dist/e2e/kit/assertions.js.map +1 -1
  180. package/dist/e2e/kit/drive.js +0 -4
  181. package/dist/e2e/kit/drive.js.map +1 -1
  182. package/dist/e2e/kit/fake-integrator.js +16 -1
  183. package/dist/e2e/kit/fake-integrator.js.map +1 -1
  184. package/dist/e2e/kit/gh-emulator.js +173 -10
  185. package/dist/e2e/kit/gh-emulator.js.map +1 -1
  186. package/dist/e2e/kit/git-target-repo.js +35 -3
  187. package/dist/e2e/kit/git-target-repo.js.map +1 -1
  188. package/dist/e2e/kit/harness.js +16 -3
  189. package/dist/e2e/kit/harness.js.map +1 -1
  190. package/dist/e2e/kit/scenarios.js +1 -1
  191. package/dist/e2e/recovery-dd-crash-child.js +3 -2
  192. package/dist/e2e/recovery-dd-crash-child.js.map +1 -1
  193. package/dist/engine/dbos.module.js +2 -1
  194. package/dist/engine/dbos.module.js.map +1 -1
  195. package/dist/engine/dbos.service.js +89 -18
  196. package/dist/engine/dbos.service.js.map +1 -1
  197. package/dist/engine/ensure-postgres.js +11 -9
  198. package/dist/engine/ensure-postgres.js.map +1 -1
  199. package/dist/features/inbox/commands/handlers/inbox-command.handlers.js +80 -0
  200. package/dist/features/inbox/commands/handlers/inbox-command.handlers.js.map +1 -0
  201. package/dist/features/inbox/commands/impl/answer-question.command.js +7 -0
  202. package/dist/features/inbox/commands/impl/answer-question.command.js.map +1 -0
  203. package/dist/features/inbox/commands/impl/approve-gate.command.js +7 -0
  204. package/dist/features/inbox/commands/impl/approve-gate.command.js.map +1 -0
  205. package/dist/features/inbox/commands/impl/reject-gate.command.js +7 -0
  206. package/dist/features/inbox/commands/impl/reject-gate.command.js.map +1 -0
  207. package/dist/features/inbox/commands/impl/resolve-inbox-item.command.js +7 -0
  208. package/dist/features/inbox/commands/impl/resolve-inbox-item.command.js.map +1 -0
  209. package/dist/features/inbox/commands/index.js +8 -0
  210. package/dist/features/inbox/commands/index.js.map +1 -0
  211. package/dist/features/inbox/inbox-api.module.js +23 -0
  212. package/dist/features/inbox/inbox-api.module.js.map +1 -0
  213. package/dist/features/inbox/inbox-api.service.js +63 -0
  214. package/dist/features/inbox/inbox-api.service.js.map +1 -0
  215. package/dist/features/inbox/queries/handlers/inbox-query.handlers.js +111 -0
  216. package/dist/features/inbox/queries/handlers/inbox-query.handlers.js.map +1 -0
  217. package/dist/features/inbox/queries/impl/get-inbox-item.query.js +7 -0
  218. package/dist/features/inbox/queries/impl/get-inbox-item.query.js.map +1 -0
  219. package/dist/features/inbox/queries/impl/get-pending-decisions.query.js +7 -0
  220. package/dist/features/inbox/queries/impl/get-pending-decisions.query.js.map +1 -0
  221. package/dist/features/inbox/queries/impl/list-inbox.query.js +7 -0
  222. package/dist/features/inbox/queries/impl/list-inbox.query.js.map +1 -0
  223. package/dist/features/inbox/queries/impl/summarize-gate-risk.query.js +7 -0
  224. package/dist/features/inbox/queries/impl/summarize-gate-risk.query.js.map +1 -0
  225. package/dist/features/inbox/queries/index.js +8 -0
  226. package/dist/features/inbox/queries/index.js.map +1 -0
  227. package/dist/features/method/commands/index.js +2 -0
  228. package/dist/features/method/commands/index.js.map +1 -0
  229. package/dist/features/method/method-api.module.js +23 -0
  230. package/dist/features/method/method-api.module.js.map +1 -0
  231. package/dist/features/method/method-api.service.js +47 -0
  232. package/dist/features/method/method-api.service.js.map +1 -0
  233. package/dist/features/method/queries/handlers/method-query.handlers.js +115 -0
  234. package/dist/features/method/queries/handlers/method-query.handlers.js.map +1 -0
  235. package/dist/features/method/queries/impl/get-pipeline.query.js +7 -0
  236. package/dist/features/method/queries/impl/get-pipeline.query.js.map +1 -0
  237. package/dist/features/method/queries/impl/get-role.query.js +7 -0
  238. package/dist/features/method/queries/impl/get-role.query.js.map +1 -0
  239. package/dist/features/method/queries/impl/list-pipelines.query.js +7 -0
  240. package/dist/features/method/queries/impl/list-pipelines.query.js.map +1 -0
  241. package/dist/features/method/queries/impl/list-playbooks.query.js +7 -0
  242. package/dist/features/method/queries/impl/list-playbooks.query.js.map +1 -0
  243. package/dist/features/method/queries/impl/list-roles.query.js +7 -0
  244. package/dist/features/method/queries/impl/list-roles.query.js.map +1 -0
  245. package/dist/features/method/queries/index.js +9 -0
  246. package/dist/features/method/queries/index.js.map +1 -0
  247. package/dist/features/pr/commands/index.js +2 -0
  248. package/dist/features/pr/commands/index.js.map +1 -0
  249. package/dist/features/pr/pr-api.module.js +23 -0
  250. package/dist/features/pr/pr-api.module.js.map +1 -0
  251. package/dist/features/pr/pr-api.service.js +35 -0
  252. package/dist/features/pr/pr-api.service.js.map +1 -0
  253. package/dist/features/pr/queries/handlers/pr-query.handlers.js +48 -0
  254. package/dist/features/pr/queries/handlers/pr-query.handlers.js.map +1 -0
  255. package/dist/features/pr/queries/impl/get-pr-readiness.query.js +7 -0
  256. package/dist/features/pr/queries/impl/get-pr-readiness.query.js.map +1 -0
  257. package/dist/features/pr/queries/impl/list-pr-feedback.query.js +7 -0
  258. package/dist/features/pr/queries/impl/list-pr-feedback.query.js.map +1 -0
  259. package/dist/features/pr/queries/index.js +3 -0
  260. package/dist/features/pr/queries/index.js.map +1 -0
  261. package/dist/features/runs/commands/handlers/runs-command.handlers.js +32 -0
  262. package/dist/features/runs/commands/handlers/runs-command.handlers.js.map +1 -0
  263. package/dist/features/runs/commands/impl/create-run.command.js +7 -0
  264. package/dist/features/runs/commands/impl/create-run.command.js.map +1 -0
  265. package/dist/features/runs/commands/index.js +3 -0
  266. package/dist/features/runs/commands/index.js.map +1 -0
  267. package/dist/features/runs/queries/handlers/runs-query.handlers.js +359 -0
  268. package/dist/features/runs/queries/handlers/runs-query.handlers.js.map +1 -0
  269. package/dist/features/runs/queries/impl/get-agent-activity.query.js +7 -0
  270. package/dist/features/runs/queries/impl/get-agent-activity.query.js.map +1 -0
  271. package/dist/features/runs/queries/impl/get-agent-attempts.query.js +7 -0
  272. package/dist/features/runs/queries/impl/get-agent-attempts.query.js.map +1 -0
  273. package/dist/features/runs/queries/impl/get-agent-log.query.js +7 -0
  274. package/dist/features/runs/queries/impl/get-agent-log.query.js.map +1 -0
  275. package/dist/features/runs/queries/impl/get-run-attempts.query.js +7 -0
  276. package/dist/features/runs/queries/impl/get-run-attempts.query.js.map +1 -0
  277. package/dist/features/runs/queries/impl/get-run-digest.query.js +7 -0
  278. package/dist/features/runs/queries/impl/get-run-digest.query.js.map +1 -0
  279. package/dist/features/runs/queries/impl/get-run-events.query.js +7 -0
  280. package/dist/features/runs/queries/impl/get-run-events.query.js.map +1 -0
  281. package/dist/features/runs/queries/impl/get-run-progress.query.js +7 -0
  282. package/dist/features/runs/queries/impl/get-run-progress.query.js.map +1 -0
  283. package/dist/features/runs/queries/impl/get-run-workflow.query.js +7 -0
  284. package/dist/features/runs/queries/impl/get-run-workflow.query.js.map +1 -0
  285. package/dist/features/runs/queries/impl/get-run.query.js +7 -0
  286. package/dist/features/runs/queries/impl/get-run.query.js.map +1 -0
  287. package/dist/features/runs/queries/impl/list-runs.query.js +7 -0
  288. package/dist/features/runs/queries/impl/list-runs.query.js.map +1 -0
  289. package/dist/features/runs/queries/impl/simulate-route.query.js +7 -0
  290. package/dist/features/runs/queries/impl/simulate-route.query.js.map +1 -0
  291. package/dist/features/runs/queries/index.js +15 -0
  292. package/dist/features/runs/queries/index.js.map +1 -0
  293. package/dist/features/runs/runs-api.module.js +23 -0
  294. package/dist/features/runs/runs-api.module.js.map +1 -0
  295. package/dist/features/runs/runs-api.service.js +79 -0
  296. package/dist/features/runs/runs-api.service.js.map +1 -0
  297. package/dist/features/shared/connection.js +39 -0
  298. package/dist/features/shared/connection.js.map +1 -0
  299. package/dist/features/system/commands/index.js +2 -0
  300. package/dist/features/system/commands/index.js.map +1 -0
  301. package/dist/features/system/queries/handlers/system-query.handlers.js +96 -0
  302. package/dist/features/system/queries/handlers/system-query.handlers.js.map +1 -0
  303. package/dist/features/system/queries/impl/doctor.query.js +4 -0
  304. package/dist/features/system/queries/impl/doctor.query.js.map +1 -0
  305. package/dist/features/system/queries/impl/get-project.query.js +4 -0
  306. package/dist/features/system/queries/impl/get-project.query.js.map +1 -0
  307. package/dist/features/system/queries/impl/get-repository-context.query.js +7 -0
  308. package/dist/features/system/queries/impl/get-repository-context.query.js.map +1 -0
  309. package/dist/features/system/queries/impl/get-status.query.js +4 -0
  310. package/dist/features/system/queries/impl/get-status.query.js.map +1 -0
  311. package/dist/features/system/queries/impl/validate-repository.query.js +7 -0
  312. package/dist/features/system/queries/impl/validate-repository.query.js.map +1 -0
  313. package/dist/features/system/queries/index.js +9 -0
  314. package/dist/features/system/queries/index.js.map +1 -0
  315. package/dist/features/system/system-api.module.js +23 -0
  316. package/dist/features/system/system-api.module.js.map +1 -0
  317. package/dist/features/system/system-api.service.js +47 -0
  318. package/dist/features/system/system-api.service.js.map +1 -0
  319. package/dist/host/daemon.js +68 -0
  320. package/dist/host/daemon.js.map +1 -0
  321. package/dist/host/ensure-host.js +109 -0
  322. package/dist/host/ensure-host.js.map +1 -0
  323. package/dist/host/host-runtime.js +52 -0
  324. package/dist/host/host-runtime.js.map +1 -0
  325. package/dist/host/host.lifecycle.js +16 -3
  326. package/dist/host/host.lifecycle.js.map +1 -1
  327. package/dist/http/graphql-host.js +56 -0
  328. package/dist/http/graphql-host.js.map +1 -0
  329. package/dist/{mcp/mcp.module.js → http/graphql-host.module.js} +12 -10
  330. package/dist/http/graphql-host.module.js.map +1 -0
  331. package/dist/infrastructure/metrics/graphql/graphql-metrics.js +91 -0
  332. package/dist/infrastructure/metrics/graphql/graphql-metrics.js.map +1 -0
  333. package/dist/mcp/mcp-capabilities.js +6 -1
  334. package/dist/mcp/mcp-capabilities.js.map +1 -1
  335. package/dist/mcp/mcp-facade.service.js +24 -0
  336. package/dist/mcp/mcp-facade.service.js.map +1 -1
  337. package/dist/mcp/mcp-http.service.js +95 -0
  338. package/dist/mcp/mcp-http.service.js.map +1 -0
  339. package/dist/mcp/mcp-tools.js +58 -0
  340. package/dist/mcp/mcp-tools.js.map +1 -1
  341. package/dist/observability/agent-activity-reporter.js +185 -0
  342. package/dist/observability/agent-activity-reporter.js.map +1 -0
  343. package/dist/observability/agent-observability.service.js +1142 -0
  344. package/dist/observability/agent-observability.service.js.map +1 -0
  345. package/dist/observability/index.js +4 -0
  346. package/dist/observability/index.js.map +1 -0
  347. package/dist/observability/types.js +11 -0
  348. package/dist/observability/types.js.map +1 -0
  349. package/dist/pipeline/await-human.js +8 -4
  350. package/dist/pipeline/await-human.js.map +1 -1
  351. package/dist/pipeline/data-driven-task.workflow.js +184 -73
  352. package/dist/pipeline/data-driven-task.workflow.js.map +1 -1
  353. package/dist/pipeline/data-driven-template.js +3 -3
  354. package/dist/pipeline/pipeline.module.js +1 -1
  355. package/dist/pipeline/pipeline.module.js.map +1 -1
  356. package/dist/pipeline/{develop-task.workflow.js → pipeline.service.js} +97 -26
  357. package/dist/pipeline/pipeline.service.js.map +1 -0
  358. package/dist/pipeline-core/kit/fixtures.js +94 -0
  359. package/dist/pipeline-core/kit/fixtures.js.map +1 -1
  360. package/dist/pipeline-core/validate-capability.js +23 -0
  361. package/dist/pipeline-core/validate-capability.js.map +1 -0
  362. package/dist/pipeline-core/validate-conflicts.js +37 -0
  363. package/dist/pipeline-core/validate-conflicts.js.map +1 -0
  364. package/dist/pipeline-core/validate-dataflow.js +180 -0
  365. package/dist/pipeline-core/validate-dataflow.js.map +1 -0
  366. package/dist/pipeline-core/validate-diff.js +158 -0
  367. package/dist/pipeline-core/validate-diff.js.map +1 -0
  368. package/dist/pipeline-core/validate-edges.js +44 -0
  369. package/dist/pipeline-core/validate-edges.js.map +1 -0
  370. package/dist/pipeline-core/validate-graph.js +123 -0
  371. package/dist/pipeline-core/validate-graph.js.map +1 -0
  372. package/dist/pipeline-core/validate-loops.js +226 -0
  373. package/dist/pipeline-core/validate-loops.js.map +1 -0
  374. package/dist/pipeline-core/validate-parallel.js +132 -0
  375. package/dist/pipeline-core/validate-parallel.js.map +1 -0
  376. package/dist/pipeline-core/validate-sink.js +27 -0
  377. package/dist/pipeline-core/validate-sink.js.map +1 -0
  378. package/dist/pipeline-core/validate-topology.js +140 -0
  379. package/dist/pipeline-core/validate-topology.js.map +1 -0
  380. package/dist/pipeline-core/validate-verdict.js +72 -0
  381. package/dist/pipeline-core/validate-verdict.js.map +1 -0
  382. package/dist/pipeline-core/validate.js +34 -1107
  383. package/dist/pipeline-core/validate.js.map +1 -1
  384. package/dist/revisium/run.service.js +31 -8
  385. package/dist/revisium/run.service.js.map +1 -1
  386. package/dist/run/create-run.js +5 -31
  387. package/dist/run/create-run.js.map +1 -1
  388. package/dist/run/inspect-run.js +2 -29
  389. package/dist/run/inspect-run.js.map +1 -1
  390. package/dist/run/terminal-run-status.js +7 -30
  391. package/dist/run/terminal-run-status.js.map +1 -1
  392. package/dist/runners/claude-code.service.js +1 -0
  393. package/dist/runners/claude-code.service.js.map +1 -1
  394. package/dist/runners/codex.service.js +51 -0
  395. package/dist/runners/codex.service.js.map +1 -0
  396. package/dist/runners/integrator-branch-naming.js +24 -0
  397. package/dist/runners/integrator-branch-naming.js.map +1 -0
  398. package/dist/runners/integrator-git.js +84 -0
  399. package/dist/runners/integrator-git.js.map +1 -0
  400. package/dist/runners/integrator-remote.js +34 -0
  401. package/dist/runners/integrator-remote.js.map +1 -0
  402. package/dist/runners/integrator-types.js +9 -0
  403. package/dist/runners/integrator-types.js.map +1 -0
  404. package/dist/runners/integrator.js +250 -134
  405. package/dist/runners/integrator.js.map +1 -1
  406. package/dist/runners/runner.module.js +7 -3
  407. package/dist/runners/runner.module.js.map +1 -1
  408. package/dist/runners/worktree.service.js +63 -0
  409. package/dist/runners/worktree.service.js.map +1 -0
  410. package/dist/smoke/cli.js +47 -0
  411. package/dist/smoke/cli.js.map +1 -0
  412. package/dist/smoke/isolation.js +113 -0
  413. package/dist/smoke/isolation.js.map +1 -0
  414. package/dist/task-control-plane/task-control-plane-api.service.js +317 -4
  415. package/dist/task-control-plane/task-control-plane-api.service.js.map +1 -1
  416. package/dist/task-control-plane/task-control-plane.module.js +22 -3
  417. package/dist/task-control-plane/task-control-plane.module.js.map +1 -1
  418. package/dist/worker/artifact-store.js +6 -1
  419. package/dist/worker/artifact-store.js.map +1 -1
  420. package/dist/worker/build-context.js +135 -1
  421. package/dist/worker/build-context.js.map +1 -1
  422. package/dist/worker/claude-code-runner.js +79 -82
  423. package/dist/worker/claude-code-runner.js.map +1 -1
  424. package/dist/worker/codex-runner.js +474 -0
  425. package/dist/worker/codex-runner.js.map +1 -0
  426. package/dist/worker/git-worktree-manager.js +148 -0
  427. package/dist/worker/git-worktree-manager.js.map +1 -0
  428. package/dist/worker/result-envelope.js +75 -63
  429. package/dist/worker/result-envelope.js.map +1 -1
  430. package/dist/worker/runner-common.js +106 -0
  431. package/dist/worker/runner-common.js.map +1 -0
  432. package/dist/worker/runner-dispatch.js +3 -1
  433. package/dist/worker/runner-dispatch.js.map +1 -1
  434. package/dist/worker/runner.js.map +1 -1
  435. package/dist/worker/stub-runner.js +3 -3
  436. package/dist/worker/stub-runner.js.map +1 -1
  437. package/package.json +15 -7
  438. package/dist/app.module.js +0 -28
  439. package/dist/app.module.js.map +0 -1
  440. package/dist/cli/commands/bootstrap.js +0 -100
  441. package/dist/cli/commands/bootstrap.js.map +0 -1
  442. package/dist/cli/commands/dev.js +0 -143
  443. package/dist/cli/commands/dev.js.map +0 -1
  444. package/dist/cli/commands/inbox.js +0 -288
  445. package/dist/cli/commands/inbox.js.map +0 -1
  446. package/dist/cli/commands/playbook.js +0 -74
  447. package/dist/cli/commands/playbook.js.map +0 -1
  448. package/dist/cli/commands/poll-workflow-state.js +0 -144
  449. package/dist/cli/commands/poll-workflow-state.js.map +0 -1
  450. package/dist/cli/commands/revisium-context.js +0 -23
  451. package/dist/cli/commands/revisium-context.js.map +0 -1
  452. package/dist/cli/commands/revisium.js +0 -89
  453. package/dist/cli/commands/revisium.js.map +0 -1
  454. package/dist/cli/commands/run.js +0 -453
  455. package/dist/cli/commands/run.js.map +0 -1
  456. package/dist/cli/live-guard.js +0 -49
  457. package/dist/cli/live-guard.js.map +0 -1
  458. package/dist/cli/needs-host.js +0 -77
  459. package/dist/cli/needs-host.js.map +0 -1
  460. package/dist/mcp/mcp-stdio.service.js +0 -48
  461. package/dist/mcp/mcp-stdio.service.js.map +0 -1
  462. package/dist/mcp/mcp.module.js.map +0 -1
  463. package/dist/pipeline/develop-task.workflow.js.map +0 -1
  464. package/dist/worker/worktree-manager.js +0 -7
  465. package/dist/worker/worktree-manager.js.map +0 -1
@@ -1,144 +0,0 @@
1
- /**
2
- * poll-workflow-state.ts — shared polling helper used by `run start` and `inbox resolve`.
3
- *
4
- * After enqueueing or signaling a DBOS workflow, the CLI must wait for either:
5
- * - a terminal DBOS status (SUCCESS / ERROR / CANCELLED / MAX_RECOVERY_ATTEMPTS_EXCEEDED), or
6
- * - a parked gate (pending inbox approval row for this runId).
7
- *
8
- * Extracted from run.ts / inbox.ts to eliminate duplication (Sonar CPD).
9
- * Used by both the run-start path (§3.6) and the gate-resolve path (§3.7).
10
- *
11
- * 0006: PollOpts added with wait/maxAttempts/intervalMs.
12
- * - wait:false (default): return on first terminal or first pending gate (unchanged behavior).
13
- * - wait:true: loop through RUNNING step transitions, exit at gate (print resolve + re-attach
14
- * hint) or at terminal; generous cap (2400 × 500ms ≈ 20 min).
15
- * SIGINT handling: sets an aborted flag so the loop returns normally, letting index.ts finally
16
- * { app.close() } run. Never calls process.exit(0).
17
- */
18
- /** DBOS terminal workflow statuses. MAX_RECOVERY_ATTEMPTS_EXCEEDED included per G10. */
19
- export const TERMINAL_STATUSES = new Set([
20
- 'SUCCESS',
21
- 'ERROR',
22
- 'CANCELLED',
23
- 'MAX_RECOVERY_ATTEMPTS_EXCEEDED',
24
- ]);
25
- /** Default cap for wait:false mode (40 × 500ms = 20s). */
26
- const DEFAULT_MAX_ATTEMPTS = 40;
27
- /** Default interval between poll iterations in ms. */
28
- const DEFAULT_INTERVAL_MS = 500;
29
- /** Cap for wait:true mode: 2400 × 500ms ≈ 20 min. */
30
- const WAIT_MAX_ATTEMPTS = 2400;
31
- /** Shared detach/re-attach message printed by both the SIGINT path and the gate path. */
32
- const DETACH_MSG = (runId) => `detached — the durable state is preserved; resume with: revo run start ${runId} --wait`;
33
- /** DBOS terminal statuses that mean the workflow FAILED (vs. SUCCESS / CANCELLED). */
34
- const FAILURE_STATUSES = new Set(['ERROR', 'MAX_RECOVERY_ATTEMPTS_EXCEEDED']);
35
- /**
36
- * abortableSleep — sleep for intervalMs, but resolve early if the SIGINT handler
37
- * calls earlyResolveRef.resolve(). Uses a single timer; no polling loop needed.
38
- */
39
- function abortableSleep(intervalMs, earlyResolveRef) {
40
- return new Promise((resolve) => {
41
- earlyResolveRef.resolve = resolve;
42
- setTimeout(resolve, intervalMs);
43
- });
44
- }
45
- /**
46
- * checkTerminalStatus — check if the workflow has reached a terminal DBOS status.
47
- * Prints the status line and returns true if terminal so the caller can stop.
48
- *
49
- * 0008 #2: on a FAILURE terminal status (ERROR / MAX_RECOVERY_ATTEMPTS_EXCEEDED), read the
50
- * Revisium run-row failure reason (if a reader is supplied) and surface it as a clear
51
- * "run failed" line — never a silent sleep→ERROR with no explanation.
52
- */
53
- async function checkTerminalStatus(runId, dbosService, readFailure) {
54
- const wfStatus = await dbosService.getWorkflowStatus(runId);
55
- if (!wfStatus || !TERMINAL_STATUSES.has(wfStatus.status)) {
56
- return false;
57
- }
58
- console.log(`status: ${wfStatus.status}`);
59
- if (FAILURE_STATUSES.has(wfStatus.status) && readFailure) {
60
- try {
61
- const failure = await readFailure(runId);
62
- if (failure?.reason) {
63
- console.log(`run failed: ${failure.reason}`);
64
- }
65
- else if (failure?.runStatus && failure.runStatus !== 'failed') {
66
- // DBOS says failure but the run-row was never patched — surface the integrity gap.
67
- console.log(`note: DBOS=${wfStatus.status} but run-row status=${failure.runStatus} (no run_failed reason recorded)`);
68
- }
69
- }
70
- catch {
71
- // A failure-reason read should never mask the terminal signal — ignore and stop anyway.
72
- }
73
- }
74
- return true;
75
- }
76
- /**
77
- * checkParkedGate — check if the workflow is parked at a gate (pending inbox row).
78
- * Prints the parked line, resolve hint, and (in wait:true mode) the re-attach hint.
79
- * Returns true if parked so the caller can stop.
80
- */
81
- async function checkParkedGate(runId, inboxSvc, wait) {
82
- const pending = await inboxSvc.listInbox({ runId, status: 'pending' });
83
- if (pending.length === 0) {
84
- return false;
85
- }
86
- const gateRow = pending[0];
87
- if (gateRow) {
88
- const ctx = gateRow.context;
89
- const topic = typeof ctx?.topic === 'string' ? ctx.topic : '?';
90
- console.log(`parked: run ${runId} is waiting at the '${topic}' gate`);
91
- console.log(` resolve with: revo inbox resolve ${gateRow.id} --approve|--reject`);
92
- if (wait) {
93
- console.log(` ${DETACH_MSG(runId)}`);
94
- }
95
- }
96
- return true;
97
- }
98
- /**
99
- * pollWorkflowState — poll until the workflow is terminal or parked at a gate.
100
- *
101
- * @param runId - Workflow / run ID to observe.
102
- * @param dbosService - DBOS status provider (getWorkflowStatus).
103
- * @param inboxSvc - Inbox service for pending-approval detection.
104
- * @param opts - Poll options (wait, maxAttempts, intervalMs).
105
- */
106
- export async function pollWorkflowState(runId, dbosService, inboxSvc, opts = {}) {
107
- const wait = opts.wait ?? false;
108
- const intervalMs = opts.intervalMs ?? DEFAULT_INTERVAL_MS;
109
- // Use a generous cap in wait:true mode so long-running steps don't time out prematurely.
110
- const maxAttempts = opts.maxAttempts ?? (wait ? WAIT_MAX_ATTEMPTS : DEFAULT_MAX_ATTEMPTS);
111
- // SIGINT abort: set a flag so the loop returns normally (no process.exit).
112
- // Also holds a reference to the current sleep's resolve so Ctrl-C wakes it early.
113
- let aborted = false;
114
- const sleepRef = {};
115
- const onSigint = () => {
116
- aborted = true;
117
- if (sleepRef.resolve) {
118
- sleepRef.resolve();
119
- }
120
- };
121
- process.once('SIGINT', onSigint);
122
- try {
123
- for (let attempt = 0; attempt < maxAttempts; attempt++) {
124
- if (aborted) {
125
- console.log(DETACH_MSG(runId));
126
- return;
127
- }
128
- if (await checkTerminalStatus(runId, dbosService, opts.readFailure)) {
129
- return;
130
- }
131
- if (await checkParkedGate(runId, inboxSvc, wait)) {
132
- return;
133
- }
134
- // Still running a step — wait and retry.
135
- await abortableSleep(intervalMs, sleepRef);
136
- }
137
- }
138
- finally {
139
- process.removeListener('SIGINT', onSigint);
140
- }
141
- // Timed out — report unknown state.
142
- console.log('note: timed out waiting for settled state; check status with: revo run show');
143
- }
144
- //# sourceMappingURL=poll-workflow-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"poll-workflow-state.js","sourceRoot":"","sources":["../../../src/cli/commands/poll-workflow-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,wFAAwF;AACxF,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,SAAS;IACT,OAAO;IACP,WAAW;IACX,gCAAgC;CACjC,CAAC,CAAC;AAEH,0DAA0D;AAC1D,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,sDAAsD;AACtD,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEhC,qDAAqD;AACrD,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,yFAAyF;AACzF,MAAM,UAAU,GAAG,CAAC,KAAa,EAAE,EAAE,CACnC,0EAA0E,KAAK,SAAS,CAAC;AAU3F,sFAAsF;AACtF,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,gCAAgC,CAAC,CAAC,CAAC;AAwB9E;;;GAGG;AACH,SAAS,cAAc,CAAC,UAAkB,EAAE,eAAyC;IACnF,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QACnC,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC;QAClC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;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B,CAAC;IACH,CAAC,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAEjC,IAAI,CAAC;QACH,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,WAAW,EAAE,OAAO,EAAE,EAAE,CAAC;YACvD,IAAI,OAAO,EAAE,CAAC;gBACZ,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC/B,OAAO;YACT,CAAC;YAED,IAAI,MAAM,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpE,OAAO;YACT,CAAC;YAED,IAAI,MAAM,eAAe,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC;gBACjD,OAAO;YACT,CAAC;YAED,yCAAyC;YACzC,MAAM,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC7C,CAAC;IACH,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IAED,oCAAoC;IACpC,OAAO,CAAC,GAAG,CAAC,iFAAiF,CAAC,CAAC;AACjG,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * withRevisiumService — create a per-invocation Revisium-only Nest standalone context,
3
- * resolve the service identified by `token`, call `fn(svc)`, and always close the context.
4
- *
5
- * @param token - Injectable class token (e.g. RunService, InboxService).
6
- * @param fn - Async callback that receives the resolved service instance.
7
- * @returns Whatever `fn` returns.
8
- */
9
- export async function withRevisiumService(token, fn) {
10
- const { NestFactory } = await import('@nestjs/core');
11
- const { RevisiumModule } = await import('../../revisium/revisium.module.js');
12
- const ctx = await NestFactory.createApplicationContext(RevisiumModule, {
13
- logger: false,
14
- });
15
- try {
16
- const svc = ctx.get(token);
17
- return await fn(svc);
18
- }
19
- finally {
20
- await ctx.close();
21
- }
22
- }
23
- //# sourceMappingURL=revisium-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"revisium-context.js","sourceRoot":"","sources":["../../../src/cli/commands/revisium-context.ts"],"names":[],"mappings":"AAYA;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,KAAc,EACd,EAA0B;IAE1B,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IACrD,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,MAAM,CAAC,mCAAmC,CAAC,CAAC;IAC7E,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC,wBAAwB,CAAC,cAAc,EAAE;QACrE,MAAM,EAAE,KAAK;KACd,CAAC,CAAC;IACH,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC3B,OAAO,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;YAAS,CAAC;QACT,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC;AACH,CAAC"}
@@ -1,89 +0,0 @@
1
- import { spawn } from 'node:child_process';
2
- import { baseUrl, getConfig, isAlive, isHealthy, readRuntime, removeRuntime, } from '../config.js';
3
- import { ensureRevisium } from '../../host/ensure-revisium.js';
4
- import { killTree, tailLines, waitForExit } from './revisium-helpers.js';
5
- async function startRevisium(options) {
6
- try {
7
- const { runtime, alreadyRunning } = await ensureRevisium(options);
8
- if (alreadyRunning) {
9
- console.log(`already running on ${baseUrl(runtime.httpPort)}`);
10
- return;
11
- }
12
- console.log(`Revisium started (pid ${runtime.pid})`);
13
- console.log(`Admin: ${baseUrl(runtime.httpPort)}/`);
14
- console.log(`REST: ${baseUrl(runtime.httpPort)}/api`);
15
- console.log(`GraphQL: ${baseUrl(runtime.httpPort)}/graphql`);
16
- console.log(`MCP: ${baseUrl(runtime.httpPort)}/mcp`);
17
- console.log(`PostgreSQL port: ${runtime.pgPort}`);
18
- }
19
- catch (err) {
20
- console.error(err instanceof Error ? err.message : String(err));
21
- process.exitCode = 1;
22
- }
23
- }
24
- async function stopRevisium() {
25
- const runtime = readRuntime();
26
- if (!runtime) {
27
- console.log('not running');
28
- return;
29
- }
30
- if (isAlive(runtime.pid)) {
31
- killTree(runtime.pid, 'SIGTERM');
32
- const exited = await waitForExit(runtime.pid, 20_000);
33
- if (!exited) {
34
- killTree(runtime.pid, 'SIGKILL');
35
- await waitForExit(runtime.pid, 5_000);
36
- }
37
- }
38
- removeRuntime();
39
- console.log('stopped');
40
- }
41
- async function statusRevisium() {
42
- const runtime = readRuntime();
43
- if (!runtime || !isAlive(runtime.pid)) {
44
- if (runtime)
45
- removeRuntime();
46
- console.log('stopped');
47
- return;
48
- }
49
- if (await isHealthy(runtime.httpPort)) {
50
- console.log(`running (pid ${runtime.pid}) on ${baseUrl(runtime.httpPort)} - health OK`);
51
- }
52
- else {
53
- console.log(`running (pid ${runtime.pid}) on ${baseUrl(runtime.httpPort)} but health FAILING`);
54
- }
55
- }
56
- function logsRevisium(options) {
57
- const { logFile } = getConfig();
58
- const lines = Number(options.lines ?? 50);
59
- if (!Number.isInteger(lines) || lines <= 0) {
60
- throw new Error(`Invalid line count: ${options.lines}`);
61
- }
62
- if (options.follow) {
63
- const child = spawn('tail', ['-n', String(lines), '-f', logFile], { stdio: 'inherit' });
64
- child.on('exit', (code) => {
65
- process.exitCode = code ?? 0;
66
- });
67
- return;
68
- }
69
- const output = tailLines(logFile, lines);
70
- if (output)
71
- console.log(output);
72
- }
73
- export function registerRevisium(program) {
74
- const revisium = program.command('revisium').description('Manage local standalone Revisium');
75
- revisium
76
- .command('start')
77
- .option('--port <n>', 'HTTP port scan base')
78
- .option('--pg-port <n>', 'PostgreSQL port scan base')
79
- .option('--data <dir>', 'Standalone data directory')
80
- .action(startRevisium);
81
- revisium.command('stop').action(stopRevisium);
82
- revisium.command('status').action(statusRevisium);
83
- revisium
84
- .command('logs')
85
- .option('-n, --lines <lines>', 'Number of log lines', '50')
86
- .option('-f, --follow', 'Follow log output')
87
- .action(logsRevisium);
88
- }
89
- //# sourceMappingURL=revisium.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"revisium.js","sourceRoot":"","sources":["../../../src/cli/commands/revisium.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EACL,OAAO,EACP,SAAS,EACT,OAAO,EACP,SAAS,EACT,WAAW,EACX,aAAa,GACd,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAazE,KAAK,UAAU,aAAa,CAAC,OAAqB;IAChD,IAAI,CAAC;QACH,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,cAAc,EAAE,CAAC;YACnB,OAAO,CAAC,GAAG,CAAC,sBAAsB,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC/D,OAAO;QACT,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,yBAAyB,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QACpD,OAAO,CAAC,GAAG,CAAC,SAAS,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,QAAQ,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACrD,OAAO,CAAC,GAAG,CAAC,oBAAo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