@intentsolutions/blueprint 2.3.0 → 2.5.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.
- package/dist/cli.js +367 -12
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/jira/client.d.ts +103 -0
- package/dist/integrations/jira/client.d.ts.map +1 -0
- package/dist/integrations/jira/client.js +356 -0
- package/dist/integrations/jira/client.js.map +1 -0
- package/dist/integrations/jira/exporter.d.ts +72 -0
- package/dist/integrations/jira/exporter.d.ts.map +1 -0
- package/dist/integrations/jira/exporter.js +447 -0
- package/dist/integrations/jira/exporter.js.map +1 -0
- package/dist/integrations/jira/index.d.ts +9 -0
- package/dist/integrations/jira/index.d.ts.map +1 -0
- package/dist/integrations/jira/index.js +8 -0
- package/dist/integrations/jira/index.js.map +1 -0
- package/dist/integrations/jira/types.d.ts +194 -0
- package/dist/integrations/jira/types.d.ts.map +1 -0
- package/dist/integrations/jira/types.js +42 -0
- package/dist/integrations/jira/types.js.map +1 -0
- package/dist/integrations/linear/client.d.ts +94 -0
- package/dist/integrations/linear/client.d.ts.map +1 -0
- package/dist/integrations/linear/client.js +398 -0
- package/dist/integrations/linear/client.js.map +1 -0
- package/dist/integrations/linear/exporter.d.ts +80 -0
- package/dist/integrations/linear/exporter.d.ts.map +1 -0
- package/dist/integrations/linear/exporter.js +438 -0
- package/dist/integrations/linear/exporter.js.map +1 -0
- package/dist/integrations/linear/index.d.ts +9 -0
- package/dist/integrations/linear/index.d.ts.map +1 -0
- package/dist/integrations/linear/index.js +8 -0
- package/dist/integrations/linear/index.js.map +1 -0
- package/dist/integrations/linear/types.d.ts +137 -0
- package/dist/integrations/linear/types.d.ts.map +1 -0
- package/dist/integrations/linear/types.js +40 -0
- package/dist/integrations/linear/types.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear Exporter
|
|
3
|
+
* High-level export operations for Blueprint documents to Linear
|
|
4
|
+
*/
|
|
5
|
+
import { LinearClient } from './client.js';
|
|
6
|
+
import { STANDARD_LABELS, CATEGORY_LABELS } from './types.js';
|
|
7
|
+
export class LinearExporter {
|
|
8
|
+
client;
|
|
9
|
+
teamId;
|
|
10
|
+
constructor(config) {
|
|
11
|
+
this.client = new LinearClient(config);
|
|
12
|
+
this.teamId = config.teamId;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Export Blueprint documents to Linear
|
|
16
|
+
*/
|
|
17
|
+
async export(documents, options = {}) {
|
|
18
|
+
const result = {
|
|
19
|
+
cycles: [],
|
|
20
|
+
issues: [],
|
|
21
|
+
labels: [],
|
|
22
|
+
errors: [],
|
|
23
|
+
};
|
|
24
|
+
// Dry run - just preview
|
|
25
|
+
if (options.dryRun) {
|
|
26
|
+
return this.preview(documents, options);
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
// Verify connection
|
|
30
|
+
await this.client.verify();
|
|
31
|
+
// Sync labels if requested
|
|
32
|
+
if (options.syncLabels !== false) {
|
|
33
|
+
const allLabels = [...STANDARD_LABELS, ...CATEGORY_LABELS];
|
|
34
|
+
result.labels = await this.client.ensureLabels(allLabels);
|
|
35
|
+
}
|
|
36
|
+
// Create project if requested
|
|
37
|
+
if (options.createProject && options.projectName) {
|
|
38
|
+
result.project = await this.client.createProject({
|
|
39
|
+
name: options.projectName,
|
|
40
|
+
description: this.extractDescription(documents),
|
|
41
|
+
teamIds: [this.teamId],
|
|
42
|
+
state: 'planned',
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
// Extract and create cycles from release phases
|
|
46
|
+
if (options.createCycles !== false) {
|
|
47
|
+
const phases = this.extractReleasePhases(documents);
|
|
48
|
+
result.cycles = await this.createCyclesFromPhases(phases);
|
|
49
|
+
}
|
|
50
|
+
// Extract and create issues from task breakdowns
|
|
51
|
+
const taskBreakdowns = this.extractTaskBreakdowns(documents);
|
|
52
|
+
const labelMap = this.buildLabelMap(result.labels);
|
|
53
|
+
for (const breakdown of taskBreakdowns) {
|
|
54
|
+
// Find matching cycle for this phase
|
|
55
|
+
const cycle = result.cycles.find(c => c.name?.toLowerCase().includes(breakdown.phase.toLowerCase()));
|
|
56
|
+
const issues = await this.createIssuesFromBreakdown(breakdown, {
|
|
57
|
+
projectId: result.project?.id,
|
|
58
|
+
cycleId: cycle?.id,
|
|
59
|
+
labelMap,
|
|
60
|
+
});
|
|
61
|
+
result.issues.push(...issues);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
result.errors.push(error instanceof Error ? error.message : String(error));
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Preview what would be created (dry run)
|
|
71
|
+
*/
|
|
72
|
+
async preview(documents, options = {}) {
|
|
73
|
+
const result = {
|
|
74
|
+
cycles: [],
|
|
75
|
+
issues: [],
|
|
76
|
+
labels: [],
|
|
77
|
+
errors: [],
|
|
78
|
+
};
|
|
79
|
+
// Preview labels
|
|
80
|
+
if (options.syncLabels !== false) {
|
|
81
|
+
const allLabels = [...STANDARD_LABELS, ...CATEGORY_LABELS];
|
|
82
|
+
result.labels = allLabels.map((l, i) => ({
|
|
83
|
+
id: `preview-label-${i}`,
|
|
84
|
+
name: l.name,
|
|
85
|
+
color: l.color,
|
|
86
|
+
teamId: this.teamId,
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
// Preview project
|
|
90
|
+
if (options.createProject && options.projectName) {
|
|
91
|
+
result.project = {
|
|
92
|
+
id: 'preview-project',
|
|
93
|
+
name: options.projectName,
|
|
94
|
+
description: this.extractDescription(documents),
|
|
95
|
+
state: 'planned',
|
|
96
|
+
teamIds: [this.teamId],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
// Preview cycles
|
|
100
|
+
if (options.createCycles !== false) {
|
|
101
|
+
const phases = this.extractReleasePhases(documents);
|
|
102
|
+
result.cycles = phases.map((phase, i) => ({
|
|
103
|
+
id: `preview-cycle-${i}`,
|
|
104
|
+
number: i + 1,
|
|
105
|
+
name: phase.name,
|
|
106
|
+
startsAt: phase.startDate || new Date().toISOString(),
|
|
107
|
+
endsAt: phase.endDate || new Date(Date.now() + 14 * 24 * 60 * 60 * 1000).toISOString(),
|
|
108
|
+
teamId: this.teamId,
|
|
109
|
+
}));
|
|
110
|
+
}
|
|
111
|
+
// Preview issues
|
|
112
|
+
const taskBreakdowns = this.extractTaskBreakdowns(documents);
|
|
113
|
+
let issueNum = 1;
|
|
114
|
+
for (const breakdown of taskBreakdowns) {
|
|
115
|
+
for (const task of breakdown.tasks) {
|
|
116
|
+
result.issues.push({
|
|
117
|
+
id: `preview-issue-${issueNum}`,
|
|
118
|
+
identifier: `PREVIEW-${issueNum}`,
|
|
119
|
+
title: task.title,
|
|
120
|
+
description: task.description,
|
|
121
|
+
priority: this.mapPriority(task.priority),
|
|
122
|
+
estimate: task.estimate,
|
|
123
|
+
state: { id: 'preview-state', name: 'Backlog' },
|
|
124
|
+
labels: (task.labels || []).map(l => ({
|
|
125
|
+
id: `preview-label-${l}`,
|
|
126
|
+
name: l,
|
|
127
|
+
color: '#888888',
|
|
128
|
+
})),
|
|
129
|
+
url: '#',
|
|
130
|
+
});
|
|
131
|
+
issueNum++;
|
|
132
|
+
// Add subtasks
|
|
133
|
+
if (task.subtasks) {
|
|
134
|
+
for (const subtask of task.subtasks) {
|
|
135
|
+
result.issues.push({
|
|
136
|
+
id: `preview-issue-${issueNum}`,
|
|
137
|
+
identifier: `PREVIEW-${issueNum}`,
|
|
138
|
+
title: subtask.title,
|
|
139
|
+
description: subtask.description,
|
|
140
|
+
priority: this.mapPriority(subtask.priority),
|
|
141
|
+
estimate: subtask.estimate,
|
|
142
|
+
state: { id: 'preview-state', name: 'Backlog' },
|
|
143
|
+
labels: [],
|
|
144
|
+
url: '#',
|
|
145
|
+
});
|
|
146
|
+
issueNum++;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Extract project description from documents
|
|
155
|
+
*/
|
|
156
|
+
extractDescription(documents) {
|
|
157
|
+
// Look for PRD or overview document
|
|
158
|
+
const prd = documents.find(d => d.name.toLowerCase().includes('prd') ||
|
|
159
|
+
d.name.toLowerCase().includes('product'));
|
|
160
|
+
if (prd) {
|
|
161
|
+
// Extract first paragraph or executive summary
|
|
162
|
+
const lines = prd.content.split('\n');
|
|
163
|
+
const summaryStart = lines.findIndex(l => l.toLowerCase().includes('summary') ||
|
|
164
|
+
l.toLowerCase().includes('overview'));
|
|
165
|
+
if (summaryStart !== -1) {
|
|
166
|
+
const summaryLines = [];
|
|
167
|
+
for (let i = summaryStart + 1; i < lines.length && i < summaryStart + 10; i++) {
|
|
168
|
+
if (lines[i].startsWith('#'))
|
|
169
|
+
break;
|
|
170
|
+
if (lines[i].trim())
|
|
171
|
+
summaryLines.push(lines[i]);
|
|
172
|
+
}
|
|
173
|
+
return summaryLines.join('\n').slice(0, 500);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return documents[0]?.content.slice(0, 500) || '';
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Extract release phases from documents
|
|
180
|
+
*/
|
|
181
|
+
extractReleasePhases(documents) {
|
|
182
|
+
const phases = [];
|
|
183
|
+
for (const doc of documents) {
|
|
184
|
+
// Look for release plan sections
|
|
185
|
+
const phaseRegex = /##?\s*(phase|sprint|cycle|milestone)\s*(\d+|[ivx]+)?[:\s-]*([^\n]*)/gi;
|
|
186
|
+
let match;
|
|
187
|
+
while ((match = phaseRegex.exec(doc.content)) !== null) {
|
|
188
|
+
const phaseName = match[3]?.trim() || `${match[1]} ${match[2] || ''}`.trim();
|
|
189
|
+
// Try to extract dates
|
|
190
|
+
const dateRegex = /(\d{4}-\d{2}-\d{2}|\d{1,2}\/\d{1,2}\/\d{4})/g;
|
|
191
|
+
const contentAfterHeader = doc.content.slice(match.index, match.index + 500);
|
|
192
|
+
const dates = contentAfterHeader.match(dateRegex);
|
|
193
|
+
phases.push({
|
|
194
|
+
name: phaseName,
|
|
195
|
+
startDate: dates?.[0],
|
|
196
|
+
endDate: dates?.[1],
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
// If no phases found, create default phases
|
|
201
|
+
if (phases.length === 0) {
|
|
202
|
+
const now = new Date();
|
|
203
|
+
phases.push({
|
|
204
|
+
name: 'Phase 1 - Foundation',
|
|
205
|
+
startDate: now.toISOString(),
|
|
206
|
+
endDate: new Date(now.getTime() + 14 * 24 * 60 * 60 * 1000).toISOString(),
|
|
207
|
+
}, {
|
|
208
|
+
name: 'Phase 2 - Core Features',
|
|
209
|
+
startDate: new Date(now.getTime() + 14 * 24 * 60 * 60 * 1000).toISOString(),
|
|
210
|
+
endDate: new Date(now.getTime() + 28 * 24 * 60 * 60 * 1000).toISOString(),
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
return phases;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Extract task breakdowns from documents
|
|
217
|
+
*/
|
|
218
|
+
extractTaskBreakdowns(documents) {
|
|
219
|
+
const breakdowns = [];
|
|
220
|
+
for (const doc of documents) {
|
|
221
|
+
const tasks = this.parseTasksFromMarkdown(doc.content);
|
|
222
|
+
if (tasks.length > 0) {
|
|
223
|
+
// Try to determine the phase from document context
|
|
224
|
+
const phaseMatch = doc.content.match(/##?\s*(phase|sprint|cycle)\s*(\d+|[ivx]+)?/i);
|
|
225
|
+
const phase = phaseMatch ? phaseMatch[0].replace(/^#+\s*/, '') : 'Backlog';
|
|
226
|
+
breakdowns.push({
|
|
227
|
+
phase,
|
|
228
|
+
tasks,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return breakdowns;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Parse tasks from markdown content
|
|
236
|
+
*/
|
|
237
|
+
parseTasksFromMarkdown(content) {
|
|
238
|
+
const tasks = [];
|
|
239
|
+
const lines = content.split('\n');
|
|
240
|
+
let currentTask = null;
|
|
241
|
+
for (const line of lines) {
|
|
242
|
+
// Match task items: - [ ] Task or * [ ] Task or - Task
|
|
243
|
+
const taskMatch = line.match(/^[\s]*[-*]\s*(?:\[[ x]\])?\s*(.+)/);
|
|
244
|
+
if (taskMatch) {
|
|
245
|
+
const taskText = taskMatch[1].trim();
|
|
246
|
+
// Determine indentation level for subtasks
|
|
247
|
+
const indent = line.match(/^(\s*)/)?.[1].length || 0;
|
|
248
|
+
// Extract priority from markers like [P1], [HIGH], etc.
|
|
249
|
+
const priority = this.extractPriority(taskText);
|
|
250
|
+
// Extract estimate from markers like [2h], [3d], [5pt], etc.
|
|
251
|
+
const estimate = this.extractEstimate(taskText);
|
|
252
|
+
// Extract labels from markers like [feature], [bug], etc.
|
|
253
|
+
const labels = this.extractLabels(taskText);
|
|
254
|
+
// Clean task title
|
|
255
|
+
const title = this.cleanTaskTitle(taskText);
|
|
256
|
+
if (indent < 4 && title.length > 3) {
|
|
257
|
+
// Top-level task
|
|
258
|
+
currentTask = {
|
|
259
|
+
title,
|
|
260
|
+
priority,
|
|
261
|
+
estimate,
|
|
262
|
+
labels,
|
|
263
|
+
subtasks: [],
|
|
264
|
+
};
|
|
265
|
+
tasks.push(currentTask);
|
|
266
|
+
}
|
|
267
|
+
else if (currentTask && indent >= 4 && title.length > 3) {
|
|
268
|
+
// Subtask
|
|
269
|
+
currentTask.subtasks = currentTask.subtasks || [];
|
|
270
|
+
currentTask.subtasks.push({
|
|
271
|
+
title,
|
|
272
|
+
priority,
|
|
273
|
+
estimate,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
// Also look for numbered lists
|
|
279
|
+
const numberedRegex = /^\d+\.\s+(.+)/gm;
|
|
280
|
+
let match;
|
|
281
|
+
while ((match = numberedRegex.exec(content)) !== null) {
|
|
282
|
+
const taskText = match[1].trim();
|
|
283
|
+
if (taskText.length > 3 && !tasks.some(t => t.title === taskText)) {
|
|
284
|
+
tasks.push({
|
|
285
|
+
title: this.cleanTaskTitle(taskText),
|
|
286
|
+
priority: this.extractPriority(taskText),
|
|
287
|
+
estimate: this.extractEstimate(taskText),
|
|
288
|
+
labels: this.extractLabels(taskText),
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return tasks;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Extract priority from task text
|
|
296
|
+
*/
|
|
297
|
+
extractPriority(text) {
|
|
298
|
+
const lower = text.toLowerCase();
|
|
299
|
+
if (lower.includes('[p0]') || lower.includes('[urgent]') || lower.includes('🔴'))
|
|
300
|
+
return 'urgent';
|
|
301
|
+
if (lower.includes('[p1]') || lower.includes('[high]') || lower.includes('🟠'))
|
|
302
|
+
return 'high';
|
|
303
|
+
if (lower.includes('[p2]') || lower.includes('[medium]') || lower.includes('🟡'))
|
|
304
|
+
return 'medium';
|
|
305
|
+
if (lower.includes('[p3]') || lower.includes('[low]') || lower.includes('🟢'))
|
|
306
|
+
return 'low';
|
|
307
|
+
return 'none';
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Map priority string to Linear priority number
|
|
311
|
+
*/
|
|
312
|
+
mapPriority(priority) {
|
|
313
|
+
const map = {
|
|
314
|
+
urgent: 1,
|
|
315
|
+
high: 2,
|
|
316
|
+
medium: 3,
|
|
317
|
+
low: 4,
|
|
318
|
+
none: 0,
|
|
319
|
+
};
|
|
320
|
+
return map[priority] || 0;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Extract estimate from task text
|
|
324
|
+
*/
|
|
325
|
+
extractEstimate(text) {
|
|
326
|
+
// Match patterns like [2h], [3d], [5pt], [1w]
|
|
327
|
+
const match = text.match(/\[(\d+)(h|d|pt|w)\]/i);
|
|
328
|
+
if (!match)
|
|
329
|
+
return undefined;
|
|
330
|
+
const value = parseInt(match[1], 10);
|
|
331
|
+
const unit = match[2].toLowerCase();
|
|
332
|
+
// Convert to points (assuming 1 point = 1 hour, 1 day = 8 hours)
|
|
333
|
+
switch (unit) {
|
|
334
|
+
case 'h': return value;
|
|
335
|
+
case 'd': return value * 8;
|
|
336
|
+
case 'w': return value * 40;
|
|
337
|
+
case 'pt': return value;
|
|
338
|
+
default: return value;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Extract labels from task text
|
|
343
|
+
*/
|
|
344
|
+
extractLabels(text) {
|
|
345
|
+
const labels = [];
|
|
346
|
+
const labelRegex = /\[(feature|bug|tech-debt|research|design|devops|security|testing|documentation)\]/gi;
|
|
347
|
+
let match;
|
|
348
|
+
while ((match = labelRegex.exec(text)) !== null) {
|
|
349
|
+
labels.push(match[1].toLowerCase());
|
|
350
|
+
}
|
|
351
|
+
return labels;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Clean task title by removing markers
|
|
355
|
+
*/
|
|
356
|
+
cleanTaskTitle(text) {
|
|
357
|
+
return text
|
|
358
|
+
.replace(/\[p[0-3]\]/gi, '')
|
|
359
|
+
.replace(/\[(urgent|high|medium|low)\]/gi, '')
|
|
360
|
+
.replace(/\[\d+(h|d|pt|w)\]/gi, '')
|
|
361
|
+
.replace(/\[(feature|bug|tech-debt|research|design|devops|security|testing|documentation)\]/gi, '')
|
|
362
|
+
.replace(/[🔴🟠🟡🟢]/g, '')
|
|
363
|
+
.trim();
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Build label ID map from labels
|
|
367
|
+
*/
|
|
368
|
+
buildLabelMap(labels) {
|
|
369
|
+
const map = new Map();
|
|
370
|
+
for (const label of labels) {
|
|
371
|
+
map.set(label.name.toLowerCase(), label.id);
|
|
372
|
+
}
|
|
373
|
+
return map;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Create cycles from release phases
|
|
377
|
+
*/
|
|
378
|
+
async createCyclesFromPhases(phases) {
|
|
379
|
+
const cycles = [];
|
|
380
|
+
let currentDate = new Date();
|
|
381
|
+
for (const phase of phases) {
|
|
382
|
+
const startsAt = phase.startDate || currentDate.toISOString();
|
|
383
|
+
const endsAt = phase.endDate || new Date(new Date(startsAt).getTime() + 14 * 24 * 60 * 60 * 1000).toISOString();
|
|
384
|
+
try {
|
|
385
|
+
const cycle = await this.client.createCycle({
|
|
386
|
+
name: phase.name,
|
|
387
|
+
teamId: this.teamId,
|
|
388
|
+
startsAt,
|
|
389
|
+
endsAt,
|
|
390
|
+
});
|
|
391
|
+
cycles.push(cycle);
|
|
392
|
+
currentDate = new Date(endsAt);
|
|
393
|
+
}
|
|
394
|
+
catch (error) {
|
|
395
|
+
// Cycle creation may fail if dates overlap - continue
|
|
396
|
+
console.warn(`Could not create cycle "${phase.name}": ${error}`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return cycles;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Create issues from a task breakdown
|
|
403
|
+
*/
|
|
404
|
+
async createIssuesFromBreakdown(breakdown, options) {
|
|
405
|
+
const tasks = breakdown.tasks.map(task => ({
|
|
406
|
+
title: task.title,
|
|
407
|
+
description: task.description,
|
|
408
|
+
priority: this.mapPriority(task.priority),
|
|
409
|
+
estimate: task.estimate,
|
|
410
|
+
labels: task.labels,
|
|
411
|
+
subtasks: task.subtasks?.map(st => ({
|
|
412
|
+
title: st.title,
|
|
413
|
+
description: st.description,
|
|
414
|
+
priority: this.mapPriority(st.priority),
|
|
415
|
+
estimate: st.estimate,
|
|
416
|
+
})),
|
|
417
|
+
}));
|
|
418
|
+
// Map label names to IDs
|
|
419
|
+
const labelIds = breakdown.tasks
|
|
420
|
+
.flatMap(t => t.labels || [])
|
|
421
|
+
.filter((v, i, a) => a.indexOf(v) === i)
|
|
422
|
+
.map(name => options.labelMap.get(name.toLowerCase()))
|
|
423
|
+
.filter((id) => !!id);
|
|
424
|
+
return this.client.createIssuesFromTasks(tasks, {
|
|
425
|
+
projectId: options.projectId,
|
|
426
|
+
cycleId: options.cycleId,
|
|
427
|
+
labelIds: labelIds.length > 0 ? labelIds : undefined,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* Export documents to Linear (convenience function)
|
|
433
|
+
*/
|
|
434
|
+
export async function exportToLinear(config, documents, options = {}) {
|
|
435
|
+
const exporter = new LinearExporter(config);
|
|
436
|
+
return exporter.export(documents, options);
|
|
437
|
+
}
|
|
438
|
+
//# sourceMappingURL=exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exporter.js","sourceRoot":"","sources":["../../../src/integrations/linear/exporter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAa3C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,OAAO,cAAc;IACjB,MAAM,CAAe;IACrB,MAAM,CAAS;IAEvB,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,SAAmD,EACnD,UAA+B,EAAE;QAEjC,MAAM,MAAM,GAAuB;YACjC,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;SACX,CAAC;QAEF,yBAAyB;QACzB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO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,MAAoB,EACpB,SAAmD,EACnD,UAA+B,EAAE;IAEjC,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear Integration
|
|
3
|
+
* Export Blueprint documents to Linear (projects, cycles, issues)
|
|
4
|
+
*/
|
|
5
|
+
export { LinearClient } from './client.js';
|
|
6
|
+
export { LinearExporter, exportToLinear } from './exporter.js';
|
|
7
|
+
export type { LinearConfig, LinearTeam, LinearProject, LinearCycle, LinearLabel, LinearIssue, LinearWorkflowState, CreateIssueInput, CreateProjectInput, CreateCycleInput, LinearTaskBreakdown, LinearTaskItem, LinearExportResult, LinearExportOptions, } from './types.js';
|
|
8
|
+
export { PRIORITY_MAP, STANDARD_LABELS, CATEGORY_LABELS, } from './types.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/linear/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/D,YAAY,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear Integration
|
|
3
|
+
* Export Blueprint documents to Linear (projects, cycles, issues)
|
|
4
|
+
*/
|
|
5
|
+
export { LinearClient } from './client.js';
|
|
6
|
+
export { LinearExporter, exportToLinear } from './exporter.js';
|
|
7
|
+
export { PRIORITY_MAP, STANDARD_LABELS, CATEGORY_LABELS, } from './types.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/linear/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAiB/D,OAAO,EACL,YAAY,EACZ,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear Integration Types
|
|
3
|
+
* Types for Linear API integration
|
|
4
|
+
*/
|
|
5
|
+
export interface LinearConfig {
|
|
6
|
+
/** Linear API key */
|
|
7
|
+
apiKey: string;
|
|
8
|
+
/** Team ID to create issues in */
|
|
9
|
+
teamId: string;
|
|
10
|
+
/** Optional project ID */
|
|
11
|
+
projectId?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface LinearTeam {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
key: string;
|
|
17
|
+
}
|
|
18
|
+
export interface LinearProject {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
state: string;
|
|
23
|
+
teamIds: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface LinearCycle {
|
|
26
|
+
id: string;
|
|
27
|
+
number: number;
|
|
28
|
+
name?: string;
|
|
29
|
+
startsAt: string;
|
|
30
|
+
endsAt: string;
|
|
31
|
+
teamId: string;
|
|
32
|
+
}
|
|
33
|
+
export interface LinearLabel {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
color: string;
|
|
37
|
+
teamId?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface LinearIssue {
|
|
40
|
+
id: string;
|
|
41
|
+
identifier: string;
|
|
42
|
+
title: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
priority: number;
|
|
45
|
+
estimate?: number;
|
|
46
|
+
state: {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
};
|
|
50
|
+
labels: LinearLabel[];
|
|
51
|
+
project?: LinearProject;
|
|
52
|
+
cycle?: LinearCycle;
|
|
53
|
+
url: string;
|
|
54
|
+
}
|
|
55
|
+
export interface LinearWorkflowState {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
type: 'backlog' | 'unstarted' | 'started' | 'completed' | 'canceled';
|
|
59
|
+
teamId: string;
|
|
60
|
+
}
|
|
61
|
+
export interface CreateIssueInput {
|
|
62
|
+
title: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
teamId: string;
|
|
65
|
+
projectId?: string;
|
|
66
|
+
cycleId?: string;
|
|
67
|
+
priority?: number;
|
|
68
|
+
estimate?: number;
|
|
69
|
+
labelIds?: string[];
|
|
70
|
+
stateId?: string;
|
|
71
|
+
parentId?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface CreateProjectInput {
|
|
74
|
+
name: string;
|
|
75
|
+
description?: string;
|
|
76
|
+
teamIds: string[];
|
|
77
|
+
state?: 'planned' | 'started' | 'paused' | 'completed' | 'canceled';
|
|
78
|
+
}
|
|
79
|
+
export interface CreateCycleInput {
|
|
80
|
+
name?: string;
|
|
81
|
+
teamId: string;
|
|
82
|
+
startsAt: string;
|
|
83
|
+
endsAt: string;
|
|
84
|
+
description?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface LinearTaskBreakdown {
|
|
87
|
+
phase: string;
|
|
88
|
+
tasks: LinearTaskItem[];
|
|
89
|
+
cycleWeeks?: number;
|
|
90
|
+
}
|
|
91
|
+
export interface LinearTaskItem {
|
|
92
|
+
title: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
priority: 'urgent' | 'high' | 'medium' | 'low' | 'none';
|
|
95
|
+
estimate?: number;
|
|
96
|
+
labels?: string[];
|
|
97
|
+
subtasks?: LinearTaskItem[];
|
|
98
|
+
}
|
|
99
|
+
export interface LinearExportResult {
|
|
100
|
+
project?: LinearProject;
|
|
101
|
+
cycles: LinearCycle[];
|
|
102
|
+
issues: LinearIssue[];
|
|
103
|
+
labels: LinearLabel[];
|
|
104
|
+
errors: string[];
|
|
105
|
+
}
|
|
106
|
+
export interface LinearExportOptions {
|
|
107
|
+
/** Create a new project for the PRD */
|
|
108
|
+
createProject?: boolean;
|
|
109
|
+
/** Project name (if creating) */
|
|
110
|
+
projectName?: string;
|
|
111
|
+
/** Create cycles from release phases */
|
|
112
|
+
createCycles?: boolean;
|
|
113
|
+
/** Sync labels from document categories */
|
|
114
|
+
syncLabels?: boolean;
|
|
115
|
+
/** Dry run - preview without creating */
|
|
116
|
+
dryRun?: boolean;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Priority mapping between Blueprint and Linear
|
|
120
|
+
* Linear: 0 = No priority, 1 = Urgent, 2 = High, 3 = Medium, 4 = Low
|
|
121
|
+
*/
|
|
122
|
+
export declare const PRIORITY_MAP: Record<string, number>;
|
|
123
|
+
/**
|
|
124
|
+
* Standard labels for Blueprint documents
|
|
125
|
+
*/
|
|
126
|
+
export declare const STANDARD_LABELS: Array<{
|
|
127
|
+
name: string;
|
|
128
|
+
color: string;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* Category labels for task organization
|
|
132
|
+
*/
|
|
133
|
+
export declare const CATEGORY_LABELS: Array<{
|
|
134
|
+
name: string;
|
|
135
|
+
color: string;
|
|
136
|
+
}>;
|
|
137
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts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types
|
|
3
|
+
* Types for Linear API integration
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Priority mapping between Blueprint and Linear
|
|
7
|
+
* Linear: 0 = No priority, 1 = Urgent, 2 = High, 3 = Medium, 4 = Low
|
|
8
|
+
*/
|
|
9
|
+
export const PRIORITY_MAP = {
|
|
10
|
+
urgent: 1,
|
|
11
|
+
high: 2,
|
|
12
|
+
medium: 3,
|
|
13
|
+
low: 4,
|
|
14
|
+
none: 0,
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Standard labels for Blueprint documents
|
|
18
|
+
*/
|
|
19
|
+
export const STANDARD_LABELS = [
|
|
20
|
+
{ name: 'prd', color: '#6B5B95' },
|
|
21
|
+
{ name: 'technical-spec', color: '#88B04B' },
|
|
22
|
+
{ name: 'architecture', color: '#F7CAC9' },
|
|
23
|
+
{ name: 'api-design', color: '#92A8D1' },
|
|
24
|
+
{ name: 'security', color: '#DD4124' },
|
|
25
|
+
{ name: 'infrastructure', color: '#45B8AC' },
|
|
26
|
+
{ name: 'testing', color: '#EFC050' },
|
|
27
|
+
{ name: 'documentation', color: '#5B5EA6' },
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Category labels for task organization
|
|
31
|
+
*/
|
|
32
|
+
export const CATEGORY_LABELS = [
|
|
33
|
+
{ name: 'feature', color: '#0052CC' },
|
|
34
|
+
{ name: 'bug', color: '#DE350B' },
|
|
35
|
+
{ name: 'tech-debt', color: '#FF8B00' },
|
|
36
|
+
{ name: 'research', color: '#6554C0' },
|
|
37
|
+
{ name: 'design', color: '#00B8D9' },
|
|
38
|
+
{ name: 'devops', color: '#36B37E' },
|
|
39
|
+
];
|
|
40
|
+
//# sourceMappingURL=types.js.map
|