specweave 0.28.68 → 0.29.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 (318) hide show
  1. package/CLAUDE.md +3 -2
  2. package/README.md +19 -2
  3. package/dist/src/cli/commands/discrepancies.d.ts +89 -0
  4. package/dist/src/cli/commands/discrepancies.d.ts.map +1 -0
  5. package/dist/src/cli/commands/discrepancies.js +385 -0
  6. package/dist/src/cli/commands/discrepancies.js.map +1 -0
  7. package/dist/src/cli/commands/notifications.d.ts +70 -0
  8. package/dist/src/cli/commands/notifications.d.ts.map +1 -0
  9. package/dist/src/cli/commands/notifications.js +236 -0
  10. package/dist/src/cli/commands/notifications.js.map +1 -0
  11. package/dist/src/cli/commands/sync-logs.d.ts +54 -0
  12. package/dist/src/cli/commands/sync-logs.d.ts.map +1 -0
  13. package/dist/src/cli/commands/sync-logs.js +240 -0
  14. package/dist/src/cli/commands/sync-logs.js.map +1 -0
  15. package/dist/src/cli/commands/sync-monitor.d.ts +42 -0
  16. package/dist/src/cli/commands/sync-monitor.d.ts.map +1 -0
  17. package/dist/src/cli/commands/sync-monitor.js +191 -0
  18. package/dist/src/cli/commands/sync-monitor.js.map +1 -0
  19. package/dist/src/cli/helpers/init/brownfield-analysis.d.ts +45 -0
  20. package/dist/src/cli/helpers/init/brownfield-analysis.d.ts.map +1 -0
  21. package/dist/src/cli/helpers/init/brownfield-analysis.js +431 -0
  22. package/dist/src/cli/helpers/init/brownfield-analysis.js.map +1 -0
  23. package/dist/src/cli/helpers/init/index.d.ts +1 -0
  24. package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
  25. package/dist/src/cli/helpers/init/index.js +2 -0
  26. package/dist/src/cli/helpers/init/index.js.map +1 -1
  27. package/dist/src/cli/workers/brownfield-worker.d.ts +66 -0
  28. package/dist/src/cli/workers/brownfield-worker.d.ts.map +1 -0
  29. package/dist/src/cli/workers/brownfield-worker.js +417 -0
  30. package/dist/src/cli/workers/brownfield-worker.js.map +1 -0
  31. package/dist/src/core/background/brownfield-launcher.d.ts +86 -0
  32. package/dist/src/core/background/brownfield-launcher.d.ts.map +1 -0
  33. package/dist/src/core/background/brownfield-launcher.js +295 -0
  34. package/dist/src/core/background/brownfield-launcher.js.map +1 -0
  35. package/dist/src/core/background/index.d.ts +2 -0
  36. package/dist/src/core/background/index.d.ts.map +1 -1
  37. package/dist/src/core/background/index.js +2 -0
  38. package/dist/src/core/background/index.js.map +1 -1
  39. package/dist/src/core/background/types.d.ts +23 -2
  40. package/dist/src/core/background/types.d.ts.map +1 -1
  41. package/dist/src/core/config/index.d.ts +1 -0
  42. package/dist/src/core/config/index.d.ts.map +1 -1
  43. package/dist/src/core/config/index.js +1 -0
  44. package/dist/src/core/config/index.js.map +1 -1
  45. package/dist/src/core/config/types.d.ts +6 -0
  46. package/dist/src/core/config/types.d.ts.map +1 -1
  47. package/dist/src/core/config/types.js.map +1 -1
  48. package/dist/src/core/dashboard/dashboard-data.d.ts +156 -0
  49. package/dist/src/core/dashboard/dashboard-data.d.ts.map +1 -0
  50. package/dist/src/core/dashboard/dashboard-data.js +191 -0
  51. package/dist/src/core/dashboard/dashboard-data.js.map +1 -0
  52. package/dist/src/core/dashboard/index.d.ts +9 -0
  53. package/dist/src/core/dashboard/index.d.ts.map +1 -0
  54. package/dist/src/core/dashboard/index.js +9 -0
  55. package/dist/src/core/dashboard/index.js.map +1 -0
  56. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.d.ts +77 -0
  57. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.d.ts.map +1 -0
  58. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.js +286 -0
  59. package/dist/src/core/discrepancy/analyzers/api-route-analyzer.js.map +1 -0
  60. package/dist/src/core/discrepancy/analyzers/index.d.ts +8 -0
  61. package/dist/src/core/discrepancy/analyzers/index.d.ts.map +1 -0
  62. package/dist/src/core/discrepancy/analyzers/index.js +8 -0
  63. package/dist/src/core/discrepancy/analyzers/index.js.map +1 -0
  64. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.d.ts +96 -0
  65. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.d.ts.map +1 -0
  66. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.js +247 -0
  67. package/dist/src/core/discrepancy/analyzers/typescript-analyzer.js.map +1 -0
  68. package/dist/src/core/discrepancy/brownfield-manager.d.ts +88 -0
  69. package/dist/src/core/discrepancy/brownfield-manager.d.ts.map +1 -0
  70. package/dist/src/core/discrepancy/brownfield-manager.js +520 -0
  71. package/dist/src/core/discrepancy/brownfield-manager.js.map +1 -0
  72. package/dist/src/core/discrepancy/brownfield-types.d.ts +174 -0
  73. package/dist/src/core/discrepancy/brownfield-types.d.ts.map +1 -0
  74. package/dist/src/core/discrepancy/brownfield-types.js +11 -0
  75. package/dist/src/core/discrepancy/brownfield-types.js.map +1 -0
  76. package/dist/src/core/discrepancy/detector.d.ts +92 -0
  77. package/dist/src/core/discrepancy/detector.d.ts.map +1 -0
  78. package/dist/src/core/discrepancy/detector.js +346 -0
  79. package/dist/src/core/discrepancy/detector.js.map +1 -0
  80. package/dist/src/core/discrepancy/increment-generator.d.ts +51 -0
  81. package/dist/src/core/discrepancy/increment-generator.d.ts.map +1 -0
  82. package/dist/src/core/discrepancy/increment-generator.js +234 -0
  83. package/dist/src/core/discrepancy/increment-generator.js.map +1 -0
  84. package/dist/src/core/discrepancy/index.d.ts +18 -0
  85. package/dist/src/core/discrepancy/index.d.ts.map +1 -0
  86. package/dist/src/core/discrepancy/index.js +24 -0
  87. package/dist/src/core/discrepancy/index.js.map +1 -0
  88. package/dist/src/core/discrepancy/severity-classifier.d.ts +81 -0
  89. package/dist/src/core/discrepancy/severity-classifier.d.ts.map +1 -0
  90. package/dist/src/core/discrepancy/severity-classifier.js +289 -0
  91. package/dist/src/core/discrepancy/severity-classifier.js.map +1 -0
  92. package/dist/src/core/discrepancy/spec-parser.d.ts +74 -0
  93. package/dist/src/core/discrepancy/spec-parser.d.ts.map +1 -0
  94. package/dist/src/core/discrepancy/spec-parser.js +213 -0
  95. package/dist/src/core/discrepancy/spec-parser.js.map +1 -0
  96. package/dist/src/core/discrepancy/update-recommender.d.ts +77 -0
  97. package/dist/src/core/discrepancy/update-recommender.d.ts.map +1 -0
  98. package/dist/src/core/discrepancy/update-recommender.js +323 -0
  99. package/dist/src/core/discrepancy/update-recommender.js.map +1 -0
  100. package/dist/src/core/living-docs/living-docs-sync.d.ts +13 -16
  101. package/dist/src/core/living-docs/living-docs-sync.d.ts.map +1 -1
  102. package/dist/src/core/living-docs/living-docs-sync.js +31 -112
  103. package/dist/src/core/living-docs/living-docs-sync.js.map +1 -1
  104. package/dist/src/core/logs/index.d.ts +10 -0
  105. package/dist/src/core/logs/index.d.ts.map +1 -0
  106. package/dist/src/core/logs/index.js +10 -0
  107. package/dist/src/core/logs/index.js.map +1 -0
  108. package/dist/src/core/logs/log-aggregator.d.ts +130 -0
  109. package/dist/src/core/logs/log-aggregator.d.ts.map +1 -0
  110. package/dist/src/core/logs/log-aggregator.js +206 -0
  111. package/dist/src/core/logs/log-aggregator.js.map +1 -0
  112. package/dist/src/core/logs/log-exporter.d.ts +81 -0
  113. package/dist/src/core/logs/log-exporter.d.ts.map +1 -0
  114. package/dist/src/core/logs/log-exporter.js +141 -0
  115. package/dist/src/core/logs/log-exporter.js.map +1 -0
  116. package/dist/src/core/notifications/command-integration.d.ts +82 -0
  117. package/dist/src/core/notifications/command-integration.d.ts.map +1 -0
  118. package/dist/src/core/notifications/command-integration.js +80 -0
  119. package/dist/src/core/notifications/command-integration.js.map +1 -0
  120. package/dist/src/core/notifications/index.d.ts +12 -0
  121. package/dist/src/core/notifications/index.d.ts.map +1 -0
  122. package/dist/src/core/notifications/index.js +12 -0
  123. package/dist/src/core/notifications/index.js.map +1 -0
  124. package/dist/src/core/notifications/notification-display.d.ts +70 -0
  125. package/dist/src/core/notifications/notification-display.d.ts.map +1 -0
  126. package/dist/src/core/notifications/notification-display.js +177 -0
  127. package/dist/src/core/notifications/notification-display.js.map +1 -0
  128. package/dist/src/core/notifications/notification-manager.d.ts +126 -0
  129. package/dist/src/core/notifications/notification-manager.d.ts.map +1 -0
  130. package/dist/src/core/notifications/notification-manager.js +287 -0
  131. package/dist/src/core/notifications/notification-manager.js.map +1 -0
  132. package/dist/src/core/notifications/notification-types.d.ts +159 -0
  133. package/dist/src/core/notifications/notification-types.d.ts.map +1 -0
  134. package/dist/src/core/notifications/notification-types.js +93 -0
  135. package/dist/src/core/notifications/notification-types.js.map +1 -0
  136. package/dist/src/core/scheduler/index.d.ts +11 -0
  137. package/dist/src/core/scheduler/index.d.ts.map +1 -0
  138. package/dist/src/core/scheduler/index.js +11 -0
  139. package/dist/src/core/scheduler/index.js.map +1 -0
  140. package/dist/src/core/scheduler/job-scheduler.d.ts +179 -0
  141. package/dist/src/core/scheduler/job-scheduler.d.ts.map +1 -0
  142. package/dist/src/core/scheduler/job-scheduler.js +282 -0
  143. package/dist/src/core/scheduler/job-scheduler.js.map +1 -0
  144. package/dist/src/core/scheduler/schedule-persistence.d.ts +83 -0
  145. package/dist/src/core/scheduler/schedule-persistence.d.ts.map +1 -0
  146. package/dist/src/core/scheduler/schedule-persistence.js +180 -0
  147. package/dist/src/core/scheduler/schedule-persistence.js.map +1 -0
  148. package/dist/src/core/scheduler/scheduled-job.d.ts +188 -0
  149. package/dist/src/core/scheduler/scheduled-job.d.ts.map +1 -0
  150. package/dist/src/core/scheduler/scheduled-job.js +182 -0
  151. package/dist/src/core/scheduler/scheduled-job.js.map +1 -0
  152. package/dist/src/core/sync/permission-enforcer.d.ts +206 -0
  153. package/dist/src/core/sync/permission-enforcer.d.ts.map +1 -0
  154. package/dist/src/core/sync/permission-enforcer.js +268 -0
  155. package/dist/src/core/sync/permission-enforcer.js.map +1 -0
  156. package/dist/src/core/sync/sync-audit-logger.d.ts +217 -0
  157. package/dist/src/core/sync/sync-audit-logger.d.ts.map +1 -0
  158. package/dist/src/core/sync/sync-audit-logger.js +327 -0
  159. package/dist/src/core/sync/sync-audit-logger.js.map +1 -0
  160. package/dist/src/core/sync/sync-interceptor.d.ts +190 -0
  161. package/dist/src/core/sync/sync-interceptor.d.ts.map +1 -0
  162. package/dist/src/core/sync/sync-interceptor.js +224 -0
  163. package/dist/src/core/sync/sync-interceptor.js.map +1 -0
  164. package/dist/src/core/types/increment-metadata.d.ts +5 -2
  165. package/dist/src/core/types/increment-metadata.d.ts.map +1 -1
  166. package/dist/src/core/types/sync-config.d.ts +267 -0
  167. package/dist/src/core/types/sync-config.d.ts.map +1 -0
  168. package/dist/src/core/types/sync-config.js +304 -0
  169. package/dist/src/core/types/sync-config.js.map +1 -0
  170. package/dist/src/hooks/index.d.ts +11 -0
  171. package/dist/src/hooks/index.d.ts.map +1 -0
  172. package/dist/src/hooks/index.js +11 -0
  173. package/dist/src/hooks/index.js.map +1 -0
  174. package/dist/src/hooks/platform.d.ts +125 -0
  175. package/dist/src/hooks/platform.d.ts.map +1 -0
  176. package/dist/src/hooks/platform.js +325 -0
  177. package/dist/src/hooks/platform.js.map +1 -0
  178. package/dist/src/hooks/processor.d.ts +20 -0
  179. package/dist/src/hooks/processor.d.ts.map +1 -0
  180. package/dist/src/hooks/processor.js +317 -0
  181. package/dist/src/hooks/processor.js.map +1 -0
  182. package/dist/src/hooks/scheduler-startup.d.ts +19 -0
  183. package/dist/src/hooks/scheduler-startup.d.ts.map +1 -0
  184. package/dist/src/hooks/scheduler-startup.js +92 -0
  185. package/dist/src/hooks/scheduler-startup.js.map +1 -0
  186. package/dist/src/hooks/session-start.d.ts +16 -0
  187. package/dist/src/hooks/session-start.d.ts.map +1 -0
  188. package/dist/src/hooks/session-start.js +92 -0
  189. package/dist/src/hooks/session-start.js.map +1 -0
  190. package/dist/src/importers/duplicate-detector.d.ts +13 -2
  191. package/dist/src/importers/duplicate-detector.d.ts.map +1 -1
  192. package/dist/src/importers/duplicate-detector.js +21 -2
  193. package/dist/src/importers/duplicate-detector.js.map +1 -1
  194. package/dist/src/importers/item-converter.d.ts +41 -2
  195. package/dist/src/importers/item-converter.d.ts.map +1 -1
  196. package/dist/src/importers/item-converter.js +225 -38
  197. package/dist/src/importers/item-converter.js.map +1 -1
  198. package/dist/src/living-docs/fs-id-allocator.d.ts +7 -0
  199. package/dist/src/living-docs/fs-id-allocator.d.ts.map +1 -1
  200. package/dist/src/living-docs/fs-id-allocator.js +30 -4
  201. package/dist/src/living-docs/fs-id-allocator.js.map +1 -1
  202. package/dist/src/sync/ado-sync-wrapper.d.ts +137 -0
  203. package/dist/src/sync/ado-sync-wrapper.d.ts.map +1 -0
  204. package/dist/src/sync/ado-sync-wrapper.js +148 -0
  205. package/dist/src/sync/ado-sync-wrapper.js.map +1 -0
  206. package/dist/src/sync/github-sync-wrapper.d.ts +195 -0
  207. package/dist/src/sync/github-sync-wrapper.d.ts.map +1 -0
  208. package/dist/src/sync/github-sync-wrapper.js +220 -0
  209. package/dist/src/sync/github-sync-wrapper.js.map +1 -0
  210. package/dist/src/sync/jira-sync-wrapper.d.ts +155 -0
  211. package/dist/src/sync/jira-sync-wrapper.d.ts.map +1 -0
  212. package/dist/src/sync/jira-sync-wrapper.js +175 -0
  213. package/dist/src/sync/jira-sync-wrapper.js.map +1 -0
  214. package/dist/src/utils/feature-id-derivation.d.ts +58 -0
  215. package/dist/src/utils/feature-id-derivation.d.ts.map +1 -0
  216. package/dist/src/utils/feature-id-derivation.js +77 -0
  217. package/dist/src/utils/feature-id-derivation.js.map +1 -0
  218. package/package.json +3 -1
  219. package/plugins/specweave/commands/specweave-discrepancies.md +141 -0
  220. package/plugins/specweave/commands/specweave-discrepancy-to-increment.md +160 -0
  221. package/plugins/specweave/commands/specweave-jobs.md +45 -2
  222. package/plugins/specweave/commands/specweave-notifications.md +92 -0
  223. package/plugins/specweave/commands/specweave-sync-logs.md +131 -0
  224. package/plugins/specweave/commands/specweave-sync-monitor.md +57 -0
  225. package/plugins/specweave/hooks/hooks.json +3 -3
  226. package/plugins/specweave/hooks/lib/scheduler-startup.sh +72 -0
  227. package/plugins/specweave/hooks/universal/dispatcher.mjs +246 -0
  228. package/plugins/specweave/hooks/universal/session-start.cmd +16 -0
  229. package/plugins/specweave/hooks/universal/session-start.ps1 +16 -0
  230. package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +14 -5
  231. package/plugins/specweave/lib/vendor/core/types/increment-metadata.d.ts +5 -2
  232. package/plugins/specweave/skills/discrepancy-viewer.md +154 -0
  233. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +46 -0
  234. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +69 -0
  235. package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts +0 -26
  236. package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts.map +0 -1
  237. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +0 -249
  238. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +0 -1
  239. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +0 -28
  240. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +0 -1
  241. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -156
  242. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +0 -1
  243. package/dist/src/core/sync/bidirectional-engine.d.ts +0 -119
  244. package/dist/src/core/sync/bidirectional-engine.d.ts.map +0 -1
  245. package/dist/src/core/sync/bidirectional-engine.js +0 -359
  246. package/dist/src/core/sync/bidirectional-engine.js.map +0 -1
  247. package/dist/src/core/sync/conflict-resolver.d.ts +0 -66
  248. package/dist/src/core/sync/conflict-resolver.d.ts.map +0 -1
  249. package/dist/src/core/sync/conflict-resolver.js +0 -108
  250. package/dist/src/core/sync/conflict-resolver.js.map +0 -1
  251. package/dist/src/core/sync/enhanced-content-builder.d.ts +0 -55
  252. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +0 -1
  253. package/dist/src/core/sync/enhanced-content-builder.js +0 -203
  254. package/dist/src/core/sync/enhanced-content-builder.js.map +0 -1
  255. package/dist/src/core/sync/folder-mapper.d.ts +0 -71
  256. package/dist/src/core/sync/folder-mapper.d.ts.map +0 -1
  257. package/dist/src/core/sync/folder-mapper.js +0 -203
  258. package/dist/src/core/sync/folder-mapper.js.map +0 -1
  259. package/dist/src/core/sync/label-detector.d.ts +0 -66
  260. package/dist/src/core/sync/label-detector.d.ts.map +0 -1
  261. package/dist/src/core/sync/label-detector.js +0 -224
  262. package/dist/src/core/sync/label-detector.js.map +0 -1
  263. package/dist/src/core/sync/performance-optimizer.d.ts +0 -153
  264. package/dist/src/core/sync/performance-optimizer.d.ts.map +0 -1
  265. package/dist/src/core/sync/performance-optimizer.js +0 -220
  266. package/dist/src/core/sync/performance-optimizer.js.map +0 -1
  267. package/dist/src/core/sync/profile-selector.d.ts +0 -52
  268. package/dist/src/core/sync/profile-selector.d.ts.map +0 -1
  269. package/dist/src/core/sync/profile-selector.js +0 -179
  270. package/dist/src/core/sync/profile-selector.js.map +0 -1
  271. package/dist/src/core/sync/profile-validator.d.ts +0 -52
  272. package/dist/src/core/sync/profile-validator.d.ts.map +0 -1
  273. package/dist/src/core/sync/profile-validator.js +0 -170
  274. package/dist/src/core/sync/profile-validator.js.map +0 -1
  275. package/dist/src/core/sync/rate-limiter.d.ts +0 -116
  276. package/dist/src/core/sync/rate-limiter.d.ts.map +0 -1
  277. package/dist/src/core/sync/rate-limiter.js +0 -308
  278. package/dist/src/core/sync/rate-limiter.js.map +0 -1
  279. package/dist/src/core/sync/retry-handler.d.ts +0 -98
  280. package/dist/src/core/sync/retry-handler.d.ts.map +0 -1
  281. package/dist/src/core/sync/retry-handler.js +0 -196
  282. package/dist/src/core/sync/retry-handler.js.map +0 -1
  283. package/dist/src/core/sync/retry-logic.d.ts +0 -64
  284. package/dist/src/core/sync/retry-logic.d.ts.map +0 -1
  285. package/dist/src/core/sync/retry-logic.js +0 -165
  286. package/dist/src/core/sync/retry-logic.js.map +0 -1
  287. package/dist/src/core/sync/status-cache.d.ts +0 -91
  288. package/dist/src/core/sync/status-cache.d.ts.map +0 -1
  289. package/dist/src/core/sync/status-cache.js +0 -140
  290. package/dist/src/core/sync/status-cache.js.map +0 -1
  291. package/dist/src/core/sync/status-mapper.d.ts +0 -69
  292. package/dist/src/core/sync/status-mapper.d.ts.map +0 -1
  293. package/dist/src/core/sync/status-mapper.js +0 -90
  294. package/dist/src/core/sync/status-mapper.js.map +0 -1
  295. package/dist/src/core/sync/status-sync-engine.d.ts +0 -162
  296. package/dist/src/core/sync/status-sync-engine.d.ts.map +0 -1
  297. package/dist/src/core/sync/status-sync-engine.js +0 -347
  298. package/dist/src/core/sync/status-sync-engine.js.map +0 -1
  299. package/dist/src/core/sync/sync-event-logger.d.ts +0 -113
  300. package/dist/src/core/sync/sync-event-logger.d.ts.map +0 -1
  301. package/dist/src/core/sync/sync-event-logger.js +0 -141
  302. package/dist/src/core/sync/sync-event-logger.js.map +0 -1
  303. package/dist/src/core/sync/time-range-selector.d.ts +0 -48
  304. package/dist/src/core/sync/time-range-selector.d.ts.map +0 -1
  305. package/dist/src/core/sync/time-range-selector.js +0 -224
  306. package/dist/src/core/sync/time-range-selector.js.map +0 -1
  307. package/dist/src/core/sync/types.d.ts +0 -52
  308. package/dist/src/core/sync/types.d.ts.map +0 -1
  309. package/dist/src/core/sync/types.js +0 -5
  310. package/dist/src/core/sync/types.js.map +0 -1
  311. package/dist/src/core/sync/workflow-detector.d.ts +0 -95
  312. package/dist/src/core/sync/workflow-detector.d.ts.map +0 -1
  313. package/dist/src/core/sync/workflow-detector.js +0 -175
  314. package/dist/src/core/sync/workflow-detector.js.map +0 -1
  315. package/plugins/specweave-github/lib/enhanced-github-sync.js +0 -220
  316. package/plugins/specweave-github/lib/enhanced-github-sync.ts +0 -322
  317. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -134
  318. package/plugins/specweave-jira/lib/enhanced-jira-sync.ts +0 -196
