@mc1global/opencode-jarvis 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) 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/index.d.ts.map +1 -1
  190. package/dist/index.js +113 -75
  191. package/dist/index.js.map +1 -1
  192. package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts +29 -0
  193. package/dist/infrastructure/agent-registry/agent-profile-repository.d.ts.map +1 -0
  194. package/dist/infrastructure/agent-registry/agent-profile-repository.js +109 -0
  195. package/dist/infrastructure/agent-registry/agent-profile-repository.js.map +1 -0
  196. package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts +28 -0
  197. package/dist/infrastructure/agent-registry/agent-session-adapter.d.ts.map +1 -0
  198. package/dist/infrastructure/agent-registry/agent-session-adapter.js +61 -0
  199. package/dist/infrastructure/agent-registry/agent-session-adapter.js.map +1 -0
  200. package/dist/infrastructure/agent-registry/built-in-profiles.d.ts +19 -0
  201. package/dist/infrastructure/agent-registry/built-in-profiles.d.ts.map +1 -0
  202. package/dist/infrastructure/agent-registry/built-in-profiles.js +210 -0
  203. package/dist/infrastructure/agent-registry/built-in-profiles.js.map +1 -0
  204. package/dist/infrastructure/azure-sync/azure-auth.d.ts +40 -0
  205. package/dist/infrastructure/azure-sync/azure-auth.d.ts.map +1 -0
  206. package/dist/infrastructure/azure-sync/azure-auth.js +94 -0
  207. package/dist/infrastructure/azure-sync/azure-auth.js.map +1 -0
  208. package/dist/infrastructure/azure-sync/azure-devops-client.d.ts +43 -0
  209. package/dist/infrastructure/azure-sync/azure-devops-client.d.ts.map +1 -0
  210. package/dist/infrastructure/azure-sync/azure-devops-client.js +296 -0
  211. package/dist/infrastructure/azure-sync/azure-devops-client.js.map +1 -0
  212. package/dist/infrastructure/azure-sync/index.d.ts +9 -0
  213. package/dist/infrastructure/azure-sync/index.d.ts.map +1 -0
  214. package/dist/infrastructure/azure-sync/index.js +12 -0
  215. package/dist/infrastructure/azure-sync/index.js.map +1 -0
  216. package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts +39 -0
  217. package/dist/infrastructure/azure-sync/sqlite-sync-repository.d.ts.map +1 -0
  218. package/dist/infrastructure/azure-sync/sqlite-sync-repository.js +202 -0
  219. package/dist/infrastructure/azure-sync/sqlite-sync-repository.js.map +1 -0
  220. package/dist/infrastructure/config/index.d.ts +5 -0
  221. package/dist/infrastructure/config/index.d.ts.map +1 -0
  222. package/dist/infrastructure/config/index.js +5 -0
  223. package/dist/infrastructure/config/index.js.map +1 -0
  224. package/dist/infrastructure/config/yaml-config-repository.d.ts +22 -0
  225. package/dist/infrastructure/config/yaml-config-repository.d.ts.map +1 -0
  226. package/dist/infrastructure/config/yaml-config-repository.js +68 -0
  227. package/dist/infrastructure/config/yaml-config-repository.js.map +1 -0
  228. package/dist/infrastructure/database/sqlite-adapter.d.ts +13 -15
  229. package/dist/infrastructure/database/sqlite-adapter.d.ts.map +1 -1
  230. package/dist/infrastructure/database/sqlite-adapter.js +31 -17
  231. package/dist/infrastructure/database/sqlite-adapter.js.map +1 -1
  232. package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts +21 -0
  233. package/dist/infrastructure/domain-map/llm-prompt-factory.d.ts.map +1 -0
  234. package/dist/infrastructure/domain-map/llm-prompt-factory.js +49 -0
  235. package/dist/infrastructure/domain-map/llm-prompt-factory.js.map +1 -0
  236. package/dist/infrastructure/kanban/card-repository.d.ts +6 -0
  237. package/dist/infrastructure/kanban/card-repository.d.ts.map +1 -1
  238. package/dist/infrastructure/kanban/card-repository.js +79 -7
  239. package/dist/infrastructure/kanban/card-repository.js.map +1 -1
  240. package/dist/infrastructure/pipeline/dagger-adapter.d.ts +50 -0
  241. package/dist/infrastructure/pipeline/dagger-adapter.d.ts.map +1 -0
  242. package/dist/infrastructure/pipeline/dagger-adapter.js +153 -0
  243. package/dist/infrastructure/pipeline/dagger-adapter.js.map +1 -0
  244. package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts +35 -0
  245. package/dist/infrastructure/pipeline/dagger-scaffold-generator.d.ts.map +1 -0
  246. package/dist/infrastructure/pipeline/dagger-scaffold-generator.js +132 -0
  247. package/dist/infrastructure/pipeline/dagger-scaffold-generator.js.map +1 -0
  248. package/dist/infrastructure/pipeline/index.d.ts +20 -0
  249. package/dist/infrastructure/pipeline/index.d.ts.map +1 -0
  250. package/dist/infrastructure/pipeline/index.js +19 -0
  251. package/dist/infrastructure/pipeline/index.js.map +1 -0
  252. package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts +23 -0
  253. package/dist/infrastructure/pipeline/pipeline-template-registry.d.ts.map +1 -0
  254. package/dist/infrastructure/pipeline/pipeline-template-registry.js +63 -0
  255. package/dist/infrastructure/pipeline/pipeline-template-registry.js.map +1 -0
  256. package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts +17 -0
  257. package/dist/infrastructure/pipeline/scaffold-templates-extra.d.ts.map +1 -0
  258. package/dist/infrastructure/pipeline/scaffold-templates-extra.js +467 -0
  259. package/dist/infrastructure/pipeline/scaffold-templates-extra.js.map +1 -0
  260. package/dist/infrastructure/pipeline/scaffold-templates.d.ts +23 -0
  261. package/dist/infrastructure/pipeline/scaffold-templates.d.ts.map +1 -0
  262. package/dist/infrastructure/pipeline/scaffold-templates.js +476 -0
  263. package/dist/infrastructure/pipeline/scaffold-templates.js.map +1 -0
  264. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts +32 -0
  265. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.d.ts.map +1 -0
  266. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js +197 -0
  267. package/dist/infrastructure/pipeline/sqlite-pipeline-repository.js.map +1 -0
  268. package/dist/mcp-server.d.ts +3 -0
  269. package/dist/mcp-server.d.ts.map +1 -0
  270. package/dist/mcp-server.js +300 -0
  271. package/dist/mcp-server.js.map +1 -0
  272. package/dist/tools/agent-registry-tools.d.ts +11 -0
  273. package/dist/tools/agent-registry-tools.d.ts.map +1 -0
  274. package/dist/tools/agent-registry-tools.js +208 -0
  275. package/dist/tools/agent-registry-tools.js.map +1 -0
  276. package/dist/tools/azure-sync-tools.d.ts +15 -0
  277. package/dist/tools/azure-sync-tools.d.ts.map +1 -0
  278. package/dist/tools/azure-sync-tools.js +332 -0
  279. package/dist/tools/azure-sync-tools.js.map +1 -0
  280. package/dist/tools/kanban-card-tools.d.ts.map +1 -1
  281. package/dist/tools/kanban-card-tools.js +41 -16
  282. package/dist/tools/kanban-card-tools.js.map +1 -1
  283. package/dist/tools/kanban-gate-tools.d.ts +7 -0
  284. package/dist/tools/kanban-gate-tools.d.ts.map +1 -0
  285. package/dist/tools/kanban-gate-tools.js +106 -0
  286. package/dist/tools/kanban-gate-tools.js.map +1 -0
  287. package/dist/tools/kanban-grooming-tools.d.ts +7 -0
  288. package/dist/tools/kanban-grooming-tools.d.ts.map +1 -0
  289. package/dist/tools/kanban-grooming-tools.js +180 -0
  290. package/dist/tools/kanban-grooming-tools.js.map +1 -0
  291. package/dist/tools/pipeline-tools.d.ts +15 -0
  292. package/dist/tools/pipeline-tools.d.ts.map +1 -0
  293. package/dist/tools/pipeline-tools.js +424 -0
  294. package/dist/tools/pipeline-tools.js.map +1 -0
  295. package/package.json +9 -3
