specweave 0.29.0 → 0.29.2

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 (87) hide show
  1. package/package.json +3 -1
  2. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +18 -0
  3. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +27 -0
  4. package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts +0 -26
  5. package/dist/plugins/specweave-github/lib/enhanced-github-sync.d.ts.map +0 -1
  6. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js +0 -249
  7. package/dist/plugins/specweave-github/lib/enhanced-github-sync.js.map +0 -1
  8. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts +0 -28
  9. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.d.ts.map +0 -1
  10. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -156
  11. package/dist/plugins/specweave-jira/lib/enhanced-jira-sync.js.map +0 -1
  12. package/dist/src/core/sync/bidirectional-engine.d.ts +0 -119
  13. package/dist/src/core/sync/bidirectional-engine.d.ts.map +0 -1
  14. package/dist/src/core/sync/bidirectional-engine.js +0 -359
  15. package/dist/src/core/sync/bidirectional-engine.js.map +0 -1
  16. package/dist/src/core/sync/conflict-resolver.d.ts +0 -66
  17. package/dist/src/core/sync/conflict-resolver.d.ts.map +0 -1
  18. package/dist/src/core/sync/conflict-resolver.js +0 -108
  19. package/dist/src/core/sync/conflict-resolver.js.map +0 -1
  20. package/dist/src/core/sync/enhanced-content-builder.d.ts +0 -55
  21. package/dist/src/core/sync/enhanced-content-builder.d.ts.map +0 -1
  22. package/dist/src/core/sync/enhanced-content-builder.js +0 -203
  23. package/dist/src/core/sync/enhanced-content-builder.js.map +0 -1
  24. package/dist/src/core/sync/folder-mapper.d.ts +0 -71
  25. package/dist/src/core/sync/folder-mapper.d.ts.map +0 -1
  26. package/dist/src/core/sync/folder-mapper.js +0 -203
  27. package/dist/src/core/sync/folder-mapper.js.map +0 -1
  28. package/dist/src/core/sync/label-detector.d.ts +0 -66
  29. package/dist/src/core/sync/label-detector.d.ts.map +0 -1
  30. package/dist/src/core/sync/label-detector.js +0 -224
  31. package/dist/src/core/sync/label-detector.js.map +0 -1
  32. package/dist/src/core/sync/performance-optimizer.d.ts +0 -153
  33. package/dist/src/core/sync/performance-optimizer.d.ts.map +0 -1
  34. package/dist/src/core/sync/performance-optimizer.js +0 -220
  35. package/dist/src/core/sync/performance-optimizer.js.map +0 -1
  36. package/dist/src/core/sync/profile-selector.d.ts +0 -52
  37. package/dist/src/core/sync/profile-selector.d.ts.map +0 -1
  38. package/dist/src/core/sync/profile-selector.js +0 -179
  39. package/dist/src/core/sync/profile-selector.js.map +0 -1
  40. package/dist/src/core/sync/profile-validator.d.ts +0 -52
  41. package/dist/src/core/sync/profile-validator.d.ts.map +0 -1
  42. package/dist/src/core/sync/profile-validator.js +0 -170
  43. package/dist/src/core/sync/profile-validator.js.map +0 -1
  44. package/dist/src/core/sync/rate-limiter.d.ts +0 -116
  45. package/dist/src/core/sync/rate-limiter.d.ts.map +0 -1
  46. package/dist/src/core/sync/rate-limiter.js +0 -308
  47. package/dist/src/core/sync/rate-limiter.js.map +0 -1
  48. package/dist/src/core/sync/retry-handler.d.ts +0 -98
  49. package/dist/src/core/sync/retry-handler.d.ts.map +0 -1
  50. package/dist/src/core/sync/retry-handler.js +0 -196
  51. package/dist/src/core/sync/retry-handler.js.map +0 -1
  52. package/dist/src/core/sync/retry-logic.d.ts +0 -64
  53. package/dist/src/core/sync/retry-logic.d.ts.map +0 -1
  54. package/dist/src/core/sync/retry-logic.js +0 -165
  55. package/dist/src/core/sync/retry-logic.js.map +0 -1
  56. package/dist/src/core/sync/status-cache.d.ts +0 -91
  57. package/dist/src/core/sync/status-cache.d.ts.map +0 -1
  58. package/dist/src/core/sync/status-cache.js +0 -140
  59. package/dist/src/core/sync/status-cache.js.map +0 -1
  60. package/dist/src/core/sync/status-mapper.d.ts +0 -69
  61. package/dist/src/core/sync/status-mapper.d.ts.map +0 -1
  62. package/dist/src/core/sync/status-mapper.js +0 -90
  63. package/dist/src/core/sync/status-mapper.js.map +0 -1
  64. package/dist/src/core/sync/status-sync-engine.d.ts +0 -162
  65. package/dist/src/core/sync/status-sync-engine.d.ts.map +0 -1
  66. package/dist/src/core/sync/status-sync-engine.js +0 -347
  67. package/dist/src/core/sync/status-sync-engine.js.map +0 -1
  68. package/dist/src/core/sync/sync-event-logger.d.ts +0 -113
  69. package/dist/src/core/sync/sync-event-logger.d.ts.map +0 -1
  70. package/dist/src/core/sync/sync-event-logger.js +0 -141
  71. package/dist/src/core/sync/sync-event-logger.js.map +0 -1
  72. package/dist/src/core/sync/time-range-selector.d.ts +0 -48
  73. package/dist/src/core/sync/time-range-selector.d.ts.map +0 -1
  74. package/dist/src/core/sync/time-range-selector.js +0 -224
  75. package/dist/src/core/sync/time-range-selector.js.map +0 -1
  76. package/dist/src/core/sync/types.d.ts +0 -52
  77. package/dist/src/core/sync/types.d.ts.map +0 -1
  78. package/dist/src/core/sync/types.js +0 -5
  79. package/dist/src/core/sync/types.js.map +0 -1
  80. package/dist/src/core/sync/workflow-detector.d.ts +0 -95
  81. package/dist/src/core/sync/workflow-detector.d.ts.map +0 -1
  82. package/dist/src/core/sync/workflow-detector.js +0 -175
  83. package/dist/src/core/sync/workflow-detector.js.map +0 -1
  84. package/plugins/specweave-github/lib/enhanced-github-sync.js +0 -220
  85. package/plugins/specweave-github/lib/enhanced-github-sync.ts +0 -322
  86. package/plugins/specweave-jira/lib/enhanced-jira-sync.js +0 -134
  87. package/plugins/specweave-jira/lib/enhanced-jira-sync.ts +0 -196