@@ -1,66 +0,0 @@
1
- /**
2
- * Conflict Resolver
3
- *
4
- * Detects and resolves status conflicts between SpecWeave increments
5
- * and external tools (GitHub, JIRA, Azure DevOps).
6
- *
7
- * Supports four resolution strategies:
8
- * - prompt: Requires user interaction (UI)
9
- * - last-write-wins: Uses most recent timestamp
10
- * - specweave-wins: Always uses local SpecWeave status
11
- * - external-wins: Always uses external tool status
12
- */
13
- export type ConflictResolutionStrategy = 'prompt' | 'last-write-wins' | 'specweave-wins' | 'external-wins';
14
- export interface StatusConflict {
15
- incrementId: string;
16
- tool: string;
17
- localStatus: string;
18
- remoteStatus: string;
19
- localTimestamp: string;
20
- remoteTimestamp: string;
21
- }
22
- export interface ConflictResolution {
23
- action: 'use-local' | 'use-remote';
24
- resolvedStatus: string;
25
- }
26
- export interface ConflictDetectionInput {
27
- incrementId: string;
28
- local: string;
29
- remote: string;
30
- tool: string;
31
- localTimestamp: string;
32
- remoteTimestamp: string;
33
- }
34
- export declare class ConflictResolver {
35
- /**
36
- * Detect status conflicts between local and remote
37
- *
38
- * @param input - Detection input with local/remote statuses and timestamps
39
- * @returns StatusConflict if conflict exists, null if statuses match
40
- */
41
- detect(input: ConflictDetectionInput): Promise<StatusConflict | null>;
42
- /**
43
- * Resolve status conflict using specified strategy
44
- *
45
- * @param conflict - The status conflict to resolve
46
- * @param strategy - Resolution strategy to use
47
- * @returns Resolution with action and resolved status
48
- * @throws Error if strategy is unknown or requires user interaction
49
- */
50
- resolve(conflict: StatusConflict, strategy: ConflictResolutionStrategy): Promise<ConflictResolution>;
51
- /**
52
- * Resolve conflict by comparing timestamps (last-write-wins)
53
- *
54
- * @param conflict - The status conflict to resolve
55
- * @returns Resolution based on most recent timestamp
56
- */
57
- private resolveByTimestamp;
58
- /**
59
- * Format conflict details for display to user
60
- *
61
- * @param conflict - The status conflict to format
62
- * @returns Human-readable conflict message
63
- */
64
- formatConflictMessage(conflict: StatusConflict): string;
65
- }
66
- //# sourceMappingURL=conflict-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conflict-resolver.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/conflict-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,0BAA0B,GAClC,QAAQ,GACR,iBAAiB,GACjB,gBAAgB,GAChB,eAAe,CAAC;AAEpB,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,GAAG,YAAY,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,gBAAgB;IAC3B;;;;;OAKG;IACU,MAAM,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IAiBlF;;;;;;;OAOG;IACU,OAAO,CAClB,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,0BAA0B,GACnC,OAAO,CAAC,kBAAkB,CAAC;IAyB9B;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAkB1B;;;;;OAKG;IACI,qBAAqB,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM;CAiB/D"}
@@ -1,108 +0,0 @@
1
- /**
2
- * Conflict Resolver
3
- *
4
- * Detects and resolves status conflicts between SpecWeave increments
5
- * and external tools (GitHub, JIRA, Azure DevOps).
6
- *
7
- * Supports four resolution strategies:
8
- * - prompt: Requires user interaction (UI)
9
- * - last-write-wins: Uses most recent timestamp
10
- * - specweave-wins: Always uses local SpecWeave status
11
- * - external-wins: Always uses external tool status
12
- */
13
- export class ConflictResolver {
14
- /**
15
- * Detect status conflicts between local and remote
16
- *
17
- * @param input - Detection input with local/remote statuses and timestamps
18
- * @returns StatusConflict if conflict exists, null if statuses match
19
- */
20
- async detect(input) {
21
- // No conflict if statuses match
22
- if (input.local === input.remote) {
23
- return null;
24
- }
25
- // Conflict detected - return conflict object
26
- return {
27
- incrementId: input.incrementId,
28
- tool: input.tool,
29
- localStatus: input.local,
30
- remoteStatus: input.remote,
31
- localTimestamp: input.localTimestamp,
32
- remoteTimestamp: input.remoteTimestamp
33
- };
34
- }
35
- /**
36
- * Resolve status conflict using specified strategy
37
- *
38
- * @param conflict - The status conflict to resolve
39
- * @param strategy - Resolution strategy to use
40
- * @returns Resolution with action and resolved status
41
- * @throws Error if strategy is unknown or requires user interaction
42
- */
43
- async resolve(conflict, strategy) {
44
- switch (strategy) {
45
- case 'specweave-wins':
46
- return {
47
- action: 'use-local',
48
- resolvedStatus: conflict.localStatus
49
- };
50
- case 'external-wins':
51
- return {
52
- action: 'use-remote',
53
- resolvedStatus: conflict.remoteStatus
54
- };
55
- case 'last-write-wins':
56
- return this.resolveByTimestamp(conflict);
57
- case 'prompt':
58
- throw new Error('Prompt strategy requires user interaction');
59
- default:
60
- throw new Error(`Unknown conflict resolution strategy: ${strategy}`);
61
- }
62
- }
63
- /**
64
- * Resolve conflict by comparing timestamps (last-write-wins)
65
- *
66
- * @param conflict - The status conflict to resolve
67
- * @returns Resolution based on most recent timestamp
68
- */
69
- resolveByTimestamp(conflict) {
70
- const localTime = new Date(conflict.localTimestamp).getTime();
71
- const remoteTime = new Date(conflict.remoteTimestamp).getTime();
72
- // If timestamps equal, tie-break favors local (SpecWeave is source of truth)
73
- if (localTime >= remoteTime) {
74
- return {
75
- action: 'use-local',
76
- resolvedStatus: conflict.localStatus
77
- };
78
- }
79
- return {
80
- action: 'use-remote',
81
- resolvedStatus: conflict.remoteStatus
82
- };
83
- }
84
- /**
85
- * Format conflict details for display to user
86
- *
87
- * @param conflict - The status conflict to format
88
- * @returns Human-readable conflict message
89
- */
90
- formatConflictMessage(conflict) {
91
- return `
92
- Status Conflict Detected for Increment ${conflict.incrementId}
93
-
94
- Tool: ${conflict.tool}
95
-
96
- Local (SpecWeave):
97
- Status: ${conflict.localStatus}
98
- Last Updated: ${conflict.localTimestamp}
99
-
100
- Remote (${conflict.tool}):
101
- Status: ${conflict.remoteStatus}
102
- Last Updated: ${conflict.remoteTimestamp}
103
-
104
- Conflict: Local and remote statuses differ.
105
- `.trim();
106
- }
107
- }
108
- //# sourceMappingURL=conflict-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conflict-resolver.js","sourceRoot":"","sources":["../../../../src/core/sync/conflict-resolver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA+BH,MAAM,OAAO,gBAAgB;IAC3B;;;;;OAKG;IACI,KAAK,CAAC,MAAM,CAAC,KAA6B;QAC/C,gCAAgC;QAChC,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACd,CAAC;QAED,6CAA6C;QAC7C,OAAO;YACL,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,WAAW,EAAE,KAAK,CAAC,KAAK;YACxB,YAAY,EAAE,KAAK,CAAC,MAAM;YAC1B,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,OAAO,CAClB,QAAwB,EACxB,QAAoC;QAEpC,QAAQ,QAAQ,EAAE,CAAC;YACjB,KAAK,gBAAgB;gBACnB,OAAO;oBACL,MAAM,EAAE,WAAW;oBACnB,cAAc,EAAE,QAAQ,CAAC,WAAW;iBACrC,CAA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Content Builder
5
- *
6
- * Builds rich external issue descriptions with full spec content
7
- * for GitHub, JIRA, and Azure DevOps integrations.
8
- */
9
- export declare class EnhancedContentBuilder {
10
- /**
11
- * Build complete external description from spec
12
- */
13
- buildExternalDescription(spec: SpecContent): string;
14
- /**
15
- * Build summary section
16
- */
17
- buildSummarySection(spec: SpecContent | {
18
- summary: string;
19
- }): string;
20
- /**
21
- * Build user stories section with collapsible details
22
- */
23
- buildUserStoriesSection(userStories: UserStory[]): string;
24
- /**
25
- * Build individual user story with collapsible details
26
- */
27
- private buildUserStoryDetails;
28
- /**
29
- * Group acceptance criteria by priority
30
- */
31
- private groupAcceptanceCriteriaByPriority;
32
- /**
33
- * Build tasks section with GitHub issue links
34
- * Supports both simple array and options object for backward compatibility
35
- */
36
- buildTasksSection(tasks: TaskLink[] | any, ownerOrOptions?: string | {
37
- showCheckboxes?: boolean;
38
- showProgressBar?: boolean;
39
- showCompletionStatus?: boolean;
40
- provider?: string;
41
- }, repo?: string): string;
42
- /**
43
- * Build architecture section
44
- */
45
- buildArchitectureSection(docs: string[]): string;
46
- /**
47
- * Build source links section
48
- */
49
- buildSourceLinksSection(sourceLinks: {
50
- spec: string;
51
- plan: string;
52
- tasks: string;
53
- }): string;
54
- }
55
- //# sourceMappingURL=enhanced-content-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enhanced-content-builder.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/enhanced-content-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAuB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGxG,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;;GAKG;AACH,qBAAa,sBAAsB;IACjC;;OAEG;IACI,wBAAwB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;IA2B1D;;OAEG;IACI,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAI3E;;OAEG;IACI,uBAAuB,CAAC,WAAW,EAAE,SAAS,EAAE,GAAG,MAAM;IAehE;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA0C7B;;OAEG;IACH,OAAO,CAAC,iCAAiC;IAoBzC;;;OAGG;IACI,iBAAiB,CACtB,KAAK,EAAE,QAAQ,EAAE,GAAG,GAAG,EACvB,cAAc,CAAC,EAAE,MAAM,GAAG;QAAE,cAAc,CAAC,EAAE,OAAO,CAAC;QAAC,eAAe,CAAC,EAAE,OAAO,CAAC;QAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,EACpI,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM;IAyET;;OAEG;IACI,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM;IAcvD;;OAEG;IACI,uBAAuB,CAAC,WAAW,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;CASnG"}
@@ -1,203 +0,0 @@
1
- /**
2
- * Enhanced Content Builder
3
- *
4
- * Builds rich external issue descriptions with full spec content
5
- * for GitHub, JIRA, and Azure DevOps integrations.
6
- */
7
- export class EnhancedContentBuilder {
8
- /**
9
- * Build complete external description from spec
10
- */
11
- buildExternalDescription(spec) {
12
- const sections = [];
13
- // 1. Executive Summary
14
- sections.push(this.buildSummarySection(spec));
15
- // 2. User Stories (collapsible in GitHub)
16
- sections.push(this.buildUserStoriesSection(spec.userStories));
17
- // 3. Linked Tasks (if available)
18
- if (spec.tasks && spec.tasks.length > 0) {
19
- sections.push(this.buildTasksSection(spec.tasks));
20
- }
21
- // 4. Architecture References (if available)
22
- if (spec.architectureDocs && spec.architectureDocs.length > 0) {
23
- sections.push(this.buildArchitectureSection(spec.architectureDocs));
24
- }
25
- // 5. Source Links (if available)
26
- if (spec.sourceLinks) {
27
- sections.push(this.buildSourceLinksSection(spec.sourceLinks));
28
- }
29
- return sections.join('\n\n');
30
- }
31
- /**
32
- * Build summary section
33
- */
34
- buildSummarySection(spec) {
35
- return `## Summary\n\n${spec.summary}`;
36
- }
37
- /**
38
- * Build user stories section with collapsible details
39
- */
40
- buildUserStoriesSection(userStories) {
41
- if (!userStories || userStories.length === 0) {
42
- return `## User Stories\n\nNo user stories defined.`;
43
- }
44
- const sections = ['## User Stories'];
45
- for (const story of userStories) {
46
- const storySection = this.buildUserStoryDetails(story);
47
- sections.push(storySection);
48
- }
49
- return sections.join('\n\n');
50
- }
51
- /**
52
- * Build individual user story with collapsible details
53
- */
54
- buildUserStoryDetails(story) {
55
- const lines = [];
56
- // Use GitHub collapsible format
57
- lines.push(`<details>`);
58
- lines.push(`<summary><strong>${story.id}: ${story.title}</strong></summary>`);
59
- lines.push('');
60
- // Add description if available
61
- if (story.description) {
62
- lines.push(`**Description**: ${story.description}`);
63
- lines.push('');
64
- }
65
- // Acceptance Criteria
66
- if (story.acceptanceCriteria && story.acceptanceCriteria.length > 0) {
67
- lines.push('**Acceptance Criteria**:');
68
- lines.push('');
69
- // Group by priority
70
- const byPriority = this.groupAcceptanceCriteriaByPriority(story.acceptanceCriteria);
71
- for (const priority of ['P1', 'P2', 'P3', 'OTHER']) {
72
- const criteria = byPriority[priority];
73
- if (criteria && criteria.length > 0) {
74
- for (const ac of criteria) {
75
- const priorityLabel = ac.priority ? ` (${ac.priority})` : '';
76
- const checkbox = ac.completed ? '[x]' : '[ ]';
77
- lines.push(`- ${checkbox} **${ac.id}**${priorityLabel}: ${ac.description}`);
78
- }
79
- }
80
- }
81
- }
82
- else {
83
- lines.push('**Acceptance Criteria**: No acceptance criteria defined.');
84
- }
85
- lines.push('');
86
- lines.push('</details>');
87
- return lines.join('\n');
88
- }
89
- /**
90
- * Group acceptance criteria by priority
91
- */
92
- groupAcceptanceCriteriaByPriority(criteria) {
93
- const grouped = {
94
- P1: [],
95
- P2: [],
96
- P3: [],
97
- OTHER: [] // For criteria without priority or with other priorities
98
- };
99
- for (const ac of criteria) {
100
- const priority = ac.priority || 'OTHER';
101
- if (priority in grouped) {
102
- grouped[priority].push(ac);
103
- }
104
- else {
105
- grouped.OTHER.push(ac);
106
- }
107
- }
108
- return grouped;
109
- }
110
- /**
111
- * Build tasks section with GitHub issue links
112
- * Supports both simple array and options object for backward compatibility
113
- */
114
- buildTasksSection(tasks, ownerOrOptions, repo) {
115
- // Handle both old and new signatures
116
- let taskList;
117
- let owner;
118
- let options = {};
119
- if (Array.isArray(tasks)) {
120
- taskList = tasks;
121
- if (typeof ownerOrOptions === 'string') {
122
- owner = ownerOrOptions;
123
- }
124
- else if (typeof ownerOrOptions === 'object') {
125
- options = ownerOrOptions;
126
- }
127
- }
128
- else {
129
- // tasks is actually taskMapping object
130
- taskList = tasks?.tasks || [];
131
- if (typeof ownerOrOptions === 'object') {
132
- options = ownerOrOptions;
133
- owner = tasks?.owner;
134
- repo = tasks?.repo;
135
- }
136
- }
137
- if (!taskList || taskList.length === 0) {
138
- return `## Tasks\n\nNo tasks defined.`;
139
- }
140
- const lines = ['## Tasks'];
141
- lines.push('');
142
- // Add progress bar if requested
143
- if (options.showProgressBar && taskList.length > 0) {
144
- const completed = taskList.filter(t => t.completed).length;
145
- const total = taskList.length;
146
- const percentage = Math.round((completed / total) * 100);
147
- lines.push(`**Progress**: ${completed}/${total} tasks (${percentage}%)`);
148
- lines.push('');
149
- }
150
- for (const task of taskList) {
151
- let taskLine = '';
152
- // Add checkbox if requested
153
- if (options.showCheckboxes) {
154
- taskLine += task.completed ? '- [x] ' : '- [ ] ';
155
- }
156
- else {
157
- taskLine += '- ';
158
- }
159
- taskLine += `**${task.id}**: ${task.title}`;
160
- // Add GitHub issue link if available
161
- if (task.githubIssue && owner && repo) {
162
- const issueUrl = `https://github.com/${owner}/${repo}/issues/${task.githubIssue}`;
163
- taskLine += ` ([#${task.githubIssue}](${issueUrl}))`;
164
- }
165
- // Add user story references
166
- if (task.userStoryIds && task.userStoryIds.length > 0) {
167
- taskLine += ` → Implements: ${task.userStoryIds.join(', ')}`;
168
- }
169
- // Add completion status if requested
170
- if (options.showCompletionStatus && task.completed) {
171
- taskLine += ' ✅';
172
- }
173
- lines.push(taskLine);
174
- }
175
- return lines.join('\n');
176
- }
177
- /**
178
- * Build architecture section
179
- */
180
- buildArchitectureSection(docs) {
181
- const lines = ['## Architecture'];
182
- lines.push('');
183
- lines.push('Related architecture documentation:');
184
- lines.push('');
185
- for (const doc of docs) {
186
- const fileName = doc.split('/').pop() || doc;
187
- lines.push(`- [${fileName}](${doc})`);
188
- }
189
- return lines.join('\n');
190
- }
191
- /**
192
- * Build source links section
193
- */
194
- buildSourceLinksSection(sourceLinks) {
195
- const lines = ['## Source Files'];
196
- lines.push('');
197
- lines.push(`- **Specification**: [spec.md](${sourceLinks.spec})`);
198
- lines.push(`- **Technical Plan**: [plan.md](${sourceLinks.plan})`);
199
- lines.push(`- **Task List**: [tasks.md](${sourceLinks.tasks})`);
200
- return lines.join('\n');
201
- }
202
- }
203
- //# sourceMappingURL=enhanced-content-builder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enhanced-content-builder.js","sourceRoot":"","sources":["../../../../src/core/sync/enhanced-content-builder.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,OAAO,sBAAsB;IACjC;;OAEG;IACI,wBAAwB,CAAC,IAAiB;QAC/C,MAAM,QAAQ,GAAa,EAAE,CAAC;QAE9B,uBAAuB;QACvB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC;QAE9C,0CAA0C;QAC1C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAE9D,iCAAiC;QACjC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAA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Ef,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC;YAC7C,KAAK,CAAC,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,CAAC;QACxC,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,uBAAuB,CAAC,WAA0D;QACvF,MAAM,KAAK,GAAa,CAAC,iBAAiB,CAAC,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,kCAAkC,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC;QAClE,KAAK,CAAC,IAAI,CAAC,mCAAmC,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC;QACnE,KAAK,CAAC,IAAI,CAAC,+BAA+B,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC;QAEhE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
@@ -1,71 +0,0 @@
1
- /**
2
- * Folder Mapper for Multi-Team Sync
3
- *
4
- * Maps sync profiles (ADO teams, Jira projects/components) to SpecWeave folder structure
5
- */
6
- import { SyncProfile } from '../types/sync-profile.js';
7
- /**
8
- * Get specs folders for a sync profile
9
- *
10
- * Returns array of folders for multi-team profiles:
11
- * - ADO with teams: Multiple folders (one per team)
12
- * - Jira project-per-team: Multiple folders (one per project)
13
- * - Jira shared-project-with-components: Multiple folders (one per component)
14
- * - GitHub: Single folder (repo name)
15
- *
16
- * @param profile - Sync profile
17
- * @returns Array of folder paths relative to project root
18
- */
19
- export declare function getSpecsFoldersForProfile(profile: SyncProfile): string[];
20
- /**
21
- * Get Area Path for ADO team
22
- *
23
- * ADO Area Path format: "Project\\Team Name"
24
- * Special case: If team name matches project name, use just project name
25
- *
26
- * Examples:
27
- * - getAreaPathForTeam("League Scheduler", "League Scheduler Team") → "League Scheduler"
28
- * - getAreaPathForTeam("League Scheduler", "Platform Engineering Team") → "League Scheduler\\Platform Engineering Team"
29
- *
30
- * @param project - ADO project name
31
- * @param team - Team name
32
- * @returns Area Path string
33
- */
34
- export declare function getAreaPathForTeam(project: string, team: string): string;
35
- /**
36
- * Generate Area Paths map for ADO profile
37
- *
38
- * Creates mapping from team folder names to ADO Area Paths
39
- *
40
- * Example:
41
- * Input: project="League Scheduler", teams=["Platform Engineering Team", "QA Team"]
42
- * Output: {
43
- * "platform-engineering-team": "League Scheduler\\Platform Engineering Team",
44
- * "qa-team": "League Scheduler\\QA Team"
45
- * }
46
- *
47
- * @param project - ADO project name
48
- * @param teams - Array of team names
49
- * @returns Map of folder names to Area Paths
50
- */
51
- export declare function generateAreaPaths(project: string, teams: string[]): Record<string, string>;
52
- /**
53
- * Get team folder name from Area Path
54
- *
55
- * Reverse mapping: "League Scheduler\\Platform Engineering Team" → "platform-engineering-team"
56
- *
57
- * @param areaPath - ADO Area Path
58
- * @returns Folder name (kebab-case)
59
- */
60
- export declare function getFolderNameFromAreaPath(areaPath: string): string;
61
- /**
62
- * Get team/project identifier from folder name
63
- *
64
- * Maps folder name back to original team/project name
65
- *
66
- * @param profile - Sync profile
67
- * @param folderName - Folder name (kebab-case)
68
- * @returns Original team/project name, or null if not found
69
- */
70
- export declare function getTeamFromFolder(profile: SyncProfile, folderName: string): string | null;
71
- //# sourceMappingURL=folder-mapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"folder-mapper.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/folder-mapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,WAAW,EAIZ,MAAM,0BAA0B,CAAC;AAGlC;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,EAAE,CAyDxE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAYxE;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EAAE,GACd,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASxB;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,IAAI,CAoDf"}