@mc1global/opencode-jarvis 0.1.1 → 0.3.1

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 (299) hide show
  1. package/dist/application/agent-registry/dtos.d.ts +66 -0
  2. package/dist/application/agent-registry/dtos.d.ts.map +1 -0
  3. package/dist/application/agent-registry/dtos.js +11 -0
  4. package/dist/application/agent-registry/dtos.js.map +1 -0
  5. package/dist/application/agent-registry/use-cases.d.ts +39 -0
  6. package/dist/application/agent-registry/use-cases.d.ts.map +1 -0
  7. package/dist/application/agent-registry/use-cases.js +222 -0
  8. package/dist/application/agent-registry/use-cases.js.map +1 -0
  9. package/dist/application/azure-sync/dtos.d.ts +210 -0
  10. package/dist/application/azure-sync/dtos.d.ts.map +1 -0
  11. package/dist/application/azure-sync/dtos.js +11 -0
  12. package/dist/application/azure-sync/dtos.js.map +1 -0
  13. package/dist/application/azure-sync/field-builders.d.ts +54 -0
  14. package/dist/application/azure-sync/field-builders.d.ts.map +1 -0
  15. package/dist/application/azure-sync/field-builders.js +166 -0
  16. package/dist/application/azure-sync/field-builders.js.map +1 -0
  17. package/dist/application/azure-sync/index.d.ts +16 -0
  18. package/dist/application/azure-sync/index.d.ts.map +1 -0
  19. package/dist/application/azure-sync/index.js +10 -0
  20. package/dist/application/azure-sync/index.js.map +1 -0
  21. package/dist/application/azure-sync/pr-use-cases.d.ts +39 -0
  22. package/dist/application/azure-sync/pr-use-cases.d.ts.map +1 -0
  23. package/dist/application/azure-sync/pr-use-cases.js +192 -0
  24. package/dist/application/azure-sync/pr-use-cases.js.map +1 -0
  25. package/dist/application/azure-sync/pull-use-cases.d.ts +43 -0
  26. package/dist/application/azure-sync/pull-use-cases.d.ts.map +1 -0
  27. package/dist/application/azure-sync/pull-use-cases.js +322 -0
  28. package/dist/application/azure-sync/pull-use-cases.js.map +1 -0
  29. package/dist/application/azure-sync/push-use-cases.d.ts +53 -0
  30. package/dist/application/azure-sync/push-use-cases.d.ts.map +1 -0
  31. package/dist/application/azure-sync/push-use-cases.js +341 -0
  32. package/dist/application/azure-sync/push-use-cases.js.map +1 -0
  33. package/dist/application/azure-sync/reverse-field-builder.d.ts +52 -0
  34. package/dist/application/azure-sync/reverse-field-builder.d.ts.map +1 -0
  35. package/dist/application/azure-sync/reverse-field-builder.js +130 -0
  36. package/dist/application/azure-sync/reverse-field-builder.js.map +1 -0
  37. package/dist/application/azure-sync/task-push-use-cases.d.ts +68 -0
  38. package/dist/application/azure-sync/task-push-use-cases.d.ts.map +1 -0
  39. package/dist/application/azure-sync/task-push-use-cases.js +162 -0
  40. package/dist/application/azure-sync/task-push-use-cases.js.map +1 -0
  41. package/dist/application/config/config-service.d.ts +64 -0
  42. package/dist/application/config/config-service.d.ts.map +1 -0
  43. package/dist/application/config/config-service.js +110 -0
  44. package/dist/application/config/config-service.js.map +1 -0
  45. package/dist/application/config/index.d.ts +5 -0
  46. package/dist/application/config/index.d.ts.map +1 -0
  47. package/dist/application/config/index.js +5 -0
  48. package/dist/application/config/index.js.map +1 -0
  49. package/dist/application/kanban/board-use-cases.d.ts.map +1 -1
  50. package/dist/application/kanban/board-use-cases.js +14 -0
  51. package/dist/application/kanban/board-use-cases.js.map +1 -1
  52. package/dist/application/kanban/card-use-cases.d.ts +21 -2
  53. package/dist/application/kanban/card-use-cases.d.ts.map +1 -1
  54. package/dist/application/kanban/card-use-cases.js +180 -1
  55. package/dist/application/kanban/card-use-cases.js.map +1 -1
  56. package/dist/application/kanban/dtos.d.ts +59 -0
  57. package/dist/application/kanban/dtos.d.ts.map +1 -1
  58. package/dist/application/mcp/index.d.ts +10 -0
  59. package/dist/application/mcp/index.d.ts.map +1 -0
  60. package/dist/application/mcp/index.js +8 -0
  61. package/dist/application/mcp/index.js.map +1 -0
  62. package/dist/application/mcp/middleware.d.ts +91 -0
  63. package/dist/application/mcp/middleware.d.ts.map +1 -0
  64. package/dist/application/mcp/middleware.js +84 -0
  65. package/dist/application/mcp/middleware.js.map +1 -0
  66. package/dist/application/mcp/tool-adapter.d.ts +72 -0
  67. package/dist/application/mcp/tool-adapter.d.ts.map +1 -0
  68. package/dist/application/mcp/tool-adapter.js +132 -0
  69. package/dist/application/mcp/tool-adapter.js.map +1 -0
  70. package/dist/application/pipeline/dtos.d.ts +135 -0
  71. package/dist/application/pipeline/dtos.d.ts.map +1 -0
  72. package/dist/application/pipeline/dtos.js +11 -0
  73. package/dist/application/pipeline/dtos.js.map +1 -0
  74. package/dist/application/pipeline/index.d.ts +8 -0
  75. package/dist/application/pipeline/index.d.ts.map +1 -0
  76. package/dist/application/pipeline/index.js +7 -0
  77. package/dist/application/pipeline/index.js.map +1 -0
  78. package/dist/application/pipeline/use-cases.d.ts +67 -0
  79. package/dist/application/pipeline/use-cases.d.ts.map +1 -0
  80. package/dist/application/pipeline/use-cases.js +413 -0
  81. package/dist/application/pipeline/use-cases.js.map +1 -0
  82. package/dist/application/rag/use-cases.d.ts +3 -0
  83. package/dist/application/rag/use-cases.d.ts.map +1 -1
  84. package/dist/application/rag/use-cases.js +112 -34
  85. package/dist/application/rag/use-cases.js.map +1 -1
  86. package/dist/domain/agent-registry/entities.d.ts +68 -0
  87. package/dist/domain/agent-registry/entities.d.ts.map +1 -0
  88. package/dist/domain/agent-registry/entities.js +177 -0
  89. package/dist/domain/agent-registry/entities.js.map +1 -0
  90. package/dist/domain/agent-registry/repositories.d.ts +56 -0
  91. package/dist/domain/agent-registry/repositories.d.ts.map +1 -0
  92. package/dist/domain/agent-registry/repositories.js +12 -0
  93. package/dist/domain/agent-registry/repositories.js.map +1 -0
  94. package/dist/domain/agent-registry/services.d.ts +87 -0
  95. package/dist/domain/agent-registry/services.d.ts.map +1 -0
  96. package/dist/domain/agent-registry/services.js +188 -0
  97. package/dist/domain/agent-registry/services.js.map +1 -0
  98. package/dist/domain/agent-registry/value-objects.d.ts +145 -0
  99. package/dist/domain/agent-registry/value-objects.d.ts.map +1 -0
  100. package/dist/domain/agent-registry/value-objects.js +339 -0
  101. package/dist/domain/agent-registry/value-objects.js.map +1 -0
  102. package/dist/domain/azure-sync/entities.d.ts +165 -0
  103. package/dist/domain/azure-sync/entities.d.ts.map +1 -0
  104. package/dist/domain/azure-sync/entities.js +203 -0
  105. package/dist/domain/azure-sync/entities.js.map +1 -0
  106. package/dist/domain/azure-sync/index.d.ts +16 -0
  107. package/dist/domain/azure-sync/index.d.ts.map +1 -0
  108. package/dist/domain/azure-sync/index.js +14 -0
  109. package/dist/domain/azure-sync/index.js.map +1 -0
  110. package/dist/domain/azure-sync/ports.d.ts +117 -0
  111. package/dist/domain/azure-sync/ports.d.ts.map +1 -0
  112. package/dist/domain/azure-sync/ports.js +13 -0
  113. package/dist/domain/azure-sync/ports.js.map +1 -0
  114. package/dist/domain/azure-sync/repositories.d.ts +53 -0
  115. package/dist/domain/azure-sync/repositories.d.ts.map +1 -0
  116. package/dist/domain/azure-sync/repositories.js +11 -0
  117. package/dist/domain/azure-sync/repositories.js.map +1 -0
  118. package/dist/domain/azure-sync/services.d.ts +107 -0
  119. package/dist/domain/azure-sync/services.d.ts.map +1 -0
  120. package/dist/domain/azure-sync/services.js +316 -0
  121. package/dist/domain/azure-sync/services.js.map +1 -0
  122. package/dist/domain/azure-sync/value-objects.d.ts +129 -0
  123. package/dist/domain/azure-sync/value-objects.d.ts.map +1 -0
  124. package/dist/domain/azure-sync/value-objects.js +343 -0
  125. package/dist/domain/azure-sync/value-objects.js.map +1 -0
  126. package/dist/domain/config/index.d.ts +9 -0
  127. package/dist/domain/config/index.d.ts.map +1 -0
  128. package/dist/domain/config/index.js +7 -0
  129. package/dist/domain/config/index.js.map +1 -0
  130. package/dist/domain/config/repositories.d.ts +36 -0
  131. package/dist/domain/config/repositories.d.ts.map +1 -0
  132. package/dist/domain/config/repositories.js +12 -0
  133. package/dist/domain/config/repositories.js.map +1 -0
  134. package/dist/domain/config/value-objects.d.ts +112 -0
  135. package/dist/domain/config/value-objects.d.ts.map +1 -0
  136. package/dist/domain/config/value-objects.js +93 -0
  137. package/dist/domain/config/value-objects.js.map +1 -0
  138. package/dist/domain/governance/policies.d.ts.map +1 -1
  139. package/dist/domain/governance/policies.js +70 -0
  140. package/dist/domain/governance/policies.js.map +1 -1
  141. package/dist/domain/kanban/entities.d.ts +67 -15
  142. package/dist/domain/kanban/entities.d.ts.map +1 -1
  143. package/dist/domain/kanban/entities.js +177 -14
  144. package/dist/domain/kanban/entities.js.map +1 -1
  145. package/dist/domain/kanban/grooming.d.ts +27 -7
  146. package/dist/domain/kanban/grooming.d.ts.map +1 -1
  147. package/dist/domain/kanban/grooming.js +50 -12
  148. package/dist/domain/kanban/grooming.js.map +1 -1
  149. package/dist/domain/kanban/services.d.ts +16 -2
  150. package/dist/domain/kanban/services.d.ts.map +1 -1
  151. package/dist/domain/kanban/services.js +29 -2
  152. package/dist/domain/kanban/services.js.map +1 -1
  153. package/dist/domain/kanban/value-objects.d.ts +48 -0
  154. package/dist/domain/kanban/value-objects.d.ts.map +1 -1
  155. package/dist/domain/kanban/value-objects.js +53 -0
  156. package/dist/domain/kanban/value-objects.js.map +1 -1
  157. package/dist/domain/pipeline/gate.d.ts +75 -0
  158. package/dist/domain/pipeline/gate.d.ts.map +1 -0
  159. package/dist/domain/pipeline/gate.js +158 -0
  160. package/dist/domain/pipeline/gate.js.map +1 -0
  161. package/dist/domain/pipeline/index.d.ts +13 -0
  162. package/dist/domain/pipeline/index.d.ts.map +1 -0
  163. package/dist/domain/pipeline/index.js +14 -0
  164. package/dist/domain/pipeline/index.js.map +1 -0
  165. package/dist/domain/pipeline/pipeline.d.ts +99 -0
  166. package/dist/domain/pipeline/pipeline.d.ts.map +1 -0
  167. package/dist/domain/pipeline/pipeline.js +257 -0
  168. package/dist/domain/pipeline/pipeline.js.map +1 -0
  169. package/dist/domain/pipeline/ports.d.ts +120 -0
  170. package/dist/domain/pipeline/ports.d.ts.map +1 -0
  171. package/dist/domain/pipeline/ports.js +12 -0
  172. package/dist/domain/pipeline/ports.js.map +1 -0
  173. package/dist/domain/pipeline/repositories.d.ts +66 -0
  174. package/dist/domain/pipeline/repositories.d.ts.map +1 -0
  175. package/dist/domain/pipeline/repositories.js +11 -0
  176. package/dist/domain/pipeline/repositories.js.map +1 -0
  177. package/dist/domain/pipeline/services.d.ts +77 -0
  178. package/dist/domain/pipeline/services.d.ts.map +1 -0
  179. package/dist/domain/pipeline/services.js +156 -0
  180. package/dist/domain/pipeline/services.js.map +1 -0
  181. package/dist/domain/pipeline/value-objects.d.ts +117 -0
  182. package/dist/domain/pipeline/value-objects.d.ts.map +1 -0
  183. package/dist/domain/pipeline/value-objects.js +313 -0
  184. package/dist/domain/pipeline/value-objects.js.map +1 -0
  185. package/dist/domain/rag/value-objects.d.ts +9 -2
  186. package/dist/domain/rag/value-objects.d.ts.map +1 -1
  187. package/dist/domain/rag/value-objects.js +8 -2
  188. package/dist/domain/rag/value-objects.js.map +1 -1
  189. package/dist/hooks/event-handlers.d.ts +3 -0
  190. package/dist/hooks/event-handlers.d.ts.map +1 -1
  191. package/dist/hooks/event-handlers.js +4 -2
  192. package/dist/hooks/event-handlers.js.map +1 -1
  193. package/dist/hooks/logger.d.ts +46 -0
  194. package/dist/hooks/logger.d.ts.map +1 -0
  195. package/dist/hooks/logger.js +79 -0
  196. package/dist/hooks/logger.js.map +1 -0
  197. package/dist/index.d.ts.map +1 -1
  198. package/dist/index.js +152 -108
  199. package/dist/index.js.map +1 -1
  200. package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts +29 -0
  201. package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts.map +1 -0
  202. package/dist/infrastructure/agent-registry/agent-profile-repository.js +109 -0
  203. package/dist/infrastructure/agent-registry/agent-profile-repository.js.map +1 -0
  204. package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts +28 -0
  205. package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts.map +1 -0
  206. package/dist/infrastructure/agent-registry/agent-session-adapter.js +61 -0
  207. package/dist/infrastructure/agent-registry/agent-session-adapter.js.map +1 -0
  208. package/dist/infrastructure/agent-registry/built-in-profiles.d.ts +19 -0
  209. package/dist/infrastructure/agent-registry/built-in-profiles.d.ts.map +1 -0
  210. package/dist/infrastructure/agent-registry/built-in-profiles.js +210 -0
  211. package/dist/infrastructure/agent-registry/built-in-profiles.js.map +1 -0
  212. package/dist/infrastructure/azure-sync/azure-auth.d.ts +40 -0
  213. package/dist/infrastructure/azure-sync/azure-auth.d.ts.map +1 -0
  214. package/dist/infrastructure/azure-sync/azure-auth.js +94 -0
  215. package/dist/infrastructure/azure-sync/azure-auth.js.map +1 -0
  216. package/dist/infrastructure/azure-sync/azure-devops-client.d.ts +43 -0
  217. package/dist/infrastructure/azure-sync/azure-devops-client.d.ts.map +1 -0
  218. package/dist/infrastructure/azure-sync/azure-devops-client.js +296 -0
  219. package/dist/infrastructure/azure-sync/azure-devops-client.js.map +1 -0
  220. package/dist/infrastructure/azure-sync/index.d.ts +9 -0
  221. package/dist/infrastructure/azure-sync/index.d.ts.map +1 -0
  222. package/dist/infrastructure/azure-sync/index.js +12 -0
  223. package/dist/infrastructure/azure-sync/index.js.map +1 -0
  224. package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts +39 -0
  225. package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts.map +1 -0
  226. package/dist/infrastructure/azure-sync/sqlite-sync-repository.js +202 -0
  227. package/dist/infrastructure/azure-sync/sqlite-sync-repository.js.map +1 -0
  228. package/dist/infrastructure/config/index.d.ts +5 -0
  229. package/dist/infrastructure/config/index.d.ts.map +1 -0
  230. package/dist/infrastructure/config/index.js +5 -0
  231. package/dist/infrastructure/config/index.js.map +1 -0
  232. package/dist/infrastructure/config/yaml-config-repository.d.ts +22 -0
  233. package/dist/infrastructure/config/yaml-config-repository.d.ts.map +1 -0
  234. package/dist/infrastructure/config/yaml-config-repository.js +68 -0
  235. package/dist/infrastructure/config/yaml-config-repository.js.map +1 -0
  236. package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts +21 -0
  237. package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts.map +1 -0
  238. package/dist/infrastructure/domain-map/llm-prompt-factory.js +49 -0
  239. package/dist/infrastructure/domain-map/llm-prompt-factory.js.map +1 -0
  240. package/dist/infrastructure/kanban/card-repository.d.ts +6 -0
  241. package/dist/infrastructure/kanban/card-repository.d.ts.map +1 -1
  242. package/dist/infrastructure/kanban/card-repository.js +79 -7
  243. package/dist/infrastructure/kanban/card-repository.js.map +1 -1
  244. package/dist/infrastructure/pipeline/dagger-adapter.d.ts +50 -0
  245. package/dist/infrastructure/pipeline/dagger-adapter.d.ts.map +1 -0
  246. package/dist/infrastructure/pipeline/dagger-adapter.js +153 -0
  247. package/dist/infrastructure/pipeline/dagger-adapter.js.map +1 -0
  248. package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts +35 -0
  249. package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts.map +1 -0
  250. package/dist/infrastructure/pipeline/dagger-scaffold-generator.js +132 -0
  251. package/dist/infrastructure/pipeline/dagger-scaffold-generator.js.map +1 -0
  252. package/dist/infrastructure/pipeline/index.d.ts +20 -0
  253. package/dist/infrastructure/pipeline/index.d.ts.map +1 -0
  254. package/dist/infrastructure/pipeline/index.js +19 -0
  255. package/dist/infrastructure/pipeline/index.js.map +1 -0
  256. package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts +23 -0
  257. package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts.map +1 -0
  258. package/dist/infrastructure/pipeline/pipeline-template-registry.js +63 -0
  259. package/dist/infrastructure/pipeline/pipeline-template-registry.js.map +1 -0
  260. package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts +17 -0
  261. package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts.map +1 -0
  262. package/dist/infrastructure/pipeline/scaffold-templates-extra.js +467 -0
  263. package/dist/infrastructure/pipeline/scaffold-templates-extra.js.map +1 -0
  264. package/dist/infrastructure/pipeline/scaffold-templates.d.ts +23 -0
  265. package/dist/infrastructure/pipeline/scaffold-templates.d.ts.map +1 -0
  266. package/dist/infrastructure/pipeline/scaffold-templates.js +476 -0
  267. package/dist/infrastructure/pipeline/scaffold-templates.js.map +1 -0
  268. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts +32 -0
  269. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts.map +1 -0
  270. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js +197 -0
  271. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js.map +1 -0
  272. package/dist/mcp-server.d.ts +3 -0
  273. package/dist/mcp-server.d.ts.map +1 -0
  274. package/dist/mcp-server.js +300 -0
  275. package/dist/mcp-server.js.map +1 -0
  276. package/dist/tools/agent-registry-tools.d.ts +11 -0
  277. package/dist/tools/agent-registry-tools.d.ts.map +1 -0
  278. package/dist/tools/agent-registry-tools.js +208 -0
  279. package/dist/tools/agent-registry-tools.js.map +1 -0
  280. package/dist/tools/azure-sync-tools.d.ts +15 -0
  281. package/dist/tools/azure-sync-tools.d.ts.map +1 -0
  282. package/dist/tools/azure-sync-tools.js +332 -0
  283. package/dist/tools/azure-sync-tools.js.map +1 -0
  284. package/dist/tools/kanban-card-tools.d.ts.map +1 -1
  285. package/dist/tools/kanban-card-tools.js +41 -16
  286. package/dist/tools/kanban-card-tools.js.map +1 -1
  287. package/dist/tools/kanban-gate-tools.d.ts +7 -0
  288. package/dist/tools/kanban-gate-tools.d.ts.map +1 -0
  289. package/dist/tools/kanban-gate-tools.js +106 -0
  290. package/dist/tools/kanban-gate-tools.js.map +1 -0
  291. package/dist/tools/kanban-grooming-tools.d.ts +7 -0
  292. package/dist/tools/kanban-grooming-tools.d.ts.map +1 -0
  293. package/dist/tools/kanban-grooming-tools.js +180 -0
  294. package/dist/tools/kanban-grooming-tools.js.map +1 -0
  295. package/dist/tools/pipeline-tools.d.ts +15 -0
  296. package/dist/tools/pipeline-tools.d.ts.map +1 -0
  297. package/dist/tools/pipeline-tools.js +424 -0
  298. package/dist/tools/pipeline-tools.js.map +1 -0
  299. package/package.json +7 -2
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Pipeline Domain — Port Interfaces
3
+ *
4
+ * Hexagonal architecture ports for external infrastructure.
5
+ * Domain defines WHAT operations are needed; infrastructure implements HOW.
6
+ *
7
+ * SOLID: DIP — domain depends on abstractions, not implementations
8
+ * SOLID: ISP — separate port interfaces per capability
9
+ * DDD: Port/Adapter — domain-layer contracts with zero external dependencies
10
+ */
11
+ import type { Result } from "../shared/value-objects.js";
12
+ /**
13
+ * Supported container runtimes for Dagger execution.
14
+ * Docker is the primary runtime; Apple Container is for Swift/Xcode on macOS.
15
+ */
16
+ export type ContainerRuntime = "docker" | "apple-container";
17
+ /**
18
+ * Status information about the Dagger CLI and container runtime environment.
19
+ */
20
+ export interface DaggerEnvironmentInfo {
21
+ /** Whether the Dagger CLI is installed and accessible. */
22
+ readonly daggerAvailable: boolean;
23
+ /** Dagger CLI version string (e.g., "0.15.1"), undefined if not installed. */
24
+ readonly daggerVersion?: string;
25
+ /** Detected container runtime, undefined if none found. */
26
+ readonly containerRuntime?: ContainerRuntime;
27
+ /** Whether the container runtime is currently running/accessible. */
28
+ readonly runtimeReady: boolean;
29
+ }
30
+ /**
31
+ * Request to execute a Dagger function within a module.
32
+ */
33
+ export interface DaggerRunRequest {
34
+ /** Path to the directory containing the Dagger module (with dagger.json). */
35
+ readonly moduleDir: string;
36
+ /** The Dagger function to invoke (e.g., "lint", "test", "build"). */
37
+ readonly functionName: string;
38
+ /** Optional arguments to pass to the function. */
39
+ readonly args?: readonly string[];
40
+ /** Execution timeout in milliseconds. */
41
+ readonly timeoutMs?: number;
42
+ }
43
+ /**
44
+ * Result of a Dagger function execution.
45
+ */
46
+ export interface DaggerRunResult {
47
+ /** Whether the function executed successfully (exit code 0). */
48
+ readonly success: boolean;
49
+ /** Combined stdout/stderr output. */
50
+ readonly output: string;
51
+ /** Process exit code. */
52
+ readonly exitCode: number;
53
+ /** Execution duration in milliseconds. */
54
+ readonly durationMs: number;
55
+ }
56
+ /**
57
+ * Port interface for Dagger CLI operations.
58
+ *
59
+ * Infrastructure adapter wraps the `dagger` CLI binary and container runtime
60
+ * to execute pipeline gate functions defined in Dagger modules.
61
+ *
62
+ * This is the domain contract — infrastructure decides HOW to invoke dagger,
63
+ * handle process management, and detect runtimes.
64
+ */
65
+ export interface DaggerPort {
66
+ /**
67
+ * Check the Dagger CLI and container runtime environment.
68
+ * Returns availability info without side effects.
69
+ */
70
+ checkEnvironment(): Promise<DaggerEnvironmentInfo>;
71
+ /**
72
+ * Execute a Dagger function.
73
+ * Returns a structured result — never throws for execution failures.
74
+ * Infrastructure errors (e.g., dagger not installed) return Result.fail().
75
+ */
76
+ run(request: DaggerRunRequest): Promise<Result<DaggerRunResult>>;
77
+ }
78
+ /**
79
+ * A single file to be generated as part of a Dagger module scaffold.
80
+ */
81
+ export interface ScaffoldFile {
82
+ /** Relative path from project root (e.g., ".dagger/src/index.ts"). */
83
+ readonly path: string;
84
+ /** Full file content as a string. */
85
+ readonly content: string;
86
+ }
87
+ /**
88
+ * Complete scaffold output for a Dagger module.
89
+ */
90
+ export interface ScaffoldOutput {
91
+ /** Stack template that generated this scaffold. */
92
+ readonly stack: string;
93
+ /** SDK language used by the Dagger module. */
94
+ readonly sdk: "typescript" | "python";
95
+ /** Module name derived from stack template. */
96
+ readonly moduleName: string;
97
+ /** Files to generate, in order. */
98
+ readonly files: readonly ScaffoldFile[];
99
+ }
100
+ /**
101
+ * Port interface for Dagger module scaffold generation.
102
+ *
103
+ * Infrastructure generates the actual file content for each stack template.
104
+ * Domain defines the contract; infrastructure decides file structure and code.
105
+ *
106
+ * SOLID: DIP — domain depends on abstraction
107
+ * SOLID: ISP — separate from DaggerPort (generation vs execution)
108
+ */
109
+ export interface ScaffoldPort {
110
+ /**
111
+ * Generate scaffold files for a given stack template.
112
+ * Returns undefined if the stack is not supported.
113
+ */
114
+ generate(stack: string): ScaffoldOutput | undefined;
115
+ /**
116
+ * List all stacks that have scaffold support.
117
+ */
118
+ supportedStacks(): readonly string[];
119
+ }
120
+ //# sourceMappingURL=ports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../../src/domain/pipeline/ports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAIzD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,iBAAiB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,0DAA0D;IAC1D,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,2DAA2D;IAC3D,QAAQ,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAC7C,qEAAqE;IACrE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,yCAAyC;IACzC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,yBAAyB;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,0CAA0C;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAID;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,gBAAgB,IAAI,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAEnD;;;;OAIG;IACH,GAAG,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC;CAClE;AAID;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8CAA8C;IAC9C,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,QAAQ,CAAC;IACtC,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAC;CACzC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAAC;IAEpD;;OAEG;IACH,eAAe,IAAI,SAAS,MAAM,EAAE,CAAC;CACtC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Pipeline Domain — Port Interfaces
3
+ *
4
+ * Hexagonal architecture ports for external infrastructure.
5
+ * Domain defines WHAT operations are needed; infrastructure implements HOW.
6
+ *
7
+ * SOLID: DIP — domain depends on abstractions, not implementations
8
+ * SOLID: ISP — separate port interfaces per capability
9
+ * DDD: Port/Adapter — domain-layer contracts with zero external dependencies
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=ports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ports.js","sourceRoot":"","sources":["../../../src/domain/pipeline/ports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Pipeline Domain — Repository Interfaces (Ports)
3
+ *
4
+ * Pure interfaces defining persistence contracts.
5
+ * Implementations provided by infrastructure layer (DIP).
6
+ *
7
+ * SOLID: ISP — separate interfaces per aggregate, DIP — domain defines contracts
8
+ * DDD: Repository pattern — abstracts persistence behind domain-driven interface
9
+ */
10
+ import type { WorkspaceId } from "../shared/value-objects.js";
11
+ import type { Pipeline } from "./pipeline.js";
12
+ import type { PipelineId, PipelineScope, PipelineStatus, StackTemplate } from "./value-objects.js";
13
+ /**
14
+ * Repository for Pipeline aggregate root persistence.
15
+ * One pipeline per workspace+scope+version combination (conceptually).
16
+ */
17
+ export interface PipelineRepository {
18
+ /** Persist a pipeline (create or update). */
19
+ save(pipeline: Pipeline): Promise<void>;
20
+ /** Find a pipeline by its ID. Returns undefined if not found. */
21
+ findById(id: PipelineId): Promise<Pipeline | undefined>;
22
+ /** Find all pipelines for a workspace. */
23
+ findByWorkspace(workspaceId: WorkspaceId): Promise<readonly Pipeline[]>;
24
+ /** Find pipelines by workspace and status. */
25
+ findByStatus(workspaceId: WorkspaceId, status: PipelineStatus): Promise<readonly Pipeline[]>;
26
+ /** Find pipelines by workspace and scope. */
27
+ findByScope(workspaceId: WorkspaceId, scope: PipelineScope): Promise<readonly Pipeline[]>;
28
+ /** Find the active pipeline for a workspace (at most one). */
29
+ findActive(workspaceId: WorkspaceId): Promise<Pipeline | undefined>;
30
+ /** Delete a pipeline by ID. Returns true if found and deleted. */
31
+ delete(id: PipelineId): Promise<boolean>;
32
+ /** Get the next available sequence number for PipelineId generation. */
33
+ nextSequence(workspaceId: WorkspaceId): Promise<number>;
34
+ }
35
+ /**
36
+ * Template registry providing pipeline template configurations.
37
+ *
38
+ * Templates define which gates a pipeline should have for a given
39
+ * stack + scope combination, along with default skip policies and
40
+ * dagger function references.
41
+ *
42
+ * NOTE: This will likely be implemented as an in-memory registry
43
+ * in infrastructure (CD-004), not a database-backed store.
44
+ */
45
+ export interface PipelineTemplateRepository {
46
+ /** Get gate configurations for a stack template and pipeline scope. */
47
+ getTemplate(stack: StackTemplate, scope: PipelineScope): Promise<PipelineTemplateConfig | undefined>;
48
+ /** List all available stack templates. */
49
+ listTemplates(): Promise<readonly StackTemplate[]>;
50
+ /** Check if a template exists for the given stack. */
51
+ hasTemplate(stack: StackTemplate): Promise<boolean>;
52
+ }
53
+ /** Configuration returned by the template registry. */
54
+ export interface PipelineTemplateConfig {
55
+ readonly stack: StackTemplate;
56
+ readonly scope: PipelineScope;
57
+ readonly gates: readonly GateTemplateConfig[];
58
+ }
59
+ /** Gate configuration within a template. */
60
+ export interface GateTemplateConfig {
61
+ readonly type: import("./value-objects.js").GateType;
62
+ readonly daggerFunction: string;
63
+ readonly skipPolicy: import("./value-objects.js").SkipPolicy;
64
+ readonly command?: string;
65
+ }
66
+ //# sourceMappingURL=repositories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../../../src/domain/pipeline/repositories.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnG;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IAExD,0CAA0C;IAC1C,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,QAAQ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AC;IAChC,QAAQ,CAAC,UAAU,EAAE,OAAO,oBAAoB,EAAE,UAAU,CAAC;IAC7D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Pipeline Domain — Repository Interfaces (Ports)
3
+ *
4
+ * Pure interfaces defining persistence contracts.
5
+ * Implementations provided by infrastructure layer (DIP).
6
+ *
7
+ * SOLID: ISP — separate interfaces per aggregate, DIP — domain defines contracts
8
+ * DDD: Repository pattern — abstracts persistence behind domain-driven interface
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=repositories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repositories.js","sourceRoot":"","sources":["../../../src/domain/pipeline/repositories.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Pipeline Domain — Domain Services
3
+ *
4
+ * Stateless services that orchestrate cross-entity business logic.
5
+ * PipelineFactory: creates pipelines from templates.
6
+ * GateEnforcer: validates gate transitions with full context.
7
+ *
8
+ * SOLID: SRP — each service has one responsibility
9
+ * DDD: Domain Service — logic that doesn't belong to a single entity
10
+ */
11
+ import type { WorkspaceId } from "../shared/value-objects.js";
12
+ import type { Result } from "../shared/value-objects.js";
13
+ import { Pipeline } from "./pipeline.js";
14
+ import type { PipelineRepository, PipelineTemplateRepository } from "./repositories.js";
15
+ import { PipelineId, type PipelineScope, type StackTemplate, GateId } from "./value-objects.js";
16
+ /** Request to create a new pipeline. */
17
+ export interface CreatePipelineRequest {
18
+ readonly workspaceId: WorkspaceId;
19
+ readonly stack: StackTemplate;
20
+ readonly scope: PipelineScope;
21
+ readonly version: string;
22
+ readonly cardId?: string;
23
+ }
24
+ /**
25
+ * PipelineFactory — creates Pipeline aggregates from templates.
26
+ *
27
+ * Loads template configuration, generates gates in order,
28
+ * assigns IDs, and returns a fully-formed Pipeline in draft status.
29
+ */
30
+ export declare class PipelineFactory {
31
+ private readonly pipelineRepo;
32
+ private readonly templateRepo;
33
+ constructor(pipelineRepo: PipelineRepository, templateRepo: PipelineTemplateRepository);
34
+ /**
35
+ * Create a new pipeline from a template.
36
+ *
37
+ * 1. Validates the template exists
38
+ * 2. Parses and validates the version string
39
+ * 3. Generates a pipeline ID
40
+ * 4. Creates gates from template config
41
+ * 5. Returns a Pipeline in draft status
42
+ */
43
+ create(request: CreatePipelineRequest): Promise<Result<Pipeline>>;
44
+ }
45
+ /**
46
+ * GateEnforcer — validates and executes gate transitions.
47
+ *
48
+ * Provides a safe, Result-returning API for gate operations
49
+ * that wraps Pipeline entity methods (which throw on invariant violations).
50
+ * Handles the load-mutate-save cycle.
51
+ */
52
+ export declare class GateEnforcer {
53
+ private readonly pipelineRepo;
54
+ constructor(pipelineRepo: PipelineRepository);
55
+ /** Start a gate. Validates ordering and pipeline state. */
56
+ startGate(pipelineId: PipelineId, gateId: GateId): Promise<Result<Pipeline>>;
57
+ /** Pass a gate with optional output. May complete the pipeline. */
58
+ passGate(pipelineId: PipelineId, gateId: GateId, output?: string): Promise<Result<Pipeline>>;
59
+ /** Fail a gate. Transitions pipeline to failed. */
60
+ failGate(pipelineId: PipelineId, gateId: GateId, output?: string): Promise<Result<Pipeline>>;
61
+ /** Skip a gate with reason and optional approval. */
62
+ skipGate(pipelineId: PipelineId, gateId: GateId, reason: string, approvedBy?: string): Promise<Result<Pipeline>>;
63
+ /** Retry a failed gate. Reactivates pipeline. */
64
+ retryGate(pipelineId: PipelineId, gateId: GateId): Promise<Result<Pipeline>>;
65
+ /** Activate a pipeline (draft -> active). */
66
+ activatePipeline(pipelineId: PipelineId): Promise<Result<Pipeline>>;
67
+ /** Cancel a pipeline. */
68
+ cancelPipeline(pipelineId: PipelineId): Promise<Result<Pipeline>>;
69
+ /** Retry a failed pipeline. */
70
+ retryPipeline(pipelineId: PipelineId): Promise<Result<Pipeline>>;
71
+ /**
72
+ * Load-mutate-save pattern.
73
+ * Loads pipeline, applies mutation, saves, returns result.
74
+ */
75
+ private withPipeline;
76
+ }
77
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/domain/pipeline/services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,EACL,UAAU,EACV,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,MAAM,EAGP,MAAM,oBAAoB,CAAC;AAI5B,wCAAwC;AACxC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,YAAY,EAAE,kBAAkB,EAChC,YAAY,EAAE,0BAA0B;IAG3D;;;;;;;;OAQG;IACG,MAAM,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CA8DxE;AAID;;;;;;GAMG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,kBAAkB;IAE7D,2DAA2D;IACrD,SAAS,CACb,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B,mEAAmE;IAC7D,QAAQ,CACZ,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B,mDAAmD;IAC7C,QAAQ,CACZ,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B,qDAAqD;IAC/C,QAAQ,CACZ,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B,iDAAiD;IAC3C,SAAS,CACb,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B,6CAA6C;IACvC,gBAAgB,CACpB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B,yBAAyB;IACnB,cAAc,CAClB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B,+BAA+B;IACzB,aAAa,CACjB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAM5B;;;OAGG;YACW,YAAY;CAkB3B"}
@@ -0,0 +1,156 @@
1
+ /**
2
+ * Pipeline Domain — Domain Services
3
+ *
4
+ * Stateless services that orchestrate cross-entity business logic.
5
+ * PipelineFactory: creates pipelines from templates.
6
+ * GateEnforcer: validates gate transitions with full context.
7
+ *
8
+ * SOLID: SRP — each service has one responsibility
9
+ * DDD: Domain Service — logic that doesn't belong to a single entity
10
+ */
11
+ import { ok, fail } from "../shared/value-objects.js";
12
+ import { Gate } from "./gate.js";
13
+ import { Pipeline } from "./pipeline.js";
14
+ import { PipelineId, GateId, DaggerFunctionRef, SemanticVersion, } from "./value-objects.js";
15
+ /**
16
+ * PipelineFactory — creates Pipeline aggregates from templates.
17
+ *
18
+ * Loads template configuration, generates gates in order,
19
+ * assigns IDs, and returns a fully-formed Pipeline in draft status.
20
+ */
21
+ export class PipelineFactory {
22
+ pipelineRepo;
23
+ templateRepo;
24
+ constructor(pipelineRepo, templateRepo) {
25
+ this.pipelineRepo = pipelineRepo;
26
+ this.templateRepo = templateRepo;
27
+ }
28
+ /**
29
+ * Create a new pipeline from a template.
30
+ *
31
+ * 1. Validates the template exists
32
+ * 2. Parses and validates the version string
33
+ * 3. Generates a pipeline ID
34
+ * 4. Creates gates from template config
35
+ * 5. Returns a Pipeline in draft status
36
+ */
37
+ async create(request) {
38
+ try {
39
+ // 1. Load template
40
+ const template = await this.templateRepo.getTemplate(request.stack, request.scope);
41
+ if (!template) {
42
+ return fail(`No template found for stack "${request.stack}" with scope "${request.scope}"`);
43
+ }
44
+ // 2. Parse version
45
+ let version;
46
+ try {
47
+ version = SemanticVersion.parse(request.version);
48
+ }
49
+ catch (e) {
50
+ const message = e instanceof Error ? e.message : String(e);
51
+ return fail(`Invalid version: ${message}`);
52
+ }
53
+ // 3. Generate pipeline ID
54
+ const sequence = await this.pipelineRepo.nextSequence(request.workspaceId);
55
+ const pipelineId = PipelineId.create(sequence);
56
+ // 4. Create gates from template
57
+ const gates = [];
58
+ for (let i = 0; i < template.gates.length; i++) {
59
+ const gateConfig = template.gates[i];
60
+ const gateId = GateId.create(i + 1);
61
+ const daggerFn = DaggerFunctionRef.create(gateConfig.daggerFunction);
62
+ const gate = Gate.create(gateId, gateConfig.type, i, daggerFn, gateConfig.skipPolicy, gateConfig.command);
63
+ gates.push(gate);
64
+ }
65
+ // 5. Create pipeline
66
+ const pipeline = Pipeline.create(pipelineId, request.workspaceId, request.stack, request.scope, version, gates, request.cardId);
67
+ return ok(pipeline);
68
+ }
69
+ catch (e) {
70
+ const message = e instanceof Error ? e.message : String(e);
71
+ return fail(`Failed to create pipeline: ${message}`);
72
+ }
73
+ }
74
+ }
75
+ // ─── Gate Enforcer ────────────────────────────────────────────────────────────
76
+ /**
77
+ * GateEnforcer — validates and executes gate transitions.
78
+ *
79
+ * Provides a safe, Result-returning API for gate operations
80
+ * that wraps Pipeline entity methods (which throw on invariant violations).
81
+ * Handles the load-mutate-save cycle.
82
+ */
83
+ export class GateEnforcer {
84
+ pipelineRepo;
85
+ constructor(pipelineRepo) {
86
+ this.pipelineRepo = pipelineRepo;
87
+ }
88
+ /** Start a gate. Validates ordering and pipeline state. */
89
+ async startGate(pipelineId, gateId) {
90
+ return this.withPipeline(pipelineId, (pipeline) => {
91
+ pipeline.startGate(gateId);
92
+ });
93
+ }
94
+ /** Pass a gate with optional output. May complete the pipeline. */
95
+ async passGate(pipelineId, gateId, output) {
96
+ return this.withPipeline(pipelineId, (pipeline) => {
97
+ pipeline.passGate(gateId, output);
98
+ });
99
+ }
100
+ /** Fail a gate. Transitions pipeline to failed. */
101
+ async failGate(pipelineId, gateId, output) {
102
+ return this.withPipeline(pipelineId, (pipeline) => {
103
+ pipeline.failGate(gateId, output);
104
+ });
105
+ }
106
+ /** Skip a gate with reason and optional approval. */
107
+ async skipGate(pipelineId, gateId, reason, approvedBy) {
108
+ return this.withPipeline(pipelineId, (pipeline) => {
109
+ pipeline.skipGate(gateId, reason, approvedBy);
110
+ });
111
+ }
112
+ /** Retry a failed gate. Reactivates pipeline. */
113
+ async retryGate(pipelineId, gateId) {
114
+ return this.withPipeline(pipelineId, (pipeline) => {
115
+ pipeline.retryGate(gateId);
116
+ });
117
+ }
118
+ /** Activate a pipeline (draft -> active). */
119
+ async activatePipeline(pipelineId) {
120
+ return this.withPipeline(pipelineId, (pipeline) => {
121
+ pipeline.activate();
122
+ });
123
+ }
124
+ /** Cancel a pipeline. */
125
+ async cancelPipeline(pipelineId) {
126
+ return this.withPipeline(pipelineId, (pipeline) => {
127
+ pipeline.cancel();
128
+ });
129
+ }
130
+ /** Retry a failed pipeline. */
131
+ async retryPipeline(pipelineId) {
132
+ return this.withPipeline(pipelineId, (pipeline) => {
133
+ pipeline.retry();
134
+ });
135
+ }
136
+ /**
137
+ * Load-mutate-save pattern.
138
+ * Loads pipeline, applies mutation, saves, returns result.
139
+ */
140
+ async withPipeline(pipelineId, mutation) {
141
+ try {
142
+ const pipeline = await this.pipelineRepo.findById(pipelineId);
143
+ if (!pipeline) {
144
+ return fail(`Pipeline ${pipelineId} not found`);
145
+ }
146
+ mutation(pipeline);
147
+ await this.pipelineRepo.save(pipeline);
148
+ return ok(pipeline);
149
+ }
150
+ catch (e) {
151
+ const message = e instanceof Error ? e.message : String(e);
152
+ return fail(message);
153
+ }
154
+ }
155
+ }
156
+ //# sourceMappingURL=services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.js","sourceRoot":"","sources":["../../../src/domain/pipeline/services.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EACL,UAAU,EAGV,MAAM,EACN,iBAAiB,EACjB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAa5B;;;;;GAKG;AACH,MAAM,OAAO,eAAe;IAEP;IACA;IAFnB,YACmB,YAAgC,EAChC,YAAwC;QADxC,iBAAY,GAAZ,YAAY,CAAoB;QAChC,iBAAY,GAAZ,YAAY,CAA4B;IACxD,CAAC;IAEJ;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CAAC,OAA8B;QACzC,IAAI,CAAC;YACH,mBAAmB;YACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC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,EAAE,CAAC,QAAQ,EAAE,EAAE;YAChD,QAAQ,CAAC,KAAK,EAAE,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,YAAY,CACxB,UAAsB,EACtB,QAAsC;QAEtC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;YAC9D,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACd,OAAO,IAAI,CAAC,YAAY,UAAU,YAAY,CAAC,CAAC;YAClD,CAAC;YAED,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACnB,MAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;QACtB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,OAAO,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Pipeline Domain — Value Objects
3
+ *
4
+ * Identifiers, enums, and constrained types for the pipeline bounded context.
5
+ * All value objects are immutable with value-based equality.
6
+ *
7
+ * SOLID: SRP — each type models a single domain concept
8
+ * DDD: Value Objects compared by value, no identity of their own
9
+ */
10
+ import { EntityId } from "../shared/value-objects.js";
11
+ /** Pipeline aggregate root identifier (format: PL-NNN). */
12
+ export declare class PipelineId extends EntityId {
13
+ private constructor();
14
+ static create(sequence: number): PipelineId;
15
+ static from(value: string): PipelineId;
16
+ get sequence(): number;
17
+ }
18
+ /** Gate child entity identifier (format: GT-NNN). */
19
+ export declare class GateId extends EntityId {
20
+ private constructor();
21
+ static create(sequence: number): GateId;
22
+ static from(value: string): GateId;
23
+ get sequence(): number;
24
+ }
25
+ /** Ordered gate types representing pipeline stages. */
26
+ export declare const GATE_TYPES: readonly ["analyze", "lint", "test", "build", "tag", "publish", "deploy"];
27
+ export type GateType = (typeof GATE_TYPES)[number];
28
+ /** Gate types included in branch (CI) pipelines. */
29
+ export declare const BRANCH_GATE_TYPES: readonly GateType[];
30
+ /** Gate types included in release (CD) pipelines. */
31
+ export declare const RELEASE_GATE_TYPES: readonly GateType[];
32
+ /**
33
+ * Returns the ordinal position of a gate type.
34
+ * Used to enforce sequential gate progression.
35
+ */
36
+ export declare function gateTypeOrder(type: GateType): number;
37
+ export declare function isValidGateType(value: string): value is GateType;
38
+ export declare const GATE_STATUSES: readonly ["pending", "running", "passed", "failed", "skipped"];
39
+ export type GateStatus = (typeof GATE_STATUSES)[number];
40
+ /** Valid gate status transitions. */
41
+ export declare const GATE_TRANSITIONS: Record<GateStatus, readonly GateStatus[]>;
42
+ export declare function isTerminalGateStatus(status: GateStatus): boolean;
43
+ export declare function isSuccessGateStatus(status: GateStatus): boolean;
44
+ export declare const PIPELINE_STATUSES: readonly ["draft", "active", "completed", "failed", "cancelled"];
45
+ export type PipelineStatus = (typeof PIPELINE_STATUSES)[number];
46
+ /** Valid pipeline status transitions. */
47
+ export declare const PIPELINE_TRANSITIONS: Record<PipelineStatus, readonly PipelineStatus[]>;
48
+ export declare function isTerminalPipelineStatus(status: PipelineStatus): boolean;
49
+ export declare const PIPELINE_SCOPES: readonly ["branch", "release"];
50
+ export type PipelineScope = (typeof PIPELINE_SCOPES)[number];
51
+ export declare function isValidPipelineScope(value: string): value is PipelineScope;
52
+ export declare const SKIP_POLICIES: readonly ["blocked", "justification", "approval_required"];
53
+ export type SkipPolicy = (typeof SKIP_POLICIES)[number];
54
+ export declare function isValidSkipPolicy(value: string): value is SkipPolicy;
55
+ export declare const STACK_TEMPLATES: readonly ["typescript-lib", "typescript-app", "python-lib", "python-app", "swift-ios", "csharp-app", "kotlin-android", "generic"];
56
+ export type StackTemplate = (typeof STACK_TEMPLATES)[number];
57
+ export declare function isValidStackTemplate(value: string): value is StackTemplate;
58
+ /**
59
+ * A validated reference to a Dagger function.
60
+ * Format: lowercase letters, digits, hyphens (e.g., "lint", "run-tests", "build-image").
61
+ */
62
+ export declare class DaggerFunctionRef {
63
+ readonly value: string;
64
+ private static readonly PATTERN;
65
+ private static readonly MAX_LENGTH;
66
+ private constructor();
67
+ static create(ref: string): DaggerFunctionRef;
68
+ static from(value: string): DaggerFunctionRef;
69
+ equals(other: DaggerFunctionRef): boolean;
70
+ toString(): string;
71
+ }
72
+ /**
73
+ * Semantic version value object (major.minor.patch).
74
+ * Immutable, validated, with comparison support.
75
+ */
76
+ export declare class SemanticVersion {
77
+ readonly major: number;
78
+ readonly minor: number;
79
+ readonly patch: number;
80
+ private static readonly PATTERN;
81
+ private constructor();
82
+ static create(major: number, minor: number, patch: number): SemanticVersion;
83
+ static parse(version: string): SemanticVersion;
84
+ static from(value: string): SemanticVersion;
85
+ /** Compare: returns -1, 0, or 1. */
86
+ compareTo(other: SemanticVersion): number;
87
+ isGreaterThan(other: SemanticVersion): boolean;
88
+ equals(other: SemanticVersion): boolean;
89
+ bumpMajor(): SemanticVersion;
90
+ bumpMinor(): SemanticVersion;
91
+ bumpPatch(): SemanticVersion;
92
+ toString(): string;
93
+ }
94
+ /**
95
+ * Bounded-length execution output from a gate run.
96
+ * Truncates to max length to prevent unbounded storage.
97
+ */
98
+ export declare class GateOutput {
99
+ readonly value: string;
100
+ static readonly MAX_LENGTH = 10000;
101
+ private constructor();
102
+ static create(output: string): GateOutput;
103
+ static from(value: string): GateOutput;
104
+ equals(other: GateOutput): boolean;
105
+ toString(): string;
106
+ }
107
+ /**
108
+ * Default skip policies for each gate type.
109
+ * Can be overridden per pipeline template.
110
+ */
111
+ export declare const DEFAULT_SKIP_POLICIES: Record<GateType, SkipPolicy>;
112
+ /**
113
+ * Default Dagger function names for each gate type.
114
+ * Infrastructure maps these to actual Dagger module functions.
115
+ */
116
+ export declare const DEFAULT_DAGGER_FUNCTIONS: Record<GateType, string>;
117
+ //# sourceMappingURL=value-objects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-objects.d.ts","sourceRoot":"","sources":["../../../src/domain/pipeline/value-objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAItD,2DAA2D;AAC3D,qBAAa,UAAW,SAAQ,QAAQ;IACtC,OAAO;IAIP,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU;IAO3C,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU;IAItC,IAAI,QAAQ,IAAI,MAAM,CAGrB;CACF;AAED,qDAAqD;AACrD,qBAAa,MAAO,SAAQ,QAAQ;IAClC,OAAO;IAIP,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAOvC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIlC,IAAI,QAAQ,IAAI,MAAM,CAGrB;CACF;AAID,uDAAuD;AACvD,eAAO,MAAM,UAAU,2EAQb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,oDAAoD;AACpD,eAAO,MAAM,iBAAiB,EAAE,SAAS,QAAQ,EAKhD,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,kBAAkB,EAAE,SAAS,QAAQ,EAAoB,CAAC;AAEvE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAEpD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAEhE;AAID,eAAO,MAAM,aAAa,gEAMhB,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAA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