@@ -0,0 +1,153 @@
1
+ import { ok, fail } from "../../domain/shared/value-objects.js";
2
+ // ─── Default Shell Executor (child_process) ──────────────────────────────────
3
+ /**
4
+ * Default shell executor using Node.js/Bun child_process.
5
+ * Spawns processes with timeout support.
6
+ */
7
+ export class ChildProcessExecutor {
8
+ async exec(command, args, options) {
9
+ const { spawn } = await import("child_process");
10
+ return new Promise((resolve) => {
11
+ const child = spawn(command, [...args], {
12
+ cwd: options.cwd,
13
+ env: { ...process.env, ...options.env },
14
+ stdio: ["ignore", "pipe", "pipe"],
15
+ });
16
+ let stdout = "";
17
+ let stderr = "";
18
+ child.stdout.on("data", (data) => {
19
+ stdout += data.toString();
20
+ });
21
+ child.stderr.on("data", (data) => {
22
+ stderr += data.toString();
23
+ });
24
+ let timedOut = false;
25
+ let timer;
26
+ if (options.timeoutMs !== undefined && options.timeoutMs > 0) {
27
+ timer = setTimeout(() => {
28
+ timedOut = true;
29
+ child.kill("SIGTERM");
30
+ }, options.timeoutMs);
31
+ }
32
+ child.on("close", (code) => {
33
+ if (timer !== undefined)
34
+ clearTimeout(timer);
35
+ if (timedOut) {
36
+ resolve({
37
+ stdout,
38
+ stderr: stderr + "\n[TIMEOUT] Process killed after timeout",
39
+ exitCode: 124, // Standard timeout exit code
40
+ });
41
+ }
42
+ else {
43
+ resolve({
44
+ stdout,
45
+ stderr,
46
+ exitCode: code ?? 1,
47
+ });
48
+ }
49
+ });
50
+ child.on("error", (err) => {
51
+ if (timer !== undefined)
52
+ clearTimeout(timer);
53
+ resolve({
54
+ stdout: "",
55
+ stderr: err.message,
56
+ exitCode: 127, // Command not found
57
+ });
58
+ });
59
+ });
60
+ }
61
+ }
62
+ // ─── Dagger Adapter ──────────────────────────────────────────────────────────
63
+ /** Default timeout for Dagger operations (5 minutes). */
64
+ const DEFAULT_TIMEOUT_MS = 300_000;
65
+ /** Default timeout for environment checks (10 seconds). */
66
+ const CHECK_TIMEOUT_MS = 10_000;
67
+ export class DaggerCliAdapter {
68
+ shell;
69
+ constructor(shell) {
70
+ this.shell = shell ?? new ChildProcessExecutor();
71
+ }
72
+ async checkEnvironment() {
73
+ // Check Dagger CLI
74
+ const daggerResult = await this.shell.exec("dagger", ["version"], { timeoutMs: CHECK_TIMEOUT_MS });
75
+ const daggerAvailable = daggerResult.exitCode === 0;
76
+ const daggerVersion = daggerAvailable
77
+ ? this.parseDaggerVersion(daggerResult.stdout)
78
+ : undefined;
79
+ // Check container runtime
80
+ const runtime = await this.detectContainerRuntime();
81
+ return {
82
+ daggerAvailable,
83
+ ...(daggerVersion !== undefined ? { daggerVersion } : {}),
84
+ ...(runtime !== undefined ? { containerRuntime: runtime.type } : {}),
85
+ runtimeReady: runtime?.ready ?? false,
86
+ };
87
+ }
88
+ async run(request) {
89
+ // Pre-flight: check Dagger availability
90
+ const envCheck = await this.checkEnvironment();
91
+ if (!envCheck.daggerAvailable) {
92
+ return fail("Dagger CLI is not installed or not accessible. " +
93
+ "Install from https://docs.dagger.io/install");
94
+ }
95
+ if (!envCheck.runtimeReady) {
96
+ return fail("No container runtime is available. " +
97
+ "Ensure Docker Desktop or compatible runtime is running.");
98
+ }
99
+ // Build command arguments
100
+ const args = this.buildRunArgs(request);
101
+ const timeoutMs = request.timeoutMs ?? DEFAULT_TIMEOUT_MS;
102
+ const startTime = Date.now();
103
+ const result = await this.shell.exec("dagger", args, {
104
+ cwd: request.moduleDir,
105
+ timeoutMs,
106
+ });
107
+ const durationMs = Date.now() - startTime;
108
+ const output = [result.stdout, result.stderr]
109
+ .filter((s) => s.length > 0)
110
+ .join("\n");
111
+ const runResult = {
112
+ success: result.exitCode === 0,
113
+ output,
114
+ exitCode: result.exitCode,
115
+ durationMs,
116
+ };
117
+ return ok(runResult);
118
+ }
119
+ // ─── Private Helpers ─────────────────────────────────────────────────
120
+ buildRunArgs(request) {
121
+ const args = ["call", request.functionName];
122
+ if (request.args) {
123
+ args.push(...request.args);
124
+ }
125
+ return args;
126
+ }
127
+ parseDaggerVersion(stdout) {
128
+ // Dagger version output format: "dagger v0.15.1 (registry.dagger.io/engine) ..."
129
+ const match = /v?(\d+\.\d+\.\d+)/.exec(stdout);
130
+ return match?.[1];
131
+ }
132
+ async detectContainerRuntime() {
133
+ // Try Docker first (most common)
134
+ const dockerResult = await this.shell.exec("docker", ["info", "--format", "{{.ServerVersion}}"], { timeoutMs: CHECK_TIMEOUT_MS });
135
+ if (dockerResult.exitCode === 0) {
136
+ return { type: "docker", ready: true };
137
+ }
138
+ // Docker installed but daemon not running
139
+ if (dockerResult.exitCode !== 127) {
140
+ return { type: "docker", ready: false };
141
+ }
142
+ // Try Apple Container (macOS Swift/Xcode workflows)
143
+ const containerResult = await this.shell.exec("container", ["--version"], { timeoutMs: CHECK_TIMEOUT_MS });
144
+ if (containerResult.exitCode === 0) {
145
+ return { type: "apple-container", ready: true };
146
+ }
147
+ if (containerResult.exitCode !== 127) {
148
+ return { type: "apple-container", ready: false };
149
+ }
150
+ return undefined;
151
+ }
152
+ }
153
+ //# sourceMappingURL=dagger-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dagger-adapter.js","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/dagger-adapter.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AA4BhE,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAC/B,KAAK,CAAC,IAAI,CACR,OAAe,EACf,IAAuB,EACvB,OAAyB;QAEzB,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,CAAC;QAEhD,OAAO,IAAI,OAAO,CAAkB,CAAC,OAAO,EAAE,EAAE;YAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE;gBACtC,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;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B,EAAE,CAChC,CAAC;QAEF,IAAI,eAAe,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnC,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAClD,CAAC;QAED,IAAI,eAAe,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;YACrC,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACnD,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Dagger Scaffold Generator
3
+ *
4
+ * Generates Dagger module scaffold files for supported stack templates.
5
+ * Each stack produces a complete set of files (.dagger/dagger.json,
6
+ * .dagger/src/index.ts or .dagger/src/{name}/main.py) with real CI/CD
7
+ * functions that match the gate-to-function mapping in the template registry.
8
+ *
9
+ * Template source content is in scaffold-templates.ts (SRP split).
10
+ *
11
+ * SOLID: SRP — scaffold generation orchestration only
12
+ * SOLID: OCP — new stacks added by extending the generator map
13
+ * SOLID: DIP — implements domain ScaffoldPort interface
14
+ */
15
+ import type { ScaffoldPort, ScaffoldOutput } from "../../domain/pipeline/ports.js";
16
+ /**
17
+ * Dagger scaffold generator for TypeScript and Python stacks.
18
+ *
19
+ * Generates complete Dagger module files with real CI/CD functions
20
+ * that match the gate-to-function mapping in the template registry.
21
+ * Function names use the stack prefix (e.g., "typescript-lib-lint"
22
+ * becomes "typescriptLibLint" in TS or "typescript_lib_lint" in Python).
23
+ */
24
+ export declare class DaggerScaffoldGenerator implements ScaffoldPort {
25
+ /** Generate scaffold files for a supported stack. */
26
+ generate(stack: string): ScaffoldOutput | undefined;
27
+ /** List all stacks with scaffold support. */
28
+ supportedStacks(): readonly string[];
29
+ private buildScaffold;
30
+ private getSdk;
31
+ private generateFiles;
32
+ private getTypescriptSource;
33
+ private getPythonSource;
34
+ }
35
+ //# sourceMappingURL=dagger-scaffold-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dagger-scaffold-generator.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/dagger-scaffold-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EAEf,MAAM,gCAAgC,CAAC;AAoDxC;;;;;;;GAOG;AACH,qBAAa,uBAAwB,YAAW,YAAY;IAC1D,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAOnD,6CAA6C;IAC7C,eAAe,IAAI,SAAS,MAAM,EAAE;IAMpC,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,aAAa;IAmCrB,OAAO,CAAC,mBAAmB;IAmB3B,OAAO,CAAC,eAAe;CAUxB"}
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Dagger Scaffold Generator
3
+ *
4
+ * Generates Dagger module scaffold files for supported stack templates.
5
+ * Each stack produces a complete set of files (.dagger/dagger.json,
6
+ * .dagger/src/index.ts or .dagger/src/{name}/main.py) with real CI/CD
7
+ * functions that match the gate-to-function mapping in the template registry.
8
+ *
9
+ * Template source content is in scaffold-templates.ts (SRP split).
10
+ *
11
+ * SOLID: SRP — scaffold generation orchestration only
12
+ * SOLID: OCP — new stacks added by extending the generator map
13
+ * SOLID: DIP — implements domain ScaffoldPort interface
14
+ */
15
+ import { typescriptLibSource, typescriptAppSource, pythonLibSource, pythonAppSource, } from "./scaffold-templates.js";
16
+ import { swiftIosSource, csharpAppSource, kotlinAndroidSource, genericSource, } from "./scaffold-templates-extra.js";
17
+ // ─── Supported Stacks ────────────────────────────────────────────────────────
18
+ const SUPPORTED_STACKS = [
19
+ "typescript-lib",
20
+ "typescript-app",
21
+ "python-lib",
22
+ "python-app",
23
+ "swift-ios",
24
+ "csharp-app",
25
+ "kotlin-android",
26
+ "generic",
27
+ ];
28
+ function isSupportedStack(stack) {
29
+ return SUPPORTED_STACKS.includes(stack);
30
+ }
31
+ // ─── Dagger JSON Generator ───────────────────────────────────────────────────
32
+ /**
33
+ * Generate dagger.json module configuration.
34
+ */
35
+ function daggerJson(name, sdk) {
36
+ return JSON.stringify({
37
+ name,
38
+ sdk,
39
+ engineVersion: "v0.18.5",
40
+ }, null, 2);
41
+ }
42
+ // ─── Generator Implementation ────────────────────────────────────────────────
43
+ /**
44
+ * Dagger scaffold generator for TypeScript and Python stacks.
45
+ *
46
+ * Generates complete Dagger module files with real CI/CD functions
47
+ * that match the gate-to-function mapping in the template registry.
48
+ * Function names use the stack prefix (e.g., "typescript-lib-lint"
49
+ * becomes "typescriptLibLint" in TS or "typescript_lib_lint" in Python).
50
+ */
51
+ export class DaggerScaffoldGenerator {
52
+ /** Generate scaffold files for a supported stack. */
53
+ generate(stack) {
54
+ if (!isSupportedStack(stack)) {
55
+ return undefined;
56
+ }
57
+ return this.buildScaffold(stack);
58
+ }
59
+ /** List all stacks with scaffold support. */
60
+ supportedStacks() {
61
+ return [...SUPPORTED_STACKS];
62
+ }
63
+ // ─── Private ─────────────────────────────────────────────────────────
64
+ buildScaffold(stack) {
65
+ const sdk = this.getSdk(stack);
66
+ const moduleName = stack;
67
+ const files = this.generateFiles(stack, sdk, moduleName);
68
+ return { stack, sdk, moduleName, files };
69
+ }
70
+ getSdk(stack) {
71
+ if (stack.startsWith("python"))
72
+ return "python";
73
+ return "typescript";
74
+ }
75
+ generateFiles(stack, sdk, moduleName) {
76
+ const files = [];
77
+ // dagger.json (always first)
78
+ files.push({
79
+ path: ".dagger/dagger.json",
80
+ content: daggerJson(moduleName, sdk),
81
+ });
82
+ // Source file(s)
83
+ if (sdk === "typescript") {
84
+ files.push({
85
+ path: ".dagger/src/index.ts",
86
+ content: this.getTypescriptSource(stack),
87
+ });
88
+ }
89
+ else {
90
+ const pyModule = moduleName.replace(/-/g, "_");
91
+ files.push({
92
+ path: `.dagger/src/${pyModule}/main.py`,
93
+ content: this.getPythonSource(stack),
94
+ });
95
+ // Python __init__.py
96
+ files.push({
97
+ path: `.dagger/src/${pyModule}/__init__.py`,
98
+ content: "",
99
+ });
100
+ }
101
+ return files;
102
+ }
103
+ getTypescriptSource(stack) {
104
+ switch (stack) {
105
+ case "typescript-lib":
106
+ return typescriptLibSource(stack);
107
+ case "typescript-app":
108
+ return typescriptAppSource(stack);
109
+ case "swift-ios":
110
+ return swiftIosSource(stack);
111
+ case "csharp-app":
112
+ return csharpAppSource(stack);
113
+ case "kotlin-android":
114
+ return kotlinAndroidSource(stack);
115
+ case "generic":
116
+ return genericSource(stack);
117
+ default:
118
+ throw new Error(`No TypeScript source for stack: ${stack}`);
119
+ }
120
+ }
121
+ getPythonSource(stack) {
122
+ switch (stack) {
123
+ case "python-lib":
124
+ return pythonLibSource(stack);
125
+ case "python-app":
126
+ return pythonAppSource(stack);
127
+ default:
128
+ throw new Error(`No Python source for stack: ${stack}`);
129
+ }
130
+ }
131
+ }
132
+ //# sourceMappingURL=dagger-scaffold-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dagger-scaffold-generator.js","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/dagger-scaffold-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,eAAe,GAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,MAAM,+BAA+B,CAAC;AAEvC,gFAAgF;AAEhF,MAAM,gBAAgB,GAAG;IACvB,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,SAAS;CACD,CAAC;AAIX,SAAS,gBAAgB,CAAC,KAAa;IACrC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAuB,CAAC,CAAC;AAC5D,CAAC;AAED,gFAAgF;AAEhF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AAC;YAChC,KAAK,YAAY;gBACf,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;YAChC;gBACE,MAAM,IAAI,KAAK,CAAC,+BAA+B,KAAK,EAAE,CAAC,CAAC;QAC5D,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Pipeline Bounded Context — Infrastructure Layer
3
+ *
4
+ * Exports all infrastructure implementations for the pipeline context.
5
+ *
6
+ * Components:
7
+ * - SqlitePipelineRepository: SQLite persistence for Pipeline aggregate
8
+ * - InMemoryPipelineTemplateRegistry: Built-in template definitions
9
+ * - DaggerCliAdapter: Dagger CLI execution + runtime detection
10
+ * - DaggerScaffoldGenerator: Dagger module scaffold file generation
11
+ * - Scaffold Templates: TS/Python (scaffold-templates) + Swift/C#/Kotlin/Generic (scaffold-templates-extra)
12
+ */
13
+ export { SqlitePipelineRepository } from "./sqlite-pipeline-repository.js";
14
+ export { InMemoryPipelineTemplateRegistry } from "./pipeline-template-registry.js";
15
+ export { DaggerCliAdapter, ChildProcessExecutor, } from "./dagger-adapter.js";
16
+ export type { ShellExecutor, ShellExecOptions, ShellExecResult, } from "./dagger-adapter.js";
17
+ export { DaggerScaffoldGenerator } from "./dagger-scaffold-generator.js";
18
+ export { typescriptLibSource, typescriptAppSource, pythonLibSource, pythonAppSource, pascalCase, camelCase, snakeCase, } from "./scaffold-templates.js";
19
+ export { swiftIosSource, csharpAppSource, kotlinAndroidSource, genericSource, } from "./scaffold-templates-extra.js";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,EACV,SAAS,EACT,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Pipeline Bounded Context — Infrastructure Layer
3
+ *
4
+ * Exports all infrastructure implementations for the pipeline context.
5
+ *
6
+ * Components:
7
+ * - SqlitePipelineRepository: SQLite persistence for Pipeline aggregate
8
+ * - InMemoryPipelineTemplateRegistry: Built-in template definitions
9
+ * - DaggerCliAdapter: Dagger CLI execution + runtime detection
10
+ * - DaggerScaffoldGenerator: Dagger module scaffold file generation
11
+ * - Scaffold Templates: TS/Python (scaffold-templates) + Swift/C#/Kotlin/Generic (scaffold-templates-extra)
12
+ */
13
+ export { SqlitePipelineRepository } from "./sqlite-pipeline-repository.js";
14
+ export { InMemoryPipelineTemplateRegistry } from "./pipeline-template-registry.js";
15
+ export { DaggerCliAdapter, ChildProcessExecutor, } from "./dagger-adapter.js";
16
+ export { DaggerScaffoldGenerator } from "./dagger-scaffold-generator.js";
17
+ export { typescriptLibSource, typescriptAppSource, pythonLibSource, pythonAppSource, pascalCase, camelCase, snakeCase, } from "./scaffold-templates.js";
18
+ export { swiftIosSource, csharpAppSource, kotlinAndroidSource, genericSource, } from "./scaffold-templates-extra.js";
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EACL,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,EACV,SAAS,EACT,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,aAAa,GACd,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * In-Memory Pipeline Template Registry
3
+ *
4
+ * Implements PipelineTemplateRepository with static built-in templates.
5
+ * Each template defines the gate sequence for a stack+scope combination.
6
+ *
7
+ * Templates are readonly configuration data — no database persistence needed.
8
+ * Follows the same pattern as agent-registry/built-in-profiles.ts.
9
+ *
10
+ * SOLID: SRP — template lookup and listing only
11
+ * SOLID: OCP — new templates added by extending the registry data
12
+ * SOLID: DIP — implements domain interface
13
+ */
14
+ import type { PipelineTemplateRepository, PipelineTemplateConfig } from "../../domain/pipeline/repositories.js";
15
+ import type { StackTemplate, PipelineScope } from "../../domain/pipeline/value-objects.js";
16
+ export declare class InMemoryPipelineTemplateRegistry implements PipelineTemplateRepository {
17
+ private readonly templates;
18
+ constructor();
19
+ getTemplate(stack: StackTemplate, scope: PipelineScope): Promise<PipelineTemplateConfig | undefined>;
20
+ listTemplates(): Promise<readonly StackTemplate[]>;
21
+ hasTemplate(stack: StackTemplate): Promise<boolean>;
22
+ }
23
+ //# sourceMappingURL=pipeline-template-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-template-registry.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/pipeline-template-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EAEvB,MAAM,uCAAuC,CAAC;AAQ/C,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EAEd,MAAM,wCAAwC,CAAC;AA6DhD,qBAAa,gCACX,YAAW,0BAA0B;IAErC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8C;;IAMlE,WAAW,CACf,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAIxC,aAAa,IAAI,OAAO,CAAC,SAAS,aAAa,EAAE,CAAC;IAIlD,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC;CAI1D"}
@@ -0,0 +1,63 @@
1
+ import { BRANCH_GATE_TYPES, RELEASE_GATE_TYPES, STACK_TEMPLATES, DEFAULT_SKIP_POLICIES, DEFAULT_DAGGER_FUNCTIONS, } from "../../domain/pipeline/value-objects.js";
2
+ // ─── Template Key ────────────────────────────────────────────────────────────
3
+ /** Composite key for template lookup. */
4
+ function templateKey(stack, scope) {
5
+ return `${stack}:${scope}`;
6
+ }
7
+ // ─── Gate Template Builder ───────────────────────────────────────────────────
8
+ /**
9
+ * Build gate templates with a stack-specific Dagger function prefix.
10
+ * E.g., for typescript-lib: "lint" becomes "typescript-lib-lint".
11
+ */
12
+ function buildPrefixedGates(scope, prefix) {
13
+ const gateTypes = scope === "branch" ? BRANCH_GATE_TYPES : RELEASE_GATE_TYPES;
14
+ return gateTypes.map((type) => ({
15
+ type,
16
+ daggerFunction: `${prefix}-${DEFAULT_DAGGER_FUNCTIONS[type]}`,
17
+ skipPolicy: DEFAULT_SKIP_POLICIES[type],
18
+ }));
19
+ }
20
+ // ─── Built-in Templates ──────────────────────────────────────────────────────
21
+ /**
22
+ * Generate all built-in templates.
23
+ * Each stack gets a branch template (4 gates) and a release template (7 gates).
24
+ */
25
+ function buildBuiltInTemplates() {
26
+ const templates = new Map();
27
+ for (const stack of STACK_TEMPLATES) {
28
+ const prefix = stack; // Use stack name as Dagger function prefix
29
+ // Branch (CI) template
30
+ const branchConfig = {
31
+ stack,
32
+ scope: "branch",
33
+ gates: buildPrefixedGates("branch", prefix),
34
+ };
35
+ templates.set(templateKey(stack, "branch"), branchConfig);
36
+ // Release (CD) template
37
+ const releaseConfig = {
38
+ stack,
39
+ scope: "release",
40
+ gates: buildPrefixedGates("release", prefix),
41
+ };
42
+ templates.set(templateKey(stack, "release"), releaseConfig);
43
+ }
44
+ return templates;
45
+ }
46
+ // ─── Repository Implementation ───────────────────────────────────────────────
47
+ export class InMemoryPipelineTemplateRegistry {
48
+ templates;
49
+ constructor() {
50
+ this.templates = buildBuiltInTemplates();
51
+ }
52
+ async getTemplate(stack, scope) {
53
+ return this.templates.get(templateKey(stack, scope));
54
+ }
55
+ async listTemplates() {
56
+ return [...STACK_TEMPLATES];
57
+ }
58
+ async hasTemplate(stack) {
59
+ // Every stack has both branch and release templates
60
+ return this.templates.has(templateKey(stack, "branch"));
61
+ }
62
+ }
63
+ //# sourceMappingURL=pipeline-template-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-template-registry.js","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/pipeline-template-registry.ts"],"names":[],"mappings":"AAkBA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,wCAAwC,CAAC;AAOhD,gFAAgF;AAEhF,yCAAyC;AACzC,SAAS,WAAW,CAAC,KAAoB,EAAE,KAAoB;IAC7D,OAAO,GAAG,KAAK,IAAI,KAAK,EAAE,CAAC;AAC7B,CAAC;AAED,gFAAgF;AAEhF;;;GAGG;AACH,SAAS,kBAAkB,CACzB,KAAoB,EACpB,MAAc;IAEd,MAAM,SAAS,GAAG,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,CAAC;IAC9E,OAAO,SAAS,CAAC,GAAG,CAA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ACjB,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAAoB;QACpC,oDAAoD;QACpD,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC1D,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Dagger Module Scaffold Templates — Extra Stacks
3
+ *
4
+ * Swift, C#, Kotlin, and Generic scaffold content using TypeScript Dagger SDK.
5
+ * Each function generates platform-specific CI/CD gate functions.
6
+ *
7
+ * SOLID: SRP — template content only (no generation logic)
8
+ */
9
+ /** Swift iOS Dagger module (SwiftLint, xcodebuild, App Store Connect). */
10
+ export declare function swiftIosSource(prefix: string): string;
11
+ /** C# application Dagger module (dotnet format, dotnet test, dotnet publish). */
12
+ export declare function csharpAppSource(prefix: string): string;
13
+ /** Kotlin Android Dagger module (ktlint, Gradle test, Gradle build, Play Store). */
14
+ export declare function kotlinAndroidSource(prefix: string): string;
15
+ /** Generic Dagger module with configurable shell command placeholders. */
16
+ export declare function genericSource(prefix: string): string;
17
+ //# sourceMappingURL=scaffold-templates-extra.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaffold-templates-extra.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/pipeline/scaffold-templates-extra.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA+GrD;AAID,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAkHtD;AAID,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA8G1D;AAID,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CA8GpD"}