requ-mcp 0.2.0 → 0.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/README.md +64 -3
- package/dist/coverage.d.ts +28 -4
- package/dist/coverage.js +48 -6
- package/dist/coverage.js.map +1 -1
- package/dist/export-import.d.ts +10 -0
- package/dist/export-import.js +127 -0
- package/dist/export-import.js.map +1 -0
- package/dist/index.js +663 -58
- package/dist/index.js.map +1 -1
- package/dist/public/app.js +914 -0
- package/dist/public/index.html +1418 -0
- package/dist/public/style.css +458 -0
- package/dist/schema.d.ts +666 -28
- package/dist/schema.js +90 -29
- package/dist/schema.js.map +1 -1
- package/dist/sqlite-store.d.ts +43 -0
- package/dist/sqlite-store.js +210 -0
- package/dist/sqlite-store.js.map +1 -0
- package/dist/storage.d.ts +16 -4
- package/dist/storage.js +53 -19
- package/dist/storage.js.map +1 -1
- package/dist/web-api.d.ts +9 -0
- package/dist/web-api.js +789 -0
- package/dist/web-api.js.map +1 -0
- package/package.json +9 -5
package/dist/schema.d.ts
CHANGED
|
@@ -3,20 +3,48 @@ import { z } from "zod";
|
|
|
3
3
|
* The requ-mcp data model.
|
|
4
4
|
*
|
|
5
5
|
* Traceability spine:
|
|
6
|
-
* Requirement → User Story →
|
|
7
|
-
*
|
|
8
|
-
* Phase → Execution (
|
|
6
|
+
* Component ← Requirement → User Story → (acceptance criteria)
|
|
7
|
+
* ↑
|
|
8
|
+
* Phase → Execution (a scenario result for a run) ─── @US-xxx tag in feature files
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Everything is persisted as flat YAML in `.requ/`.
|
|
10
|
+
* Component: a sub-system/module that maps to broker domain_tags.
|
|
11
|
+
* Phase.id is free-form — use the same value as the broker phase_id (e.g. "P1")
|
|
12
|
+
* so both systems share a single identifier.
|
|
15
13
|
*/
|
|
16
14
|
export declare const Priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
17
15
|
export type Priority = z.infer<typeof Priority>;
|
|
18
16
|
/** ISO-8601 timestamp string. */
|
|
19
17
|
export declare const Timestamp: z.ZodString;
|
|
18
|
+
export declare const ComponentStatus: z.ZodEnum<["active", "deprecated"]>;
|
|
19
|
+
export type ComponentStatus = z.infer<typeof ComponentStatus>;
|
|
20
|
+
export declare const Component: z.ZodObject<{
|
|
21
|
+
/** Unique identifier. Use the same value as broker domain_tag (e.g. 'C-auth'). */
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
description: z.ZodDefault<z.ZodString>;
|
|
25
|
+
/** Broker routing tags this component maps to. E.g. ["auth","security"]. */
|
|
26
|
+
domainTags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
27
|
+
status: z.ZodDefault<z.ZodEnum<["active", "deprecated"]>>;
|
|
28
|
+
createdAt: z.ZodString;
|
|
29
|
+
updatedAt: z.ZodString;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
status: "active" | "deprecated";
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
domainTags: string[];
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
}, {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
createdAt: string;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
status?: "active" | "deprecated" | undefined;
|
|
44
|
+
description?: string | undefined;
|
|
45
|
+
domainTags?: string[] | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
export type Component = z.infer<typeof Component>;
|
|
20
48
|
export declare const RequirementStatus: z.ZodEnum<["active", "deprecated"]>;
|
|
21
49
|
export type RequirementStatus = z.infer<typeof RequirementStatus>;
|
|
22
50
|
export declare const Requirement: z.ZodObject<{
|
|
@@ -26,34 +54,39 @@ export declare const Requirement: z.ZodObject<{
|
|
|
26
54
|
/** Provenance: where this requirement came from (doc, spec section, ticket). */
|
|
27
55
|
source: z.ZodDefault<z.ZodString>;
|
|
28
56
|
priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
29
|
-
/**
|
|
57
|
+
/** Component IDs this requirement belongs to (matches Component.id). */
|
|
30
58
|
components: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
31
59
|
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
32
60
|
status: z.ZodDefault<z.ZodEnum<["active", "deprecated"]>>;
|
|
61
|
+
/** Target phase this requirement is planned for (matches Phase.id). Optional;
|
|
62
|
+
* unassigned requirements are always in scope for every phase report. */
|
|
63
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
33
64
|
createdAt: z.ZodString;
|
|
34
65
|
updatedAt: z.ZodString;
|
|
35
66
|
}, "strip", z.ZodTypeAny, {
|
|
36
67
|
status: "active" | "deprecated";
|
|
37
68
|
id: string;
|
|
38
|
-
title: string;
|
|
39
69
|
description: string;
|
|
70
|
+
createdAt: string;
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
title: string;
|
|
40
73
|
source: string;
|
|
41
74
|
priority: "low" | "medium" | "high" | "critical";
|
|
42
75
|
components: string[];
|
|
43
76
|
tags: string[];
|
|
44
|
-
|
|
45
|
-
updatedAt: string;
|
|
77
|
+
phase?: string | undefined;
|
|
46
78
|
}, {
|
|
47
79
|
id: string;
|
|
48
|
-
title: string;
|
|
49
80
|
createdAt: string;
|
|
50
81
|
updatedAt: string;
|
|
82
|
+
title: string;
|
|
51
83
|
status?: "active" | "deprecated" | undefined;
|
|
52
84
|
description?: string | undefined;
|
|
53
85
|
source?: string | undefined;
|
|
54
86
|
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
55
87
|
components?: string[] | undefined;
|
|
56
88
|
tags?: string[] | undefined;
|
|
89
|
+
phase?: string | undefined;
|
|
57
90
|
}>;
|
|
58
91
|
export type Requirement = z.infer<typeof Requirement>;
|
|
59
92
|
export declare const TestStatus: z.ZodEnum<["pass", "fail", "pending"]>;
|
|
@@ -95,28 +128,34 @@ export declare const UserStory: z.ZodObject<{
|
|
|
95
128
|
text: string;
|
|
96
129
|
}>, "many">>;
|
|
97
130
|
status: z.ZodDefault<z.ZodEnum<["draft", "ready", "in_progress", "done"]>>;
|
|
131
|
+
/** Target phase this story is planned for (matches Phase.id). Optional and
|
|
132
|
+
* independent of the story's requirements; unassigned stories are always in
|
|
133
|
+
* scope for every phase report. */
|
|
134
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
98
135
|
createdAt: z.ZodString;
|
|
99
136
|
updatedAt: z.ZodString;
|
|
100
137
|
}, "strip", z.ZodTypeAny, {
|
|
101
138
|
status: "draft" | "ready" | "in_progress" | "done";
|
|
102
139
|
id: string;
|
|
103
|
-
title: string;
|
|
104
140
|
description: string;
|
|
105
141
|
createdAt: string;
|
|
106
142
|
updatedAt: string;
|
|
143
|
+
title: string;
|
|
107
144
|
requirements: string[];
|
|
108
145
|
acceptanceCriteria: {
|
|
109
146
|
id: string;
|
|
110
147
|
text: string;
|
|
111
148
|
}[];
|
|
149
|
+
phase?: string | undefined;
|
|
112
150
|
}, {
|
|
113
151
|
id: string;
|
|
114
|
-
title: string;
|
|
115
152
|
createdAt: string;
|
|
116
153
|
updatedAt: string;
|
|
154
|
+
title: string;
|
|
117
155
|
requirements: string[];
|
|
118
156
|
status?: "draft" | "ready" | "in_progress" | "done" | undefined;
|
|
119
157
|
description?: string | undefined;
|
|
158
|
+
phase?: string | undefined;
|
|
120
159
|
acceptanceCriteria?: {
|
|
121
160
|
id: string;
|
|
122
161
|
text: string;
|
|
@@ -126,6 +165,11 @@ export type UserStory = z.infer<typeof UserStory>;
|
|
|
126
165
|
export declare const PhaseStatus: z.ZodEnum<["planned", "active", "completed"]>;
|
|
127
166
|
export type PhaseStatus = z.infer<typeof PhaseStatus>;
|
|
128
167
|
export declare const Phase: z.ZodObject<{
|
|
168
|
+
/**
|
|
169
|
+
* Free-form identifier. Use the same value as the broker phase_id
|
|
170
|
+
* (e.g. "P1", "Sprint-3") so both systems share one identifier.
|
|
171
|
+
* Previously required PHASE-\d+ format; that format is still valid.
|
|
172
|
+
*/
|
|
129
173
|
id: z.ZodString;
|
|
130
174
|
name: z.ZodString;
|
|
131
175
|
/** Sort key for evolution; lower = earlier. */
|
|
@@ -137,16 +181,16 @@ export declare const Phase: z.ZodObject<{
|
|
|
137
181
|
}, "strip", z.ZodTypeAny, {
|
|
138
182
|
status: "active" | "planned" | "completed";
|
|
139
183
|
id: string;
|
|
184
|
+
name: string;
|
|
140
185
|
description: string;
|
|
141
186
|
createdAt: string;
|
|
142
187
|
updatedAt: string;
|
|
143
|
-
name: string;
|
|
144
188
|
order: number;
|
|
145
189
|
}, {
|
|
146
190
|
id: string;
|
|
191
|
+
name: string;
|
|
147
192
|
createdAt: string;
|
|
148
193
|
updatedAt: string;
|
|
149
|
-
name: string;
|
|
150
194
|
order: number;
|
|
151
195
|
status?: "active" | "planned" | "completed" | undefined;
|
|
152
196
|
description?: string | undefined;
|
|
@@ -165,8 +209,8 @@ export declare const Execution: z.ZodObject<{
|
|
|
165
209
|
name: z.ZodString;
|
|
166
210
|
}, "strip", z.ZodTypeAny, {
|
|
167
211
|
status: "pass" | "fail" | "pending";
|
|
168
|
-
source: "manual" | "cucumber-json" | "import";
|
|
169
212
|
name: string;
|
|
213
|
+
source: "manual" | "cucumber-json" | "import";
|
|
170
214
|
ranAt: string;
|
|
171
215
|
feature: string;
|
|
172
216
|
runId?: string | undefined;
|
|
@@ -181,7 +225,7 @@ export declare const Execution: z.ZodObject<{
|
|
|
181
225
|
note?: string | undefined;
|
|
182
226
|
}>;
|
|
183
227
|
export type Execution = z.infer<typeof Execution>;
|
|
184
|
-
/** Per-phase execution log file shape. */
|
|
228
|
+
/** Per-phase execution log file shape (YAML mode). */
|
|
185
229
|
export declare const ExecutionLog: z.ZodObject<{
|
|
186
230
|
phase: z.ZodString;
|
|
187
231
|
runs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
@@ -195,8 +239,8 @@ export declare const ExecutionLog: z.ZodObject<{
|
|
|
195
239
|
name: z.ZodString;
|
|
196
240
|
}, "strip", z.ZodTypeAny, {
|
|
197
241
|
status: "pass" | "fail" | "pending";
|
|
198
|
-
source: "manual" | "cucumber-json" | "import";
|
|
199
242
|
name: string;
|
|
243
|
+
source: "manual" | "cucumber-json" | "import";
|
|
200
244
|
ranAt: string;
|
|
201
245
|
feature: string;
|
|
202
246
|
runId?: string | undefined;
|
|
@@ -214,8 +258,8 @@ export declare const ExecutionLog: z.ZodObject<{
|
|
|
214
258
|
phase: string;
|
|
215
259
|
runs: {
|
|
216
260
|
status: "pass" | "fail" | "pending";
|
|
217
|
-
source: "manual" | "cucumber-json" | "import";
|
|
218
261
|
name: string;
|
|
262
|
+
source: "manual" | "cucumber-json" | "import";
|
|
219
263
|
ranAt: string;
|
|
220
264
|
feature: string;
|
|
221
265
|
runId?: string | undefined;
|
|
@@ -236,31 +280,625 @@ export declare const ExecutionLog: z.ZodObject<{
|
|
|
236
280
|
export type ExecutionLog = z.infer<typeof ExecutionLog>;
|
|
237
281
|
export declare const Config: z.ZodObject<{
|
|
238
282
|
name: z.ZodDefault<z.ZodString>;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
* Absolute, or relative to the .requ/ parent (the repo root).
|
|
242
|
-
*/
|
|
283
|
+
key: z.ZodOptional<z.ZodString>;
|
|
284
|
+
brief: z.ZodOptional<z.ZodString>;
|
|
243
285
|
conductorPath: z.ZodDefault<z.ZodString>;
|
|
244
|
-
/** Detected name of the Conductor project (package.json name or folder name). */
|
|
245
286
|
conductorName: z.ZodOptional<z.ZodString>;
|
|
246
|
-
/** Default path to Conductor's cucumber-json result file (for import). */
|
|
247
287
|
conductorReportPath: z.ZodOptional<z.ZodString>;
|
|
248
|
-
/**
|
|
288
|
+
/** Free-form phase identifier (e.g. "P1"). */
|
|
249
289
|
activePhase: z.ZodOptional<z.ZodString>;
|
|
290
|
+
/** VCS repository reference (requ-mcp never calls VCS; it only records references). */
|
|
291
|
+
repoUrl: z.ZodOptional<z.ZodString>;
|
|
292
|
+
/** Default branch name; treated as "main" when unset. */
|
|
293
|
+
defaultBranch: z.ZodOptional<z.ZodString>;
|
|
294
|
+
vcsType: z.ZodOptional<z.ZodEnum<["gitlab"]>>;
|
|
250
295
|
}, "strip", z.ZodTypeAny, {
|
|
251
296
|
name: string;
|
|
252
297
|
conductorPath: string;
|
|
298
|
+
key?: string | undefined;
|
|
299
|
+
brief?: string | undefined;
|
|
253
300
|
conductorName?: string | undefined;
|
|
254
301
|
conductorReportPath?: string | undefined;
|
|
255
302
|
activePhase?: string | undefined;
|
|
303
|
+
repoUrl?: string | undefined;
|
|
304
|
+
defaultBranch?: string | undefined;
|
|
305
|
+
vcsType?: "gitlab" | undefined;
|
|
256
306
|
}, {
|
|
257
307
|
name?: string | undefined;
|
|
308
|
+
key?: string | undefined;
|
|
309
|
+
brief?: string | undefined;
|
|
258
310
|
conductorPath?: string | undefined;
|
|
259
311
|
conductorName?: string | undefined;
|
|
260
312
|
conductorReportPath?: string | undefined;
|
|
261
313
|
activePhase?: string | undefined;
|
|
314
|
+
repoUrl?: string | undefined;
|
|
315
|
+
defaultBranch?: string | undefined;
|
|
316
|
+
vcsType?: "gitlab" | undefined;
|
|
262
317
|
}>;
|
|
263
318
|
export type Config = z.infer<typeof Config>;
|
|
319
|
+
export declare const VcsRefKind: z.ZodEnum<["branch", "mr"]>;
|
|
320
|
+
export type VcsRefKind = z.infer<typeof VcsRefKind>;
|
|
321
|
+
export declare const VcsRefState: z.ZodEnum<["opened", "merged", "closed"]>;
|
|
322
|
+
export type VcsRefState = z.infer<typeof VcsRefState>;
|
|
323
|
+
export declare const VcsRef: z.ZodObject<{
|
|
324
|
+
/** Auto-id, e.g. "MR-5" / "BR-1". */
|
|
325
|
+
id: z.ZodString;
|
|
326
|
+
kind: z.ZodEnum<["branch", "mr"]>;
|
|
327
|
+
/** MR iid as string, or branch name. */
|
|
328
|
+
ref: z.ZodString;
|
|
329
|
+
url: z.ZodDefault<z.ZodString>;
|
|
330
|
+
branch: z.ZodDefault<z.ZodString>;
|
|
331
|
+
targetBranch: z.ZodOptional<z.ZodString>;
|
|
332
|
+
component: z.ZodOptional<z.ZodString>;
|
|
333
|
+
storyIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
334
|
+
requirementIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
335
|
+
state: z.ZodDefault<z.ZodEnum<["opened", "merged", "closed"]>>;
|
|
336
|
+
mergeCommit: z.ZodOptional<z.ZodString>;
|
|
337
|
+
createdAt: z.ZodString;
|
|
338
|
+
updatedAt: z.ZodString;
|
|
339
|
+
}, "strip", z.ZodTypeAny, {
|
|
340
|
+
id: string;
|
|
341
|
+
createdAt: string;
|
|
342
|
+
updatedAt: string;
|
|
343
|
+
branch: string;
|
|
344
|
+
kind: "branch" | "mr";
|
|
345
|
+
ref: string;
|
|
346
|
+
url: string;
|
|
347
|
+
storyIds: string[];
|
|
348
|
+
requirementIds: string[];
|
|
349
|
+
state: "opened" | "merged" | "closed";
|
|
350
|
+
targetBranch?: string | undefined;
|
|
351
|
+
component?: string | undefined;
|
|
352
|
+
mergeCommit?: string | undefined;
|
|
353
|
+
}, {
|
|
354
|
+
id: string;
|
|
355
|
+
createdAt: string;
|
|
356
|
+
updatedAt: string;
|
|
357
|
+
kind: "branch" | "mr";
|
|
358
|
+
ref: string;
|
|
359
|
+
branch?: string | undefined;
|
|
360
|
+
url?: string | undefined;
|
|
361
|
+
targetBranch?: string | undefined;
|
|
362
|
+
component?: string | undefined;
|
|
363
|
+
storyIds?: string[] | undefined;
|
|
364
|
+
requirementIds?: string[] | undefined;
|
|
365
|
+
state?: "opened" | "merged" | "closed" | undefined;
|
|
366
|
+
mergeCommit?: string | undefined;
|
|
367
|
+
}>;
|
|
368
|
+
export type VcsRef = z.infer<typeof VcsRef>;
|
|
264
369
|
/** Coverage resolution mode across phases. */
|
|
265
370
|
export declare const CoverageMode: z.ZodEnum<["cumulative", "strict"]>;
|
|
266
371
|
export type CoverageMode = z.infer<typeof CoverageMode>;
|
|
372
|
+
export declare const ExportPayload: z.ZodObject<{
|
|
373
|
+
version: z.ZodLiteral<"1">;
|
|
374
|
+
exportedAt: z.ZodString;
|
|
375
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
376
|
+
name: z.ZodString;
|
|
377
|
+
}, "strip", z.ZodTypeAny, {
|
|
378
|
+
name: string;
|
|
379
|
+
}, {
|
|
380
|
+
name: string;
|
|
381
|
+
}>>;
|
|
382
|
+
data: z.ZodObject<{
|
|
383
|
+
components: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
384
|
+
/** Unique identifier. Use the same value as broker domain_tag (e.g. 'C-auth'). */
|
|
385
|
+
id: z.ZodString;
|
|
386
|
+
name: z.ZodString;
|
|
387
|
+
description: z.ZodDefault<z.ZodString>;
|
|
388
|
+
/** Broker routing tags this component maps to. E.g. ["auth","security"]. */
|
|
389
|
+
domainTags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
390
|
+
status: z.ZodDefault<z.ZodEnum<["active", "deprecated"]>>;
|
|
391
|
+
createdAt: z.ZodString;
|
|
392
|
+
updatedAt: z.ZodString;
|
|
393
|
+
}, "strip", z.ZodTypeAny, {
|
|
394
|
+
status: "active" | "deprecated";
|
|
395
|
+
id: string;
|
|
396
|
+
name: string;
|
|
397
|
+
description: string;
|
|
398
|
+
domainTags: string[];
|
|
399
|
+
createdAt: string;
|
|
400
|
+
updatedAt: string;
|
|
401
|
+
}, {
|
|
402
|
+
id: string;
|
|
403
|
+
name: string;
|
|
404
|
+
createdAt: string;
|
|
405
|
+
updatedAt: string;
|
|
406
|
+
status?: "active" | "deprecated" | undefined;
|
|
407
|
+
description?: string | undefined;
|
|
408
|
+
domainTags?: string[] | undefined;
|
|
409
|
+
}>, "many">>;
|
|
410
|
+
requirements: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
411
|
+
id: z.ZodString;
|
|
412
|
+
title: z.ZodString;
|
|
413
|
+
description: z.ZodDefault<z.ZodString>;
|
|
414
|
+
/** Provenance: where this requirement came from (doc, spec section, ticket). */
|
|
415
|
+
source: z.ZodDefault<z.ZodString>;
|
|
416
|
+
priority: z.ZodDefault<z.ZodEnum<["low", "medium", "high", "critical"]>>;
|
|
417
|
+
/** Component IDs this requirement belongs to (matches Component.id). */
|
|
418
|
+
components: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
419
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
420
|
+
status: z.ZodDefault<z.ZodEnum<["active", "deprecated"]>>;
|
|
421
|
+
/** Target phase this requirement is planned for (matches Phase.id). Optional;
|
|
422
|
+
* unassigned requirements are always in scope for every phase report. */
|
|
423
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
424
|
+
createdAt: z.ZodString;
|
|
425
|
+
updatedAt: z.ZodString;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
status: "active" | "deprecated";
|
|
428
|
+
id: string;
|
|
429
|
+
description: string;
|
|
430
|
+
createdAt: string;
|
|
431
|
+
updatedAt: string;
|
|
432
|
+
title: string;
|
|
433
|
+
source: string;
|
|
434
|
+
priority: "low" | "medium" | "high" | "critical";
|
|
435
|
+
components: string[];
|
|
436
|
+
tags: string[];
|
|
437
|
+
phase?: string | undefined;
|
|
438
|
+
}, {
|
|
439
|
+
id: string;
|
|
440
|
+
createdAt: string;
|
|
441
|
+
updatedAt: string;
|
|
442
|
+
title: string;
|
|
443
|
+
status?: "active" | "deprecated" | undefined;
|
|
444
|
+
description?: string | undefined;
|
|
445
|
+
source?: string | undefined;
|
|
446
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
447
|
+
components?: string[] | undefined;
|
|
448
|
+
tags?: string[] | undefined;
|
|
449
|
+
phase?: string | undefined;
|
|
450
|
+
}>, "many">>;
|
|
451
|
+
stories: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
452
|
+
id: z.ZodString;
|
|
453
|
+
title: z.ZodString;
|
|
454
|
+
description: z.ZodDefault<z.ZodString>;
|
|
455
|
+
/** Must contain at least one requirement id. Enforced at write time. */
|
|
456
|
+
requirements: z.ZodArray<z.ZodString, "many">;
|
|
457
|
+
acceptanceCriteria: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
text: z.ZodString;
|
|
460
|
+
}, "strip", z.ZodTypeAny, {
|
|
461
|
+
id: string;
|
|
462
|
+
text: string;
|
|
463
|
+
}, {
|
|
464
|
+
id: string;
|
|
465
|
+
text: string;
|
|
466
|
+
}>, "many">>;
|
|
467
|
+
status: z.ZodDefault<z.ZodEnum<["draft", "ready", "in_progress", "done"]>>;
|
|
468
|
+
/** Target phase this story is planned for (matches Phase.id). Optional and
|
|
469
|
+
* independent of the story's requirements; unassigned stories are always in
|
|
470
|
+
* scope for every phase report. */
|
|
471
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
472
|
+
createdAt: z.ZodString;
|
|
473
|
+
updatedAt: z.ZodString;
|
|
474
|
+
}, "strip", z.ZodTypeAny, {
|
|
475
|
+
status: "draft" | "ready" | "in_progress" | "done";
|
|
476
|
+
id: string;
|
|
477
|
+
description: string;
|
|
478
|
+
createdAt: string;
|
|
479
|
+
updatedAt: string;
|
|
480
|
+
title: string;
|
|
481
|
+
requirements: string[];
|
|
482
|
+
acceptanceCriteria: {
|
|
483
|
+
id: string;
|
|
484
|
+
text: string;
|
|
485
|
+
}[];
|
|
486
|
+
phase?: string | undefined;
|
|
487
|
+
}, {
|
|
488
|
+
id: string;
|
|
489
|
+
createdAt: string;
|
|
490
|
+
updatedAt: string;
|
|
491
|
+
title: string;
|
|
492
|
+
requirements: string[];
|
|
493
|
+
status?: "draft" | "ready" | "in_progress" | "done" | undefined;
|
|
494
|
+
description?: string | undefined;
|
|
495
|
+
phase?: string | undefined;
|
|
496
|
+
acceptanceCriteria?: {
|
|
497
|
+
id: string;
|
|
498
|
+
text: string;
|
|
499
|
+
}[] | undefined;
|
|
500
|
+
}>, "many">>;
|
|
501
|
+
phases: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
502
|
+
/**
|
|
503
|
+
* Free-form identifier. Use the same value as the broker phase_id
|
|
504
|
+
* (e.g. "P1", "Sprint-3") so both systems share one identifier.
|
|
505
|
+
* Previously required PHASE-\d+ format; that format is still valid.
|
|
506
|
+
*/
|
|
507
|
+
id: z.ZodString;
|
|
508
|
+
name: z.ZodString;
|
|
509
|
+
/** Sort key for evolution; lower = earlier. */
|
|
510
|
+
order: z.ZodNumber;
|
|
511
|
+
status: z.ZodDefault<z.ZodEnum<["planned", "active", "completed"]>>;
|
|
512
|
+
description: z.ZodDefault<z.ZodString>;
|
|
513
|
+
createdAt: z.ZodString;
|
|
514
|
+
updatedAt: z.ZodString;
|
|
515
|
+
}, "strip", z.ZodTypeAny, {
|
|
516
|
+
status: "active" | "planned" | "completed";
|
|
517
|
+
id: string;
|
|
518
|
+
name: string;
|
|
519
|
+
description: string;
|
|
520
|
+
createdAt: string;
|
|
521
|
+
updatedAt: string;
|
|
522
|
+
order: number;
|
|
523
|
+
}, {
|
|
524
|
+
id: string;
|
|
525
|
+
name: string;
|
|
526
|
+
createdAt: string;
|
|
527
|
+
updatedAt: string;
|
|
528
|
+
order: number;
|
|
529
|
+
status?: "active" | "planned" | "completed" | undefined;
|
|
530
|
+
description?: string | undefined;
|
|
531
|
+
}>, "many">>;
|
|
532
|
+
executions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
533
|
+
status: z.ZodEnum<["pass", "fail", "pending"]>;
|
|
534
|
+
ranAt: z.ZodString;
|
|
535
|
+
/** Optional run identifier (CI job, report file). Latest by ranAt wins per test. */
|
|
536
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
537
|
+
source: z.ZodDefault<z.ZodEnum<["manual", "cucumber-json", "import"]>>;
|
|
538
|
+
note: z.ZodOptional<z.ZodString>;
|
|
539
|
+
feature: z.ZodString;
|
|
540
|
+
name: z.ZodString;
|
|
541
|
+
}, "strip", z.ZodTypeAny, {
|
|
542
|
+
status: "pass" | "fail" | "pending";
|
|
543
|
+
name: string;
|
|
544
|
+
source: "manual" | "cucumber-json" | "import";
|
|
545
|
+
ranAt: string;
|
|
546
|
+
feature: string;
|
|
547
|
+
runId?: string | undefined;
|
|
548
|
+
note?: string | undefined;
|
|
549
|
+
}, {
|
|
550
|
+
status: "pass" | "fail" | "pending";
|
|
551
|
+
name: string;
|
|
552
|
+
ranAt: string;
|
|
553
|
+
feature: string;
|
|
554
|
+
source?: "manual" | "cucumber-json" | "import" | undefined;
|
|
555
|
+
runId?: string | undefined;
|
|
556
|
+
note?: string | undefined;
|
|
557
|
+
}>, "many">>>;
|
|
558
|
+
vcsRefs: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
559
|
+
/** Auto-id, e.g. "MR-5" / "BR-1". */
|
|
560
|
+
id: z.ZodString;
|
|
561
|
+
kind: z.ZodEnum<["branch", "mr"]>;
|
|
562
|
+
/** MR iid as string, or branch name. */
|
|
563
|
+
ref: z.ZodString;
|
|
564
|
+
url: z.ZodDefault<z.ZodString>;
|
|
565
|
+
branch: z.ZodDefault<z.ZodString>;
|
|
566
|
+
targetBranch: z.ZodOptional<z.ZodString>;
|
|
567
|
+
component: z.ZodOptional<z.ZodString>;
|
|
568
|
+
storyIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
569
|
+
requirementIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
570
|
+
state: z.ZodDefault<z.ZodEnum<["opened", "merged", "closed"]>>;
|
|
571
|
+
mergeCommit: z.ZodOptional<z.ZodString>;
|
|
572
|
+
createdAt: z.ZodString;
|
|
573
|
+
updatedAt: z.ZodString;
|
|
574
|
+
}, "strip", z.ZodTypeAny, {
|
|
575
|
+
id: string;
|
|
576
|
+
createdAt: string;
|
|
577
|
+
updatedAt: string;
|
|
578
|
+
branch: string;
|
|
579
|
+
kind: "branch" | "mr";
|
|
580
|
+
ref: string;
|
|
581
|
+
url: string;
|
|
582
|
+
storyIds: string[];
|
|
583
|
+
requirementIds: string[];
|
|
584
|
+
state: "opened" | "merged" | "closed";
|
|
585
|
+
targetBranch?: string | undefined;
|
|
586
|
+
component?: string | undefined;
|
|
587
|
+
mergeCommit?: string | undefined;
|
|
588
|
+
}, {
|
|
589
|
+
id: string;
|
|
590
|
+
createdAt: string;
|
|
591
|
+
updatedAt: string;
|
|
592
|
+
kind: "branch" | "mr";
|
|
593
|
+
ref: string;
|
|
594
|
+
branch?: string | undefined;
|
|
595
|
+
url?: string | undefined;
|
|
596
|
+
targetBranch?: string | undefined;
|
|
597
|
+
component?: string | undefined;
|
|
598
|
+
storyIds?: string[] | undefined;
|
|
599
|
+
requirementIds?: string[] | undefined;
|
|
600
|
+
state?: "opened" | "merged" | "closed" | undefined;
|
|
601
|
+
mergeCommit?: string | undefined;
|
|
602
|
+
}>, "many">>;
|
|
603
|
+
}, "strip", z.ZodTypeAny, {
|
|
604
|
+
components: {
|
|
605
|
+
status: "active" | "deprecated";
|
|
606
|
+
id: string;
|
|
607
|
+
name: string;
|
|
608
|
+
description: string;
|
|
609
|
+
domainTags: string[];
|
|
610
|
+
createdAt: string;
|
|
611
|
+
updatedAt: string;
|
|
612
|
+
}[];
|
|
613
|
+
requirements: {
|
|
614
|
+
status: "active" | "deprecated";
|
|
615
|
+
id: string;
|
|
616
|
+
description: string;
|
|
617
|
+
createdAt: string;
|
|
618
|
+
updatedAt: string;
|
|
619
|
+
title: string;
|
|
620
|
+
source: string;
|
|
621
|
+
priority: "low" | "medium" | "high" | "critical";
|
|
622
|
+
components: string[];
|
|
623
|
+
tags: string[];
|
|
624
|
+
phase?: string | undefined;
|
|
625
|
+
}[];
|
|
626
|
+
stories: {
|
|
627
|
+
status: "draft" | "ready" | "in_progress" | "done";
|
|
628
|
+
id: string;
|
|
629
|
+
description: string;
|
|
630
|
+
createdAt: string;
|
|
631
|
+
updatedAt: string;
|
|
632
|
+
title: string;
|
|
633
|
+
requirements: string[];
|
|
634
|
+
acceptanceCriteria: {
|
|
635
|
+
id: string;
|
|
636
|
+
text: string;
|
|
637
|
+
}[];
|
|
638
|
+
phase?: string | undefined;
|
|
639
|
+
}[];
|
|
640
|
+
phases: {
|
|
641
|
+
status: "active" | "planned" | "completed";
|
|
642
|
+
id: string;
|
|
643
|
+
name: string;
|
|
644
|
+
description: string;
|
|
645
|
+
createdAt: string;
|
|
646
|
+
updatedAt: string;
|
|
647
|
+
order: number;
|
|
648
|
+
}[];
|
|
649
|
+
executions: Record<string, {
|
|
650
|
+
status: "pass" | "fail" | "pending";
|
|
651
|
+
name: string;
|
|
652
|
+
source: "manual" | "cucumber-json" | "import";
|
|
653
|
+
ranAt: string;
|
|
654
|
+
feature: string;
|
|
655
|
+
runId?: string | undefined;
|
|
656
|
+
note?: string | undefined;
|
|
657
|
+
}[]>;
|
|
658
|
+
vcsRefs: {
|
|
659
|
+
id: string;
|
|
660
|
+
createdAt: string;
|
|
661
|
+
updatedAt: string;
|
|
662
|
+
branch: string;
|
|
663
|
+
kind: "branch" | "mr";
|
|
664
|
+
ref: string;
|
|
665
|
+
url: string;
|
|
666
|
+
storyIds: string[];
|
|
667
|
+
requirementIds: string[];
|
|
668
|
+
state: "opened" | "merged" | "closed";
|
|
669
|
+
targetBranch?: string | undefined;
|
|
670
|
+
component?: string | undefined;
|
|
671
|
+
mergeCommit?: string | undefined;
|
|
672
|
+
}[];
|
|
673
|
+
}, {
|
|
674
|
+
components?: {
|
|
675
|
+
id: string;
|
|
676
|
+
name: string;
|
|
677
|
+
createdAt: string;
|
|
678
|
+
updatedAt: string;
|
|
679
|
+
status?: "active" | "deprecated" | undefined;
|
|
680
|
+
description?: string | undefined;
|
|
681
|
+
domainTags?: string[] | undefined;
|
|
682
|
+
}[] | undefined;
|
|
683
|
+
requirements?: {
|
|
684
|
+
id: string;
|
|
685
|
+
createdAt: string;
|
|
686
|
+
updatedAt: string;
|
|
687
|
+
title: string;
|
|
688
|
+
status?: "active" | "deprecated" | undefined;
|
|
689
|
+
description?: string | undefined;
|
|
690
|
+
source?: string | undefined;
|
|
691
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
692
|
+
components?: string[] | undefined;
|
|
693
|
+
tags?: string[] | undefined;
|
|
694
|
+
phase?: string | undefined;
|
|
695
|
+
}[] | undefined;
|
|
696
|
+
stories?: {
|
|
697
|
+
id: string;
|
|
698
|
+
createdAt: string;
|
|
699
|
+
updatedAt: string;
|
|
700
|
+
title: string;
|
|
701
|
+
requirements: string[];
|
|
702
|
+
status?: "draft" | "ready" | "in_progress" | "done" | undefined;
|
|
703
|
+
description?: string | undefined;
|
|
704
|
+
phase?: string | undefined;
|
|
705
|
+
acceptanceCriteria?: {
|
|
706
|
+
id: string;
|
|
707
|
+
text: string;
|
|
708
|
+
}[] | undefined;
|
|
709
|
+
}[] | undefined;
|
|
710
|
+
phases?: {
|
|
711
|
+
id: string;
|
|
712
|
+
name: string;
|
|
713
|
+
createdAt: string;
|
|
714
|
+
updatedAt: string;
|
|
715
|
+
order: number;
|
|
716
|
+
status?: "active" | "planned" | "completed" | undefined;
|
|
717
|
+
description?: string | undefined;
|
|
718
|
+
}[] | undefined;
|
|
719
|
+
executions?: Record<string, {
|
|
720
|
+
status: "pass" | "fail" | "pending";
|
|
721
|
+
name: string;
|
|
722
|
+
ranAt: string;
|
|
723
|
+
feature: string;
|
|
724
|
+
source?: "manual" | "cucumber-json" | "import" | undefined;
|
|
725
|
+
runId?: string | undefined;
|
|
726
|
+
note?: string | undefined;
|
|
727
|
+
}[]> | undefined;
|
|
728
|
+
vcsRefs?: {
|
|
729
|
+
id: string;
|
|
730
|
+
createdAt: string;
|
|
731
|
+
updatedAt: string;
|
|
732
|
+
kind: "branch" | "mr";
|
|
733
|
+
ref: string;
|
|
734
|
+
branch?: string | undefined;
|
|
735
|
+
url?: string | undefined;
|
|
736
|
+
targetBranch?: string | undefined;
|
|
737
|
+
component?: string | undefined;
|
|
738
|
+
storyIds?: string[] | undefined;
|
|
739
|
+
requirementIds?: string[] | undefined;
|
|
740
|
+
state?: "opened" | "merged" | "closed" | undefined;
|
|
741
|
+
mergeCommit?: string | undefined;
|
|
742
|
+
}[] | undefined;
|
|
743
|
+
}>;
|
|
744
|
+
}, "strip", z.ZodTypeAny, {
|
|
745
|
+
version: "1";
|
|
746
|
+
exportedAt: string;
|
|
747
|
+
data: {
|
|
748
|
+
components: {
|
|
749
|
+
status: "active" | "deprecated";
|
|
750
|
+
id: string;
|
|
751
|
+
name: string;
|
|
752
|
+
description: string;
|
|
753
|
+
domainTags: string[];
|
|
754
|
+
createdAt: string;
|
|
755
|
+
updatedAt: string;
|
|
756
|
+
}[];
|
|
757
|
+
requirements: {
|
|
758
|
+
status: "active" | "deprecated";
|
|
759
|
+
id: string;
|
|
760
|
+
description: string;
|
|
761
|
+
createdAt: string;
|
|
762
|
+
updatedAt: string;
|
|
763
|
+
title: string;
|
|
764
|
+
source: string;
|
|
765
|
+
priority: "low" | "medium" | "high" | "critical";
|
|
766
|
+
components: string[];
|
|
767
|
+
tags: string[];
|
|
768
|
+
phase?: string | undefined;
|
|
769
|
+
}[];
|
|
770
|
+
stories: {
|
|
771
|
+
status: "draft" | "ready" | "in_progress" | "done";
|
|
772
|
+
id: string;
|
|
773
|
+
description: string;
|
|
774
|
+
createdAt: string;
|
|
775
|
+
updatedAt: string;
|
|
776
|
+
title: string;
|
|
777
|
+
requirements: string[];
|
|
778
|
+
acceptanceCriteria: {
|
|
779
|
+
id: string;
|
|
780
|
+
text: string;
|
|
781
|
+
}[];
|
|
782
|
+
phase?: string | undefined;
|
|
783
|
+
}[];
|
|
784
|
+
phases: {
|
|
785
|
+
status: "active" | "planned" | "completed";
|
|
786
|
+
id: string;
|
|
787
|
+
name: string;
|
|
788
|
+
description: string;
|
|
789
|
+
createdAt: string;
|
|
790
|
+
updatedAt: string;
|
|
791
|
+
order: number;
|
|
792
|
+
}[];
|
|
793
|
+
executions: Record<string, {
|
|
794
|
+
status: "pass" | "fail" | "pending";
|
|
795
|
+
name: string;
|
|
796
|
+
source: "manual" | "cucumber-json" | "import";
|
|
797
|
+
ranAt: string;
|
|
798
|
+
feature: string;
|
|
799
|
+
runId?: string | undefined;
|
|
800
|
+
note?: string | undefined;
|
|
801
|
+
}[]>;
|
|
802
|
+
vcsRefs: {
|
|
803
|
+
id: string;
|
|
804
|
+
createdAt: string;
|
|
805
|
+
updatedAt: string;
|
|
806
|
+
branch: string;
|
|
807
|
+
kind: "branch" | "mr";
|
|
808
|
+
ref: string;
|
|
809
|
+
url: string;
|
|
810
|
+
storyIds: string[];
|
|
811
|
+
requirementIds: string[];
|
|
812
|
+
state: "opened" | "merged" | "closed";
|
|
813
|
+
targetBranch?: string | undefined;
|
|
814
|
+
component?: string | undefined;
|
|
815
|
+
mergeCommit?: string | undefined;
|
|
816
|
+
}[];
|
|
817
|
+
};
|
|
818
|
+
source?: {
|
|
819
|
+
name: string;
|
|
820
|
+
} | undefined;
|
|
821
|
+
}, {
|
|
822
|
+
version: "1";
|
|
823
|
+
exportedAt: string;
|
|
824
|
+
data: {
|
|
825
|
+
components?: {
|
|
826
|
+
id: string;
|
|
827
|
+
name: string;
|
|
828
|
+
createdAt: string;
|
|
829
|
+
updatedAt: string;
|
|
830
|
+
status?: "active" | "deprecated" | undefined;
|
|
831
|
+
description?: string | undefined;
|
|
832
|
+
domainTags?: string[] | undefined;
|
|
833
|
+
}[] | undefined;
|
|
834
|
+
requirements?: {
|
|
835
|
+
id: string;
|
|
836
|
+
createdAt: string;
|
|
837
|
+
updatedAt: string;
|
|
838
|
+
title: string;
|
|
839
|
+
status?: "active" | "deprecated" | undefined;
|
|
840
|
+
description?: string | undefined;
|
|
841
|
+
source?: string | undefined;
|
|
842
|
+
priority?: "low" | "medium" | "high" | "critical" | undefined;
|
|
843
|
+
components?: string[] | undefined;
|
|
844
|
+
tags?: string[] | undefined;
|
|
845
|
+
phase?: string | undefined;
|
|
846
|
+
}[] | undefined;
|
|
847
|
+
stories?: {
|
|
848
|
+
id: string;
|
|
849
|
+
createdAt: string;
|
|
850
|
+
updatedAt: string;
|
|
851
|
+
title: string;
|
|
852
|
+
requirements: string[];
|
|
853
|
+
status?: "draft" | "ready" | "in_progress" | "done" | undefined;
|
|
854
|
+
description?: string | undefined;
|
|
855
|
+
phase?: string | undefined;
|
|
856
|
+
acceptanceCriteria?: {
|
|
857
|
+
id: string;
|
|
858
|
+
text: string;
|
|
859
|
+
}[] | undefined;
|
|
860
|
+
}[] | undefined;
|
|
861
|
+
phases?: {
|
|
862
|
+
id: string;
|
|
863
|
+
name: string;
|
|
864
|
+
createdAt: string;
|
|
865
|
+
updatedAt: string;
|
|
866
|
+
order: number;
|
|
867
|
+
status?: "active" | "planned" | "completed" | undefined;
|
|
868
|
+
description?: string | undefined;
|
|
869
|
+
}[] | undefined;
|
|
870
|
+
executions?: Record<string, {
|
|
871
|
+
status: "pass" | "fail" | "pending";
|
|
872
|
+
name: string;
|
|
873
|
+
ranAt: string;
|
|
874
|
+
feature: string;
|
|
875
|
+
source?: "manual" | "cucumber-json" | "import" | undefined;
|
|
876
|
+
runId?: string | undefined;
|
|
877
|
+
note?: string | undefined;
|
|
878
|
+
}[]> | undefined;
|
|
879
|
+
vcsRefs?: {
|
|
880
|
+
id: string;
|
|
881
|
+
createdAt: string;
|
|
882
|
+
updatedAt: string;
|
|
883
|
+
kind: "branch" | "mr";
|
|
884
|
+
ref: string;
|
|
885
|
+
branch?: string | undefined;
|
|
886
|
+
url?: string | undefined;
|
|
887
|
+
targetBranch?: string | undefined;
|
|
888
|
+
component?: string | undefined;
|
|
889
|
+
storyIds?: string[] | undefined;
|
|
890
|
+
requirementIds?: string[] | undefined;
|
|
891
|
+
state?: "opened" | "merged" | "closed" | undefined;
|
|
892
|
+
mergeCommit?: string | undefined;
|
|
893
|
+
}[] | undefined;
|
|
894
|
+
};
|
|
895
|
+
source?: {
|
|
896
|
+
name: string;
|
|
897
|
+
} | undefined;
|
|
898
|
+
}>;
|
|
899
|
+
export type ExportPayload = z.infer<typeof ExportPayload>;
|
|
900
|
+
export type ImportReport = {
|
|
901
|
+
imported: Record<string, number>;
|
|
902
|
+
skipped: Record<string, string[]>;
|
|
903
|
+
errors: string[];
|
|
904
|
+
};
|