@evolith/core-domain 1.0.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 (532) hide show
  1. package/dist/application/agents/agent-ruleset-builder.d.ts +30 -0
  2. package/dist/application/agents/agent-ruleset-builder.js +75 -0
  3. package/dist/application/agents/agent-ruleset-builder.js.map +1 -0
  4. package/dist/application/agents/agent-ruleset-builder.spec.d.ts +1 -0
  5. package/dist/application/agents/agent-ruleset-builder.spec.js +135 -0
  6. package/dist/application/agents/agent-ruleset-builder.spec.js.map +1 -0
  7. package/dist/application/architecture/workspace-manager.strategy.d.ts +8 -0
  8. package/dist/application/architecture/workspace-manager.strategy.js +3 -0
  9. package/dist/application/architecture/workspace-manager.strategy.js.map +1 -0
  10. package/dist/application/generators/hexagonal-scaffolder.d.ts +6 -0
  11. package/dist/application/generators/hexagonal-scaffolder.js +259 -0
  12. package/dist/application/generators/hexagonal-scaffolder.js.map +1 -0
  13. package/dist/application/generators/hexagonal-scaffolder.spec.d.ts +1 -0
  14. package/dist/application/generators/hexagonal-scaffolder.spec.js +166 -0
  15. package/dist/application/generators/hexagonal-scaffolder.spec.js.map +1 -0
  16. package/dist/application/generators/mermaid-class-parser.d.ts +38 -0
  17. package/dist/application/generators/mermaid-class-parser.js +183 -0
  18. package/dist/application/generators/mermaid-class-parser.js.map +1 -0
  19. package/dist/application/generators/mermaid-class-parser.spec.d.ts +1 -0
  20. package/dist/application/generators/mermaid-class-parser.spec.js +148 -0
  21. package/dist/application/generators/mermaid-class-parser.spec.js.map +1 -0
  22. package/dist/application/index.d.ts +9 -0
  23. package/dist/application/index.js +26 -0
  24. package/dist/application/index.js.map +1 -0
  25. package/dist/application/ports/blueprint-repository.port.d.ts +6 -0
  26. package/dist/application/ports/blueprint-repository.port.js +3 -0
  27. package/dist/application/ports/blueprint-repository.port.js.map +1 -0
  28. package/dist/application/ports/event-bus.port.d.ts +5 -0
  29. package/dist/application/ports/event-bus.port.js +3 -0
  30. package/dist/application/ports/event-bus.port.js.map +1 -0
  31. package/dist/application/ports/index.d.ts +5 -0
  32. package/dist/application/ports/index.js +22 -0
  33. package/dist/application/ports/index.js.map +1 -0
  34. package/dist/application/ports/platform-detection.port.d.ts +9 -0
  35. package/dist/application/ports/platform-detection.port.js +3 -0
  36. package/dist/application/ports/platform-detection.port.js.map +1 -0
  37. package/dist/application/ports/webhook-notifier.port.d.ts +3 -0
  38. package/dist/application/ports/webhook-notifier.port.js +3 -0
  39. package/dist/application/ports/webhook-notifier.port.js.map +1 -0
  40. package/dist/application/ports/webhook-subscription.port.d.ts +13 -0
  41. package/dist/application/ports/webhook-subscription.port.js +3 -0
  42. package/dist/application/ports/webhook-subscription.port.js.map +1 -0
  43. package/dist/application/services/audit.service.d.ts +12 -0
  44. package/dist/application/services/audit.service.js +36 -0
  45. package/dist/application/services/audit.service.js.map +1 -0
  46. package/dist/application/services/catalog.service.d.ts +10 -0
  47. package/dist/application/services/catalog.service.js +84 -0
  48. package/dist/application/services/catalog.service.js.map +1 -0
  49. package/dist/application/services/evolith-config.service.d.ts +25 -0
  50. package/dist/application/services/evolith-config.service.js +120 -0
  51. package/dist/application/services/evolith-config.service.js.map +1 -0
  52. package/dist/application/services/gate-registry.service.d.ts +34 -0
  53. package/dist/application/services/gate-registry.service.js +104 -0
  54. package/dist/application/services/gate-registry.service.js.map +1 -0
  55. package/dist/application/services/index.d.ts +41 -0
  56. package/dist/application/services/index.js +25 -0
  57. package/dist/application/services/index.js.map +1 -0
  58. package/dist/application/services/initialize-project.spec.d.ts +5 -0
  59. package/dist/application/services/initialize-project.spec.js +228 -0
  60. package/dist/application/services/initialize-project.spec.js.map +1 -0
  61. package/dist/application/services/phase-transition.use-case.spec.d.ts +1 -0
  62. package/dist/application/services/phase-transition.use-case.spec.js +303 -0
  63. package/dist/application/services/phase-transition.use-case.spec.js.map +1 -0
  64. package/dist/application/services/project-scaffolder.service.d.ts +19 -0
  65. package/dist/application/services/project-scaffolder.service.js +194 -0
  66. package/dist/application/services/project-scaffolder.service.js.map +1 -0
  67. package/dist/application/services/satellite-evaluation-pipeline.service.d.ts +18 -0
  68. package/dist/application/services/satellite-evaluation-pipeline.service.js +206 -0
  69. package/dist/application/services/satellite-evaluation-pipeline.service.js.map +1 -0
  70. package/dist/application/services/sdlc-data-loader.service.d.ts +39 -0
  71. package/dist/application/services/sdlc-data-loader.service.js +112 -0
  72. package/dist/application/services/sdlc-data-loader.service.js.map +1 -0
  73. package/dist/application/services/services/command-executor.service.d.ts +3 -0
  74. package/dist/application/services/services/command-executor.service.js +13 -0
  75. package/dist/application/services/services/command-executor.service.js.map +1 -0
  76. package/dist/application/services/services/command-history.service.d.ts +39 -0
  77. package/dist/application/services/services/command-history.service.js +150 -0
  78. package/dist/application/services/services/command-history.service.js.map +1 -0
  79. package/dist/application/services/services/command-history.service.spec.d.ts +1 -0
  80. package/dist/application/services/services/command-history.service.spec.js +266 -0
  81. package/dist/application/services/services/command-history.service.spec.js.map +1 -0
  82. package/dist/application/services/services/command-providers.d.ts +1 -0
  83. package/dist/application/services/services/command-providers.js +17 -0
  84. package/dist/application/services/services/command-providers.js.map +1 -0
  85. package/dist/application/services/topology-catalog.service.d.ts +58 -0
  86. package/dist/application/services/topology-catalog.service.js +85 -0
  87. package/dist/application/services/topology-catalog.service.js.map +1 -0
  88. package/dist/application/sync/sync.service.d.ts +9 -0
  89. package/dist/application/sync/sync.service.js +88 -0
  90. package/dist/application/sync/sync.service.js.map +1 -0
  91. package/dist/application/sync/sync.service.spec.d.ts +1 -0
  92. package/dist/application/sync/sync.service.spec.js +76 -0
  93. package/dist/application/sync/sync.service.spec.js.map +1 -0
  94. package/dist/application/upgrade/satellite-upgrade-apply.d.ts +5 -0
  95. package/dist/application/upgrade/satellite-upgrade-apply.js +102 -0
  96. package/dist/application/upgrade/satellite-upgrade-apply.js.map +1 -0
  97. package/dist/application/upgrade/satellite-upgrade-diff.d.ts +6 -0
  98. package/dist/application/upgrade/satellite-upgrade-diff.js +130 -0
  99. package/dist/application/upgrade/satellite-upgrade-diff.js.map +1 -0
  100. package/dist/application/upgrade/satellite-upgrade-fs.d.ts +4 -0
  101. package/dist/application/upgrade/satellite-upgrade-fs.js +97 -0
  102. package/dist/application/upgrade/satellite-upgrade-fs.js.map +1 -0
  103. package/dist/application/upgrade/satellite-upgrade.service.d.ts +14 -0
  104. package/dist/application/upgrade/satellite-upgrade.service.js +78 -0
  105. package/dist/application/upgrade/satellite-upgrade.service.js.map +1 -0
  106. package/dist/application/upgrade/satellite-upgrade.service.spec.d.ts +1 -0
  107. package/dist/application/upgrade/satellite-upgrade.service.spec.js +231 -0
  108. package/dist/application/upgrade/satellite-upgrade.service.spec.js.map +1 -0
  109. package/dist/application/upgrade/satellite-upgrade.types.d.ts +31 -0
  110. package/dist/application/upgrade/satellite-upgrade.types.js +3 -0
  111. package/dist/application/upgrade/satellite-upgrade.types.js.map +1 -0
  112. package/dist/application/use-cases/evaluate-gate.use-case.d.ts +25 -0
  113. package/dist/application/use-cases/evaluate-gate.use-case.js +124 -0
  114. package/dist/application/use-cases/evaluate-gate.use-case.js.map +1 -0
  115. package/dist/application/use-cases/evaluate-gate.use-case.spec.d.ts +1 -0
  116. package/dist/application/use-cases/evaluate-gate.use-case.spec.js +112 -0
  117. package/dist/application/use-cases/evaluate-gate.use-case.spec.js.map +1 -0
  118. package/dist/application/use-cases/index.d.ts +7 -0
  119. package/dist/application/use-cases/index.js +24 -0
  120. package/dist/application/use-cases/index.js.map +1 -0
  121. package/dist/application/use-cases/initialize-project.use-case.d.ts +10 -0
  122. package/dist/application/use-cases/initialize-project.use-case.js +71 -0
  123. package/dist/application/use-cases/initialize-project.use-case.js.map +1 -0
  124. package/dist/application/use-cases/phase-transition.use-case.d.ts +22 -0
  125. package/dist/application/use-cases/phase-transition.use-case.js +100 -0
  126. package/dist/application/use-cases/phase-transition.use-case.js.map +1 -0
  127. package/dist/application/use-cases/propose-phase-advance.use-case.d.ts +15 -0
  128. package/dist/application/use-cases/propose-phase-advance.use-case.js +42 -0
  129. package/dist/application/use-cases/propose-phase-advance.use-case.js.map +1 -0
  130. package/dist/application/use-cases/propose-phase-advance.use-case.spec.d.ts +1 -0
  131. package/dist/application/use-cases/propose-phase-advance.use-case.spec.js +64 -0
  132. package/dist/application/use-cases/propose-phase-advance.use-case.spec.js.map +1 -0
  133. package/dist/application/use-cases/validate-blueprint.use-case.d.ts +32 -0
  134. package/dist/application/use-cases/validate-blueprint.use-case.js +179 -0
  135. package/dist/application/use-cases/validate-blueprint.use-case.js.map +1 -0
  136. package/dist/application/use-cases/validate-satellite.use-case.d.ts +25 -0
  137. package/dist/application/use-cases/validate-satellite.use-case.js +192 -0
  138. package/dist/application/use-cases/validate-satellite.use-case.js.map +1 -0
  139. package/dist/application/use-cases/validate-satellite.use-case.spec.d.ts +1 -0
  140. package/dist/application/use-cases/validate-satellite.use-case.spec.js +102 -0
  141. package/dist/application/use-cases/validate-satellite.use-case.spec.js.map +1 -0
  142. package/dist/application/use-cases/validate-workflow.use-case.d.ts +11 -0
  143. package/dist/application/use-cases/validate-workflow.use-case.js +121 -0
  144. package/dist/application/use-cases/validate-workflow.use-case.js.map +1 -0
  145. package/dist/application/validators/architecture/detectors.d.ts +7 -0
  146. package/dist/application/validators/architecture/detectors.js +128 -0
  147. package/dist/application/validators/architecture/detectors.js.map +1 -0
  148. package/dist/application/validators/architecture/import-graph.d.ts +5 -0
  149. package/dist/application/validators/architecture/import-graph.js +132 -0
  150. package/dist/application/validators/architecture/import-graph.js.map +1 -0
  151. package/dist/application/validators/architecture/types.d.ts +44 -0
  152. package/dist/application/validators/architecture/types.js +39 -0
  153. package/dist/application/validators/architecture/types.js.map +1 -0
  154. package/dist/application/validators/architecture-drift.service.d.ts +74 -0
  155. package/dist/application/validators/architecture-drift.service.js +268 -0
  156. package/dist/application/validators/architecture-drift.service.js.map +1 -0
  157. package/dist/application/validators/architecture-drift.service.spec.d.ts +1 -0
  158. package/dist/application/validators/architecture-drift.service.spec.js +144 -0
  159. package/dist/application/validators/architecture-drift.service.spec.js.map +1 -0
  160. package/dist/application/validators/architecture-validator.d.ts +14 -0
  161. package/dist/application/validators/architecture-validator.js +125 -0
  162. package/dist/application/validators/architecture-validator.js.map +1 -0
  163. package/dist/application/validators/blocking-criteria-validator.d.ts +29 -0
  164. package/dist/application/validators/blocking-criteria-validator.js +255 -0
  165. package/dist/application/validators/blocking-criteria-validator.js.map +1 -0
  166. package/dist/application/validators/build-vs-compose.schema.spec.d.ts +1 -0
  167. package/dist/application/validators/build-vs-compose.schema.spec.js +143 -0
  168. package/dist/application/validators/build-vs-compose.schema.spec.js.map +1 -0
  169. package/dist/application/validators/deep-architecture-analyzer.d.ts +9 -0
  170. package/dist/application/validators/deep-architecture-analyzer.js +73 -0
  171. package/dist/application/validators/deep-architecture-analyzer.js.map +1 -0
  172. package/dist/application/validators/deep-architecture-analyzer.spec.d.ts +1 -0
  173. package/dist/application/validators/deep-architecture-analyzer.spec.js +186 -0
  174. package/dist/application/validators/deep-architecture-analyzer.spec.js.map +1 -0
  175. package/dist/application/validators/evaluators/architecture-equivalence.spec.d.ts +1 -0
  176. package/dist/application/validators/evaluators/architecture-equivalence.spec.js +58 -0
  177. package/dist/application/validators/evaluators/architecture-equivalence.spec.js.map +1 -0
  178. package/dist/application/validators/evaluators/evaluator.interface.d.ts +14 -0
  179. package/dist/application/validators/evaluators/evaluator.interface.js +3 -0
  180. package/dist/application/validators/evaluators/evaluator.interface.js.map +1 -0
  181. package/dist/application/validators/evaluators/handlers/acl-rule.handler.d.ts +16 -0
  182. package/dist/application/validators/evaluators/handlers/acl-rule.handler.js +139 -0
  183. package/dist/application/validators/evaluators/handlers/acl-rule.handler.js.map +1 -0
  184. package/dist/application/validators/evaluators/handlers/architecture/agent-rules.d.ts +6 -0
  185. package/dist/application/validators/evaluators/handlers/architecture/agent-rules.js +131 -0
  186. package/dist/application/validators/evaluators/handlers/architecture/agent-rules.js.map +1 -0
  187. package/dist/application/validators/evaluators/handlers/architecture/ast-rules.d.ts +6 -0
  188. package/dist/application/validators/evaluators/handlers/architecture/ast-rules.js +151 -0
  189. package/dist/application/validators/evaluators/handlers/architecture/ast-rules.js.map +1 -0
  190. package/dist/application/validators/evaluators/handlers/architecture/config-rules.d.ts +6 -0
  191. package/dist/application/validators/evaluators/handlers/architecture/config-rules.js +60 -0
  192. package/dist/application/validators/evaluators/handlers/architecture/config-rules.js.map +1 -0
  193. package/dist/application/validators/evaluators/handlers/architecture/shared.d.ts +14 -0
  194. package/dist/application/validators/evaluators/handlers/architecture/shared.js +91 -0
  195. package/dist/application/validators/evaluators/handlers/architecture/shared.js.map +1 -0
  196. package/dist/application/validators/evaluators/handlers/architecture/structural-rules.d.ts +6 -0
  197. package/dist/application/validators/evaluators/handlers/architecture/structural-rules.js +208 -0
  198. package/dist/application/validators/evaluators/handlers/architecture/structural-rules.js.map +1 -0
  199. package/dist/application/validators/evaluators/handlers/architecture-rule.handler.d.ts +11 -0
  200. package/dist/application/validators/evaluators/handlers/architecture-rule.handler.js +39 -0
  201. package/dist/application/validators/evaluators/handlers/architecture-rule.handler.js.map +1 -0
  202. package/dist/application/validators/evaluators/handlers/architecture-rule.handler.spec.d.ts +1 -0
  203. package/dist/application/validators/evaluators/handlers/architecture-rule.handler.spec.js +212 -0
  204. package/dist/application/validators/evaluators/handlers/architecture-rule.handler.spec.js.map +1 -0
  205. package/dist/application/validators/evaluators/handlers/cli-release-rule.handler.d.ts +17 -0
  206. package/dist/application/validators/evaluators/handlers/cli-release-rule.handler.js +133 -0
  207. package/dist/application/validators/evaluators/handlers/cli-release-rule.handler.js.map +1 -0
  208. package/dist/application/validators/evaluators/handlers/cli-release-rule.handler.spec.d.ts +1 -0
  209. package/dist/application/validators/evaluators/handlers/cli-release-rule.handler.spec.js +89 -0
  210. package/dist/application/validators/evaluators/handlers/cli-release-rule.handler.spec.js.map +1 -0
  211. package/dist/application/validators/evaluators/handlers/cross-cutting-rule.handler.d.ts +25 -0
  212. package/dist/application/validators/evaluators/handlers/cross-cutting-rule.handler.js +244 -0
  213. package/dist/application/validators/evaluators/handlers/cross-cutting-rule.handler.js.map +1 -0
  214. package/dist/application/validators/evaluators/handlers/dependency-rule.handler.d.ts +17 -0
  215. package/dist/application/validators/evaluators/handlers/dependency-rule.handler.js +163 -0
  216. package/dist/application/validators/evaluators/handlers/dependency-rule.handler.js.map +1 -0
  217. package/dist/application/validators/evaluators/handlers/dependency-rule.handler.spec.d.ts +1 -0
  218. package/dist/application/validators/evaluators/handlers/dependency-rule.handler.spec.js +115 -0
  219. package/dist/application/validators/evaluators/handlers/dependency-rule.handler.spec.js.map +1 -0
  220. package/dist/application/validators/evaluators/handlers/evidence-rule.handler.d.ts +10 -0
  221. package/dist/application/validators/evaluators/handlers/evidence-rule.handler.js +102 -0
  222. package/dist/application/validators/evaluators/handlers/evidence-rule.handler.js.map +1 -0
  223. package/dist/application/validators/evaluators/handlers/evidence-rule.handler.spec.d.ts +1 -0
  224. package/dist/application/validators/evaluators/handlers/evidence-rule.handler.spec.js +94 -0
  225. package/dist/application/validators/evaluators/handlers/evidence-rule.handler.spec.js.map +1 -0
  226. package/dist/application/validators/evaluators/handlers/executive-scorecard-rule.handler.d.ts +15 -0
  227. package/dist/application/validators/evaluators/handlers/executive-scorecard-rule.handler.js +126 -0
  228. package/dist/application/validators/evaluators/handlers/executive-scorecard-rule.handler.js.map +1 -0
  229. package/dist/application/validators/evaluators/handlers/governance-rule.handler.d.ts +11 -0
  230. package/dist/application/validators/evaluators/handlers/governance-rule.handler.js +120 -0
  231. package/dist/application/validators/evaluators/handlers/governance-rule.handler.js.map +1 -0
  232. package/dist/application/validators/evaluators/handlers/governance-rule.handler.spec.d.ts +1 -0
  233. package/dist/application/validators/evaluators/handlers/governance-rule.handler.spec.js +107 -0
  234. package/dist/application/validators/evaluators/handlers/governance-rule.handler.spec.js.map +1 -0
  235. package/dist/application/validators/evaluators/handlers/mcp-rule.handler.d.ts +12 -0
  236. package/dist/application/validators/evaluators/handlers/mcp-rule.handler.js +91 -0
  237. package/dist/application/validators/evaluators/handlers/mcp-rule.handler.js.map +1 -0
  238. package/dist/application/validators/evaluators/handlers/mcp-rule.handler.spec.d.ts +1 -0
  239. package/dist/application/validators/evaluators/handlers/mcp-rule.handler.spec.js +92 -0
  240. package/dist/application/validators/evaluators/handlers/mcp-rule.handler.spec.js.map +1 -0
  241. package/dist/application/validators/evaluators/handlers/rule-handler.interface.d.ts +6 -0
  242. package/dist/application/validators/evaluators/handlers/rule-handler.interface.js +3 -0
  243. package/dist/application/validators/evaluators/handlers/rule-handler.interface.js.map +1 -0
  244. package/dist/application/validators/evaluators/handlers/satellite-contract-rule.handler.d.ts +14 -0
  245. package/dist/application/validators/evaluators/handlers/satellite-contract-rule.handler.js +105 -0
  246. package/dist/application/validators/evaluators/handlers/satellite-contract-rule.handler.js.map +1 -0
  247. package/dist/application/validators/evaluators/handlers/sdlc-rule.handler.d.ts +12 -0
  248. package/dist/application/validators/evaluators/handlers/sdlc-rule.handler.js +81 -0
  249. package/dist/application/validators/evaluators/handlers/sdlc-rule.handler.js.map +1 -0
  250. package/dist/application/validators/evaluators/handlers/taxonomy-rule.handler.d.ts +13 -0
  251. package/dist/application/validators/evaluators/handlers/taxonomy-rule.handler.js +136 -0
  252. package/dist/application/validators/evaluators/handlers/taxonomy-rule.handler.js.map +1 -0
  253. package/dist/application/validators/evaluators/handlers/taxonomy-rule.handler.spec.d.ts +1 -0
  254. package/dist/application/validators/evaluators/handlers/taxonomy-rule.handler.spec.js +96 -0
  255. package/dist/application/validators/evaluators/handlers/taxonomy-rule.handler.spec.js.map +1 -0
  256. package/dist/application/validators/evaluators/native-evaluator.d.ts +12 -0
  257. package/dist/application/validators/evaluators/native-evaluator.js +63 -0
  258. package/dist/application/validators/evaluators/native-evaluator.js.map +1 -0
  259. package/dist/application/validators/evaluators/opa-evaluator.d.ts +14 -0
  260. package/dist/application/validators/evaluators/opa-evaluator.js +151 -0
  261. package/dist/application/validators/evaluators/opa-evaluator.js.map +1 -0
  262. package/dist/application/validators/evaluators/opa-evaluator.spec.d.ts +1 -0
  263. package/dist/application/validators/evaluators/opa-evaluator.spec.js +96 -0
  264. package/dist/application/validators/evaluators/opa-evaluator.spec.js.map +1 -0
  265. package/dist/application/validators/evaluators/opa-input-builder.d.ts +27 -0
  266. package/dist/application/validators/evaluators/opa-input-builder.js +357 -0
  267. package/dist/application/validators/evaluators/opa-input-builder.js.map +1 -0
  268. package/dist/application/validators/evaluators/opa-input-builder.spec.d.ts +1 -0
  269. package/dist/application/validators/evaluators/opa-input-builder.spec.js +138 -0
  270. package/dist/application/validators/evaluators/opa-input-builder.spec.js.map +1 -0
  271. package/dist/application/validators/evidence-validator.d.ts +13 -0
  272. package/dist/application/validators/evidence-validator.js +195 -0
  273. package/dist/application/validators/evidence-validator.js.map +1 -0
  274. package/dist/application/validators/index.d.ts +4 -0
  275. package/dist/application/validators/index.js +21 -0
  276. package/dist/application/validators/index.js.map +1 -0
  277. package/dist/application/validators/modes/adhoc-validation.mode.d.ts +8 -0
  278. package/dist/application/validators/modes/adhoc-validation.mode.js +156 -0
  279. package/dist/application/validators/modes/adhoc-validation.mode.js.map +1 -0
  280. package/dist/application/validators/modes/adr-validation.mode.d.ts +7 -0
  281. package/dist/application/validators/modes/adr-validation.mode.js +183 -0
  282. package/dist/application/validators/modes/adr-validation.mode.js.map +1 -0
  283. package/dist/application/validators/modes/architecture-validation.mode.d.ts +7 -0
  284. package/dist/application/validators/modes/architecture-validation.mode.js +154 -0
  285. package/dist/application/validators/modes/architecture-validation.mode.js.map +1 -0
  286. package/dist/application/validators/modes/composable-validation-engine.d.ts +20 -0
  287. package/dist/application/validators/modes/composable-validation-engine.js +110 -0
  288. package/dist/application/validators/modes/composable-validation-engine.js.map +1 -0
  289. package/dist/application/validators/modes/index.d.ts +7 -0
  290. package/dist/application/validators/modes/index.js +16 -0
  291. package/dist/application/validators/modes/index.js.map +1 -0
  292. package/dist/application/validators/modes/ruleset-validation.mode.d.ts +6 -0
  293. package/dist/application/validators/modes/ruleset-validation.mode.js +143 -0
  294. package/dist/application/validators/modes/ruleset-validation.mode.js.map +1 -0
  295. package/dist/application/validators/modes/sdlc-validation.mode.d.ts +7 -0
  296. package/dist/application/validators/modes/sdlc-validation.mode.js +151 -0
  297. package/dist/application/validators/modes/sdlc-validation.mode.js.map +1 -0
  298. package/dist/application/validators/modes/validation-mode.interface.d.ts +34 -0
  299. package/dist/application/validators/modes/validation-mode.interface.js +3 -0
  300. package/dist/application/validators/modes/validation-mode.interface.js.map +1 -0
  301. package/dist/application/validators/phase-gate-validator.service.d.ts +77 -0
  302. package/dist/application/validators/phase-gate-validator.service.js +183 -0
  303. package/dist/application/validators/phase-gate-validator.service.js.map +1 -0
  304. package/dist/application/validators/phase-gate-validator.service.spec.d.ts +1 -0
  305. package/dist/application/validators/phase-gate-validator.service.spec.js +383 -0
  306. package/dist/application/validators/phase-gate-validator.service.spec.js.map +1 -0
  307. package/dist/application/validators/rule-evaluation-engine.d.ts +29 -0
  308. package/dist/application/validators/rule-evaluation-engine.js +41 -0
  309. package/dist/application/validators/rule-evaluation-engine.js.map +1 -0
  310. package/dist/application/validators/ruleset-id-loader.d.ts +3 -0
  311. package/dist/application/validators/ruleset-id-loader.js +109 -0
  312. package/dist/application/validators/ruleset-id-loader.js.map +1 -0
  313. package/dist/application/validators/ruleset-loader.d.ts +13 -0
  314. package/dist/application/validators/ruleset-loader.js +83 -0
  315. package/dist/application/validators/ruleset-loader.js.map +1 -0
  316. package/dist/application/validators/ruleset-validator-architecture.spec.d.ts +1 -0
  317. package/dist/application/validators/ruleset-validator-architecture.spec.js +174 -0
  318. package/dist/application/validators/ruleset-validator-architecture.spec.js.map +1 -0
  319. package/dist/application/validators/ruleset-validator.service.d.ts +18 -0
  320. package/dist/application/validators/ruleset-validator.service.js +154 -0
  321. package/dist/application/validators/ruleset-validator.service.js.map +1 -0
  322. package/dist/application/validators/ruleset-validator.types.d.ts +57 -0
  323. package/dist/application/validators/ruleset-validator.types.js +5 -0
  324. package/dist/application/validators/ruleset-validator.types.js.map +1 -0
  325. package/dist/common/request-context.d.ts +10 -0
  326. package/dist/common/request-context.js +14 -0
  327. package/dist/common/request-context.js.map +1 -0
  328. package/dist/domain/audit/audit-entry.d.ts +19 -0
  329. package/dist/domain/audit/audit-entry.js +3 -0
  330. package/dist/domain/audit/audit-entry.js.map +1 -0
  331. package/dist/domain/audit/audit-repository.port.d.ts +6 -0
  332. package/dist/domain/audit/audit-repository.port.js +3 -0
  333. package/dist/domain/audit/audit-repository.port.js.map +1 -0
  334. package/dist/domain/audit/index.d.ts +2 -0
  335. package/dist/domain/audit/index.js +19 -0
  336. package/dist/domain/audit/index.js.map +1 -0
  337. package/dist/domain/entities/blueprint.d.ts +41 -0
  338. package/dist/domain/entities/blueprint.js +82 -0
  339. package/dist/domain/entities/blueprint.js.map +1 -0
  340. package/dist/domain/entities/index.d.ts +73 -0
  341. package/dist/domain/entities/index.js +134 -0
  342. package/dist/domain/entities/index.js.map +1 -0
  343. package/dist/domain/errors/gate-authorization.error.d.ts +9 -0
  344. package/dist/domain/errors/gate-authorization.error.js +17 -0
  345. package/dist/domain/errors/gate-authorization.error.js.map +1 -0
  346. package/dist/domain/errors/index.d.ts +29 -0
  347. package/dist/domain/errors/index.js +73 -0
  348. package/dist/domain/errors/index.js.map +1 -0
  349. package/dist/domain/events/domain-event.d.ts +9 -0
  350. package/dist/domain/events/domain-event.js +14 -0
  351. package/dist/domain/events/domain-event.js.map +1 -0
  352. package/dist/domain/events/domain-events.d.ts +99 -0
  353. package/dist/domain/events/domain-events.js +49 -0
  354. package/dist/domain/events/domain-events.js.map +1 -0
  355. package/dist/domain/events/event-catalog.d.ts +7 -0
  356. package/dist/domain/events/event-catalog.js +82 -0
  357. package/dist/domain/events/event-catalog.js.map +1 -0
  358. package/dist/domain/events/index.d.ts +4 -0
  359. package/dist/domain/events/index.js +21 -0
  360. package/dist/domain/events/index.js.map +1 -0
  361. package/dist/domain/gate-evidence.d.ts +70 -0
  362. package/dist/domain/gate-evidence.js +46 -0
  363. package/dist/domain/gate-evidence.js.map +1 -0
  364. package/dist/domain/gate-evidence.spec.d.ts +1 -0
  365. package/dist/domain/gate-evidence.spec.js +173 -0
  366. package/dist/domain/gate-evidence.spec.js.map +1 -0
  367. package/dist/domain/index.d.ts +12 -0
  368. package/dist/domain/index.js +29 -0
  369. package/dist/domain/index.js.map +1 -0
  370. package/dist/domain/interfaces.d.ts +301 -0
  371. package/dist/domain/interfaces.js +5 -0
  372. package/dist/domain/interfaces.js.map +1 -0
  373. package/dist/domain/lifecycle/artifact-state-machine.d.ts +23 -0
  374. package/dist/domain/lifecycle/artifact-state-machine.js +50 -0
  375. package/dist/domain/lifecycle/artifact-state-machine.js.map +1 -0
  376. package/dist/domain/lifecycle/index.d.ts +2 -0
  377. package/dist/domain/lifecycle/index.js +19 -0
  378. package/dist/domain/lifecycle/index.js.map +1 -0
  379. package/dist/domain/lifecycle/phase-state-machine.d.ts +24 -0
  380. package/dist/domain/lifecycle/phase-state-machine.js +50 -0
  381. package/dist/domain/lifecycle/phase-state-machine.js.map +1 -0
  382. package/dist/domain/metrics/dora-calculator.d.ts +18 -0
  383. package/dist/domain/metrics/dora-calculator.js +146 -0
  384. package/dist/domain/metrics/dora-calculator.js.map +1 -0
  385. package/dist/domain/metrics/dora-calculator.spec.d.ts +1 -0
  386. package/dist/domain/metrics/dora-calculator.spec.js +172 -0
  387. package/dist/domain/metrics/dora-calculator.spec.js.map +1 -0
  388. package/dist/domain/metrics/git-log-reader.d.ts +14 -0
  389. package/dist/domain/metrics/git-log-reader.js +39 -0
  390. package/dist/domain/metrics/git-log-reader.js.map +1 -0
  391. package/dist/domain/metrics/git-log-reader.spec.d.ts +8 -0
  392. package/dist/domain/metrics/git-log-reader.spec.js +121 -0
  393. package/dist/domain/metrics/git-log-reader.spec.js.map +1 -0
  394. package/dist/domain/metrics/index.d.ts +2 -0
  395. package/dist/domain/metrics/index.js +19 -0
  396. package/dist/domain/metrics/index.js.map +1 -0
  397. package/dist/domain/models/normalized-rule.d.ts +10 -0
  398. package/dist/domain/models/normalized-rule.js +3 -0
  399. package/dist/domain/models/normalized-rule.js.map +1 -0
  400. package/dist/domain/ports/index.d.ts +2 -0
  401. package/dist/domain/ports/index.js +19 -0
  402. package/dist/domain/ports/index.js.map +1 -0
  403. package/dist/domain/ports/ruleset-repository.port.d.ts +4 -0
  404. package/dist/domain/ports/ruleset-repository.port.js +3 -0
  405. package/dist/domain/ports/ruleset-repository.port.js.map +1 -0
  406. package/dist/domain/ports/workflow-definition.port.d.ts +24 -0
  407. package/dist/domain/ports/workflow-definition.port.js +3 -0
  408. package/dist/domain/ports/workflow-definition.port.js.map +1 -0
  409. package/dist/domain/rbac/gate-role-enforcer.d.ts +16 -0
  410. package/dist/domain/rbac/gate-role-enforcer.js +46 -0
  411. package/dist/domain/rbac/gate-role-enforcer.js.map +1 -0
  412. package/dist/domain/rbac/index.d.ts +1 -0
  413. package/dist/domain/rbac/index.js +12 -0
  414. package/dist/domain/rbac/index.js.map +1 -0
  415. package/dist/domain/rbac/role.d.ts +19 -0
  416. package/dist/domain/rbac/role.js +79 -0
  417. package/dist/domain/rbac/role.js.map +1 -0
  418. package/dist/domain/satellite-manifest.d.ts +44 -0
  419. package/dist/domain/satellite-manifest.js +3 -0
  420. package/dist/domain/satellite-manifest.js.map +1 -0
  421. package/dist/domain/services/adr.service.d.ts +50 -0
  422. package/dist/domain/services/adr.service.js +129 -0
  423. package/dist/domain/services/adr.service.js.map +1 -0
  424. package/dist/domain/services/adr.service.spec.d.ts +1 -0
  425. package/dist/domain/services/adr.service.spec.js +141 -0
  426. package/dist/domain/services/adr.service.spec.js.map +1 -0
  427. package/dist/domain/services/default-workflow-definition.d.ts +40 -0
  428. package/dist/domain/services/default-workflow-definition.js +94 -0
  429. package/dist/domain/services/default-workflow-definition.js.map +1 -0
  430. package/dist/domain/services/index.d.ts +37 -0
  431. package/dist/domain/services/index.js +110 -0
  432. package/dist/domain/services/index.js.map +1 -0
  433. package/dist/domain/services/standards.service.d.ts +47 -0
  434. package/dist/domain/services/standards.service.js +129 -0
  435. package/dist/domain/services/standards.service.js.map +1 -0
  436. package/dist/domain/services/standards.service.spec.d.ts +1 -0
  437. package/dist/domain/services/standards.service.spec.js +600 -0
  438. package/dist/domain/services/standards.service.spec.js.map +1 -0
  439. package/dist/domain/verdict/index.d.ts +1 -0
  440. package/dist/domain/verdict/index.js +18 -0
  441. package/dist/domain/verdict/index.js.map +1 -0
  442. package/dist/domain/verdict/verdict.d.ts +22 -0
  443. package/dist/domain/verdict/verdict.js +50 -0
  444. package/dist/domain/verdict/verdict.js.map +1 -0
  445. package/dist/domain/webhook/webhook-subscription.d.ts +27 -0
  446. package/dist/domain/webhook/webhook-subscription.js +9 -0
  447. package/dist/domain/webhook/webhook-subscription.js.map +1 -0
  448. package/dist/domain/workflow/index.d.ts +1 -0
  449. package/dist/domain/workflow/index.js +18 -0
  450. package/dist/domain/workflow/index.js.map +1 -0
  451. package/dist/domain/workflow/workflow-definition.d.ts +33 -0
  452. package/dist/domain/workflow/workflow-definition.js +3 -0
  453. package/dist/domain/workflow/workflow-definition.js.map +1 -0
  454. package/dist/evidence/evidence-graph.d.ts +29 -0
  455. package/dist/evidence/evidence-graph.js +27 -0
  456. package/dist/evidence/evidence-graph.js.map +1 -0
  457. package/dist/evidence/index.d.ts +1 -0
  458. package/dist/evidence/index.js +18 -0
  459. package/dist/evidence/index.js.map +1 -0
  460. package/dist/gates/decision/gate-decision.d.ts +18 -0
  461. package/dist/gates/decision/gate-decision.js +23 -0
  462. package/dist/gates/decision/gate-decision.js.map +1 -0
  463. package/dist/gates/decision/index.d.ts +1 -0
  464. package/dist/gates/decision/index.js +18 -0
  465. package/dist/gates/decision/index.js.map +1 -0
  466. package/dist/gates/gate-evaluator.d.ts +15 -0
  467. package/dist/gates/gate-evaluator.js +37 -0
  468. package/dist/gates/gate-evaluator.js.map +1 -0
  469. package/dist/gates/index.d.ts +1 -0
  470. package/dist/gates/index.js +18 -0
  471. package/dist/gates/index.js.map +1 -0
  472. package/dist/index.d.ts +2 -0
  473. package/dist/index.js +19 -0
  474. package/dist/index.js.map +1 -0
  475. package/dist/infrastructure/audit/in-memory-audit-repository.d.ts +10 -0
  476. package/dist/infrastructure/audit/in-memory-audit-repository.js +44 -0
  477. package/dist/infrastructure/audit/in-memory-audit-repository.js.map +1 -0
  478. package/dist/infrastructure/audit/index.d.ts +2 -0
  479. package/dist/infrastructure/audit/index.js +19 -0
  480. package/dist/infrastructure/audit/index.js.map +1 -0
  481. package/dist/infrastructure/audit/jsonl-audit-repository.d.ts +12 -0
  482. package/dist/infrastructure/audit/jsonl-audit-repository.js +103 -0
  483. package/dist/infrastructure/audit/jsonl-audit-repository.js.map +1 -0
  484. package/dist/infrastructure/events/in-memory-event-bus.d.ts +9 -0
  485. package/dist/infrastructure/events/in-memory-event-bus.js +25 -0
  486. package/dist/infrastructure/events/in-memory-event-bus.js.map +1 -0
  487. package/dist/infrastructure/events/index.d.ts +4 -0
  488. package/dist/infrastructure/events/index.js +21 -0
  489. package/dist/infrastructure/events/index.js.map +1 -0
  490. package/dist/infrastructure/events/outbox.d.ts +27 -0
  491. package/dist/infrastructure/events/outbox.js +43 -0
  492. package/dist/infrastructure/events/outbox.js.map +1 -0
  493. package/dist/infrastructure/webhook/hmac-signer.d.ts +6 -0
  494. package/dist/infrastructure/webhook/hmac-signer.js +25 -0
  495. package/dist/infrastructure/webhook/hmac-signer.js.map +1 -0
  496. package/dist/infrastructure/webhook/in-memory-delivery-repository.d.ts +10 -0
  497. package/dist/infrastructure/webhook/in-memory-delivery-repository.js +25 -0
  498. package/dist/infrastructure/webhook/in-memory-delivery-repository.js.map +1 -0
  499. package/dist/infrastructure/webhook/in-memory-subscription-repository.d.ts +11 -0
  500. package/dist/infrastructure/webhook/in-memory-subscription-repository.js +28 -0
  501. package/dist/infrastructure/webhook/in-memory-subscription-repository.js.map +1 -0
  502. package/dist/infrastructure/webhook/index.d.ts +4 -0
  503. package/dist/infrastructure/webhook/index.js +21 -0
  504. package/dist/infrastructure/webhook/index.js.map +1 -0
  505. package/dist/infrastructure/webhook/webhook-dispatcher.d.ts +13 -0
  506. package/dist/infrastructure/webhook/webhook-dispatcher.js +91 -0
  507. package/dist/infrastructure/webhook/webhook-dispatcher.js.map +1 -0
  508. package/dist/phases/index.d.ts +1 -0
  509. package/dist/phases/index.js +18 -0
  510. package/dist/phases/index.js.map +1 -0
  511. package/dist/phases/phase-transition.d.ts +19 -0
  512. package/dist/phases/phase-transition.js +31 -0
  513. package/dist/phases/phase-transition.js.map +1 -0
  514. package/dist/phases/transition/index.d.ts +1 -0
  515. package/dist/phases/transition/index.js +18 -0
  516. package/dist/phases/transition/index.js.map +1 -0
  517. package/dist/phases/transition/phase-transition.model.d.ts +13 -0
  518. package/dist/phases/transition/phase-transition.model.js +21 -0
  519. package/dist/phases/transition/phase-transition.model.js.map +1 -0
  520. package/dist/providers/index.d.ts +1 -0
  521. package/dist/providers/index.js +18 -0
  522. package/dist/providers/index.js.map +1 -0
  523. package/dist/providers/provider.ports.d.ts +39 -0
  524. package/dist/providers/provider.ports.js +18 -0
  525. package/dist/providers/provider.ports.js.map +1 -0
  526. package/dist/tenancy/index.d.ts +1 -0
  527. package/dist/tenancy/index.js +18 -0
  528. package/dist/tenancy/index.js.map +1 -0
  529. package/dist/tenancy/tenant-authority.d.ts +22 -0
  530. package/dist/tenancy/tenant-authority.js +31 -0
  531. package/dist/tenancy/tenant-authority.js.map +1 -0
  532. package/package.json +80 -0
