@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,66 @@
1
+ /**
2
+ * Agent Registry DTOs (Data Transfer Objects)
3
+ *
4
+ * Plain objects for crossing layer boundaries.
5
+ * Tools -> Use Cases (request DTOs), Use Cases -> Tools (response DTOs).
6
+ *
7
+ * SOLID: SRP - DTOs carry data, no logic
8
+ * DDD: Application layer boundary objects
9
+ */
10
+ export interface RegisterAgentRequest {
11
+ readonly id: string;
12
+ readonly displayName: string;
13
+ readonly role: string;
14
+ readonly systemPrompt: string;
15
+ readonly modelPrimary?: string;
16
+ readonly modelFallbacks?: readonly string[];
17
+ readonly capabilities?: readonly string[];
18
+ readonly allowedTools?: readonly string[];
19
+ }
20
+ export interface GetAgentProfileRequest {
21
+ readonly id: string;
22
+ }
23
+ export interface ListAgentsRequest {
24
+ readonly role?: string;
25
+ readonly status?: string;
26
+ }
27
+ export interface UpdateAgentRequest {
28
+ readonly id: string;
29
+ readonly displayName?: string;
30
+ readonly role?: string;
31
+ readonly systemPrompt?: string;
32
+ readonly modelPrimary?: string;
33
+ readonly modelFallbacks?: readonly string[];
34
+ readonly capabilities?: readonly string[];
35
+ readonly allowedTools?: readonly string[];
36
+ readonly activate?: boolean;
37
+ readonly deactivate?: boolean;
38
+ }
39
+ export interface DeleteAgentRequest {
40
+ readonly id: string;
41
+ }
42
+ export interface SpawnAgentSessionRequest {
43
+ readonly agentId: string;
44
+ readonly message?: string;
45
+ }
46
+ export interface AgentProfileResponse {
47
+ readonly id: string;
48
+ readonly displayName: string;
49
+ readonly role: string;
50
+ readonly systemPrompt: string;
51
+ readonly modelPrimary: string;
52
+ readonly modelFallbacks: readonly string[];
53
+ readonly capabilities: readonly string[];
54
+ readonly allowedTools: readonly string[];
55
+ readonly status: string;
56
+ readonly builtIn: boolean;
57
+ readonly createdAt: string;
58
+ readonly updatedAt: string;
59
+ }
60
+ export interface SpawnAgentSessionResponse {
61
+ readonly sessionId: string;
62
+ readonly agentId: string;
63
+ readonly agentName: string;
64
+ readonly sessionTitle: string | undefined;
65
+ }
66
+ //# sourceMappingURL=dtos.d.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> Use Cases (request DTOs), Use Cases -> Tools (response DTOs).
6
+ *
7
+ * SOLID: SRP - DTOs carry data, no logic
8
+ * DDD: Application layer boundary objects
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=dtos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dtos.js","sourceRoot":"","sources":["../../../src/application/agent-registry/dtos.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Agent Registry Use Cases
3
+ *
4
+ * Application layer orchestration for agent profile management.
5
+ * Converts DTOs <-> domain types, delegates to domain services.
6
+ *
7
+ * Use Cases:
8
+ * RegisterAgent, GetAgentProfile, ListAgents, UpdateAgent,
9
+ * DeleteAgent, SpawnAgentSession, BootstrapBuiltInProfiles
10
+ *
11
+ * SOLID: SRP - agent registry operations only
12
+ * SOLID: DIP - depends on domain service abstractions
13
+ * DDD: Application Service pattern
14
+ */
15
+ import type { Result } from "../../domain/shared/value-objects.js";
16
+ import type { AgentProfileRegistrationData } from "../../domain/agent-registry/value-objects.js";
17
+ import type { AgentRegistryService } from "../../domain/agent-registry/services.js";
18
+ import type { AgentSessionPort } from "../../domain/agent-registry/repositories.js";
19
+ import type { RegisterAgentRequest, GetAgentProfileRequest, ListAgentsRequest, UpdateAgentRequest, DeleteAgentRequest, SpawnAgentSessionRequest, AgentProfileResponse, SpawnAgentSessionResponse } from "./dtos.js";
20
+ export declare class AgentRegistryUseCases {
21
+ private readonly registryService;
22
+ private readonly sessionPort;
23
+ constructor(registryService: AgentRegistryService, sessionPort: AgentSessionPort);
24
+ registerAgent(request: RegisterAgentRequest): Promise<Result<AgentProfileResponse>>;
25
+ getAgentProfile(request: GetAgentProfileRequest): Promise<Result<AgentProfileResponse | null>>;
26
+ listAgents(request: ListAgentsRequest): Promise<Result<readonly AgentProfileResponse[]>>;
27
+ updateAgent(request: UpdateAgentRequest): Promise<Result<AgentProfileResponse>>;
28
+ deleteAgent(request: DeleteAgentRequest): Promise<Result<{
29
+ deleted: boolean;
30
+ }>>;
31
+ spawnAgentSession(request: SpawnAgentSessionRequest): Promise<Result<SpawnAgentSessionResponse>>;
32
+ /**
33
+ * Register or update built-in agent profiles.
34
+ * Called at plugin boot. Uses registerOrUpdate() for idempotent upserts.
35
+ * Fire-and-forget — errors are logged but don't block startup.
36
+ */
37
+ bootstrapBuiltInProfiles(profiles: readonly AgentProfileRegistrationData[]): Promise<void>;
38
+ }
39
+ //# sourceMappingURL=use-cases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-cases.d.ts","sourceRoot":"","sources":["../../../src/application/agent-registry/use-cases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAYnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,8CAA8C,CAAC;AACjG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,WAAW,CAAC;AAyBnB,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,WAAW;gBADX,eAAe,EAAE,oBAAoB,EACrC,WAAW,EAAE,gBAAgB;IAK1C,aAAa,CACjB,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAmClC,eAAe,CACnB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IAazC,UAAU,CACd,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,MAAM,CAAC,SAAS,oBAAoB,EAAE,CAAC,CAAC;IAyB7C,WAAW,CACf,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IA+DlC,WAAW,CACf,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAgBlC,iBAAiB,CACrB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;IA4C7C;;;;OAIG;IACG,wBAAwB,CAC5B,QAAQ,EAAE,SAAS,4BAA4B,EAAE,GAChD,OAAO,CAAC,IAAI,CAAC;CAKjB"}
@@ -0,0 +1,222 @@
1
+ import { ok, fail } from "../../domain/shared/value-objects.js";
2
+ import { AgentProfileId, SystemPrompt, ModelPreference, AgentCapabilities, AllowedTools, parseAgentRole, isValidAgentProfileStatus, } from "../../domain/agent-registry/value-objects.js";
3
+ // ── Response Mapper ──────────────────────────────────────────────────
4
+ /** Maps an AgentProfile entity to an AgentProfileResponse DTO. */
5
+ function toResponse(profile) {
6
+ const data = profile.toData();
7
+ return {
8
+ id: data.id.value,
9
+ displayName: data.displayName,
10
+ role: data.role,
11
+ systemPrompt: data.systemPrompt.value,
12
+ modelPrimary: data.modelPreference.primary,
13
+ modelFallbacks: [...data.modelPreference.fallbacks],
14
+ capabilities: [...data.capabilities.toArray()],
15
+ allowedTools: [...data.allowedTools.toArray()],
16
+ status: data.status,
17
+ builtIn: data.builtIn,
18
+ createdAt: data.createdAt.toISO(),
19
+ updatedAt: data.updatedAt.toISO(),
20
+ };
21
+ }
22
+ // ── Use Cases ────────────────────────────────────────────────────────
23
+ export class AgentRegistryUseCases {
24
+ registryService;
25
+ sessionPort;
26
+ constructor(registryService, sessionPort) {
27
+ this.registryService = registryService;
28
+ this.sessionPort = sessionPort;
29
+ }
30
+ // ── Register Agent ─────────────────────────────────────────────
31
+ async registerAgent(request) {
32
+ try {
33
+ const role = parseAgentRole(request.role);
34
+ const regData = {
35
+ id: AgentProfileId.create(request.id),
36
+ displayName: request.displayName,
37
+ role,
38
+ systemPrompt: SystemPrompt.create(request.systemPrompt),
39
+ ...(request.modelPrimary !== undefined
40
+ ? {
41
+ modelPreference: ModelPreference.create(request.modelPrimary, request.modelFallbacks),
42
+ }
43
+ : {}),
44
+ ...(request.capabilities !== undefined
45
+ ? { capabilities: AgentCapabilities.create(request.capabilities) }
46
+ : {}),
47
+ ...(request.allowedTools !== undefined
48
+ ? { allowedTools: AllowedTools.create(request.allowedTools) }
49
+ : {}),
50
+ };
51
+ const result = await this.registryService.register(regData);
52
+ if (!result.success)
53
+ return fail(result.error);
54
+ return ok(toResponse(result.profile));
55
+ }
56
+ catch (e) {
57
+ const msg = e instanceof Error ? e.message : String(e);
58
+ return fail(msg);
59
+ }
60
+ }
61
+ // ── Get Agent Profile ──────────────────────────────────────────
62
+ async getAgentProfile(request) {
63
+ try {
64
+ const id = AgentProfileId.from(request.id);
65
+ const profile = await this.registryService.findById(id);
66
+ return ok(profile ? toResponse(profile) : null);
67
+ }
68
+ catch (e) {
69
+ const msg = e instanceof Error ? e.message : String(e);
70
+ return fail(msg);
71
+ }
72
+ }
73
+ // ── List Agents ────────────────────────────────────────────────
74
+ async listAgents(request) {
75
+ try {
76
+ let profiles;
77
+ if (request.role !== undefined) {
78
+ const role = parseAgentRole(request.role);
79
+ profiles = await this.registryService.findByRole(role);
80
+ }
81
+ else if (request.status !== undefined) {
82
+ if (!isValidAgentProfileStatus(request.status)) {
83
+ return fail(`Invalid status: "${request.status}". Valid: active, inactive, draft`);
84
+ }
85
+ profiles = await this.registryService.findByStatus(request.status);
86
+ }
87
+ else {
88
+ profiles = await this.registryService.listAll();
89
+ }
90
+ return ok(profiles.map(toResponse));
91
+ }
92
+ catch (e) {
93
+ const msg = e instanceof Error ? e.message : String(e);
94
+ return fail(msg);
95
+ }
96
+ }
97
+ // ── Update Agent ───────────────────────────────────────────────
98
+ async updateAgent(request) {
99
+ try {
100
+ const id = AgentProfileId.from(request.id);
101
+ // Handle activation/deactivation first
102
+ if (request.activate === true) {
103
+ const activateResult = await this.registryService.activate(id);
104
+ if (!activateResult.success)
105
+ return fail(activateResult.error);
106
+ }
107
+ if (request.deactivate === true) {
108
+ const deactivateResult = await this.registryService.deactivate(id);
109
+ if (!deactivateResult.success)
110
+ return fail(deactivateResult.error);
111
+ }
112
+ // Handle field updates
113
+ const hasFieldUpdates = request.displayName !== undefined ||
114
+ request.role !== undefined ||
115
+ request.systemPrompt !== undefined ||
116
+ request.modelPrimary !== undefined ||
117
+ request.capabilities !== undefined ||
118
+ request.allowedTools !== undefined;
119
+ if (hasFieldUpdates) {
120
+ const result = await this.registryService.update(id, {
121
+ ...(request.displayName !== undefined
122
+ ? { displayName: request.displayName }
123
+ : {}),
124
+ ...(request.role !== undefined
125
+ ? { role: parseAgentRole(request.role) }
126
+ : {}),
127
+ ...(request.systemPrompt !== undefined
128
+ ? { systemPrompt: request.systemPrompt }
129
+ : {}),
130
+ ...(request.modelPrimary !== undefined
131
+ ? { modelPrimary: request.modelPrimary }
132
+ : {}),
133
+ ...(request.modelFallbacks !== undefined
134
+ ? { modelFallbacks: request.modelFallbacks }
135
+ : {}),
136
+ ...(request.capabilities !== undefined
137
+ ? { capabilities: request.capabilities }
138
+ : {}),
139
+ ...(request.allowedTools !== undefined
140
+ ? { allowedTools: request.allowedTools }
141
+ : {}),
142
+ });
143
+ if (!result.success)
144
+ return fail(result.error);
145
+ return ok(toResponse(result.profile));
146
+ }
147
+ // If only activate/deactivate, fetch and return the updated profile
148
+ const profile = await this.registryService.findById(id);
149
+ if (!profile)
150
+ return fail(`Agent profile "${request.id}" not found`);
151
+ return ok(toResponse(profile));
152
+ }
153
+ catch (e) {
154
+ const msg = e instanceof Error ? e.message : String(e);
155
+ return fail(msg);
156
+ }
157
+ }
158
+ // ── Delete Agent ───────────────────────────────────────────────
159
+ async deleteAgent(request) {
160
+ try {
161
+ const id = AgentProfileId.from(request.id);
162
+ const result = await this.registryService.delete(id);
163
+ if (!result.success) {
164
+ return fail(result.error ?? `Failed to delete agent "${request.id}"`);
165
+ }
166
+ return ok({ deleted: true });
167
+ }
168
+ catch (e) {
169
+ const msg = e instanceof Error ? e.message : String(e);
170
+ return fail(msg);
171
+ }
172
+ }
173
+ // ── Spawn Agent Session ────────────────────────────────────────
174
+ async spawnAgentSession(request) {
175
+ try {
176
+ const id = AgentProfileId.from(request.agentId);
177
+ const profile = await this.registryService.findById(id);
178
+ if (!profile) {
179
+ return fail(`Agent profile "${request.agentId}" not found`);
180
+ }
181
+ if (!profile.isActive) {
182
+ return fail(`Agent profile "${request.agentId}" is ${profile.status}, must be active to spawn`);
183
+ }
184
+ const modelId = profile.modelPreference.isDefault
185
+ ? undefined
186
+ : profile.modelPreference.primary;
187
+ const session = await this.sessionPort.createSession({
188
+ systemPrompt: profile.systemPrompt.value,
189
+ ...(modelId !== undefined ? { modelId } : {}),
190
+ });
191
+ // Send the initial message if provided
192
+ if (request.message !== undefined) {
193
+ await this.sessionPort.sendPrompt({
194
+ sessionId: session.id,
195
+ message: request.message,
196
+ });
197
+ }
198
+ return ok({
199
+ sessionId: session.id,
200
+ agentId: profile.id.value,
201
+ agentName: profile.displayName,
202
+ sessionTitle: session.title,
203
+ });
204
+ }
205
+ catch (e) {
206
+ const msg = e instanceof Error ? e.message : String(e);
207
+ return fail(msg);
208
+ }
209
+ }
210
+ // ── Bootstrap Built-in Profiles ────────────────────────────────
211
+ /**
212
+ * Register or update built-in agent profiles.
213
+ * Called at plugin boot. Uses registerOrUpdate() for idempotent upserts.
214
+ * Fire-and-forget — errors are logged but don't block startup.
215
+ */
216
+ async bootstrapBuiltInProfiles(profiles) {
217
+ for (const profileData of profiles) {
218
+ await this.registryService.registerOrUpdate(profileData);
219
+ }
220
+ }
221
+ }
222
+ //# sourceMappingURL=use-cases.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-cases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CAAC,OAAO;iBACzB,CAAC,CAAC;YACL,CAAC;YAED,OAAO,EAAE,CAAC;gBACR,SAAS,EAAE,OAAO,CAAC,EAAE;gBACrB,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK;gBACzB,SAAS,EAAE,OAAO,CAAC,WAAW;gBAC9B,YAAY,EAAE,OAAO,CAAC,KAAK;aAC5B,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,MAAM,GAAG,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACvD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC;IAED,kEAAkE;IAElE;;;;OAIG;IACH,KAAK,CAAC,wBAAwB,CAC5B,QAAiD;QAEjD,KAAK,MAAM,WAAW,IAAI,QAAQ,EAAE,CAAC;YACnC,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,210 @@
1
+ /**
2
+ * Azure Sync Application — DTOs
3
+ *
4
+ * Request/Response data transfer objects for azure-sync use cases.
5
+ * Flat, serializable structures with no domain types.
6
+ *
7
+ * SOLID: SRP — DTO definitions only
8
+ * DDD: Application layer boundary objects
9
+ */
10
+ export interface DiscoverRequest {
11
+ readonly org: string;
12
+ readonly project: string;
13
+ }
14
+ export interface DiscoverResponse {
15
+ readonly projectName: string;
16
+ readonly projectId: string;
17
+ readonly processTemplate: string;
18
+ readonly workItemTypes: readonly string[];
19
+ readonly existingWorkItems: readonly WorkItemSummary[];
20
+ readonly iterations: readonly IterationSummary[];
21
+ }
22
+ export interface WorkItemSummary {
23
+ readonly id: number;
24
+ readonly title: string;
25
+ readonly type: string;
26
+ readonly state: string;
27
+ readonly tags: string;
28
+ }
29
+ export interface IterationSummary {
30
+ readonly name: string;
31
+ readonly path: string;
32
+ readonly startDate: string | undefined;
33
+ readonly finishDate: string | undefined;
34
+ }
35
+ export interface PushRequest {
36
+ readonly workspace: string;
37
+ readonly org: string;
38
+ readonly project: string;
39
+ readonly entityType: string;
40
+ readonly entityId?: string;
41
+ readonly dryRun?: boolean;
42
+ }
43
+ export interface PushResponse {
44
+ readonly pushed: readonly PushResultItem[];
45
+ readonly skipped: readonly PushSkippedItem[];
46
+ readonly errors: readonly PushErrorItem[];
47
+ readonly summary: string;
48
+ }
49
+ export interface PushResultItem {
50
+ readonly localId: string;
51
+ readonly localTitle: string;
52
+ readonly azureWorkItemId: number;
53
+ readonly action: "created" | "updated";
54
+ readonly url: string;
55
+ }
56
+ export interface PushSkippedItem {
57
+ readonly localId: string;
58
+ readonly reason: string;
59
+ }
60
+ export interface PushErrorItem {
61
+ readonly localId: string;
62
+ readonly error: string;
63
+ }
64
+ export interface SyncStatusRequest {
65
+ readonly workspace: string;
66
+ readonly org: string;
67
+ readonly project: string;
68
+ }
69
+ export interface SyncStatusResponse {
70
+ readonly mappings: readonly MappingStatusItem[];
71
+ readonly unmappedLocal: readonly UnmappedLocalItem[];
72
+ readonly unmappedAzure: readonly UnmappedAzureItem[];
73
+ readonly summary: string;
74
+ }
75
+ export interface MappingStatusItem {
76
+ readonly localId: string;
77
+ readonly localTitle: string;
78
+ readonly azureWorkItemId: number;
79
+ readonly syncStatus: string;
80
+ readonly lastSyncedAt: string;
81
+ readonly localModifiedAt: string;
82
+ readonly azureModifiedAt: string;
83
+ }
84
+ export interface UnmappedLocalItem {
85
+ readonly localId: string;
86
+ readonly localTitle: string;
87
+ readonly entityType: string;
88
+ }
89
+ export interface UnmappedAzureItem {
90
+ readonly azureWorkItemId: number;
91
+ readonly title: string;
92
+ readonly type: string;
93
+ readonly state: string;
94
+ }
95
+ export interface PullRequest {
96
+ readonly workspace: string;
97
+ readonly org: string;
98
+ readonly project: string;
99
+ readonly entityType: string;
100
+ readonly entityId?: number;
101
+ readonly dryRun?: boolean;
102
+ }
103
+ export interface PullResponse {
104
+ readonly created: readonly PullCreatedItem[];
105
+ readonly updated: readonly PullUpdatedItem[];
106
+ readonly conflicts: readonly PullConflictItem[];
107
+ readonly skipped: readonly PullSkippedItem[];
108
+ readonly errors: readonly PushErrorItem[];
109
+ readonly summary: string;
110
+ }
111
+ export interface PullCreatedItem {
112
+ readonly azureWorkItemId: number;
113
+ readonly azureTitle: string;
114
+ readonly localId: string;
115
+ readonly entityType: string;
116
+ }
117
+ export interface PullUpdatedItem {
118
+ readonly azureWorkItemId: number;
119
+ readonly localId: string;
120
+ readonly changes: readonly string[];
121
+ }
122
+ export interface PullConflictItem {
123
+ readonly azureWorkItemId: number;
124
+ readonly localId: string;
125
+ readonly winner: string;
126
+ readonly reason: string;
127
+ }
128
+ export interface PullSkippedItem {
129
+ readonly azureWorkItemId: number;
130
+ readonly reason: string;
131
+ }
132
+ export interface BidiSyncRequest {
133
+ readonly workspace: string;
134
+ readonly org: string;
135
+ readonly project: string;
136
+ readonly dryRun?: boolean;
137
+ }
138
+ export interface BidiSyncResponse {
139
+ readonly pushResult: PushResponse;
140
+ readonly pullResult: PullResponse;
141
+ readonly summary: string;
142
+ }
143
+ export interface CreatePrRequest {
144
+ readonly org: string;
145
+ readonly project: string;
146
+ readonly repository: string;
147
+ readonly title: string;
148
+ readonly description: string;
149
+ readonly sourceBranch: string;
150
+ readonly targetBranch?: string;
151
+ readonly workItemIds?: readonly number[];
152
+ readonly reviewers?: readonly string[];
153
+ }
154
+ export interface PrResponse {
155
+ readonly pullRequestId: number;
156
+ readonly title: string;
157
+ readonly description: string;
158
+ readonly status: string;
159
+ readonly sourceBranch: string;
160
+ readonly targetBranch: string;
161
+ readonly createdBy: string;
162
+ readonly creationDate: string;
163
+ readonly mergeStatus: string;
164
+ readonly url: string;
165
+ readonly workItemIds: readonly number[];
166
+ readonly reviewers: readonly PrReviewerInfo[];
167
+ }
168
+ export interface PrReviewerInfo {
169
+ readonly displayName: string;
170
+ readonly uniqueName: string;
171
+ readonly vote: number;
172
+ readonly voteLabel: string;
173
+ }
174
+ export interface ListPrRequest {
175
+ readonly org: string;
176
+ readonly project: string;
177
+ readonly repository: string;
178
+ readonly status?: string;
179
+ readonly pullRequestId?: number;
180
+ readonly top?: number;
181
+ }
182
+ export interface ListPrResponse {
183
+ readonly pullRequests: readonly PrResponse[];
184
+ readonly summary: string;
185
+ }
186
+ export interface CommentRequest {
187
+ readonly org: string;
188
+ readonly project: string;
189
+ readonly workItemId: number;
190
+ readonly commentType: "push-summary" | "pr-link" | "custom";
191
+ readonly pushSummary?: PushResponse;
192
+ readonly prUrl?: string;
193
+ readonly prTitle?: string;
194
+ readonly customText?: string;
195
+ }
196
+ export interface CommentResponse {
197
+ readonly workItemId: number;
198
+ readonly success: boolean;
199
+ readonly error?: string;
200
+ }
201
+ export interface ConfigStatusResponse {
202
+ readonly organization: string;
203
+ readonly project: string;
204
+ readonly repository: string;
205
+ readonly authMethod: string;
206
+ readonly defaultSyncDirection: string;
207
+ readonly autoDetectTemplate: boolean;
208
+ readonly connectionStatus: string;
209
+ }
210
+ //# sourceMappingURL=dtos.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dtos.d.ts","sourceRoot":"","sources":["../../../src/application/azure-sync/dtos.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,SAAS,eAAe,EAAE,CAAC;IACvD,Q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IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC5D,QAAQ,CAAC,WAAW,CAAC,EAAE,YAAY,CAAC;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAID,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Azure Sync Application — DTOs
3
+ *
4
+ * Request/Response data transfer objects for azure-sync use cases.
5
+ * Flat, serializable structures with no domain types.
6
+ *
7
+ * SOLID: SRP — DTO definitions only
8
+ * DDD: Application layer boundary objects
9
+ */
10
+ export {};
11
+ //# sourceMappingURL=dtos.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dtos.js","sourceRoot":"","sources":["../../../src/application/azure-sync/dtos.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Azure Sync Application — Field Builders
3
+ *
4
+ * Builds Azure DevOps work item patch operations from local entity data.
5
+ * Handles template-aware field mapping for different process templates.
6
+ *
7
+ * SOLID: SRP — field building/mapping only
8
+ * DDD: Application-layer transformation between local and Azure representations
9
+ */
10
+ import type { WorkItemPatchOp } from "../../domain/azure-sync/ports.js";
11
+ import type { ProcessTemplate } from "../../domain/azure-sync/value-objects.js";
12
+ import { FieldMapper } from "../../domain/azure-sync/services.js";
13
+ /** Minimal epic shape needed for field building. */
14
+ export interface EpicFieldInput {
15
+ readonly title: string;
16
+ readonly description: string | undefined;
17
+ readonly priority: string;
18
+ }
19
+ /** Minimal card shape needed for field building. */
20
+ export interface CardFieldInput {
21
+ readonly title: string;
22
+ readonly description: string | undefined;
23
+ readonly priority: string;
24
+ readonly status: string;
25
+ readonly storyPoints: number | undefined;
26
+ readonly acceptanceCriteria: readonly {
27
+ description: string;
28
+ met: boolean;
29
+ }[];
30
+ readonly iterationPath: string | undefined;
31
+ }
32
+ /** Minimal task shape for building Azure DevOps Task work items from AC. */
33
+ export interface TaskFieldInput {
34
+ readonly title: string;
35
+ readonly met: boolean;
36
+ readonly iterationPath: string | undefined;
37
+ }
38
+ /**
39
+ * Builds Azure DevOps work item patch operations from local entities.
40
+ * Template-aware: adapts field placement based on process template capabilities.
41
+ */
42
+ export declare class AzureFieldBuilder {
43
+ private readonly fieldMapper;
44
+ constructor(fieldMapper: FieldMapper);
45
+ /** Build patch ops for an epic work item. */
46
+ buildEpicFields(epic: EpicFieldInput, _template: ProcessTemplate): readonly WorkItemPatchOp[];
47
+ /** Build patch ops for a card/issue work item. */
48
+ buildCardFields(card: CardFieldInput, template: ProcessTemplate): readonly WorkItemPatchOp[];
49
+ /** Build patch ops for a Task work item derived from an acceptance criterion. */
50
+ buildTaskFields(task: TaskFieldInput, template: ProcessTemplate): readonly WorkItemPatchOp[];
51
+ private appendDescriptionAndAc;
52
+ private appendStoryPoints;
53
+ }
54
+ //# sourceMappingURL=field-builders.d.ts.map