sprinty-mcp 0.1.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/LICENSE +201 -0
- package/README.md +76 -0
- package/dist/dashboard/page.d.ts +1 -0
- package/dist/dashboard/page.js +19 -0
- package/dist/dashboard/page.js.map +1 -0
- package/dist/dashboard/server.d.ts +6 -0
- package/dist/dashboard/server.js +23 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/domain/enums.d.ts +13 -0
- package/dist/domain/enums.js +11 -0
- package/dist/domain/enums.js.map +1 -0
- package/dist/domain/events.d.ts +488 -0
- package/dist/domain/events.js +49 -0
- package/dist/domain/events.js.map +1 -0
- package/dist/domain/gates.d.ts +29 -0
- package/dist/domain/gates.js +13 -0
- package/dist/domain/gates.js.map +1 -0
- package/dist/domain/ids.d.ts +2 -0
- package/dist/domain/ids.js +7 -0
- package/dist/domain/ids.js.map +1 -0
- package/dist/domain/projection.d.ts +37 -0
- package/dist/domain/projection.js +66 -0
- package/dist/domain/projection.js.map +1 -0
- package/dist/domain/search.d.ts +8 -0
- package/dist/domain/search.js +25 -0
- package/dist/domain/search.js.map +1 -0
- package/dist/gates/run.d.ts +3 -0
- package/dist/gates/run.js +18 -0
- package/dist/gates/run.js.map +1 -0
- package/dist/git/git.d.ts +6 -0
- package/dist/git/git.js +31 -0
- package/dist/git/git.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/ledger/book.d.ts +10 -0
- package/dist/ledger/book.js +36 -0
- package/dist/ledger/book.js.map +1 -0
- package/dist/ledger/ledger.d.ts +10 -0
- package/dist/ledger/ledger.js +23 -0
- package/dist/ledger/ledger.js.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.js +58 -0
- package/dist/server.js.map +1 -0
- package/dist/store/store.d.ts +61 -0
- package/dist/store/store.js +162 -0
- package/dist/store/store.js.map +1 -0
- package/dist/tools/current.d.ts +8 -0
- package/dist/tools/current.js +13 -0
- package/dist/tools/current.js.map +1 -0
- package/dist/tools/register.d.ts +9 -0
- package/dist/tools/register.js +32 -0
- package/dist/tools/register.js.map +1 -0
- package/dist/tools/schemas.d.ts +189 -0
- package/dist/tools/schemas.js +40 -0
- package/dist/tools/schemas.js.map +1 -0
- package/package.json +33 -0
- package/skills/how-to-run-a-sprint/SKILL.md +39 -0
- package/skills/using-sprinty/SKILL.md +31 -0
|
@@ -0,0 +1,488 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SprintCreated: z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"sprint_created">;
|
|
4
|
+
goal: z.ZodString;
|
|
5
|
+
worktree: z.ZodString;
|
|
6
|
+
branch: z.ZodString;
|
|
7
|
+
dir: z.ZodString;
|
|
8
|
+
seq: z.ZodNumber;
|
|
9
|
+
ts: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
type: "sprint_created";
|
|
12
|
+
goal: string;
|
|
13
|
+
worktree: string;
|
|
14
|
+
branch: string;
|
|
15
|
+
dir: string;
|
|
16
|
+
seq: number;
|
|
17
|
+
ts: string;
|
|
18
|
+
}, {
|
|
19
|
+
type: "sprint_created";
|
|
20
|
+
goal: string;
|
|
21
|
+
worktree: string;
|
|
22
|
+
branch: string;
|
|
23
|
+
dir: string;
|
|
24
|
+
seq: number;
|
|
25
|
+
ts: string;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const SubsprintCreated: z.ZodObject<{
|
|
28
|
+
type: z.ZodLiteral<"subsprint_created">;
|
|
29
|
+
subsprint_id: z.ZodString;
|
|
30
|
+
description: z.ZodString;
|
|
31
|
+
goals: z.ZodArray<z.ZodString, "many">;
|
|
32
|
+
gates: z.ZodArray<z.ZodObject<{
|
|
33
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
34
|
+
spec: z.ZodString;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
37
|
+
spec: string;
|
|
38
|
+
}, {
|
|
39
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
40
|
+
spec: string;
|
|
41
|
+
}>, "many">;
|
|
42
|
+
spawned_from_item: z.ZodNullable<z.ZodString>;
|
|
43
|
+
seq: z.ZodNumber;
|
|
44
|
+
ts: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
type: "subsprint_created";
|
|
47
|
+
seq: number;
|
|
48
|
+
ts: string;
|
|
49
|
+
subsprint_id: string;
|
|
50
|
+
description: string;
|
|
51
|
+
goals: string[];
|
|
52
|
+
gates: {
|
|
53
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
54
|
+
spec: string;
|
|
55
|
+
}[];
|
|
56
|
+
spawned_from_item: string | null;
|
|
57
|
+
}, {
|
|
58
|
+
type: "subsprint_created";
|
|
59
|
+
seq: number;
|
|
60
|
+
ts: string;
|
|
61
|
+
subsprint_id: string;
|
|
62
|
+
description: string;
|
|
63
|
+
goals: string[];
|
|
64
|
+
gates: {
|
|
65
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
66
|
+
spec: string;
|
|
67
|
+
}[];
|
|
68
|
+
spawned_from_item: string | null;
|
|
69
|
+
}>;
|
|
70
|
+
export declare const ItemAdded: z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<"item_added">;
|
|
72
|
+
item_id: z.ZodString;
|
|
73
|
+
subsprint_id: z.ZodString;
|
|
74
|
+
description: z.ZodString;
|
|
75
|
+
code_locations: z.ZodArray<z.ZodString, "many">;
|
|
76
|
+
gates: z.ZodArray<z.ZodObject<{
|
|
77
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
78
|
+
spec: z.ZodString;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
81
|
+
spec: string;
|
|
82
|
+
}, {
|
|
83
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
84
|
+
spec: string;
|
|
85
|
+
}>, "many">;
|
|
86
|
+
seq: z.ZodNumber;
|
|
87
|
+
ts: z.ZodString;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
type: "item_added";
|
|
90
|
+
seq: number;
|
|
91
|
+
ts: string;
|
|
92
|
+
subsprint_id: string;
|
|
93
|
+
description: string;
|
|
94
|
+
gates: {
|
|
95
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
96
|
+
spec: string;
|
|
97
|
+
}[];
|
|
98
|
+
item_id: string;
|
|
99
|
+
code_locations: string[];
|
|
100
|
+
}, {
|
|
101
|
+
type: "item_added";
|
|
102
|
+
seq: number;
|
|
103
|
+
ts: string;
|
|
104
|
+
subsprint_id: string;
|
|
105
|
+
description: string;
|
|
106
|
+
gates: {
|
|
107
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
108
|
+
spec: string;
|
|
109
|
+
}[];
|
|
110
|
+
item_id: string;
|
|
111
|
+
code_locations: string[];
|
|
112
|
+
}>;
|
|
113
|
+
export declare const ItemUpdated: z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"item_updated">;
|
|
115
|
+
target_id: z.ZodString;
|
|
116
|
+
note: z.ZodString;
|
|
117
|
+
seq: z.ZodNumber;
|
|
118
|
+
ts: z.ZodString;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
type: "item_updated";
|
|
121
|
+
seq: number;
|
|
122
|
+
ts: string;
|
|
123
|
+
target_id: string;
|
|
124
|
+
note: string;
|
|
125
|
+
}, {
|
|
126
|
+
type: "item_updated";
|
|
127
|
+
seq: number;
|
|
128
|
+
ts: string;
|
|
129
|
+
target_id: string;
|
|
130
|
+
note: string;
|
|
131
|
+
}>;
|
|
132
|
+
export declare const ItemResolved: z.ZodObject<{
|
|
133
|
+
type: z.ZodLiteral<"item_resolved">;
|
|
134
|
+
item_id: z.ZodString;
|
|
135
|
+
disposition: z.ZodEnum<["completed", "split", "deprecated"]>;
|
|
136
|
+
commit_id: z.ZodNullable<z.ZodString>;
|
|
137
|
+
gate_results: z.ZodArray<z.ZodObject<{
|
|
138
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
139
|
+
spec: z.ZodString;
|
|
140
|
+
passed: z.ZodBoolean;
|
|
141
|
+
evidence: z.ZodString;
|
|
142
|
+
}, "strip", z.ZodTypeAny, {
|
|
143
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
144
|
+
spec: string;
|
|
145
|
+
passed: boolean;
|
|
146
|
+
evidence: string;
|
|
147
|
+
}, {
|
|
148
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
149
|
+
spec: string;
|
|
150
|
+
passed: boolean;
|
|
151
|
+
evidence: string;
|
|
152
|
+
}>, "many">;
|
|
153
|
+
spawned_subsprint: z.ZodNullable<z.ZodString>;
|
|
154
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
155
|
+
seq: z.ZodNumber;
|
|
156
|
+
ts: z.ZodString;
|
|
157
|
+
}, "strip", z.ZodTypeAny, {
|
|
158
|
+
type: "item_resolved";
|
|
159
|
+
seq: number;
|
|
160
|
+
ts: string;
|
|
161
|
+
item_id: string;
|
|
162
|
+
disposition: "completed" | "split" | "deprecated";
|
|
163
|
+
commit_id: string | null;
|
|
164
|
+
gate_results: {
|
|
165
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
166
|
+
spec: string;
|
|
167
|
+
passed: boolean;
|
|
168
|
+
evidence: string;
|
|
169
|
+
}[];
|
|
170
|
+
spawned_subsprint: string | null;
|
|
171
|
+
reason: string | null;
|
|
172
|
+
}, {
|
|
173
|
+
type: "item_resolved";
|
|
174
|
+
seq: number;
|
|
175
|
+
ts: string;
|
|
176
|
+
item_id: string;
|
|
177
|
+
disposition: "completed" | "split" | "deprecated";
|
|
178
|
+
commit_id: string | null;
|
|
179
|
+
gate_results: {
|
|
180
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
181
|
+
spec: string;
|
|
182
|
+
passed: boolean;
|
|
183
|
+
evidence: string;
|
|
184
|
+
}[];
|
|
185
|
+
spawned_subsprint: string | null;
|
|
186
|
+
reason: string | null;
|
|
187
|
+
}>;
|
|
188
|
+
export declare const NoteAdded: z.ZodObject<{
|
|
189
|
+
type: z.ZodLiteral<"note_added">;
|
|
190
|
+
element_id: z.ZodString;
|
|
191
|
+
text: z.ZodString;
|
|
192
|
+
seq: z.ZodNumber;
|
|
193
|
+
ts: z.ZodString;
|
|
194
|
+
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
type: "note_added";
|
|
196
|
+
seq: number;
|
|
197
|
+
ts: string;
|
|
198
|
+
element_id: string;
|
|
199
|
+
text: string;
|
|
200
|
+
}, {
|
|
201
|
+
type: "note_added";
|
|
202
|
+
seq: number;
|
|
203
|
+
ts: string;
|
|
204
|
+
element_id: string;
|
|
205
|
+
text: string;
|
|
206
|
+
}>;
|
|
207
|
+
export declare const SprintClosed: z.ZodObject<{
|
|
208
|
+
type: z.ZodLiteral<"sprint_closed">;
|
|
209
|
+
gate_results: z.ZodArray<z.ZodObject<{
|
|
210
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
211
|
+
spec: z.ZodString;
|
|
212
|
+
passed: z.ZodBoolean;
|
|
213
|
+
evidence: z.ZodString;
|
|
214
|
+
}, "strip", z.ZodTypeAny, {
|
|
215
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
216
|
+
spec: string;
|
|
217
|
+
passed: boolean;
|
|
218
|
+
evidence: string;
|
|
219
|
+
}, {
|
|
220
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
221
|
+
spec: string;
|
|
222
|
+
passed: boolean;
|
|
223
|
+
evidence: string;
|
|
224
|
+
}>, "many">;
|
|
225
|
+
seq: z.ZodNumber;
|
|
226
|
+
ts: z.ZodString;
|
|
227
|
+
}, "strip", z.ZodTypeAny, {
|
|
228
|
+
type: "sprint_closed";
|
|
229
|
+
seq: number;
|
|
230
|
+
ts: string;
|
|
231
|
+
gate_results: {
|
|
232
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
233
|
+
spec: string;
|
|
234
|
+
passed: boolean;
|
|
235
|
+
evidence: string;
|
|
236
|
+
}[];
|
|
237
|
+
}, {
|
|
238
|
+
type: "sprint_closed";
|
|
239
|
+
seq: number;
|
|
240
|
+
ts: string;
|
|
241
|
+
gate_results: {
|
|
242
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
243
|
+
spec: string;
|
|
244
|
+
passed: boolean;
|
|
245
|
+
evidence: string;
|
|
246
|
+
}[];
|
|
247
|
+
}>;
|
|
248
|
+
export declare const LedgerEvent: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
249
|
+
type: z.ZodLiteral<"sprint_created">;
|
|
250
|
+
goal: z.ZodString;
|
|
251
|
+
worktree: z.ZodString;
|
|
252
|
+
branch: z.ZodString;
|
|
253
|
+
dir: z.ZodString;
|
|
254
|
+
seq: z.ZodNumber;
|
|
255
|
+
ts: z.ZodString;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
type: "sprint_created";
|
|
258
|
+
goal: string;
|
|
259
|
+
worktree: string;
|
|
260
|
+
branch: string;
|
|
261
|
+
dir: string;
|
|
262
|
+
seq: number;
|
|
263
|
+
ts: string;
|
|
264
|
+
}, {
|
|
265
|
+
type: "sprint_created";
|
|
266
|
+
goal: string;
|
|
267
|
+
worktree: string;
|
|
268
|
+
branch: string;
|
|
269
|
+
dir: string;
|
|
270
|
+
seq: number;
|
|
271
|
+
ts: string;
|
|
272
|
+
}>, z.ZodObject<{
|
|
273
|
+
type: z.ZodLiteral<"subsprint_created">;
|
|
274
|
+
subsprint_id: z.ZodString;
|
|
275
|
+
description: z.ZodString;
|
|
276
|
+
goals: z.ZodArray<z.ZodString, "many">;
|
|
277
|
+
gates: z.ZodArray<z.ZodObject<{
|
|
278
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
279
|
+
spec: z.ZodString;
|
|
280
|
+
}, "strip", z.ZodTypeAny, {
|
|
281
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
282
|
+
spec: string;
|
|
283
|
+
}, {
|
|
284
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
285
|
+
spec: string;
|
|
286
|
+
}>, "many">;
|
|
287
|
+
spawned_from_item: z.ZodNullable<z.ZodString>;
|
|
288
|
+
seq: z.ZodNumber;
|
|
289
|
+
ts: z.ZodString;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
type: "subsprint_created";
|
|
292
|
+
seq: number;
|
|
293
|
+
ts: string;
|
|
294
|
+
subsprint_id: string;
|
|
295
|
+
description: string;
|
|
296
|
+
goals: string[];
|
|
297
|
+
gates: {
|
|
298
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
299
|
+
spec: string;
|
|
300
|
+
}[];
|
|
301
|
+
spawned_from_item: string | null;
|
|
302
|
+
}, {
|
|
303
|
+
type: "subsprint_created";
|
|
304
|
+
seq: number;
|
|
305
|
+
ts: string;
|
|
306
|
+
subsprint_id: string;
|
|
307
|
+
description: string;
|
|
308
|
+
goals: string[];
|
|
309
|
+
gates: {
|
|
310
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
311
|
+
spec: string;
|
|
312
|
+
}[];
|
|
313
|
+
spawned_from_item: string | null;
|
|
314
|
+
}>, z.ZodObject<{
|
|
315
|
+
type: z.ZodLiteral<"item_added">;
|
|
316
|
+
item_id: z.ZodString;
|
|
317
|
+
subsprint_id: z.ZodString;
|
|
318
|
+
description: z.ZodString;
|
|
319
|
+
code_locations: z.ZodArray<z.ZodString, "many">;
|
|
320
|
+
gates: z.ZodArray<z.ZodObject<{
|
|
321
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
322
|
+
spec: z.ZodString;
|
|
323
|
+
}, "strip", z.ZodTypeAny, {
|
|
324
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
325
|
+
spec: string;
|
|
326
|
+
}, {
|
|
327
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
328
|
+
spec: string;
|
|
329
|
+
}>, "many">;
|
|
330
|
+
seq: z.ZodNumber;
|
|
331
|
+
ts: z.ZodString;
|
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
|
333
|
+
type: "item_added";
|
|
334
|
+
seq: number;
|
|
335
|
+
ts: string;
|
|
336
|
+
subsprint_id: string;
|
|
337
|
+
description: string;
|
|
338
|
+
gates: {
|
|
339
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
340
|
+
spec: string;
|
|
341
|
+
}[];
|
|
342
|
+
item_id: string;
|
|
343
|
+
code_locations: string[];
|
|
344
|
+
}, {
|
|
345
|
+
type: "item_added";
|
|
346
|
+
seq: number;
|
|
347
|
+
ts: string;
|
|
348
|
+
subsprint_id: string;
|
|
349
|
+
description: string;
|
|
350
|
+
gates: {
|
|
351
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
352
|
+
spec: string;
|
|
353
|
+
}[];
|
|
354
|
+
item_id: string;
|
|
355
|
+
code_locations: string[];
|
|
356
|
+
}>, z.ZodObject<{
|
|
357
|
+
type: z.ZodLiteral<"item_updated">;
|
|
358
|
+
target_id: z.ZodString;
|
|
359
|
+
note: z.ZodString;
|
|
360
|
+
seq: z.ZodNumber;
|
|
361
|
+
ts: z.ZodString;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
type: "item_updated";
|
|
364
|
+
seq: number;
|
|
365
|
+
ts: string;
|
|
366
|
+
target_id: string;
|
|
367
|
+
note: string;
|
|
368
|
+
}, {
|
|
369
|
+
type: "item_updated";
|
|
370
|
+
seq: number;
|
|
371
|
+
ts: string;
|
|
372
|
+
target_id: string;
|
|
373
|
+
note: string;
|
|
374
|
+
}>, z.ZodObject<{
|
|
375
|
+
type: z.ZodLiteral<"item_resolved">;
|
|
376
|
+
item_id: z.ZodString;
|
|
377
|
+
disposition: z.ZodEnum<["completed", "split", "deprecated"]>;
|
|
378
|
+
commit_id: z.ZodNullable<z.ZodString>;
|
|
379
|
+
gate_results: z.ZodArray<z.ZodObject<{
|
|
380
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
381
|
+
spec: z.ZodString;
|
|
382
|
+
passed: z.ZodBoolean;
|
|
383
|
+
evidence: z.ZodString;
|
|
384
|
+
}, "strip", z.ZodTypeAny, {
|
|
385
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
386
|
+
spec: string;
|
|
387
|
+
passed: boolean;
|
|
388
|
+
evidence: string;
|
|
389
|
+
}, {
|
|
390
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
391
|
+
spec: string;
|
|
392
|
+
passed: boolean;
|
|
393
|
+
evidence: string;
|
|
394
|
+
}>, "many">;
|
|
395
|
+
spawned_subsprint: z.ZodNullable<z.ZodString>;
|
|
396
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
397
|
+
seq: z.ZodNumber;
|
|
398
|
+
ts: z.ZodString;
|
|
399
|
+
}, "strip", z.ZodTypeAny, {
|
|
400
|
+
type: "item_resolved";
|
|
401
|
+
seq: number;
|
|
402
|
+
ts: string;
|
|
403
|
+
item_id: string;
|
|
404
|
+
disposition: "completed" | "split" | "deprecated";
|
|
405
|
+
commit_id: string | null;
|
|
406
|
+
gate_results: {
|
|
407
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
408
|
+
spec: string;
|
|
409
|
+
passed: boolean;
|
|
410
|
+
evidence: string;
|
|
411
|
+
}[];
|
|
412
|
+
spawned_subsprint: string | null;
|
|
413
|
+
reason: string | null;
|
|
414
|
+
}, {
|
|
415
|
+
type: "item_resolved";
|
|
416
|
+
seq: number;
|
|
417
|
+
ts: string;
|
|
418
|
+
item_id: string;
|
|
419
|
+
disposition: "completed" | "split" | "deprecated";
|
|
420
|
+
commit_id: string | null;
|
|
421
|
+
gate_results: {
|
|
422
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
423
|
+
spec: string;
|
|
424
|
+
passed: boolean;
|
|
425
|
+
evidence: string;
|
|
426
|
+
}[];
|
|
427
|
+
spawned_subsprint: string | null;
|
|
428
|
+
reason: string | null;
|
|
429
|
+
}>, z.ZodObject<{
|
|
430
|
+
type: z.ZodLiteral<"note_added">;
|
|
431
|
+
element_id: z.ZodString;
|
|
432
|
+
text: z.ZodString;
|
|
433
|
+
seq: z.ZodNumber;
|
|
434
|
+
ts: z.ZodString;
|
|
435
|
+
}, "strip", z.ZodTypeAny, {
|
|
436
|
+
type: "note_added";
|
|
437
|
+
seq: number;
|
|
438
|
+
ts: string;
|
|
439
|
+
element_id: string;
|
|
440
|
+
text: string;
|
|
441
|
+
}, {
|
|
442
|
+
type: "note_added";
|
|
443
|
+
seq: number;
|
|
444
|
+
ts: string;
|
|
445
|
+
element_id: string;
|
|
446
|
+
text: string;
|
|
447
|
+
}>, z.ZodObject<{
|
|
448
|
+
type: z.ZodLiteral<"sprint_closed">;
|
|
449
|
+
gate_results: z.ZodArray<z.ZodObject<{
|
|
450
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
451
|
+
spec: z.ZodString;
|
|
452
|
+
passed: z.ZodBoolean;
|
|
453
|
+
evidence: z.ZodString;
|
|
454
|
+
}, "strip", z.ZodTypeAny, {
|
|
455
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
456
|
+
spec: string;
|
|
457
|
+
passed: boolean;
|
|
458
|
+
evidence: string;
|
|
459
|
+
}, {
|
|
460
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
461
|
+
spec: string;
|
|
462
|
+
passed: boolean;
|
|
463
|
+
evidence: string;
|
|
464
|
+
}>, "many">;
|
|
465
|
+
seq: z.ZodNumber;
|
|
466
|
+
ts: z.ZodString;
|
|
467
|
+
}, "strip", z.ZodTypeAny, {
|
|
468
|
+
type: "sprint_closed";
|
|
469
|
+
seq: number;
|
|
470
|
+
ts: string;
|
|
471
|
+
gate_results: {
|
|
472
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
473
|
+
spec: string;
|
|
474
|
+
passed: boolean;
|
|
475
|
+
evidence: string;
|
|
476
|
+
}[];
|
|
477
|
+
}, {
|
|
478
|
+
type: "sprint_closed";
|
|
479
|
+
seq: number;
|
|
480
|
+
ts: string;
|
|
481
|
+
gate_results: {
|
|
482
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
483
|
+
spec: string;
|
|
484
|
+
passed: boolean;
|
|
485
|
+
evidence: string;
|
|
486
|
+
}[];
|
|
487
|
+
}>]>;
|
|
488
|
+
export type LedgerEvent = z.infer<typeof LedgerEvent>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { Disposition } from "./enums.js";
|
|
3
|
+
import { Gate, GateResult } from "./gates.js";
|
|
4
|
+
const base = {
|
|
5
|
+
seq: z.number().int().nonnegative(),
|
|
6
|
+
ts: z.string().datetime(),
|
|
7
|
+
};
|
|
8
|
+
export const SprintCreated = z.object({
|
|
9
|
+
...base, type: z.literal("sprint_created"),
|
|
10
|
+
goal: z.string().min(1), worktree: z.string(), branch: z.string(), dir: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export const SubsprintCreated = z.object({
|
|
13
|
+
...base, type: z.literal("subsprint_created"),
|
|
14
|
+
subsprint_id: z.string(), description: z.string().min(1),
|
|
15
|
+
goals: z.array(z.string().min(1)).min(1),
|
|
16
|
+
gates: z.array(Gate).min(1),
|
|
17
|
+
spawned_from_item: z.string().nullable(),
|
|
18
|
+
});
|
|
19
|
+
export const ItemAdded = z.object({
|
|
20
|
+
...base, type: z.literal("item_added"),
|
|
21
|
+
item_id: z.string(), subsprint_id: z.string(), description: z.string().min(1),
|
|
22
|
+
code_locations: z.array(z.string().min(1)).min(1),
|
|
23
|
+
gates: z.array(Gate).min(1),
|
|
24
|
+
});
|
|
25
|
+
export const ItemUpdated = z.object({
|
|
26
|
+
...base, type: z.literal("item_updated"),
|
|
27
|
+
target_id: z.string(), note: z.string().min(1),
|
|
28
|
+
});
|
|
29
|
+
export const ItemResolved = z.object({
|
|
30
|
+
...base, type: z.literal("item_resolved"),
|
|
31
|
+
item_id: z.string(),
|
|
32
|
+
disposition: Disposition,
|
|
33
|
+
commit_id: z.string().nullable(),
|
|
34
|
+
gate_results: z.array(GateResult),
|
|
35
|
+
spawned_subsprint: z.string().nullable(),
|
|
36
|
+
reason: z.string().nullable(),
|
|
37
|
+
});
|
|
38
|
+
export const NoteAdded = z.object({
|
|
39
|
+
...base, type: z.literal("note_added"),
|
|
40
|
+
element_id: z.string(), text: z.string().min(1),
|
|
41
|
+
});
|
|
42
|
+
export const SprintClosed = z.object({
|
|
43
|
+
...base, type: z.literal("sprint_closed"),
|
|
44
|
+
gate_results: z.array(GateResult),
|
|
45
|
+
});
|
|
46
|
+
export const LedgerEvent = z.discriminatedUnion("type", [
|
|
47
|
+
SprintCreated, SubsprintCreated, ItemAdded, ItemUpdated, ItemResolved, NoteAdded, SprintClosed,
|
|
48
|
+
]);
|
|
49
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/domain/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,IAAI,GAAG;IACX,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC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C,GAAG,CAAC,CAAC,CAAC;CAChD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC;IACzC,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;CAClC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACtD,aAAa,EAAE,gBAAgB,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY;CAC/F,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Gate: z.ZodObject<{
|
|
3
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
4
|
+
spec: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
7
|
+
spec: string;
|
|
8
|
+
}, {
|
|
9
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
10
|
+
spec: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type Gate = z.infer<typeof Gate>;
|
|
13
|
+
export declare const GateResult: z.ZodObject<{
|
|
14
|
+
kind: z.ZodEnum<["test", "typecheck", "build", "command", "manual"]>;
|
|
15
|
+
spec: z.ZodString;
|
|
16
|
+
passed: z.ZodBoolean;
|
|
17
|
+
evidence: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
20
|
+
spec: string;
|
|
21
|
+
passed: boolean;
|
|
22
|
+
evidence: string;
|
|
23
|
+
}, {
|
|
24
|
+
kind: "test" | "typecheck" | "build" | "command" | "manual";
|
|
25
|
+
spec: string;
|
|
26
|
+
passed: boolean;
|
|
27
|
+
evidence: string;
|
|
28
|
+
}>;
|
|
29
|
+
export type GateResult = z.infer<typeof GateResult>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { GateKind } from "./enums.js";
|
|
3
|
+
export const Gate = z.object({
|
|
4
|
+
kind: GateKind,
|
|
5
|
+
spec: z.string().min(1),
|
|
6
|
+
});
|
|
7
|
+
export const GateResult = z.object({
|
|
8
|
+
kind: GateKind,
|
|
9
|
+
spec: z.string().min(1),
|
|
10
|
+
passed: z.boolean(),
|
|
11
|
+
evidence: z.string().min(1),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=gates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gates.js","sourceRoot":"","sources":["../../src/domain/gates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5B,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export function mintSubsprintId(existingSubsprintCount) {
|
|
2
|
+
return `S${String(existingSubsprintCount + 1).padStart(2, "0")}`;
|
|
3
|
+
}
|
|
4
|
+
export function mintItemId(subsprintId, existingItemsInSubsprint) {
|
|
5
|
+
return `${subsprintId}-${String(existingItemsInSubsprint + 1).padStart(3, "0")}`;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/domain/ids.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,eAAe,CAAC,sBAA8B;IAC5D,OAAO,IAAI,MAAM,CAAC,sBAAsB,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,WAAmB,EAAE,wBAAgC;IAC9E,OAAO,GAAG,WAAW,IAAI,MAAM,CAAC,wBAAwB,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { LedgerEvent } from "./events.js";
|
|
2
|
+
import type { Gate, GateResult } from "./gates.js";
|
|
3
|
+
import type { Disposition, ItemStatus, SubsprintStatus, SprintStatus } from "./enums.js";
|
|
4
|
+
export interface ItemView {
|
|
5
|
+
id: string;
|
|
6
|
+
subsprint_id: string;
|
|
7
|
+
description: string;
|
|
8
|
+
code_locations: string[];
|
|
9
|
+
gates: Gate[];
|
|
10
|
+
status: ItemStatus;
|
|
11
|
+
disposition: Disposition | null;
|
|
12
|
+
commit_id: string | null;
|
|
13
|
+
gate_results: GateResult[];
|
|
14
|
+
reason: string | null;
|
|
15
|
+
spawned_subsprint: string | null;
|
|
16
|
+
updates: string[];
|
|
17
|
+
notes: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface SubsprintView {
|
|
20
|
+
id: string;
|
|
21
|
+
description: string;
|
|
22
|
+
goals: string[];
|
|
23
|
+
gates: Gate[];
|
|
24
|
+
status: SubsprintStatus;
|
|
25
|
+
spawned_from_item: string | null;
|
|
26
|
+
notes: string[];
|
|
27
|
+
items: ItemView[];
|
|
28
|
+
}
|
|
29
|
+
export interface SprintView {
|
|
30
|
+
goal: string;
|
|
31
|
+
worktree: string;
|
|
32
|
+
branch: string;
|
|
33
|
+
dir: string;
|
|
34
|
+
status: SprintStatus;
|
|
35
|
+
subsprints: SubsprintView[];
|
|
36
|
+
}
|
|
37
|
+
export declare function project(events: LedgerEvent[]): SprintView | null;
|