@@ -1,224 +0,0 @@
1
- /**
2
- * Interactive Time Range Selector
3
- *
4
- * Rich CLI interface for selecting time ranges with:
5
- * - Real-time estimates (items, duration, API calls)
6
- * - Rate limit impact visualization
7
- * - Current rate limit status
8
- * - Warnings and recommendations
9
- */
10
- import { RateLimiter, PROVIDER_RATE_LIMITS } from './rate-limiter.js';
11
- // ============================================================================
12
- // Time Range Selector
13
- // ============================================================================
14
- export class TimeRangeSelector {
15
- constructor(provider) {
16
- this.provider = provider;
17
- this.rateLimiter = new RateLimiter(provider);
18
- }
19
- // ==========================================================================
20
- // Interactive Selection
21
- // ==========================================================================
22
- /**
23
- * Display time range options with estimates
24
- *
25
- * @param rateLimitStatus Current rate limit status (optional)
26
- * @returns Object with selected range, estimate, and user confirmed
27
- */
28
- displayOptions(rateLimitStatus) {
29
- const options = [
30
- {
31
- preset: '1W',
32
- label: 'Last 1 week',
33
- estimate: this.rateLimiter.estimateSync('1W'),
34
- },
35
- {
36
- preset: '2W',
37
- label: 'Last 2 weeks',
38
- estimate: this.rateLimiter.estimateSync('2W'),
39
- },
40
- {
41
- preset: '1M',
42
- label: 'Last 1 month',
43
- estimate: this.rateLimiter.estimateSync('1M'),
44
- recommended: true,
45
- },
46
- {
47
- preset: '3M',
48
- label: 'Last 3 months',
49
- estimate: this.rateLimiter.estimateSync('3M'),
50
- },
51
- {
52
- preset: '6M',
53
- label: 'Last 6 months',
54
- estimate: this.rateLimiter.estimateSync('6M'),
55
- },
56
- {
57
- preset: '1Y',
58
- label: 'Last 1 year',
59
- estimate: this.rateLimiter.estimateSync('1Y'),
60
- },
61
- {
62
- preset: 'ALL',
63
- label: 'All time',
64
- estimate: this.rateLimiter.estimateSync('ALL'),
65
- warning: '⚠️ WARNING: Will likely exceed rate limit! Not recommended.',
66
- },
67
- ];
68
- // Build rate limit info
69
- const rateLimitInfo = [];
70
- const limits = PROVIDER_RATE_LIMITS[this.provider];
71
- rateLimitInfo.push(`📅 ${this.getProviderDisplayName()} Rate Limits:`);
72
- rateLimitInfo.push(` • Limit: ${limits.limit.toLocaleString()} requests per ${limits.window}`);
73
- if (rateLimitStatus) {
74
- rateLimitInfo.push(` • Current: ${rateLimitStatus.remaining.toLocaleString()}/${rateLimitStatus.limit.toLocaleString()} (${Math.round(100 - rateLimitStatus.percentUsed)}% available)`);
75
- const resetDate = new Date(rateLimitStatus.resetAt);
76
- const now = new Date();
77
- const minutesUntilReset = Math.ceil((resetDate.getTime() - now.getTime()) / 1000 / 60);
78
- rateLimitInfo.push(` • Resets: ${resetDate.toLocaleTimeString()} (${minutesUntilReset} min)`);
79
- }
80
- return {
81
- options,
82
- rateLimitInfo,
83
- recommendation: '💡 Recommended: 1 month balances completeness with performance',
84
- };
85
- }
86
- /**
87
- * Format option for display
88
- */
89
- formatOption(option, index) {
90
- const lines = [];
91
- // Option number and label
92
- const recommendedTag = option.recommended ? ' ← Recommended' : '';
93
- lines.push(` ${index + 1}. ${option.label}${recommendedTag}`);
94
- // Estimate details
95
- const estimate = option.estimate;
96
- const impactEmoji = this.getImpactEmoji(estimate.rateLimitImpact);
97
- const durationStr = this.formatDuration(estimate.durationMinutes);
98
- lines.push(` └─ ~${estimate.items} items | ${estimate.apiCalls} API calls | ${impactEmoji} ${durationStr} | Rate: ${this.formatImpact(estimate.rateLimitImpact)}`);
99
- // Warning if present
100
- if (option.warning) {
101
- lines.push(` └─ ${option.warning}`);
102
- }
103
- return lines;
104
- }
105
- /**
106
- * Display preview after selection
107
- */
108
- displayPreview(selectedOption, rateLimitStatus) {
109
- const lines = [];
110
- lines.push('');
111
- lines.push('📊 Sync Preview:');
112
- lines.push('');
113
- lines.push(` Time range: ${selectedOption.label}`);
114
- lines.push(` └─ ${this.getDateRange(selectedOption.preset)}`);
115
- lines.push('');
116
- lines.push(' Estimated sync:');
117
- lines.push(` ├─ Work items: ~${selectedOption.estimate.items} issues/PRs/work items`);
118
- lines.push(` ├─ API calls: ~${selectedOption.estimate.apiCalls} requests`);
119
- lines.push(` ├─ Duration: ~${this.formatDuration(selectedOption.estimate.durationMinutes)}`);
120
- lines.push(` └─ Rate limit: ${this.formatImpact(selectedOption.estimate.rateLimitImpact)} impact (${this.getImpactPercentage(selectedOption.estimate)}% of ${this.getProviderDisplayName()} limit)`);
121
- // Rate limit status
122
- if (rateLimitStatus) {
123
- lines.push('');
124
- lines.push(` ${this.getProviderDisplayName()} rate limit (BEFORE sync):`);
125
- lines.push(` ├─ Current: ${rateLimitStatus.remaining.toLocaleString()}/${rateLimitStatus.limit.toLocaleString()} (${Math.round(100 - rateLimitStatus.percentUsed)}% available)`);
126
- const afterSync = rateLimitStatus.remaining - selectedOption.estimate.apiCalls;
127
- const afterPercentage = (afterSync / rateLimitStatus.limit) * 100;
128
- lines.push(` ├─ After sync: ~${afterSync.toLocaleString()}/${rateLimitStatus.limit.toLocaleString()} (${Math.round(afterPercentage)}% available)`);
129
- const resetDate = new Date(rateLimitStatus.resetAt);
130
- lines.push(` └─ Reset: ${resetDate.toLocaleTimeString()}`);
131
- }
132
- lines.push('');
133
- // Safety assessment
134
- const validation = this.rateLimiter.validateSync(selectedOption.estimate, rateLimitStatus);
135
- if (validation.safe) {
136
- lines.push('✅ This sync is SAFE to proceed');
137
- }
138
- else {
139
- lines.push('❌ This sync may FAIL due to:');
140
- validation.blockers.forEach((blocker) => {
141
- lines.push(` • ${blocker}`);
142
- });
143
- }
144
- if (validation.warnings.length > 0) {
145
- lines.push('');
146
- lines.push('⚠️ Warnings:');
147
- validation.warnings.forEach((warning) => {
148
- lines.push(` • ${warning}`);
149
- });
150
- }
151
- return lines;
152
- }
153
- // ==========================================================================
154
- // Formatting Helpers
155
- // ==========================================================================
156
- getProviderDisplayName() {
157
- const names = {
158
- github: 'GitHub',
159
- jira: 'JIRA',
160
- ado: 'Azure DevOps',
161
- };
162
- return names[this.provider];
163
- }
164
- getImpactEmoji(impact) {
165
- const emojis = {
166
- low: '⚡',
167
- medium: '⚠️ ',
168
- high: '⚠️ ',
169
- critical: '❌',
170
- };
171
- return emojis[impact] || '?';
172
- }
173
- formatImpact(impact) {
174
- return impact.toUpperCase();
175
- }
176
- formatDuration(minutes) {
177
- if (minutes < 1) {
178
- return '< 1 min';
179
- }
180
- else if (minutes === 1) {
181
- return '1 min';
182
- }
183
- else if (minutes < 60) {
184
- return `${minutes} min`;
185
- }
186
- else {
187
- const hours = Math.floor(minutes / 60);
188
- const mins = minutes % 60;
189
- return mins > 0 ? `${hours}h ${mins}min` : `${hours}h`;
190
- }
191
- }
192
- getImpactPercentage(estimate) {
193
- const limits = PROVIDER_RATE_LIMITS[this.provider];
194
- return Math.round((estimate.apiCalls / limits.limit) * 100);
195
- }
196
- getDateRange(preset) {
197
- const now = new Date();
198
- const since = new Date(now);
199
- switch (preset) {
200
- case '1W':
201
- since.setDate(now.getDate() - 7);
202
- break;
203
- case '2W':
204
- since.setDate(now.getDate() - 14);
205
- break;
206
- case '1M':
207
- since.setMonth(now.getMonth() - 1);
208
- break;
209
- case '3M':
210
- since.setMonth(now.getMonth() - 3);
211
- break;
212
- case '6M':
213
- since.setMonth(now.getMonth() - 6);
214
- break;
215
- case '1Y':
216
- since.setFullYear(now.getFullYear() - 1);
217
- break;
218
- case 'ALL':
219
- return '1970-01-01 to present';
220
- }
221
- return `${since.toISOString().split('T')[0]} to ${now.toISOString().split('T')[0]}`;
222
- }
223
- }
224
- //# sourceMappingURL=time-range-selector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"time-range-selector.js","sourceRoot":"","sources":["../../../../src/core/sync/time-range-selector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAQtE,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,MAAM,OAAO,iBAAiB;IAI5B,YAAY,QAAsB;QAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED,6EAA6E;IAC7E,wBAAwB;IACxB,6EAA6E;IAE7E;;;;;OAKG;IACH,cAAc,CACZ,eAAwC;QAMxC,MAAM,OAAO,GAAsB;YACjC;gBACE,MAAM,EAAE,IAAI;gBACZ,KAAK,EA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AM;YACR,KAAK,IAAI;gBACP,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;gBACnC,MAAM;YACR,KAAK,IAAI;gBACP,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;gBACnC,MAAM;YACR,KAAK,IAAI;gBACP,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;gBACzC,MAAM;YACR,KAAK,KAAK;gBACR,OAAO,uBAAuB,CAAC;QACnC,CAAC;QAED,OAAO,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtF,CAAC;CACF"}
@@ -1,52 +0,0 @@
1
- /**
2
- * Types for Enhanced Content Sync
3
- */
4
- export interface AcceptanceCriterion {
5
- id: string;
6
- description: string;
7
- priority?: string;
8
- completed?: boolean;
9
- testable?: boolean;
10
- }
11
- export interface UserStory {
12
- id: string;
13
- title: string;
14
- description?: string;
15
- acceptanceCriteria?: AcceptanceCriterion[];
16
- }
17
- export interface TaskLink {
18
- id: string;
19
- title: string;
20
- githubIssue?: number;
21
- jiraIssue?: string;
22
- adoWorkItem?: number;
23
- userStoryIds: string[];
24
- completed?: boolean;
25
- }
26
- export interface SourceLinks {
27
- spec: string;
28
- plan: string;
29
- tasks: string;
30
- }
31
- export interface SpecContent {
32
- id: string;
33
- title: string;
34
- summary: string;
35
- userStories: UserStory[];
36
- tasks?: TaskLink[];
37
- architectureDocs?: string[];
38
- sourceLinks?: SourceLinks;
39
- }
40
- export interface EnhancedContent {
41
- title: string;
42
- body: string;
43
- }
44
- /**
45
- * Enhanced spec content for external tool sync
46
- * Extends SpecContent with additional metadata
47
- */
48
- export interface EnhancedSpecContent extends SpecContent {
49
- taskMapping?: any;
50
- [key: string]: any;
51
- }
52
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Types for Enhanced Content Sync
3
- */
4
- export {};
5
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/core/sync/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,95 +0,0 @@
1
- /**
2
- * Workflow Detector
3
- *
4
- * Detects available statuses and transitions from external tools.
5
- * Used to validate status mappings before syncing.
6
- *
7
- * Supports:
8
- * - GitHub: Simple open/closed workflow
9
- * - JIRA: Full workflow schema with transitions
10
- * - Azure DevOps: Work item type states
11
- *
12
- * @module workflow-detector
13
- */
14
- /**
15
- * Workflow information from external tool
16
- */
17
- export interface WorkflowInfo {
18
- tool: 'github' | 'jira' | 'ado';
19
- statuses: string[];
20
- canTransitionTo: Record<string, string[]>;
21
- metadata?: {
22
- labels?: string[];
23
- workItemType?: string;
24
- };
25
- }
26
- /**
27
- * Workflow detection parameters
28
- */
29
- export interface DetectWorkflowParams {
30
- tool: 'github' | 'jira' | 'ado';
31
- owner?: string;
32
- repo?: string;
33
- token?: string;
34
- domain?: string;
35
- email?: string;
36
- apiToken?: string;
37
- projectKey?: string;
38
- organization?: string;
39
- project?: string;
40
- pat?: string;
41
- workItemType?: string;
42
- }
43
- /**
44
- * Workflow Detector
45
- *
46
- * Detects available statuses and transitions from external tools.
47
- */
48
- export declare class WorkflowDetector {
49
- /**
50
- * Detect workflow from external tool
51
- *
52
- * @param params - Detection parameters
53
- * @returns Workflow information
54
- */
55
- detectWorkflow(params: DetectWorkflowParams): Promise<WorkflowInfo>;
56
- /**
57
- * Detect GitHub workflow
58
- *
59
- * GitHub uses a simple open/closed workflow.
60
- * Labels are optional metadata.
61
- *
62
- * @param owner - Repository owner
63
- * @param repo - Repository name
64
- * @param token - GitHub token
65
- * @returns Workflow information
66
- */
67
- detectGitHubWorkflow(owner: string, repo: string, token: string): Promise<WorkflowInfo>;
68
- /**
69
- * Detect JIRA workflow
70
- *
71
- * JIRA workflows are project-specific and can have custom statuses.
72
- * We query the transitions endpoint to get all available statuses.
73
- *
74
- * @param domain - JIRA domain (e.g., company.atlassian.net)
75
- * @param email - User email
76
- * @param apiToken - API token
77
- * @param projectKey - Project key (e.g., PROJ)
78
- * @returns Workflow information
79
- */
80
- detectJiraWorkflow(domain: string, email: string, apiToken: string, projectKey: string): Promise<WorkflowInfo>;
81
- /**
82
- * Detect Azure DevOps workflow
83
- *
84
- * ADO work item types define their own state transitions.
85
- * We query the work item type definition to get valid states.
86
- *
87
- * @param organization - ADO organization
88
- * @param project - Project name
89
- * @param pat - Personal access token
90
- * @param workItemType - Work item type (default: Epic)
91
- * @returns Workflow information
92
- */
93
- detectAdoWorkflow(organization: string, project: string, pat: string, workItemType?: string): Promise<WorkflowInfo>;
94
- }
95
- //# sourceMappingURL=workflow-detector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-detector.d.ts","sourceRoot":"","sources":["../../../../src/core/sync/workflow-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1C,QAAQ,CAAC,EAAE;QACT,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;IAGhC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAoBD;;;;GAIG;AACH,qBAAa,gBAAgB;IAC3B;;;;;OAKG;IACG,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;IAmCzE;;;;;;;;;;OAUG;IACG,oBAAoB,CACxB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,YAAY,CAAC;IA2BxB;;;;;;;;;;;OAWG;IACG,kBAAkB,CACtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,CAAC;IA6CxB;;;;;;;;;;;OAWG;IACG,iBAAiB,CACrB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,YAAY,GAAE,MAAe,GAC5B,OAAO,CAAC,YAAY,CAAC;CAmCzB"}
@@ -1,175 +0,0 @@
1
- /**
2
- * Workflow Detector
3
- *
4
- * Detects available statuses and transitions from external tools.
5
- * Used to validate status mappings before syncing.
6
- *
7
- * Supports:
8
- * - GitHub: Simple open/closed workflow
9
- * - JIRA: Full workflow schema with transitions
10
- * - Azure DevOps: Work item type states
11
- *
12
- * @module workflow-detector
13
- */
14
- import axios from 'axios';
15
- /**
16
- * Workflow Detector
17
- *
18
- * Detects available statuses and transitions from external tools.
19
- */
20
- export class WorkflowDetector {
21
- /**
22
- * Detect workflow from external tool
23
- *
24
- * @param params - Detection parameters
25
- * @returns Workflow information
26
- */
27
- async detectWorkflow(params) {
28
- switch (params.tool) {
29
- case 'github':
30
- if (!params.owner || !params.repo || !params.token) {
31
- throw new Error('GitHub detection requires owner, repo, and token');
32
- }
33
- return this.detectGitHubWorkflow(params.owner, params.repo, params.token);
34
- case 'jira':
35
- if (!params.domain || !params.email || !params.apiToken || !params.projectKey) {
36
- throw new Error('JIRA detection requires domain, email, apiToken, and projectKey');
37
- }
38
- return this.detectJiraWorkflow(params.domain, params.email, params.apiToken, params.projectKey);
39
- case 'ado':
40
- if (!params.organization || !params.project || !params.pat) {
41
- throw new Error('ADO detection requires organization, project, and pat');
42
- }
43
- return this.detectAdoWorkflow(params.organization, params.project, params.pat, params.workItemType || 'Epic');
44
- default:
45
- throw new Error(`Unsupported tool: ${params.tool}`);
46
- }
47
- }
48
- /**
49
- * Detect GitHub workflow
50
- *
51
- * GitHub uses a simple open/closed workflow.
52
- * Labels are optional metadata.
53
- *
54
- * @param owner - Repository owner
55
- * @param repo - Repository name
56
- * @param token - GitHub token
57
- * @returns Workflow information
58
- */
59
- async detectGitHubWorkflow(owner, repo, token) {
60
- const client = axios.create({
61
- baseURL: `https://api.github.com/repos/${owner}/${repo}`,
62
- headers: {
63
- Authorization: `token ${token}`,
64
- Accept: 'application/vnd.github.v3+json'
65
- }
66
- });
67
- // Fetch labels (optional metadata)
68
- const labelsResponse = await client.get('/labels');
69
- const labels = labelsResponse.data.map((label) => label.name);
70
- // GitHub has fixed open/closed workflow
71
- return {
72
- tool: 'github',
73
- statuses: ['open', 'closed'],
74
- canTransitionTo: {
75
- 'open': ['closed'],
76
- 'closed': ['open']
77
- },
78
- metadata: {
79
- labels
80
- }
81
- };
82
- }
83
- /**
84
- * Detect JIRA workflow
85
- *
86
- * JIRA workflows are project-specific and can have custom statuses.
87
- * We query the transitions endpoint to get all available statuses.
88
- *
89
- * @param domain - JIRA domain (e.g., company.atlassian.net)
90
- * @param email - User email
91
- * @param apiToken - API token
92
- * @param projectKey - Project key (e.g., PROJ)
93
- * @returns Workflow information
94
- */
95
- async detectJiraWorkflow(domain, email, apiToken, projectKey) {
96
- const client = axios.create({
97
- baseURL: `https://${domain}/rest/api/3`,
98
- auth: {
99
- username: email,
100
- password: apiToken
101
- },
102
- headers: {
103
- 'Accept': 'application/json',
104
- 'Content-Type': 'application/json'
105
- }
106
- });
107
- // Get a sample issue to query transitions
108
- // In practice, we'd create a temporary issue or use an existing one
109
- // For now, we'll query transitions for a hypothetical issue
110
- // The API endpoint is: /issue/{issueIdOrKey}/transitions
111
- // Instead, we can query the project's workflow scheme
112
- // But for simplicity, we'll use the transitions endpoint approach
113
- // which requires an issue. In reality, we'd need to:
114
- // 1. Find an existing issue in the project
115
- // 2. Query its transitions
116
- // For this implementation, we'll assume a sample issue exists
117
- // and query transitions (this would be the real API call)
118
- const transitionsResponse = await client.get(`/issue/SAMPLE/transitions`);
119
- const transitions = transitionsResponse.data.transitions;
120
- // Extract unique statuses
121
- const statuses = [...new Set(transitions.map(t => t.to.name))];
122
- // Build transition map (all-to-all for simplicity)
123
- const canTransitionTo = {};
124
- statuses.forEach(status => {
125
- canTransitionTo[status] = statuses.filter(s => s !== status);
126
- });
127
- return {
128
- tool: 'jira',
129
- statuses,
130
- canTransitionTo
131
- };
132
- }
133
- /**
134
- * Detect Azure DevOps workflow
135
- *
136
- * ADO work item types define their own state transitions.
137
- * We query the work item type definition to get valid states.
138
- *
139
- * @param organization - ADO organization
140
- * @param project - Project name
141
- * @param pat - Personal access token
142
- * @param workItemType - Work item type (default: Epic)
143
- * @returns Workflow information
144
- */
145
- async detectAdoWorkflow(organization, project, pat, workItemType = 'Epic') {
146
- const client = axios.create({
147
- baseURL: `https://dev.azure.com/${organization}/${project}/_apis`,
148
- auth: {
149
- username: '',
150
- password: pat
151
- },
152
- headers: {
153
- 'Accept': 'application/json'
154
- }
155
- });
156
- // Get work item type definition
157
- const response = await client.get(`/wit/workitemtypes/${workItemType}?api-version=7.0`);
158
- const states = response.data.states;
159
- const statusNames = states.map(s => s.name);
160
- // ADO allows any-to-any transitions (no strict workflow)
161
- const canTransitionTo = {};
162
- statusNames.forEach(status => {
163
- canTransitionTo[status] = statusNames.filter(s => s !== status);
164
- });
165
- return {
166
- tool: 'ado',
167
- statuses: statusNames,
168
- canTransitionTo,
169
- metadata: {
170
- workItemType
171
- }
172
- };
173
- }
174
- }
175
- //# sourceMappingURL=workflow-detector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-detector.js","sourceRoot":"","sources":["../../../../src/core/sync/workflow-detector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAwB,MAAM,OAAO,CAAC;AAyD7C;;;;GAIG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAAC,MAA4B;QAC/C,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,QAAQ;gBACX,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;oBACnD,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;gBACtE,CAAC;gBACD,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAE5E,KAAK,MAAM;gBACT,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;oBAC9E,MAAM,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