@@ -0,0 +1,41 @@
1
+ import { ArtifactState } from '../lifecycle/artifact-state-machine';
2
+ import { VerdictRecord } from '../verdict/verdict';
3
+ export interface BlueprintContent {
4
+ rulesets: string[];
5
+ topologyId: string;
6
+ gateIds: string[];
7
+ requiredArtifacts: string[];
8
+ customPolicies?: string[];
9
+ }
10
+ export interface Blueprint {
11
+ readonly id: string;
12
+ readonly tenantId: string;
13
+ readonly topology: string;
14
+ readonly phase: string;
15
+ readonly version: string;
16
+ readonly createdAt: string;
17
+ state: ArtifactState;
18
+ readonly content: BlueprintContent;
19
+ readonly verdictHistory: VerdictRecord[];
20
+ }
21
+ export declare class BlueprintBuilder {
22
+ private _id;
23
+ private _tenantId;
24
+ private _topology;
25
+ private _phase;
26
+ private _version;
27
+ private _rulesets;
28
+ private _gateIds;
29
+ private _requiredArtifacts;
30
+ private _customPolicies?;
31
+ setId(id: string): this;
32
+ setTenantId(tenantId: string): this;
33
+ setTopology(topology: string): this;
34
+ setPhase(phase: string): this;
35
+ setVersion(version: string): this;
36
+ addRuleset(ruleset: string): this;
37
+ addGate(gateId: string): this;
38
+ addRequiredArtifact(artifact: string): this;
39
+ addCustomPolicy(policy: string): this;
40
+ build(): Blueprint;
41
+ }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlueprintBuilder = void 0;
4
+ const artifact_state_machine_1 = require("../lifecycle/artifact-state-machine");
5
+ class BlueprintBuilder {
6
+ constructor() {
7
+ this._id = `bp-${Date.now().toString(36)}`;
8
+ this._tenantId = '';
9
+ this._topology = '';
10
+ this._phase = '';
11
+ this._version = '1.0.0';
12
+ this._rulesets = [];
13
+ this._gateIds = [];
14
+ this._requiredArtifacts = [];
15
+ }
16
+ setId(id) {
17
+ this._id = id;
18
+ return this;
19
+ }
20
+ setTenantId(tenantId) {
21
+ this._tenantId = tenantId;
22
+ return this;
23
+ }
24
+ setTopology(topology) {
25
+ this._topology = topology;
26
+ return this;
27
+ }
28
+ setPhase(phase) {
29
+ this._phase = phase;
30
+ return this;
31
+ }
32
+ setVersion(version) {
33
+ this._version = version;
34
+ return this;
35
+ }
36
+ addRuleset(ruleset) {
37
+ this._rulesets.push(ruleset);
38
+ return this;
39
+ }
40
+ addGate(gateId) {
41
+ this._gateIds.push(gateId);
42
+ return this;
43
+ }
44
+ addRequiredArtifact(artifact) {
45
+ this._requiredArtifacts.push(artifact);
46
+ return this;
47
+ }
48
+ addCustomPolicy(policy) {
49
+ if (!this._customPolicies)
50
+ this._customPolicies = [];
51
+ this._customPolicies.push(policy);
52
+ return this;
53
+ }
54
+ build() {
55
+ if (!this._tenantId)
56
+ throw new Error('BlueprintBuilder: tenantId is required');
57
+ if (!this._topology)
58
+ throw new Error('BlueprintBuilder: topology is required');
59
+ if (!this._phase)
60
+ throw new Error('BlueprintBuilder: phase is required');
61
+ const content = {
62
+ rulesets: [...this._rulesets],
63
+ topologyId: this._topology,
64
+ gateIds: [...this._gateIds],
65
+ requiredArtifacts: [...this._requiredArtifacts],
66
+ ...(this._customPolicies ? { customPolicies: [...this._customPolicies] } : {}),
67
+ };
68
+ return {
69
+ id: this._id,
70
+ tenantId: this._tenantId,
71
+ topology: this._topology,
72
+ phase: this._phase,
73
+ version: this._version,
74
+ createdAt: new Date().toISOString(),
75
+ state: artifact_state_machine_1.ArtifactState.DRAFT,
76
+ content,
77
+ verdictHistory: [],
78
+ };
79
+ }
80
+ }
81
+ exports.BlueprintBuilder = BlueprintBuilder;
82
+ //# sourceMappingURL=blueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.js","sourceRoot":"","sources":["../../../src/domain/entities/blueprint.ts"],"names":[],"mappings":";;;AASA,gFAAoE;AA2CpE,MAAa,gBAAgB;IAA7B;QACU,QAAG,GAAW,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;QAC9C,cAAS,GAAW,EAAE,CAAC;QACvB,cAAS,GAAW,EAAE,CAAC;QACvB,WAAM,GAAW,EAAE,CAAC;QACpB,aAAQ,GAAW,OAAO,CAAC;QAC3B,cAAS,GAAa,EAAE,CAAC;QACzB,aAAQ,GAAa,EAAE,CAAC;QACxB,uBAAkB,GAAa,EAAE,CAAC;IA0E5C,CAAC;IAvEC,KAAK,CAAC,EAAU;QACd,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;QACd,OAAO,IAAI,CAAC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AAC,qCAAqC,CAAC,CAAC;QAEzE,MAAM,OAAO,GAAqB;YAChC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;YAC7B,UAAU,EAAE,IAAI,CAAC,SAAS;YAC1B,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC3B,iBAAiB,EAAE,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;YAC/C,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/E,CAAC;QAEF,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,GAAG;YACZ,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,QAAQ,EAAE,IAAI,CAAC,SAAS;YACxB,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,OAAO,EAAE,IAAI,CAAC,QAAQ;YACtB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACnC,KAAK,EAAE,sCAAa,CAAC,KAAK;YAC1B,OAAO;YACP,cAAc,EAAE,EAAE;SACnB,CAAC;IACJ,CAAC;CACF;AAlFD,4CAkFC"}
@@ -0,0 +1,73 @@
1
+ export * from './blueprint';
2
+ import { Runtime, MonorepoOption, ArchitecturePattern, GateCheck } from '../interfaces';
3
+ export declare class Phase {
4
+ readonly value: string;
5
+ readonly label: string;
6
+ readonly description: string;
7
+ readonly gateChecks: GateCheck[];
8
+ readonly artifacts: string[];
9
+ readonly order: number;
10
+ constructor(value: string, label: string, description: string, gateChecks: GateCheck[], artifacts: string[], order: number);
11
+ canTransitionTo(other: Phase): boolean;
12
+ static fromValue(value: string, phases: Phase[]): Phase | undefined;
13
+ static readonly ORDER: Record<string, number>;
14
+ }
15
+ export declare class Project {
16
+ readonly id: string;
17
+ phase: string;
18
+ readonly createdAt: Date;
19
+ config: ProjectConfigData;
20
+ constructor(name: string, runtime: Runtime, monorepo: MonorepoOption, architecture: ArchitecturePattern, phase?: string);
21
+ private generateId;
22
+ transitionTo(phase: string): void;
23
+ setConfig(key: keyof ProjectConfigData, value: unknown): void;
24
+ getConfig(): Readonly<ProjectConfigData>;
25
+ isPhase(phase: string): boolean;
26
+ }
27
+ export interface ProjectConfigData {
28
+ name: string;
29
+ runtimeId: string;
30
+ monorepoId: string;
31
+ architectureId: string;
32
+ database: string;
33
+ apiProtocol: string;
34
+ ciCd: string;
35
+ observability: string;
36
+ tools: string[];
37
+ agents: string[];
38
+ }
39
+ export declare class Tool {
40
+ readonly id: string;
41
+ readonly name: string;
42
+ readonly category: string;
43
+ readonly phase: string;
44
+ readonly isRuntimeAware: boolean;
45
+ readonly commands: string[];
46
+ readonly platformCheck?: string | undefined;
47
+ constructor(id: string, name: string, category: string, phase: string, isRuntimeAware: boolean, commands: string[], platformCheck?: string | undefined);
48
+ requiresPlatformCheck(): boolean;
49
+ }
50
+ export declare class TransitionResult {
51
+ readonly success: boolean;
52
+ readonly fromPhase: string;
53
+ readonly toPhase: string;
54
+ readonly gateResults: GateResult[];
55
+ readonly executedTools: string[];
56
+ readonly warnings: string[];
57
+ readonly errors: string[];
58
+ constructor(success: boolean, fromPhase: string, toPhase: string, gateResults: GateResult[], executedTools: string[], warnings: string[], errors: string[]);
59
+ static success(from: string, to: string, gates: GateResult[], tools: string[]): TransitionResult;
60
+ static failure(from: string, to: string, gates: GateResult[], errors: string[]): TransitionResult;
61
+ hasBlockingErrors(): boolean;
62
+ hasRequiredGateFailures(): boolean;
63
+ }
64
+ export declare class GateResult {
65
+ readonly id: string;
66
+ readonly passed: boolean;
67
+ readonly description: string;
68
+ readonly required: boolean;
69
+ readonly error?: string | undefined;
70
+ constructor(id: string, passed: boolean, description: string, required: boolean, error?: string | undefined);
71
+ static pass(id: string, description: string, required: boolean): GateResult;
72
+ static fail(id: string, description: string, required: boolean, error: string): GateResult;
73
+ }
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.GateResult = exports.TransitionResult = exports.Tool = exports.Project = exports.Phase = void 0;
18
+ __exportStar(require("./blueprint"), exports);
19
+ class Phase {
20
+ constructor(value, label, description, gateChecks, artifacts, order) {
21
+ this.value = value;
22
+ this.label = label;
23
+ this.description = description;
24
+ this.gateChecks = gateChecks;
25
+ this.artifacts = artifacts;
26
+ this.order = order;
27
+ }
28
+ canTransitionTo(other) {
29
+ return other.order === this.order + 1;
30
+ }
31
+ static fromValue(value, phases) {
32
+ return phases.find(p => p.value === value);
33
+ }
34
+ }
35
+ exports.Phase = Phase;
36
+ Phase.ORDER = {
37
+ 'phase-0': 0,
38
+ 'phase-1': 1,
39
+ 'phase-2': 2,
40
+ 'phase-3': 3,
41
+ 'phase-4': 4,
42
+ 'phase-5': 5,
43
+ };
44
+ class Project {
45
+ constructor(name, runtime, monorepo, architecture, phase = 'phase-0') {
46
+ this.id = this.generateId(name);
47
+ this.phase = phase;
48
+ this.createdAt = new Date();
49
+ this.config = {
50
+ name,
51
+ runtimeId: runtime.id,
52
+ monorepoId: monorepo.id,
53
+ architectureId: architecture.id,
54
+ database: 'postgresql',
55
+ apiProtocol: 'rest',
56
+ ciCd: 'github',
57
+ observability: 'otel',
58
+ tools: [],
59
+ agents: [],
60
+ };
61
+ }
62
+ generateId(name) {
63
+ return `${name}-${Date.now().toString(36)}`;
64
+ }
65
+ transitionTo(phase) {
66
+ this.phase = phase;
67
+ }
68
+ setConfig(key, value) {
69
+ this.config[key] = value;
70
+ }
71
+ getConfig() {
72
+ return { ...this.config };
73
+ }
74
+ isPhase(phase) {
75
+ return this.phase === phase;
76
+ }
77
+ }
78
+ exports.Project = Project;
79
+ class Tool {
80
+ constructor(id, name, category, phase, isRuntimeAware, commands, platformCheck) {
81
+ this.id = id;
82
+ this.name = name;
83
+ this.category = category;
84
+ this.phase = phase;
85
+ this.isRuntimeAware = isRuntimeAware;
86
+ this.commands = commands;
87
+ this.platformCheck = platformCheck;
88
+ }
89
+ requiresPlatformCheck() {
90
+ return !!this.platformCheck;
91
+ }
92
+ }
93
+ exports.Tool = Tool;
94
+ class TransitionResult {
95
+ constructor(success, fromPhase, toPhase, gateResults, executedTools, warnings, errors) {
96
+ this.success = success;
97
+ this.fromPhase = fromPhase;
98
+ this.toPhase = toPhase;
99
+ this.gateResults = gateResults;
100
+ this.executedTools = executedTools;
101
+ this.warnings = warnings;
102
+ this.errors = errors;
103
+ }
104
+ static success(from, to, gates, tools) {
105
+ return new TransitionResult(true, from, to, gates, tools, [], []);
106
+ }
107
+ static failure(from, to, gates, errors) {
108
+ return new TransitionResult(false, from, to, gates, [], [], errors);
109
+ }
110
+ hasBlockingErrors() {
111
+ return this.errors.length > 0;
112
+ }
113
+ hasRequiredGateFailures() {
114
+ return this.gateResults.some(g => !g.passed && g.required);
115
+ }
116
+ }
117
+ exports.TransitionResult = TransitionResult;
118
+ class GateResult {
119
+ constructor(id, passed, description, required, error) {
120
+ this.id = id;
121
+ this.passed = passed;
122
+ this.description = description;
123
+ this.required = required;
124
+ this.error = error;
125
+ }
126
+ static pass(id, description, required) {
127
+ return new GateResult(id, true, description, required);
128
+ }
129
+ static fail(id, description, required, error) {
130
+ return new GateResult(id, false, description, required, error);
131
+ }
132
+ }
133
+ exports.GateResult = GateResult;
134
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA4B;AAI5B,MAAa,KAAK;IAChB,YACkB,KAAa,EACb,KAAa,EACb,WAAmB,EACnB,UAAuB,EACvB,SAAmB,EACnB,KAAa;QALb,UAAK,GAAL,KAAK,CAAQ;QACb,UAAK,GAAL,KAAK,CAAQ;QACb,gBAAW,GAAX,WAAW,CAAQ;QACnB,eAAU,GAAV,UAAU,CAAa;QACvB,cAAS,GAAT,SAAS,CAAU;QACnB,UAAK,GAAL,KAAK,CAAQ;IAC5B,CAAC;IAEJ,eAAe,CAAC,KAAY;QAC1B,OAAO,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,KAAa,EAAE,MAAe;QAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;IAC7C,CAAC;;AAhBH,sBA0BC;AARiB,WAAK,GAA2B;IAC9C,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,CAAC;CACb,CAAC;AAGJ,MAAa,OAAO;IAMlB,YACE,IAAY,EACZ,OAAgB,EAChB,QAAwB,EACxB,YAAiC,EACjC,QAAgB,SAAS;QAEzB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG;YAC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jB,UAAK,GAAL,KAAK,CAAS;IAC7B,CAAC;IAEJ,MAAM,CAAC,IAAI,CAAC,EAAU,EAAE,WAAmB,EAAE,QAAiB;QAC5D,OAAO,IAAI,UAAU,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,EAAU,EAAE,WAAmB,EAAE,QAAiB,EAAE,KAAa;QAC3E,OAAO,IAAI,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IACjE,CAAC;CACF;AAhBD,gCAgBC"}
@@ -0,0 +1,9 @@
1
+ import { Role } from '../rbac/role';
2
+ import { EvolithError } from './index';
3
+ export declare class GateAuthorizationError extends EvolithError {
4
+ readonly gateId: string;
5
+ readonly action: 'approve' | 'waive';
6
+ readonly required: Role;
7
+ readonly actual: Role[];
8
+ constructor(gateId: string, action: 'approve' | 'waive', required: Role, actual: Role[]);
9
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GateAuthorizationError = void 0;
4
+ const index_1 = require("./index");
5
+ class GateAuthorizationError extends index_1.EvolithError {
6
+ constructor(gateId, action, required, actual) {
7
+ super(`Actor is not authorized to ${action} gate "${gateId}": ` +
8
+ `required role "${required}", actor holds [${actual.join(', ') || 'none'}]`, 'GATE_AUTHORIZATION_ERROR', { gateId, action, required, actual });
9
+ this.gateId = gateId;
10
+ this.action = action;
11
+ this.required = required;
12
+ this.actual = actual;
13
+ this.name = 'GateAuthorizationError';
14
+ }
15
+ }
16
+ exports.GateAuthorizationError = GateAuthorizationError;
17
+ //# sourceMappingURL=gate-authorization.error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate-authorization.error.js","sourceRoot":"","sources":["../../../src/domain/errors/gate-authorization.error.ts"],"names":[],"mappings":";;;AACA,mCAAuC;AAMvC,MAAa,sBAAuB,SAAQ,oBAAY;IACtD,YACkB,MAAc,EACd,MAA2B,EAC3B,QAAc,EACd,MAAc;QAE9B,KAAK,CACH,8BAA8B,MAAM,UAAU,MAAM,KAAK;YACvD,kBAAkB,QAAQ,mBAAmB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,EAC7E,0BAA0B,EAC1B,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,CACrC,CAAC;QAVc,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAqB;QAC3B,aAAQ,GAAR,QAAQ,CAAM;QACd,WAAM,GAAN,MAAM,CAAQ;QAQ9B,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAfD,wDAeC"}
@@ -0,0 +1,29 @@
1
+ export declare class EvolithError extends Error {
2
+ code: string;
3
+ context?: Record<string, unknown> | undefined;
4
+ constructor(message: string, code: string, context?: Record<string, unknown> | undefined);
5
+ }
6
+ export declare class PlatformNotFoundError extends EvolithError {
7
+ constructor(platform: string, hint?: string);
8
+ }
9
+ export declare class PhaseTransitionError extends EvolithError {
10
+ constructor(from: string, to: string, reason: string);
11
+ }
12
+ export declare class CatalogLoadError extends EvolithError {
13
+ constructor(catalog: string, cause: string);
14
+ }
15
+ export declare class ToolValidationError extends EvolithError {
16
+ constructor(tool: string, reason: string);
17
+ }
18
+ export declare class CommandExecutionError extends EvolithError {
19
+ constructor(command: string, exitCode: number, stderr: string);
20
+ }
21
+ export declare class ValidationError extends EvolithError {
22
+ constructor(errors: string[]);
23
+ }
24
+ export declare class UserCancelledError extends EvolithError {
25
+ constructor(message?: string);
26
+ }
27
+ export declare function isEvolithError(error: unknown): error is EvolithError;
28
+ export declare function getErrorCode(error: unknown): string;
29
+ export declare function getErrorContext(error: unknown): Record<string, unknown> | undefined;
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserCancelledError = exports.ValidationError = exports.CommandExecutionError = exports.ToolValidationError = exports.CatalogLoadError = exports.PhaseTransitionError = exports.PlatformNotFoundError = exports.EvolithError = void 0;
4
+ exports.isEvolithError = isEvolithError;
5
+ exports.getErrorCode = getErrorCode;
6
+ exports.getErrorContext = getErrorContext;
7
+ class EvolithError extends Error {
8
+ constructor(message, code, context) {
9
+ super(message);
10
+ this.code = code;
11
+ this.context = context;
12
+ this.name = 'EvolithError';
13
+ }
14
+ }
15
+ exports.EvolithError = EvolithError;
16
+ class PlatformNotFoundError extends EvolithError {
17
+ constructor(platform, hint) {
18
+ super(`${platform} not found in PATH`, 'PLATFORM_NOT_FOUND', { platform, hint });
19
+ }
20
+ }
21
+ exports.PlatformNotFoundError = PlatformNotFoundError;
22
+ class PhaseTransitionError extends EvolithError {
23
+ constructor(from, to, reason) {
24
+ super(`Cannot transition from ${from} to ${to}: ${reason}`, 'PHASE_TRANSITION_ERROR', { from, to, reason });
25
+ }
26
+ }
27
+ exports.PhaseTransitionError = PhaseTransitionError;
28
+ class CatalogLoadError extends EvolithError {
29
+ constructor(catalog, cause) {
30
+ super(`Failed to load catalog ${catalog}: ${cause}`, 'CATALOG_LOAD_ERROR', { catalog });
31
+ }
32
+ }
33
+ exports.CatalogLoadError = CatalogLoadError;
34
+ class ToolValidationError extends EvolithError {
35
+ constructor(tool, reason) {
36
+ super(`Tool ${tool} validation failed: ${reason}`, 'TOOL_VALIDATION_ERROR', { tool });
37
+ }
38
+ }
39
+ exports.ToolValidationError = ToolValidationError;
40
+ class CommandExecutionError extends EvolithError {
41
+ constructor(command, exitCode, stderr) {
42
+ super(`Command "${command}" failed with exit code ${exitCode}: ${stderr}`, 'COMMAND_EXECUTION_ERROR', { command, exitCode, stderr });
43
+ }
44
+ }
45
+ exports.CommandExecutionError = CommandExecutionError;
46
+ class ValidationError extends EvolithError {
47
+ constructor(errors) {
48
+ super(`Validation failed: ${errors.join(', ')}`, 'VALIDATION_ERROR', { errors });
49
+ }
50
+ }
51
+ exports.ValidationError = ValidationError;
52
+ class UserCancelledError extends EvolithError {
53
+ constructor(message = 'User cancelled the operation') {
54
+ super(message, 'USER_CANCELLED');
55
+ }
56
+ }
57
+ exports.UserCancelledError = UserCancelledError;
58
+ function isEvolithError(error) {
59
+ return error instanceof EvolithError;
60
+ }
61
+ function getErrorCode(error) {
62
+ if (isEvolithError(error)) {
63
+ return error.code;
64
+ }
65
+ return 'UNKNOWN_ERROR';
66
+ }
67
+ function getErrorContext(error) {
68
+ if (isEvolithError(error)) {
69
+ return error.context;
70
+ }
71
+ return undefined;
72
+ }
73
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/errors/index.ts"],"names":[],"mappings":";;;AA6EA,wCAEC;AAED,oCAKC;AAED,0CAKC;AA7FD,MAAa,YAAa,SAAQ,KAAK;IACrC,YACE,OAAe,EACR,IAAY,EACZ,OAAiC;QAExC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAA0B;QAGxC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AATD,oCASC;AAED,MAAa,qBAAsB,SAAQ,YAAY;IACrD,YAAY,QAAgB,EAAE,IAAa;QACzC,KAAK,CACH,GAAG,QAAQ,oBAAoB,EAC/B,oBAAoB,EACpB,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB,CAAC;IACJ,CAAC;CACF;AARD,sDAQC;AAED,MAAa,oBAAqB,SAAQ,YAAY;IACpD,YAAY,IAAY,EAAE,EAAU,EAAE,MAAc;QAClD,KAAK,CACH,0BAA0B,IAAI,OAAO,EAAE,KAAK,MAAM,EAAE,EACpD,wBAAwB,EACxB,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CACrB,CAAC;IACJ,CAAC;CACF;AARD,oDAQC;AAED,MAAa,gBAAiB,SA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I,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,9 @@
1
+ export interface DomainEvent<T = unknown> {
2
+ readonly eventId: string;
3
+ readonly eventType: string;
4
+ readonly version: number;
5
+ readonly occurredAt: string;
6
+ readonly correlationId?: string;
7
+ readonly payload: T;
8
+ }
9
+ export declare function createEvent<T>(eventType: string, version: number, payload: T, correlationId?: string): DomainEvent<T>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createEvent = createEvent;
4
+ function createEvent(eventType, version, payload, correlationId) {
5
+ return {
6
+ eventId: crypto.randomUUID(),
7
+ eventType,
8
+ version,
9
+ occurredAt: new Date().toISOString(),
10
+ correlationId,
11
+ payload,
12
+ };
13
+ }
14
+ //# sourceMappingURL=domain-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-event.js","sourceRoot":"","sources":["../../../src/domain/events/domain-event.ts"],"names":[],"mappings":";;AA0BA,kCAcC;AAdD,SAAgB,WAAW,CACzB,SAAiB,EACjB,OAAe,EACf,OAAU,EACV,aAAsB;IAEtB,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE;QAC5B,SAAS;QACT,OAAO;QACP,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACpC,aAAa;QACb,OAAO;KACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { DomainEvent } from './domain-event';
2
+ import type { GatePhase, EvaluatorKind } from '../gate-evidence';
3
+ export declare const EVENT_TYPES: {
4
+ readonly PHASE_STARTED: "phase.started";
5
+ readonly PHASE_COMPLETED: "phase.completed";
6
+ readonly GATE_APPROVED: "gate.approved";
7
+ readonly GATE_REJECTED: "gate.rejected";
8
+ readonly ARTIFACT_CREATED: "artifact.created";
9
+ readonly ARTIFACT_UPDATED: "artifact.updated";
10
+ readonly ARTIFACT_VALIDATED: "artifact.validated";
11
+ readonly BLUEPRINT_GENERATED: "blueprint.generated";
12
+ readonly BLUEPRINT_VALIDATED: "blueprint.validated";
13
+ readonly WORKFLOW_UPDATED: "workflow.updated";
14
+ };
15
+ export type EventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
16
+ export interface PhaseStartedPayload {
17
+ projectId: string;
18
+ phase: GatePhase;
19
+ startedBy?: string;
20
+ }
21
+ export interface PhaseCompletedPayload {
22
+ projectId: string;
23
+ phase: GatePhase;
24
+ completedAt: string;
25
+ }
26
+ export interface GateApprovedPayload {
27
+ projectId: string;
28
+ phase: GatePhase;
29
+ gateId: string;
30
+ rulesetRef: string;
31
+ rulesetVersion?: string;
32
+ evaluatedBy: EvaluatorKind;
33
+ evaluatedAt: string;
34
+ }
35
+ export interface GateRejectedPayload {
36
+ projectId: string;
37
+ phase: GatePhase;
38
+ gateId: string;
39
+ rulesetRef: string;
40
+ rulesetVersion?: string;
41
+ evaluatedBy: EvaluatorKind;
42
+ evaluatedAt: string;
43
+ violationCount: number;
44
+ }
45
+ export interface ArtifactCreatedPayload {
46
+ projectId: string;
47
+ artifactPath: string;
48
+ artifactType?: string;
49
+ }
50
+ export interface ArtifactUpdatedPayload {
51
+ projectId: string;
52
+ artifactPath: string;
53
+ artifactType?: string;
54
+ }
55
+ export interface ArtifactValidatedPayload {
56
+ projectId: string;
57
+ artifactPath: string;
58
+ passed: boolean;
59
+ validatedAt: string;
60
+ }
61
+ export interface BlueprintGeneratedPayload {
62
+ projectId: string;
63
+ blueprintId: string;
64
+ generatedAt: string;
65
+ }
66
+ export interface BlueprintValidatedPayload {
67
+ projectId: string;
68
+ blueprintId: string;
69
+ passed: boolean;
70
+ validatedAt: string;
71
+ }
72
+ export interface WorkflowUpdatedPayload {
73
+ projectId: string;
74
+ workflowId: string;
75
+ updatedAt: string;
76
+ changedFields?: string[];
77
+ }
78
+ export type PhaseStartedEvent = DomainEvent<PhaseStartedPayload>;
79
+ export type PhaseCompletedEvent = DomainEvent<PhaseCompletedPayload>;
80
+ export type GateApprovedEvent = DomainEvent<GateApprovedPayload>;
81
+ export type GateRejectedEvent = DomainEvent<GateRejectedPayload>;
82
+ export type ArtifactCreatedEvent = DomainEvent<ArtifactCreatedPayload>;
83
+ export type ArtifactUpdatedEvent = DomainEvent<ArtifactUpdatedPayload>;
84
+ export type ArtifactValidatedEvent = DomainEvent<ArtifactValidatedPayload>;
85
+ export type BlueprintGeneratedEvent = DomainEvent<BlueprintGeneratedPayload>;
86
+ export type BlueprintValidatedEvent = DomainEvent<BlueprintValidatedPayload>;
87
+ export type WorkflowUpdatedEvent = DomainEvent<WorkflowUpdatedPayload>;
88
+ export declare const DomainEvents: {
89
+ readonly phaseStarted: (payload: PhaseStartedPayload, correlationId?: string) => PhaseStartedEvent;
90
+ readonly phaseCompleted: (payload: PhaseCompletedPayload, correlationId?: string) => PhaseCompletedEvent;
91
+ readonly gateApproved: (payload: GateApprovedPayload, correlationId?: string) => GateApprovedEvent;
92
+ readonly gateRejected: (payload: GateRejectedPayload, correlationId?: string) => GateRejectedEvent;
93
+ readonly artifactCreated: (payload: ArtifactCreatedPayload, correlationId?: string) => ArtifactCreatedEvent;
94
+ readonly artifactUpdated: (payload: ArtifactUpdatedPayload, correlationId?: string) => ArtifactUpdatedEvent;
95
+ readonly artifactValidated: (payload: ArtifactValidatedPayload, correlationId?: string) => ArtifactValidatedEvent;
96
+ readonly blueprintGenerated: (payload: BlueprintGeneratedPayload, correlationId?: string) => BlueprintGeneratedEvent;
97
+ readonly blueprintValidated: (payload: BlueprintValidatedPayload, correlationId?: string) => BlueprintValidatedEvent;
98
+ readonly workflowUpdated: (payload: WorkflowUpdatedPayload, correlationId?: string) => WorkflowUpdatedEvent;
99
+ };
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DomainEvents = exports.EVENT_TYPES = void 0;
4
+ const domain_event_1 = require("./domain-event");
5
+ exports.EVENT_TYPES = {
6
+ PHASE_STARTED: 'phase.started',
7
+ PHASE_COMPLETED: 'phase.completed',
8
+ GATE_APPROVED: 'gate.approved',
9
+ GATE_REJECTED: 'gate.rejected',
10
+ ARTIFACT_CREATED: 'artifact.created',
11
+ ARTIFACT_UPDATED: 'artifact.updated',
12
+ ARTIFACT_VALIDATED: 'artifact.validated',
13
+ BLUEPRINT_GENERATED: 'blueprint.generated',
14
+ BLUEPRINT_VALIDATED: 'blueprint.validated',
15
+ WORKFLOW_UPDATED: 'workflow.updated',
16
+ };
17
+ exports.DomainEvents = {
18
+ phaseStarted(payload, correlationId) {
19
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.PHASE_STARTED, 1, payload, correlationId);
20
+ },
21
+ phaseCompleted(payload, correlationId) {
22
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.PHASE_COMPLETED, 1, payload, correlationId);
23
+ },
24
+ gateApproved(payload, correlationId) {
25
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.GATE_APPROVED, 1, payload, correlationId);
26
+ },
27
+ gateRejected(payload, correlationId) {
28
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.GATE_REJECTED, 1, payload, correlationId);
29
+ },
30
+ artifactCreated(payload, correlationId) {
31
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.ARTIFACT_CREATED, 1, payload, correlationId);
32
+ },
33
+ artifactUpdated(payload, correlationId) {
34
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.ARTIFACT_UPDATED, 1, payload, correlationId);
35
+ },
36
+ artifactValidated(payload, correlationId) {
37
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.ARTIFACT_VALIDATED, 1, payload, correlationId);
38
+ },
39
+ blueprintGenerated(payload, correlationId) {
40
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.BLUEPRINT_GENERATED, 1, payload, correlationId);
41
+ },
42
+ blueprintValidated(payload, correlationId) {
43
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.BLUEPRINT_VALIDATED, 1, payload, correlationId);
44
+ },
45
+ workflowUpdated(payload, correlationId) {
46
+ return (0, domain_event_1.createEvent)(exports.EVENT_TYPES.WORKFLOW_UPDATED, 1, payload, correlationId);
47
+ },
48
+ };
49
+ //# sourceMappingURL=domain-events.js.map