@openspecui/core 3.5.2 → 3.6.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/hosted-app.d.mts +1 -1
- package/dist/hosted-app.mjs +1 -1
- package/dist/index.d.mts +62 -620
- package/dist/index.mjs +81 -97
- package/dist/markdown-facts-BmSmZmpB.mjs +136 -0
- package/dist/markdown-facts-f3kXnqXb.d.mts +39 -0
- package/dist/markdown-facts.d.mts +2 -0
- package/dist/markdown-facts.mjs +3 -0
- package/dist/markdown-reading-CrchEfoW.mjs +104 -0
- package/dist/markdown-reading-D36W693c.d.mts +74 -0
- package/dist/markdown-reading.d.mts +3 -0
- package/dist/markdown-reading.mjs +4 -0
- package/dist/{notifications-BWvRNkRJ.d.mts → notifications-C4amULI4.d.mts} +1 -1
- package/dist/{notifications-F81mmO55.mjs → notifications-fD-V5hyP.mjs} +2 -2
- package/dist/notifications.d.mts +2 -2
- package/dist/notifications.mjs +3 -3
- package/dist/openspec-annotations-BMy9nWUe.mjs +436 -0
- package/dist/openspec-annotations-CJmYcfAu.d.mts +30 -0
- package/dist/openspec-annotations.d.mts +4 -0
- package/dist/openspec-annotations.mjs +5 -0
- package/dist/openspec-projection-DTuKPTgf.d.mts +1142 -0
- package/dist/openspec-projection-DWqBxedv.mjs +223 -0
- package/dist/openspec-projection.d.mts +5 -0
- package/dist/openspec-projection.mjs +6 -0
- package/dist/opsx-display-path.d.mts +1 -1
- package/dist/opsx-display-path.mjs +1 -1
- package/dist/sounds.d.mts +1 -1
- package/dist/sounds.mjs +1 -1
- package/dist/{terminal-audio-8E82E0AM.d.mts → terminal-audio-U9Exv9A5.d.mts} +1 -1
- package/dist/{terminal-audio-DDwxz9sJ.mjs → terminal-audio-UEv3j655.mjs} +1 -1
- package/dist/terminal-audio.d.mts +2 -2
- package/dist/terminal-audio.mjs +2 -2
- package/dist/terminal-control.d.mts +2 -2
- package/dist/terminal-control.mjs +1 -1
- package/dist/{terminal-invocation-CpdllJff.d.mts → terminal-invocation-BmwWgwgY.d.mts} +6 -6
- package/dist/terminal-invocation.d.mts +1 -1
- package/dist/terminal-invocation.mjs +1 -1
- package/dist/terminal-theme.d.mts +1 -1
- package/dist/terminal-theme.mjs +1 -1
- package/package.json +25 -3
- /package/dist/{hosted-app-CIOJpbzc.mjs → hosted-app-DFFffbJc.mjs} +0 -0
- /package/dist/{hosted-app-DaGUbBJn.d.mts → hosted-app-DZrYivji.d.mts} +0 -0
- /package/dist/{opsx-display-path-CuQyGB_A.d.mts → opsx-display-path-CkV9sq_j.d.mts} +0 -0
- /package/dist/{opsx-display-path-B6Owu17P.mjs → opsx-display-path-D4KLYRXQ.mjs} +0 -0
- /package/dist/{sounds-C0dNSFm8.mjs → sounds-BzNKMW05.mjs} +0 -0
- /package/dist/{sounds-Bw-sSyFZ.d.mts → sounds-CYxOpEdm.d.mts} +0 -0
- /package/dist/{terminal-control-DtBprY6-.mjs → terminal-control-Bxois59k.mjs} +0 -0
- /package/dist/{terminal-invocation-Cdi6_Kl6.mjs → terminal-invocation-BRCuSBjE.mjs} +0 -0
- /package/dist/{terminal-theme-CMQqJvIQ.mjs → terminal-theme-CIv3YMfi.mjs} +0 -0
- /package/dist/{terminal-theme-wbkK9vVH.d.mts → terminal-theme-lPZGfVA_.d.mts} +0 -0
|
@@ -0,0 +1,1142 @@
|
|
|
1
|
+
import { d as MarkdownReadingPlugin, l as MarkdownReadingDocument } from "./markdown-reading-D36W693c.mjs";
|
|
2
|
+
import { n as OpenSpecAnnotation, t as AnnotatedOpenSpecDocument } from "./openspec-annotations-CJmYcfAu.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/schemas.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* File metadata for a change directory entry.
|
|
9
|
+
*/
|
|
10
|
+
declare const ChangeFileSchema: z.ZodObject<{
|
|
11
|
+
/** Path relative to the change root (e.g., "proposal.md" or "specs/auth/spec.md") */
|
|
12
|
+
path: z.ZodString;
|
|
13
|
+
/** Entry type */
|
|
14
|
+
type: z.ZodEnum<["file", "directory"]>;
|
|
15
|
+
/** Optional file content for text files */
|
|
16
|
+
content: z.ZodOptional<z.ZodString>;
|
|
17
|
+
/** Optional byte size for files */
|
|
18
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
path: string;
|
|
21
|
+
type: "file" | "directory";
|
|
22
|
+
size?: number | undefined;
|
|
23
|
+
content?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
path: string;
|
|
26
|
+
type: "file" | "directory";
|
|
27
|
+
size?: number | undefined;
|
|
28
|
+
content?: string | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
type ChangeFile = z.infer<typeof ChangeFileSchema>;
|
|
31
|
+
declare const ScenarioStepKeywordSchema: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
32
|
+
declare const ScenarioStepSchema: z.ZodObject<{
|
|
33
|
+
/** Scenario step keyword from the list item prefix */
|
|
34
|
+
keyword: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
35
|
+
/** Markdown content after the keyword */
|
|
36
|
+
contentMarkdown: z.ZodString;
|
|
37
|
+
/** Original markdown list item line */
|
|
38
|
+
rawText: z.ZodString;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
41
|
+
contentMarkdown: string;
|
|
42
|
+
rawText: string;
|
|
43
|
+
}, {
|
|
44
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
45
|
+
contentMarkdown: string;
|
|
46
|
+
rawText: string;
|
|
47
|
+
}>;
|
|
48
|
+
type ScenarioStep = z.infer<typeof ScenarioStepSchema>;
|
|
49
|
+
/**
|
|
50
|
+
* A requirement within a specification.
|
|
51
|
+
* Requirements should use RFC 2119 keywords (SHALL, MUST, etc.)
|
|
52
|
+
*/
|
|
53
|
+
declare const RequirementSchema: z.ZodObject<{
|
|
54
|
+
/** Unique identifier within the spec (e.g., "req-1") */
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
/** Requirement heading text from `### Requirement:` */
|
|
57
|
+
title: z.ZodString;
|
|
58
|
+
/** Markdown body between the requirement heading and the first scenario/next requirement */
|
|
59
|
+
bodyMarkdown: z.ZodString;
|
|
60
|
+
/** Full requirement text used for validation and search facts */
|
|
61
|
+
text: z.ZodString;
|
|
62
|
+
/** Test scenarios for this requirement */
|
|
63
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
64
|
+
/** Scenario heading text from `#### Scenario:` */
|
|
65
|
+
title: z.ZodString;
|
|
66
|
+
/** Markdown body between this scenario heading and the next scenario/requirement */
|
|
67
|
+
bodyMarkdown: z.ZodString;
|
|
68
|
+
/** Full scenario Markdown facts, including the scenario title */
|
|
69
|
+
rawText: z.ZodString;
|
|
70
|
+
/** Parsed scenario step facts for reading enhancements */
|
|
71
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
72
|
+
/** Scenario step keyword from the list item prefix */
|
|
73
|
+
keyword: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
74
|
+
/** Markdown content after the keyword */
|
|
75
|
+
contentMarkdown: z.ZodString;
|
|
76
|
+
/** Original markdown list item line */
|
|
77
|
+
rawText: z.ZodString;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
80
|
+
contentMarkdown: string;
|
|
81
|
+
rawText: string;
|
|
82
|
+
}, {
|
|
83
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
84
|
+
contentMarkdown: string;
|
|
85
|
+
rawText: string;
|
|
86
|
+
}>, "many">>;
|
|
87
|
+
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
title: string;
|
|
89
|
+
rawText: string;
|
|
90
|
+
bodyMarkdown: string;
|
|
91
|
+
steps?: {
|
|
92
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
93
|
+
contentMarkdown: string;
|
|
94
|
+
rawText: string;
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
title: string;
|
|
98
|
+
rawText: string;
|
|
99
|
+
bodyMarkdown: string;
|
|
100
|
+
steps?: {
|
|
101
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
102
|
+
contentMarkdown: string;
|
|
103
|
+
rawText: string;
|
|
104
|
+
}[] | undefined;
|
|
105
|
+
}>, "many">;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
title: string;
|
|
108
|
+
id: string;
|
|
109
|
+
text: string;
|
|
110
|
+
bodyMarkdown: string;
|
|
111
|
+
scenarios: {
|
|
112
|
+
title: string;
|
|
113
|
+
rawText: string;
|
|
114
|
+
bodyMarkdown: string;
|
|
115
|
+
steps?: {
|
|
116
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
117
|
+
contentMarkdown: string;
|
|
118
|
+
rawText: string;
|
|
119
|
+
}[] | undefined;
|
|
120
|
+
}[];
|
|
121
|
+
}, {
|
|
122
|
+
title: string;
|
|
123
|
+
id: string;
|
|
124
|
+
text: string;
|
|
125
|
+
bodyMarkdown: string;
|
|
126
|
+
scenarios: {
|
|
127
|
+
title: string;
|
|
128
|
+
rawText: string;
|
|
129
|
+
bodyMarkdown: string;
|
|
130
|
+
steps?: {
|
|
131
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
132
|
+
contentMarkdown: string;
|
|
133
|
+
rawText: string;
|
|
134
|
+
}[] | undefined;
|
|
135
|
+
}[];
|
|
136
|
+
}>;
|
|
137
|
+
type Requirement = z.infer<typeof RequirementSchema>;
|
|
138
|
+
/**
|
|
139
|
+
* A specification document.
|
|
140
|
+
* Located at: openspec/specs/{id}/spec.md
|
|
141
|
+
*/
|
|
142
|
+
declare const SpecSchema: z.ZodObject<{
|
|
143
|
+
/** Directory name (e.g., "user-auth") */
|
|
144
|
+
id: z.ZodString;
|
|
145
|
+
/** Human-readable name from # heading */
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
/** Purpose/overview section content */
|
|
148
|
+
overview: z.ZodString;
|
|
149
|
+
/** List of requirements */
|
|
150
|
+
requirements: z.ZodArray<z.ZodObject<{
|
|
151
|
+
/** Unique identifier within the spec (e.g., "req-1") */
|
|
152
|
+
id: z.ZodString;
|
|
153
|
+
/** Requirement heading text from `### Requirement:` */
|
|
154
|
+
title: z.ZodString;
|
|
155
|
+
/** Markdown body between the requirement heading and the first scenario/next requirement */
|
|
156
|
+
bodyMarkdown: z.ZodString;
|
|
157
|
+
/** Full requirement text used for validation and search facts */
|
|
158
|
+
text: z.ZodString;
|
|
159
|
+
/** Test scenarios for this requirement */
|
|
160
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
161
|
+
/** Scenario heading text from `#### Scenario:` */
|
|
162
|
+
title: z.ZodString;
|
|
163
|
+
/** Markdown body between this scenario heading and the next scenario/requirement */
|
|
164
|
+
bodyMarkdown: z.ZodString;
|
|
165
|
+
/** Full scenario Markdown facts, including the scenario title */
|
|
166
|
+
rawText: z.ZodString;
|
|
167
|
+
/** Parsed scenario step facts for reading enhancements */
|
|
168
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
169
|
+
/** Scenario step keyword from the list item prefix */
|
|
170
|
+
keyword: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
171
|
+
/** Markdown content after the keyword */
|
|
172
|
+
contentMarkdown: z.ZodString;
|
|
173
|
+
/** Original markdown list item line */
|
|
174
|
+
rawText: z.ZodString;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
177
|
+
contentMarkdown: string;
|
|
178
|
+
rawText: string;
|
|
179
|
+
}, {
|
|
180
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
181
|
+
contentMarkdown: string;
|
|
182
|
+
rawText: string;
|
|
183
|
+
}>, "many">>;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
title: string;
|
|
186
|
+
rawText: string;
|
|
187
|
+
bodyMarkdown: string;
|
|
188
|
+
steps?: {
|
|
189
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
190
|
+
contentMarkdown: string;
|
|
191
|
+
rawText: string;
|
|
192
|
+
}[] | undefined;
|
|
193
|
+
}, {
|
|
194
|
+
title: string;
|
|
195
|
+
rawText: string;
|
|
196
|
+
bodyMarkdown: string;
|
|
197
|
+
steps?: {
|
|
198
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
199
|
+
contentMarkdown: string;
|
|
200
|
+
rawText: string;
|
|
201
|
+
}[] | undefined;
|
|
202
|
+
}>, "many">;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
title: string;
|
|
205
|
+
id: string;
|
|
206
|
+
text: string;
|
|
207
|
+
bodyMarkdown: string;
|
|
208
|
+
scenarios: {
|
|
209
|
+
title: string;
|
|
210
|
+
rawText: string;
|
|
211
|
+
bodyMarkdown: string;
|
|
212
|
+
steps?: {
|
|
213
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
214
|
+
contentMarkdown: string;
|
|
215
|
+
rawText: string;
|
|
216
|
+
}[] | undefined;
|
|
217
|
+
}[];
|
|
218
|
+
}, {
|
|
219
|
+
title: string;
|
|
220
|
+
id: string;
|
|
221
|
+
text: string;
|
|
222
|
+
bodyMarkdown: string;
|
|
223
|
+
scenarios: {
|
|
224
|
+
title: string;
|
|
225
|
+
rawText: string;
|
|
226
|
+
bodyMarkdown: string;
|
|
227
|
+
steps?: {
|
|
228
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
229
|
+
contentMarkdown: string;
|
|
230
|
+
rawText: string;
|
|
231
|
+
}[] | undefined;
|
|
232
|
+
}[];
|
|
233
|
+
}>, "many">;
|
|
234
|
+
/** Optional metadata */
|
|
235
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
236
|
+
version: z.ZodDefault<z.ZodString>;
|
|
237
|
+
format: z.ZodDefault<z.ZodLiteral<"openspec">>;
|
|
238
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
version: string;
|
|
241
|
+
format: "openspec";
|
|
242
|
+
sourcePath?: string | undefined;
|
|
243
|
+
}, {
|
|
244
|
+
version?: string | undefined;
|
|
245
|
+
format?: "openspec" | undefined;
|
|
246
|
+
sourcePath?: string | undefined;
|
|
247
|
+
}>>;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
id: string;
|
|
250
|
+
name: string;
|
|
251
|
+
overview: string;
|
|
252
|
+
requirements: {
|
|
253
|
+
title: string;
|
|
254
|
+
id: string;
|
|
255
|
+
text: string;
|
|
256
|
+
bodyMarkdown: string;
|
|
257
|
+
scenarios: {
|
|
258
|
+
title: string;
|
|
259
|
+
rawText: string;
|
|
260
|
+
bodyMarkdown: string;
|
|
261
|
+
steps?: {
|
|
262
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
263
|
+
contentMarkdown: string;
|
|
264
|
+
rawText: string;
|
|
265
|
+
}[] | undefined;
|
|
266
|
+
}[];
|
|
267
|
+
}[];
|
|
268
|
+
metadata?: {
|
|
269
|
+
version: string;
|
|
270
|
+
format: "openspec";
|
|
271
|
+
sourcePath?: string | undefined;
|
|
272
|
+
} | undefined;
|
|
273
|
+
}, {
|
|
274
|
+
id: string;
|
|
275
|
+
name: string;
|
|
276
|
+
overview: string;
|
|
277
|
+
requirements: {
|
|
278
|
+
title: string;
|
|
279
|
+
id: string;
|
|
280
|
+
text: string;
|
|
281
|
+
bodyMarkdown: string;
|
|
282
|
+
scenarios: {
|
|
283
|
+
title: string;
|
|
284
|
+
rawText: string;
|
|
285
|
+
bodyMarkdown: string;
|
|
286
|
+
steps?: {
|
|
287
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
288
|
+
contentMarkdown: string;
|
|
289
|
+
rawText: string;
|
|
290
|
+
}[] | undefined;
|
|
291
|
+
}[];
|
|
292
|
+
}[];
|
|
293
|
+
metadata?: {
|
|
294
|
+
version?: string | undefined;
|
|
295
|
+
format?: "openspec" | undefined;
|
|
296
|
+
sourcePath?: string | undefined;
|
|
297
|
+
} | undefined;
|
|
298
|
+
}>;
|
|
299
|
+
type Spec = z.infer<typeof SpecSchema>;
|
|
300
|
+
/**
|
|
301
|
+
* A delta describes changes to a spec within a change proposal.
|
|
302
|
+
* Deltas track which specs are affected and how.
|
|
303
|
+
*/
|
|
304
|
+
declare const DeltaOperationType: z.ZodEnum<["ADDED", "MODIFIED", "REMOVED", "RENAMED"]>;
|
|
305
|
+
declare const DeltaSchema: z.ZodObject<{
|
|
306
|
+
/** Target spec ID */
|
|
307
|
+
spec: z.ZodString;
|
|
308
|
+
/** Type of change */
|
|
309
|
+
operation: z.ZodEnum<["ADDED", "MODIFIED", "REMOVED", "RENAMED"]>;
|
|
310
|
+
/** Human-readable description */
|
|
311
|
+
description: z.ZodString;
|
|
312
|
+
/** Single requirement change */
|
|
313
|
+
requirement: z.ZodOptional<z.ZodObject<{
|
|
314
|
+
/** Unique identifier within the spec (e.g., "req-1") */
|
|
315
|
+
id: z.ZodString;
|
|
316
|
+
/** Requirement heading text from `### Requirement:` */
|
|
317
|
+
title: z.ZodString;
|
|
318
|
+
/** Markdown body between the requirement heading and the first scenario/next requirement */
|
|
319
|
+
bodyMarkdown: z.ZodString;
|
|
320
|
+
/** Full requirement text used for validation and search facts */
|
|
321
|
+
text: z.ZodString;
|
|
322
|
+
/** Test scenarios for this requirement */
|
|
323
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
324
|
+
/** Scenario heading text from `#### Scenario:` */
|
|
325
|
+
title: z.ZodString;
|
|
326
|
+
/** Markdown body between this scenario heading and the next scenario/requirement */
|
|
327
|
+
bodyMarkdown: z.ZodString;
|
|
328
|
+
/** Full scenario Markdown facts, including the scenario title */
|
|
329
|
+
rawText: z.ZodString;
|
|
330
|
+
/** Parsed scenario step facts for reading enhancements */
|
|
331
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
332
|
+
/** Scenario step keyword from the list item prefix */
|
|
333
|
+
keyword: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
334
|
+
/** Markdown content after the keyword */
|
|
335
|
+
contentMarkdown: z.ZodString;
|
|
336
|
+
/** Original markdown list item line */
|
|
337
|
+
rawText: z.ZodString;
|
|
338
|
+
}, "strip", z.ZodTypeAny, {
|
|
339
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
340
|
+
contentMarkdown: string;
|
|
341
|
+
rawText: string;
|
|
342
|
+
}, {
|
|
343
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
344
|
+
contentMarkdown: string;
|
|
345
|
+
rawText: string;
|
|
346
|
+
}>, "many">>;
|
|
347
|
+
}, "strip", z.ZodTypeAny, {
|
|
348
|
+
title: string;
|
|
349
|
+
rawText: string;
|
|
350
|
+
bodyMarkdown: string;
|
|
351
|
+
steps?: {
|
|
352
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
353
|
+
contentMarkdown: string;
|
|
354
|
+
rawText: string;
|
|
355
|
+
}[] | undefined;
|
|
356
|
+
}, {
|
|
357
|
+
title: string;
|
|
358
|
+
rawText: string;
|
|
359
|
+
bodyMarkdown: string;
|
|
360
|
+
steps?: {
|
|
361
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
362
|
+
contentMarkdown: string;
|
|
363
|
+
rawText: string;
|
|
364
|
+
}[] | undefined;
|
|
365
|
+
}>, "many">;
|
|
366
|
+
}, "strip", z.ZodTypeAny, {
|
|
367
|
+
title: string;
|
|
368
|
+
id: string;
|
|
369
|
+
text: string;
|
|
370
|
+
bodyMarkdown: string;
|
|
371
|
+
scenarios: {
|
|
372
|
+
title: string;
|
|
373
|
+
rawText: string;
|
|
374
|
+
bodyMarkdown: string;
|
|
375
|
+
steps?: {
|
|
376
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
377
|
+
contentMarkdown: string;
|
|
378
|
+
rawText: string;
|
|
379
|
+
}[] | undefined;
|
|
380
|
+
}[];
|
|
381
|
+
}, {
|
|
382
|
+
title: string;
|
|
383
|
+
id: string;
|
|
384
|
+
text: string;
|
|
385
|
+
bodyMarkdown: string;
|
|
386
|
+
scenarios: {
|
|
387
|
+
title: string;
|
|
388
|
+
rawText: string;
|
|
389
|
+
bodyMarkdown: string;
|
|
390
|
+
steps?: {
|
|
391
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
392
|
+
contentMarkdown: string;
|
|
393
|
+
rawText: string;
|
|
394
|
+
}[] | undefined;
|
|
395
|
+
}[];
|
|
396
|
+
}>>;
|
|
397
|
+
/** Multiple requirement changes */
|
|
398
|
+
requirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
399
|
+
/** Unique identifier within the spec (e.g., "req-1") */
|
|
400
|
+
id: z.ZodString;
|
|
401
|
+
/** Requirement heading text from `### Requirement:` */
|
|
402
|
+
title: z.ZodString;
|
|
403
|
+
/** Markdown body between the requirement heading and the first scenario/next requirement */
|
|
404
|
+
bodyMarkdown: z.ZodString;
|
|
405
|
+
/** Full requirement text used for validation and search facts */
|
|
406
|
+
text: z.ZodString;
|
|
407
|
+
/** Test scenarios for this requirement */
|
|
408
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
409
|
+
/** Scenario heading text from `#### Scenario:` */
|
|
410
|
+
title: z.ZodString;
|
|
411
|
+
/** Markdown body between this scenario heading and the next scenario/requirement */
|
|
412
|
+
bodyMarkdown: z.ZodString;
|
|
413
|
+
/** Full scenario Markdown facts, including the scenario title */
|
|
414
|
+
rawText: z.ZodString;
|
|
415
|
+
/** Parsed scenario step facts for reading enhancements */
|
|
416
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
417
|
+
/** Scenario step keyword from the list item prefix */
|
|
418
|
+
keyword: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
419
|
+
/** Markdown content after the keyword */
|
|
420
|
+
contentMarkdown: z.ZodString;
|
|
421
|
+
/** Original markdown list item line */
|
|
422
|
+
rawText: z.ZodString;
|
|
423
|
+
}, "strip", z.ZodTypeAny, {
|
|
424
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
425
|
+
contentMarkdown: string;
|
|
426
|
+
rawText: string;
|
|
427
|
+
}, {
|
|
428
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
429
|
+
contentMarkdown: string;
|
|
430
|
+
rawText: string;
|
|
431
|
+
}>, "many">>;
|
|
432
|
+
}, "strip", z.ZodTypeAny, {
|
|
433
|
+
title: string;
|
|
434
|
+
rawText: string;
|
|
435
|
+
bodyMarkdown: string;
|
|
436
|
+
steps?: {
|
|
437
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
438
|
+
contentMarkdown: string;
|
|
439
|
+
rawText: string;
|
|
440
|
+
}[] | undefined;
|
|
441
|
+
}, {
|
|
442
|
+
title: string;
|
|
443
|
+
rawText: string;
|
|
444
|
+
bodyMarkdown: string;
|
|
445
|
+
steps?: {
|
|
446
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
447
|
+
contentMarkdown: string;
|
|
448
|
+
rawText: string;
|
|
449
|
+
}[] | undefined;
|
|
450
|
+
}>, "many">;
|
|
451
|
+
}, "strip", z.ZodTypeAny, {
|
|
452
|
+
title: string;
|
|
453
|
+
id: string;
|
|
454
|
+
text: string;
|
|
455
|
+
bodyMarkdown: string;
|
|
456
|
+
scenarios: {
|
|
457
|
+
title: string;
|
|
458
|
+
rawText: string;
|
|
459
|
+
bodyMarkdown: string;
|
|
460
|
+
steps?: {
|
|
461
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
462
|
+
contentMarkdown: string;
|
|
463
|
+
rawText: string;
|
|
464
|
+
}[] | undefined;
|
|
465
|
+
}[];
|
|
466
|
+
}, {
|
|
467
|
+
title: string;
|
|
468
|
+
id: string;
|
|
469
|
+
text: string;
|
|
470
|
+
bodyMarkdown: string;
|
|
471
|
+
scenarios: {
|
|
472
|
+
title: string;
|
|
473
|
+
rawText: string;
|
|
474
|
+
bodyMarkdown: string;
|
|
475
|
+
steps?: {
|
|
476
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
477
|
+
contentMarkdown: string;
|
|
478
|
+
rawText: string;
|
|
479
|
+
}[] | undefined;
|
|
480
|
+
}[];
|
|
481
|
+
}>, "many">>;
|
|
482
|
+
/** Rename details (for RENAMED operation) */
|
|
483
|
+
rename: z.ZodOptional<z.ZodObject<{
|
|
484
|
+
from: z.ZodString;
|
|
485
|
+
to: z.ZodString;
|
|
486
|
+
}, "strip", z.ZodTypeAny, {
|
|
487
|
+
from: string;
|
|
488
|
+
to: string;
|
|
489
|
+
}, {
|
|
490
|
+
from: string;
|
|
491
|
+
to: string;
|
|
492
|
+
}>>;
|
|
493
|
+
}, "strip", z.ZodTypeAny, {
|
|
494
|
+
description: string;
|
|
495
|
+
spec: string;
|
|
496
|
+
operation: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
|
|
497
|
+
requirements?: {
|
|
498
|
+
title: string;
|
|
499
|
+
id: string;
|
|
500
|
+
text: string;
|
|
501
|
+
bodyMarkdown: string;
|
|
502
|
+
scenarios: {
|
|
503
|
+
title: string;
|
|
504
|
+
rawText: string;
|
|
505
|
+
bodyMarkdown: string;
|
|
506
|
+
steps?: {
|
|
507
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
508
|
+
contentMarkdown: string;
|
|
509
|
+
rawText: string;
|
|
510
|
+
}[] | undefined;
|
|
511
|
+
}[];
|
|
512
|
+
}[] | undefined;
|
|
513
|
+
requirement?: {
|
|
514
|
+
title: string;
|
|
515
|
+
id: string;
|
|
516
|
+
text: string;
|
|
517
|
+
bodyMarkdown: string;
|
|
518
|
+
scenarios: {
|
|
519
|
+
title: string;
|
|
520
|
+
rawText: string;
|
|
521
|
+
bodyMarkdown: string;
|
|
522
|
+
steps?: {
|
|
523
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
524
|
+
contentMarkdown: string;
|
|
525
|
+
rawText: string;
|
|
526
|
+
}[] | undefined;
|
|
527
|
+
}[];
|
|
528
|
+
} | undefined;
|
|
529
|
+
rename?: {
|
|
530
|
+
from: string;
|
|
531
|
+
to: string;
|
|
532
|
+
} | undefined;
|
|
533
|
+
}, {
|
|
534
|
+
description: string;
|
|
535
|
+
spec: string;
|
|
536
|
+
operation: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
|
|
537
|
+
requirements?: {
|
|
538
|
+
title: string;
|
|
539
|
+
id: string;
|
|
540
|
+
text: string;
|
|
541
|
+
bodyMarkdown: string;
|
|
542
|
+
scenarios: {
|
|
543
|
+
title: string;
|
|
544
|
+
rawText: string;
|
|
545
|
+
bodyMarkdown: string;
|
|
546
|
+
steps?: {
|
|
547
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
548
|
+
contentMarkdown: string;
|
|
549
|
+
rawText: string;
|
|
550
|
+
}[] | undefined;
|
|
551
|
+
}[];
|
|
552
|
+
}[] | undefined;
|
|
553
|
+
requirement?: {
|
|
554
|
+
title: string;
|
|
555
|
+
id: string;
|
|
556
|
+
text: string;
|
|
557
|
+
bodyMarkdown: string;
|
|
558
|
+
scenarios: {
|
|
559
|
+
title: string;
|
|
560
|
+
rawText: string;
|
|
561
|
+
bodyMarkdown: string;
|
|
562
|
+
steps?: {
|
|
563
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
564
|
+
contentMarkdown: string;
|
|
565
|
+
rawText: string;
|
|
566
|
+
}[] | undefined;
|
|
567
|
+
}[];
|
|
568
|
+
} | undefined;
|
|
569
|
+
rename?: {
|
|
570
|
+
from: string;
|
|
571
|
+
to: string;
|
|
572
|
+
} | undefined;
|
|
573
|
+
}>;
|
|
574
|
+
type Delta = z.infer<typeof DeltaSchema>;
|
|
575
|
+
type DeltaOperation = z.infer<typeof DeltaOperationType>;
|
|
576
|
+
/**
|
|
577
|
+
* A task within a change proposal.
|
|
578
|
+
* Tasks are parsed from tasks.md using checkbox syntax: - [ ] or - [x]
|
|
579
|
+
*/
|
|
580
|
+
declare const TaskSchema: z.ZodObject<{
|
|
581
|
+
/** Unique identifier (e.g., "task-1") */
|
|
582
|
+
id: z.ZodString;
|
|
583
|
+
/** Task description text */
|
|
584
|
+
text: z.ZodString;
|
|
585
|
+
/** Whether the task is completed */
|
|
586
|
+
completed: z.ZodBoolean;
|
|
587
|
+
/** Optional section heading the task belongs to */
|
|
588
|
+
section: z.ZodOptional<z.ZodString>;
|
|
589
|
+
}, "strip", z.ZodTypeAny, {
|
|
590
|
+
id: string;
|
|
591
|
+
text: string;
|
|
592
|
+
completed: boolean;
|
|
593
|
+
section?: string | undefined;
|
|
594
|
+
}, {
|
|
595
|
+
id: string;
|
|
596
|
+
text: string;
|
|
597
|
+
completed: boolean;
|
|
598
|
+
section?: string | undefined;
|
|
599
|
+
}>;
|
|
600
|
+
type Task = z.infer<typeof TaskSchema>;
|
|
601
|
+
/**
|
|
602
|
+
* A delta spec file from changes/{id}/specs/{specId}/spec.md
|
|
603
|
+
* Contains the proposed changes to a spec
|
|
604
|
+
*/
|
|
605
|
+
declare const DeltaSpecSchema: z.ZodObject<{
|
|
606
|
+
/** Spec ID (directory name under changes/{id}/specs/) */
|
|
607
|
+
specId: z.ZodString;
|
|
608
|
+
/** Raw markdown content of the delta spec */
|
|
609
|
+
content: z.ZodString;
|
|
610
|
+
}, "strip", z.ZodTypeAny, {
|
|
611
|
+
content: string;
|
|
612
|
+
specId: string;
|
|
613
|
+
}, {
|
|
614
|
+
content: string;
|
|
615
|
+
specId: string;
|
|
616
|
+
}>;
|
|
617
|
+
type DeltaSpec = z.infer<typeof DeltaSpecSchema>;
|
|
618
|
+
/**
|
|
619
|
+
* A change proposal document.
|
|
620
|
+
* Located at: openspec/changes/{id}/proposal.md + tasks.md
|
|
621
|
+
*
|
|
622
|
+
* Change proposals describe why a change is needed, what will change,
|
|
623
|
+
* which specs are affected (deltas), and trackable tasks.
|
|
624
|
+
*/
|
|
625
|
+
declare const ChangeSchema: z.ZodObject<{
|
|
626
|
+
/** Directory name (e.g., "add-oauth") */
|
|
627
|
+
id: z.ZodString;
|
|
628
|
+
/** Human-readable name from # heading */
|
|
629
|
+
name: z.ZodString;
|
|
630
|
+
/** Why section - motivation for the change */
|
|
631
|
+
why: z.ZodString;
|
|
632
|
+
/** What Changes section - description of changes */
|
|
633
|
+
whatChanges: z.ZodString;
|
|
634
|
+
/** Affected specs and their changes */
|
|
635
|
+
deltas: z.ZodArray<z.ZodObject<{
|
|
636
|
+
/** Target spec ID */
|
|
637
|
+
spec: z.ZodString;
|
|
638
|
+
/** Type of change */
|
|
639
|
+
operation: z.ZodEnum<["ADDED", "MODIFIED", "REMOVED", "RENAMED"]>;
|
|
640
|
+
/** Human-readable description */
|
|
641
|
+
description: z.ZodString;
|
|
642
|
+
/** Single requirement change */
|
|
643
|
+
requirement: z.ZodOptional<z.ZodObject<{
|
|
644
|
+
/** Unique identifier within the spec (e.g., "req-1") */
|
|
645
|
+
id: z.ZodString;
|
|
646
|
+
/** Requirement heading text from `### Requirement:` */
|
|
647
|
+
title: z.ZodString;
|
|
648
|
+
/** Markdown body between the requirement heading and the first scenario/next requirement */
|
|
649
|
+
bodyMarkdown: z.ZodString;
|
|
650
|
+
/** Full requirement text used for validation and search facts */
|
|
651
|
+
text: z.ZodString;
|
|
652
|
+
/** Test scenarios for this requirement */
|
|
653
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
654
|
+
/** Scenario heading text from `#### Scenario:` */
|
|
655
|
+
title: z.ZodString;
|
|
656
|
+
/** Markdown body between this scenario heading and the next scenario/requirement */
|
|
657
|
+
bodyMarkdown: z.ZodString;
|
|
658
|
+
/** Full scenario Markdown facts, including the scenario title */
|
|
659
|
+
rawText: z.ZodString;
|
|
660
|
+
/** Parsed scenario step facts for reading enhancements */
|
|
661
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
662
|
+
/** Scenario step keyword from the list item prefix */
|
|
663
|
+
keyword: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
664
|
+
/** Markdown content after the keyword */
|
|
665
|
+
contentMarkdown: z.ZodString;
|
|
666
|
+
/** Original markdown list item line */
|
|
667
|
+
rawText: z.ZodString;
|
|
668
|
+
}, "strip", z.ZodTypeAny, {
|
|
669
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
670
|
+
contentMarkdown: string;
|
|
671
|
+
rawText: string;
|
|
672
|
+
}, {
|
|
673
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
674
|
+
contentMarkdown: string;
|
|
675
|
+
rawText: string;
|
|
676
|
+
}>, "many">>;
|
|
677
|
+
}, "strip", z.ZodTypeAny, {
|
|
678
|
+
title: string;
|
|
679
|
+
rawText: string;
|
|
680
|
+
bodyMarkdown: string;
|
|
681
|
+
steps?: {
|
|
682
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
683
|
+
contentMarkdown: string;
|
|
684
|
+
rawText: string;
|
|
685
|
+
}[] | undefined;
|
|
686
|
+
}, {
|
|
687
|
+
title: string;
|
|
688
|
+
rawText: string;
|
|
689
|
+
bodyMarkdown: string;
|
|
690
|
+
steps?: {
|
|
691
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
692
|
+
contentMarkdown: string;
|
|
693
|
+
rawText: string;
|
|
694
|
+
}[] | undefined;
|
|
695
|
+
}>, "many">;
|
|
696
|
+
}, "strip", z.ZodTypeAny, {
|
|
697
|
+
title: string;
|
|
698
|
+
id: string;
|
|
699
|
+
text: string;
|
|
700
|
+
bodyMarkdown: string;
|
|
701
|
+
scenarios: {
|
|
702
|
+
title: string;
|
|
703
|
+
rawText: string;
|
|
704
|
+
bodyMarkdown: string;
|
|
705
|
+
steps?: {
|
|
706
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
707
|
+
contentMarkdown: string;
|
|
708
|
+
rawText: string;
|
|
709
|
+
}[] | undefined;
|
|
710
|
+
}[];
|
|
711
|
+
}, {
|
|
712
|
+
title: string;
|
|
713
|
+
id: string;
|
|
714
|
+
text: string;
|
|
715
|
+
bodyMarkdown: string;
|
|
716
|
+
scenarios: {
|
|
717
|
+
title: string;
|
|
718
|
+
rawText: string;
|
|
719
|
+
bodyMarkdown: string;
|
|
720
|
+
steps?: {
|
|
721
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
722
|
+
contentMarkdown: string;
|
|
723
|
+
rawText: string;
|
|
724
|
+
}[] | undefined;
|
|
725
|
+
}[];
|
|
726
|
+
}>>;
|
|
727
|
+
/** Multiple requirement changes */
|
|
728
|
+
requirements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
729
|
+
/** Unique identifier within the spec (e.g., "req-1") */
|
|
730
|
+
id: z.ZodString;
|
|
731
|
+
/** Requirement heading text from `### Requirement:` */
|
|
732
|
+
title: z.ZodString;
|
|
733
|
+
/** Markdown body between the requirement heading and the first scenario/next requirement */
|
|
734
|
+
bodyMarkdown: z.ZodString;
|
|
735
|
+
/** Full requirement text used for validation and search facts */
|
|
736
|
+
text: z.ZodString;
|
|
737
|
+
/** Test scenarios for this requirement */
|
|
738
|
+
scenarios: z.ZodArray<z.ZodObject<{
|
|
739
|
+
/** Scenario heading text from `#### Scenario:` */
|
|
740
|
+
title: z.ZodString;
|
|
741
|
+
/** Markdown body between this scenario heading and the next scenario/requirement */
|
|
742
|
+
bodyMarkdown: z.ZodString;
|
|
743
|
+
/** Full scenario Markdown facts, including the scenario title */
|
|
744
|
+
rawText: z.ZodString;
|
|
745
|
+
/** Parsed scenario step facts for reading enhancements */
|
|
746
|
+
steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
747
|
+
/** Scenario step keyword from the list item prefix */
|
|
748
|
+
keyword: z.ZodEnum<["GIVEN", "WHEN", "THEN", "AND", "BUT"]>;
|
|
749
|
+
/** Markdown content after the keyword */
|
|
750
|
+
contentMarkdown: z.ZodString;
|
|
751
|
+
/** Original markdown list item line */
|
|
752
|
+
rawText: z.ZodString;
|
|
753
|
+
}, "strip", z.ZodTypeAny, {
|
|
754
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
755
|
+
contentMarkdown: string;
|
|
756
|
+
rawText: string;
|
|
757
|
+
}, {
|
|
758
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
759
|
+
contentMarkdown: string;
|
|
760
|
+
rawText: string;
|
|
761
|
+
}>, "many">>;
|
|
762
|
+
}, "strip", z.ZodTypeAny, {
|
|
763
|
+
title: string;
|
|
764
|
+
rawText: string;
|
|
765
|
+
bodyMarkdown: string;
|
|
766
|
+
steps?: {
|
|
767
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
768
|
+
contentMarkdown: string;
|
|
769
|
+
rawText: string;
|
|
770
|
+
}[] | undefined;
|
|
771
|
+
}, {
|
|
772
|
+
title: string;
|
|
773
|
+
rawText: string;
|
|
774
|
+
bodyMarkdown: string;
|
|
775
|
+
steps?: {
|
|
776
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
777
|
+
contentMarkdown: string;
|
|
778
|
+
rawText: string;
|
|
779
|
+
}[] | undefined;
|
|
780
|
+
}>, "many">;
|
|
781
|
+
}, "strip", z.ZodTypeAny, {
|
|
782
|
+
title: string;
|
|
783
|
+
id: string;
|
|
784
|
+
text: string;
|
|
785
|
+
bodyMarkdown: string;
|
|
786
|
+
scenarios: {
|
|
787
|
+
title: string;
|
|
788
|
+
rawText: string;
|
|
789
|
+
bodyMarkdown: string;
|
|
790
|
+
steps?: {
|
|
791
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
792
|
+
contentMarkdown: string;
|
|
793
|
+
rawText: string;
|
|
794
|
+
}[] | undefined;
|
|
795
|
+
}[];
|
|
796
|
+
}, {
|
|
797
|
+
title: string;
|
|
798
|
+
id: string;
|
|
799
|
+
text: string;
|
|
800
|
+
bodyMarkdown: string;
|
|
801
|
+
scenarios: {
|
|
802
|
+
title: string;
|
|
803
|
+
rawText: string;
|
|
804
|
+
bodyMarkdown: string;
|
|
805
|
+
steps?: {
|
|
806
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
807
|
+
contentMarkdown: string;
|
|
808
|
+
rawText: string;
|
|
809
|
+
}[] | undefined;
|
|
810
|
+
}[];
|
|
811
|
+
}>, "many">>;
|
|
812
|
+
/** Rename details (for RENAMED operation) */
|
|
813
|
+
rename: z.ZodOptional<z.ZodObject<{
|
|
814
|
+
from: z.ZodString;
|
|
815
|
+
to: z.ZodString;
|
|
816
|
+
}, "strip", z.ZodTypeAny, {
|
|
817
|
+
from: string;
|
|
818
|
+
to: string;
|
|
819
|
+
}, {
|
|
820
|
+
from: string;
|
|
821
|
+
to: string;
|
|
822
|
+
}>>;
|
|
823
|
+
}, "strip", z.ZodTypeAny, {
|
|
824
|
+
description: string;
|
|
825
|
+
spec: string;
|
|
826
|
+
operation: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
|
|
827
|
+
requirements?: {
|
|
828
|
+
title: string;
|
|
829
|
+
id: string;
|
|
830
|
+
text: string;
|
|
831
|
+
bodyMarkdown: string;
|
|
832
|
+
scenarios: {
|
|
833
|
+
title: string;
|
|
834
|
+
rawText: string;
|
|
835
|
+
bodyMarkdown: string;
|
|
836
|
+
steps?: {
|
|
837
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
838
|
+
contentMarkdown: string;
|
|
839
|
+
rawText: string;
|
|
840
|
+
}[] | undefined;
|
|
841
|
+
}[];
|
|
842
|
+
}[] | undefined;
|
|
843
|
+
requirement?: {
|
|
844
|
+
title: string;
|
|
845
|
+
id: string;
|
|
846
|
+
text: string;
|
|
847
|
+
bodyMarkdown: string;
|
|
848
|
+
scenarios: {
|
|
849
|
+
title: string;
|
|
850
|
+
rawText: string;
|
|
851
|
+
bodyMarkdown: string;
|
|
852
|
+
steps?: {
|
|
853
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
854
|
+
contentMarkdown: string;
|
|
855
|
+
rawText: string;
|
|
856
|
+
}[] | undefined;
|
|
857
|
+
}[];
|
|
858
|
+
} | undefined;
|
|
859
|
+
rename?: {
|
|
860
|
+
from: string;
|
|
861
|
+
to: string;
|
|
862
|
+
} | undefined;
|
|
863
|
+
}, {
|
|
864
|
+
description: string;
|
|
865
|
+
spec: string;
|
|
866
|
+
operation: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
|
|
867
|
+
requirements?: {
|
|
868
|
+
title: string;
|
|
869
|
+
id: string;
|
|
870
|
+
text: string;
|
|
871
|
+
bodyMarkdown: string;
|
|
872
|
+
scenarios: {
|
|
873
|
+
title: string;
|
|
874
|
+
rawText: string;
|
|
875
|
+
bodyMarkdown: string;
|
|
876
|
+
steps?: {
|
|
877
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
878
|
+
contentMarkdown: string;
|
|
879
|
+
rawText: string;
|
|
880
|
+
}[] | undefined;
|
|
881
|
+
}[];
|
|
882
|
+
}[] | undefined;
|
|
883
|
+
requirement?: {
|
|
884
|
+
title: string;
|
|
885
|
+
id: string;
|
|
886
|
+
text: string;
|
|
887
|
+
bodyMarkdown: string;
|
|
888
|
+
scenarios: {
|
|
889
|
+
title: string;
|
|
890
|
+
rawText: string;
|
|
891
|
+
bodyMarkdown: string;
|
|
892
|
+
steps?: {
|
|
893
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
894
|
+
contentMarkdown: string;
|
|
895
|
+
rawText: string;
|
|
896
|
+
}[] | undefined;
|
|
897
|
+
}[];
|
|
898
|
+
} | undefined;
|
|
899
|
+
rename?: {
|
|
900
|
+
from: string;
|
|
901
|
+
to: string;
|
|
902
|
+
} | undefined;
|
|
903
|
+
}>, "many">;
|
|
904
|
+
/** Trackable tasks from tasks.md */
|
|
905
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
906
|
+
/** Unique identifier (e.g., "task-1") */
|
|
907
|
+
id: z.ZodString;
|
|
908
|
+
/** Task description text */
|
|
909
|
+
text: z.ZodString;
|
|
910
|
+
/** Whether the task is completed */
|
|
911
|
+
completed: z.ZodBoolean;
|
|
912
|
+
/** Optional section heading the task belongs to */
|
|
913
|
+
section: z.ZodOptional<z.ZodString>;
|
|
914
|
+
}, "strip", z.ZodTypeAny, {
|
|
915
|
+
id: string;
|
|
916
|
+
text: string;
|
|
917
|
+
completed: boolean;
|
|
918
|
+
section?: string | undefined;
|
|
919
|
+
}, {
|
|
920
|
+
id: string;
|
|
921
|
+
text: string;
|
|
922
|
+
completed: boolean;
|
|
923
|
+
section?: string | undefined;
|
|
924
|
+
}>, "many">;
|
|
925
|
+
/** Task completion progress */
|
|
926
|
+
progress: z.ZodObject<{
|
|
927
|
+
total: z.ZodNumber;
|
|
928
|
+
completed: z.ZodNumber;
|
|
929
|
+
}, "strip", z.ZodTypeAny, {
|
|
930
|
+
completed: number;
|
|
931
|
+
total: number;
|
|
932
|
+
}, {
|
|
933
|
+
completed: number;
|
|
934
|
+
total: number;
|
|
935
|
+
}>;
|
|
936
|
+
/** Optional design.md content */
|
|
937
|
+
design: z.ZodOptional<z.ZodString>;
|
|
938
|
+
/** Delta specs from changes/{id}/specs/ directory */
|
|
939
|
+
deltaSpecs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
940
|
+
/** Spec ID (directory name under changes/{id}/specs/) */
|
|
941
|
+
specId: z.ZodString;
|
|
942
|
+
/** Raw markdown content of the delta spec */
|
|
943
|
+
content: z.ZodString;
|
|
944
|
+
}, "strip", z.ZodTypeAny, {
|
|
945
|
+
content: string;
|
|
946
|
+
specId: string;
|
|
947
|
+
}, {
|
|
948
|
+
content: string;
|
|
949
|
+
specId: string;
|
|
950
|
+
}>, "many">>;
|
|
951
|
+
/** Optional metadata */
|
|
952
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
953
|
+
version: z.ZodDefault<z.ZodString>;
|
|
954
|
+
format: z.ZodDefault<z.ZodLiteral<"openspec-change">>;
|
|
955
|
+
}, "strip", z.ZodTypeAny, {
|
|
956
|
+
version: string;
|
|
957
|
+
format: "openspec-change";
|
|
958
|
+
}, {
|
|
959
|
+
version?: string | undefined;
|
|
960
|
+
format?: "openspec-change" | undefined;
|
|
961
|
+
}>>;
|
|
962
|
+
}, "strip", z.ZodTypeAny, {
|
|
963
|
+
id: string;
|
|
964
|
+
name: string;
|
|
965
|
+
why: string;
|
|
966
|
+
whatChanges: string;
|
|
967
|
+
deltas: {
|
|
968
|
+
description: string;
|
|
969
|
+
spec: string;
|
|
970
|
+
operation: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
|
|
971
|
+
requirements?: {
|
|
972
|
+
title: string;
|
|
973
|
+
id: string;
|
|
974
|
+
text: string;
|
|
975
|
+
bodyMarkdown: string;
|
|
976
|
+
scenarios: {
|
|
977
|
+
title: string;
|
|
978
|
+
rawText: string;
|
|
979
|
+
bodyMarkdown: string;
|
|
980
|
+
steps?: {
|
|
981
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
982
|
+
contentMarkdown: string;
|
|
983
|
+
rawText: string;
|
|
984
|
+
}[] | undefined;
|
|
985
|
+
}[];
|
|
986
|
+
}[] | undefined;
|
|
987
|
+
requirement?: {
|
|
988
|
+
title: string;
|
|
989
|
+
id: string;
|
|
990
|
+
text: string;
|
|
991
|
+
bodyMarkdown: string;
|
|
992
|
+
scenarios: {
|
|
993
|
+
title: string;
|
|
994
|
+
rawText: string;
|
|
995
|
+
bodyMarkdown: string;
|
|
996
|
+
steps?: {
|
|
997
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
998
|
+
contentMarkdown: string;
|
|
999
|
+
rawText: string;
|
|
1000
|
+
}[] | undefined;
|
|
1001
|
+
}[];
|
|
1002
|
+
} | undefined;
|
|
1003
|
+
rename?: {
|
|
1004
|
+
from: string;
|
|
1005
|
+
to: string;
|
|
1006
|
+
} | undefined;
|
|
1007
|
+
}[];
|
|
1008
|
+
tasks: {
|
|
1009
|
+
id: string;
|
|
1010
|
+
text: string;
|
|
1011
|
+
completed: boolean;
|
|
1012
|
+
section?: string | undefined;
|
|
1013
|
+
}[];
|
|
1014
|
+
progress: {
|
|
1015
|
+
completed: number;
|
|
1016
|
+
total: number;
|
|
1017
|
+
};
|
|
1018
|
+
metadata?: {
|
|
1019
|
+
version: string;
|
|
1020
|
+
format: "openspec-change";
|
|
1021
|
+
} | undefined;
|
|
1022
|
+
design?: string | undefined;
|
|
1023
|
+
deltaSpecs?: {
|
|
1024
|
+
content: string;
|
|
1025
|
+
specId: string;
|
|
1026
|
+
}[] | undefined;
|
|
1027
|
+
}, {
|
|
1028
|
+
id: string;
|
|
1029
|
+
name: string;
|
|
1030
|
+
why: string;
|
|
1031
|
+
whatChanges: string;
|
|
1032
|
+
deltas: {
|
|
1033
|
+
description: string;
|
|
1034
|
+
spec: string;
|
|
1035
|
+
operation: "ADDED" | "MODIFIED" | "REMOVED" | "RENAMED";
|
|
1036
|
+
requirements?: {
|
|
1037
|
+
title: string;
|
|
1038
|
+
id: string;
|
|
1039
|
+
text: string;
|
|
1040
|
+
bodyMarkdown: string;
|
|
1041
|
+
scenarios: {
|
|
1042
|
+
title: string;
|
|
1043
|
+
rawText: string;
|
|
1044
|
+
bodyMarkdown: string;
|
|
1045
|
+
steps?: {
|
|
1046
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
1047
|
+
contentMarkdown: string;
|
|
1048
|
+
rawText: string;
|
|
1049
|
+
}[] | undefined;
|
|
1050
|
+
}[];
|
|
1051
|
+
}[] | undefined;
|
|
1052
|
+
requirement?: {
|
|
1053
|
+
title: string;
|
|
1054
|
+
id: string;
|
|
1055
|
+
text: string;
|
|
1056
|
+
bodyMarkdown: string;
|
|
1057
|
+
scenarios: {
|
|
1058
|
+
title: string;
|
|
1059
|
+
rawText: string;
|
|
1060
|
+
bodyMarkdown: string;
|
|
1061
|
+
steps?: {
|
|
1062
|
+
keyword: "GIVEN" | "WHEN" | "THEN" | "AND" | "BUT";
|
|
1063
|
+
contentMarkdown: string;
|
|
1064
|
+
rawText: string;
|
|
1065
|
+
}[] | undefined;
|
|
1066
|
+
}[];
|
|
1067
|
+
} | undefined;
|
|
1068
|
+
rename?: {
|
|
1069
|
+
from: string;
|
|
1070
|
+
to: string;
|
|
1071
|
+
} | undefined;
|
|
1072
|
+
}[];
|
|
1073
|
+
tasks: {
|
|
1074
|
+
id: string;
|
|
1075
|
+
text: string;
|
|
1076
|
+
completed: boolean;
|
|
1077
|
+
section?: string | undefined;
|
|
1078
|
+
}[];
|
|
1079
|
+
progress: {
|
|
1080
|
+
completed: number;
|
|
1081
|
+
total: number;
|
|
1082
|
+
};
|
|
1083
|
+
metadata?: {
|
|
1084
|
+
version?: string | undefined;
|
|
1085
|
+
format?: "openspec-change" | undefined;
|
|
1086
|
+
} | undefined;
|
|
1087
|
+
design?: string | undefined;
|
|
1088
|
+
deltaSpecs?: {
|
|
1089
|
+
content: string;
|
|
1090
|
+
specId: string;
|
|
1091
|
+
}[] | undefined;
|
|
1092
|
+
}>;
|
|
1093
|
+
type Change = z.infer<typeof ChangeSchema>;
|
|
1094
|
+
//#endregion
|
|
1095
|
+
//#region src/openspec-projection.d.ts
|
|
1096
|
+
declare const OPEN_SPEC_SPEC_PROJECTION_ID = "openspec.projection.spec.v2";
|
|
1097
|
+
declare const OPEN_SPEC_READING_SECTIONS_PROJECTION_ID = "openspec.projection.reading-sections.v2";
|
|
1098
|
+
type SpecSectionKind = 'overview' | 'requirements' | 'other';
|
|
1099
|
+
interface OpenSpecProjectionOptions {
|
|
1100
|
+
specId: string;
|
|
1101
|
+
}
|
|
1102
|
+
interface OpenSpecHeadingSection {
|
|
1103
|
+
id: string;
|
|
1104
|
+
title: string;
|
|
1105
|
+
kind: SpecSectionKind;
|
|
1106
|
+
factId: string;
|
|
1107
|
+
start: number;
|
|
1108
|
+
end: number;
|
|
1109
|
+
}
|
|
1110
|
+
interface OpenSpecRequirementBlock {
|
|
1111
|
+
id: string;
|
|
1112
|
+
title: string;
|
|
1113
|
+
factId: string;
|
|
1114
|
+
start: number;
|
|
1115
|
+
end: number;
|
|
1116
|
+
scenarios: OpenSpecScenarioBlock[];
|
|
1117
|
+
}
|
|
1118
|
+
interface OpenSpecScenarioBlock {
|
|
1119
|
+
title: string;
|
|
1120
|
+
factId: string;
|
|
1121
|
+
start: number;
|
|
1122
|
+
end: number;
|
|
1123
|
+
}
|
|
1124
|
+
interface OpenSpecReadingSectionsProjection {
|
|
1125
|
+
sections: OpenSpecHeadingSection[];
|
|
1126
|
+
requirements: OpenSpecRequirementBlock[];
|
|
1127
|
+
}
|
|
1128
|
+
interface ProjectedOpenSpecDocument extends MarkdownReadingDocument {
|
|
1129
|
+
annotations: OpenSpecAnnotation[];
|
|
1130
|
+
projections: MarkdownReadingDocument['projections'] & {
|
|
1131
|
+
[OPEN_SPEC_SPEC_PROJECTION_ID]?: Spec;
|
|
1132
|
+
[OPEN_SPEC_READING_SECTIONS_PROJECTION_ID]?: OpenSpecReadingSectionsProjection;
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
declare function createOpenSpecReadingPlugin(options: OpenSpecProjectionOptions): MarkdownReadingPlugin;
|
|
1136
|
+
declare function parseOpenSpecMarkdownToSpec(specId: string, content: string): Spec;
|
|
1137
|
+
declare function projectOpenSpecMarkdown(sourceMarkdown: string, options: OpenSpecProjectionOptions, plugins?: readonly MarkdownReadingPlugin[]): ProjectedOpenSpecDocument;
|
|
1138
|
+
declare function projectAnnotatedOpenSpecToSpec(specId: string, document: AnnotatedOpenSpecDocument): Spec;
|
|
1139
|
+
declare function getOpenSpecReadingSections(document: Pick<MarkdownReadingDocument, 'facts' | 'annotations' | 'sourceMarkdown'>): OpenSpecReadingSectionsProjection;
|
|
1140
|
+
declare function getOpenSpecProjectionAnnotation(annotations: readonly OpenSpecAnnotation[], factId: string, kind: OpenSpecAnnotation['kind']): OpenSpecAnnotation | undefined;
|
|
1141
|
+
//#endregion
|
|
1142
|
+
export { Spec as A, DeltaSpec as C, ScenarioStep as D, RequirementSchema as E, Task as M, TaskSchema as N, ScenarioStepKeywordSchema as O, DeltaSchema as S, Requirement as T, ChangeFileSchema as _, OpenSpecReadingSectionsProjection as a, DeltaOperation as b, ProjectedOpenSpecDocument as c, getOpenSpecReadingSections as d, parseOpenSpecMarkdownToSpec as f, ChangeFile as g, Change as h, OpenSpecProjectionOptions as i, SpecSchema as j, ScenarioStepSchema as k, createOpenSpecReadingPlugin as l, projectOpenSpecMarkdown as m, OPEN_SPEC_SPEC_PROJECTION_ID as n, OpenSpecRequirementBlock as o, projectAnnotatedOpenSpecToSpec as p, OpenSpecHeadingSection as r, OpenSpecScenarioBlock as s, OPEN_SPEC_READING_SECTIONS_PROJECTION_ID as t, getOpenSpecProjectionAnnotation as u, ChangeSchema as v, DeltaSpecSchema as w, DeltaOperationType as x, Delta as y };
|