@openspecui/core 3.5.1 → 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.
Files changed (50) hide show
  1. package/dist/hosted-app.d.mts +1 -1
  2. package/dist/hosted-app.mjs +1 -1
  3. package/dist/index.d.mts +68 -626
  4. package/dist/index.mjs +81 -97
  5. package/dist/markdown-facts-BmSmZmpB.mjs +136 -0
  6. package/dist/markdown-facts-f3kXnqXb.d.mts +39 -0
  7. package/dist/markdown-facts.d.mts +2 -0
  8. package/dist/markdown-facts.mjs +3 -0
  9. package/dist/markdown-reading-CrchEfoW.mjs +104 -0
  10. package/dist/markdown-reading-D36W693c.d.mts +74 -0
  11. package/dist/markdown-reading.d.mts +3 -0
  12. package/dist/markdown-reading.mjs +4 -0
  13. package/dist/{notifications-BWvRNkRJ.d.mts → notifications-C4amULI4.d.mts} +1 -1
  14. package/dist/{notifications-F81mmO55.mjs → notifications-fD-V5hyP.mjs} +2 -2
  15. package/dist/notifications.d.mts +2 -2
  16. package/dist/notifications.mjs +3 -3
  17. package/dist/openspec-annotations-BMy9nWUe.mjs +436 -0
  18. package/dist/openspec-annotations-CJmYcfAu.d.mts +30 -0
  19. package/dist/openspec-annotations.d.mts +4 -0
  20. package/dist/openspec-annotations.mjs +5 -0
  21. package/dist/openspec-projection-DTuKPTgf.d.mts +1142 -0
  22. package/dist/openspec-projection-DWqBxedv.mjs +223 -0
  23. package/dist/openspec-projection.d.mts +5 -0
  24. package/dist/openspec-projection.mjs +6 -0
  25. package/dist/opsx-display-path.d.mts +1 -1
  26. package/dist/opsx-display-path.mjs +1 -1
  27. package/dist/sounds.d.mts +1 -1
  28. package/dist/sounds.mjs +1 -1
  29. package/dist/{terminal-audio-8E82E0AM.d.mts → terminal-audio-U9Exv9A5.d.mts} +1 -1
  30. package/dist/{terminal-audio-DDwxz9sJ.mjs → terminal-audio-UEv3j655.mjs} +1 -1
  31. package/dist/terminal-audio.d.mts +2 -2
  32. package/dist/terminal-audio.mjs +2 -2
  33. package/dist/terminal-control.d.mts +2 -2
  34. package/dist/terminal-control.mjs +1 -1
  35. package/dist/terminal-invocation.d.mts +1 -1
  36. package/dist/terminal-invocation.mjs +1 -1
  37. package/dist/terminal-theme.d.mts +1 -1
  38. package/dist/terminal-theme.mjs +1 -1
  39. package/package.json +25 -3
  40. /package/dist/{hosted-app-CIOJpbzc.mjs → hosted-app-DFFffbJc.mjs} +0 -0
  41. /package/dist/{hosted-app-DaGUbBJn.d.mts → hosted-app-DZrYivji.d.mts} +0 -0
  42. /package/dist/{opsx-display-path-CuQyGB_A.d.mts → opsx-display-path-CkV9sq_j.d.mts} +0 -0
  43. /package/dist/{opsx-display-path-B6Owu17P.mjs → opsx-display-path-D4KLYRXQ.mjs} +0 -0
  44. /package/dist/{sounds-C0dNSFm8.mjs → sounds-BzNKMW05.mjs} +0 -0
  45. /package/dist/{sounds-Bw-sSyFZ.d.mts → sounds-CYxOpEdm.d.mts} +0 -0
  46. /package/dist/{terminal-control-DtBprY6-.mjs → terminal-control-Bxois59k.mjs} +0 -0
  47. /package/dist/{terminal-invocation-Cdi6_Kl6.mjs → terminal-invocation-BRCuSBjE.mjs} +0 -0
  48. /package/dist/{terminal-invocation-CGAgqosu.d.mts → terminal-invocation-BmwWgwgY.d.mts} +0 -0
  49. /package/dist/{terminal-theme-CMQqJvIQ.mjs → terminal-theme-CIv3YMfi.mjs} +0 -0
  50. /package/dist/{terminal-theme-wbkK9vVH.d.mts → terminal-theme-lPZGfVA_.d.mts} +0 -0
@@ -0,0 +1,223 @@
1
+ import { c as getMarkdownHeadingFacts, l as trimMarkdownSlice, n as createMarkdownReadingDocument, o as getMarkdownFactSpan, s as getMarkdownHeadingEnd } from "./markdown-reading-CrchEfoW.mjs";
2
+ import { r as builtinOpenSpecReadingPlugin } from "./openspec-annotations-BMy9nWUe.mjs";
3
+
4
+ //#region src/openspec-projection.ts
5
+ const OPEN_SPEC_SPEC_PROJECTION_ID = "openspec.projection.spec.v2";
6
+ const OPEN_SPEC_READING_SECTIONS_PROJECTION_ID = "openspec.projection.reading-sections.v2";
7
+ function createOpenSpecReadingPlugin(options) {
8
+ return {
9
+ ...builtinOpenSpecReadingPlugin,
10
+ id: "openspec.builtin-reading-with-projections.v2",
11
+ projectionRules: [createOpenSpecReadingSectionsProjectionRule(), createOpenSpecSpecProjectionRule(options)]
12
+ };
13
+ }
14
+ function parseOpenSpecMarkdownToSpec(specId, content) {
15
+ return projectOpenSpecMarkdown(content, { specId }).projections[OPEN_SPEC_SPEC_PROJECTION_ID];
16
+ }
17
+ function projectOpenSpecMarkdown(sourceMarkdown, options, plugins = [createOpenSpecReadingPlugin(options)]) {
18
+ return toProjectedOpenSpecDocument(createMarkdownReadingDocument(sourceMarkdown, plugins));
19
+ }
20
+ function projectAnnotatedOpenSpecToSpec(specId, document) {
21
+ return projectOpenSpecContextToSpec(createDetachedProjectionContext(document), { specId });
22
+ }
23
+ function getOpenSpecReadingSections(document) {
24
+ const context = createDetachedProjectionContext(document);
25
+ return {
26
+ sections: collectSpecSections(context),
27
+ requirements: collectRequirementBlocks(context)
28
+ };
29
+ }
30
+ function getOpenSpecProjectionAnnotation(annotations, factId, kind) {
31
+ return annotations.find((annotation) => annotation.targetFactId === factId && annotation.kind === kind);
32
+ }
33
+ function createOpenSpecReadingSectionsProjectionRule() {
34
+ return {
35
+ id: OPEN_SPEC_READING_SECTIONS_PROJECTION_ID,
36
+ project(context) {
37
+ return {
38
+ sections: collectSpecSections(toOpenSpecProjectionContext(context)),
39
+ requirements: collectRequirementBlocks(toOpenSpecProjectionContext(context))
40
+ };
41
+ }
42
+ };
43
+ }
44
+ function createOpenSpecSpecProjectionRule(options) {
45
+ return {
46
+ id: OPEN_SPEC_SPEC_PROJECTION_ID,
47
+ project(context) {
48
+ return projectOpenSpecContextToSpec(toOpenSpecProjectionContext(context), options);
49
+ }
50
+ };
51
+ }
52
+ function projectOpenSpecContextToSpec(context, options) {
53
+ const name = context.annotations.find((annotation) => annotation.kind === "document-title")?.metadata?.title || options.specId;
54
+ const overviewSection = collectSpecSections(context).find((section) => section.kind === "overview");
55
+ const overview = overviewSection ? trimMarkdownSlice(context.sourceMarkdown, getContentStartAfterHeading(context, overviewSection.factId, overviewSection.start), overviewSection.end) : "";
56
+ const requirements = collectRequirementBlocks(context).map((requirement) => projectRequirement(context, requirement));
57
+ return {
58
+ id: options.specId,
59
+ name: name || options.specId,
60
+ overview: overview.trim(),
61
+ requirements,
62
+ metadata: {
63
+ version: "1.0.0",
64
+ format: "openspec"
65
+ }
66
+ };
67
+ }
68
+ function createRequirementText(title, bodyMarkdown, scenarioText) {
69
+ return [
70
+ title,
71
+ bodyMarkdown,
72
+ scenarioText
73
+ ].filter((part) => part.trim()).join("\n\n");
74
+ }
75
+ function collectSpecSections(context) {
76
+ const headings = getMarkdownHeadingFacts(context);
77
+ return headings.reduce((sections, fact, index) => {
78
+ if (fact.depth !== 2) return sections;
79
+ const span = getFactSpan(fact);
80
+ if (!span) return sections;
81
+ sections.push({
82
+ id: fact.id,
83
+ title: fact.text,
84
+ kind: getSectionKind(context.annotations, fact.id),
85
+ factId: fact.id,
86
+ start: span.start,
87
+ end: getMarkdownHeadingEnd(headings, index, context.sourceMarkdown.length)
88
+ });
89
+ return sections;
90
+ }, []);
91
+ }
92
+ function collectRequirementBlocks(context) {
93
+ const headings = getMarkdownHeadingFacts(context);
94
+ let reqIndex = 0;
95
+ return headings.reduce((requirements, fact, index) => {
96
+ const annotation = getOpenSpecProjectionAnnotation(context.annotations, fact.id, "requirement");
97
+ if (!annotation) return requirements;
98
+ const span = getFactSpan(fact);
99
+ if (!span) return requirements;
100
+ reqIndex++;
101
+ const end = getMarkdownHeadingEnd(headings, index, context.sourceMarkdown.length);
102
+ const title = annotation.metadata?.title?.trim() || fact.text;
103
+ requirements.push({
104
+ id: `req-${reqIndex}`,
105
+ title,
106
+ factId: fact.id,
107
+ start: span.start,
108
+ end,
109
+ scenarios: collectScenarioBlocks(context, headings, fact, end)
110
+ });
111
+ return requirements;
112
+ }, []);
113
+ }
114
+ function collectScenarioBlocks(context, headings, requirementFact, requirementEnd) {
115
+ const requirementSpan = getFactSpan(requirementFact);
116
+ if (!requirementSpan) return [];
117
+ return headings.reduce((scenarios, fact, index) => {
118
+ const annotation = getOpenSpecProjectionAnnotation(context.annotations, fact.id, "scenario");
119
+ if (!annotation) return scenarios;
120
+ const span = getFactSpan(fact);
121
+ if (!span || span.start <= requirementSpan.start || span.start >= requirementEnd) return scenarios;
122
+ scenarios.push({
123
+ title: annotation.metadata?.title?.trim() || fact.text,
124
+ factId: fact.id,
125
+ start: span.start,
126
+ end: Math.min(getScenarioEnd(context, headings, index, requirementEnd), requirementEnd)
127
+ });
128
+ return scenarios;
129
+ }, []);
130
+ }
131
+ function getScenarioEnd(context, headings, scenarioIndex, requirementEnd) {
132
+ for (let i = scenarioIndex + 1; i < headings.length; i++) {
133
+ const next = headings[i];
134
+ const nextSpan = getFactSpan(next);
135
+ if (!nextSpan || nextSpan.start >= requirementEnd) return requirementEnd;
136
+ if ((next.depth ?? 6) <= 3 || getOpenSpecProjectionAnnotation(context.annotations, next.id, "scenario")) return nextSpan.start;
137
+ }
138
+ return requirementEnd;
139
+ }
140
+ function getContentStartAfterHeading(context, factId, fallback) {
141
+ const fact = context.factById.get(factId);
142
+ return fact ? getFactSpan(fact)?.end ?? fallback : fallback;
143
+ }
144
+ function projectScenario(context, scenario) {
145
+ const bodyMarkdown = trimMarkdownSlice(context.sourceMarkdown, getContentStartAfterHeading(context, scenario.factId, scenario.start), scenario.end);
146
+ const rawText = [scenario.title, bodyMarkdown].filter((part) => part.trim()).join("\n");
147
+ return {
148
+ title: scenario.title,
149
+ bodyMarkdown,
150
+ rawText,
151
+ steps: getScenarioStepsFromAnnotations(context, scenario)
152
+ };
153
+ }
154
+ function getScenarioStepsFromAnnotations(context, scenario) {
155
+ return context.annotations.reduce((steps, annotation) => {
156
+ if (annotation.kind !== "scenario-step") return steps;
157
+ const fact = context.factById.get(annotation.targetFactId);
158
+ const span = fact ? getFactSpan(fact) : void 0;
159
+ if (!span || span.start <= scenario.start || span.start >= scenario.end) return steps;
160
+ const keyword = annotation.metadata?.keyword;
161
+ const contentMarkdown = annotation.metadata?.contentMarkdown;
162
+ const rawText = annotation.metadata?.rawMarkdown;
163
+ if (!isScenarioStepKeyword(keyword) || !contentMarkdown || !rawText) return steps;
164
+ steps.push({
165
+ keyword,
166
+ contentMarkdown,
167
+ rawText
168
+ });
169
+ return steps;
170
+ }, []);
171
+ }
172
+ function isScenarioStepKeyword(value) {
173
+ return value === "GIVEN" || value === "WHEN" || value === "THEN" || value === "AND" || value === "BUT";
174
+ }
175
+ function projectRequirement(context, requirement) {
176
+ const bodyEnd = requirement.scenarios.map((scenario) => scenario.start).sort((left, right) => left - right)[0] ?? requirement.end;
177
+ const bodyMarkdown = trimMarkdownSlice(context.sourceMarkdown, getContentStartAfterHeading(context, requirement.factId, requirement.start), bodyEnd);
178
+ const scenarios = requirement.scenarios.map((scenario) => projectScenario(context, scenario));
179
+ const scenarioText = scenarios.map((scenario) => scenario.rawText).join("\n\n");
180
+ return {
181
+ id: requirement.id,
182
+ title: requirement.title,
183
+ bodyMarkdown,
184
+ text: createRequirementText(requirement.title, bodyMarkdown, scenarioText),
185
+ scenarios
186
+ };
187
+ }
188
+ function getFactSpan(fact) {
189
+ return getMarkdownFactSpan(fact);
190
+ }
191
+ function getSectionKind(annotations, factId) {
192
+ if (getOpenSpecProjectionAnnotation(annotations, factId, "purpose-section")) return "overview";
193
+ if (getOpenSpecProjectionAnnotation(annotations, factId, "requirements-section")) return "requirements";
194
+ return "other";
195
+ }
196
+ function createDetachedProjectionContext(document) {
197
+ return {
198
+ sourceMarkdown: document.sourceMarkdown,
199
+ facts: document.facts,
200
+ factById: new Map(document.facts.map((fact) => [fact.id, fact])),
201
+ annotations: document.annotations.filter(isOpenSpecAnnotation)
202
+ };
203
+ }
204
+ function toOpenSpecProjectionContext(context) {
205
+ return {
206
+ sourceMarkdown: context.sourceMarkdown,
207
+ facts: context.facts,
208
+ factById: context.factById,
209
+ annotations: context.annotations.filter(isOpenSpecAnnotation)
210
+ };
211
+ }
212
+ function toProjectedOpenSpecDocument(document) {
213
+ return {
214
+ ...document,
215
+ annotations: document.annotations.filter(isOpenSpecAnnotation)
216
+ };
217
+ }
218
+ function isOpenSpecAnnotation(annotation) {
219
+ return annotation.kind === "document-title" || annotation.kind === "purpose-section" || annotation.kind === "requirements-section" || annotation.kind === "requirement" || annotation.kind === "scenario" || annotation.kind === "scenario-step" || annotation.kind === "keyword";
220
+ }
221
+
222
+ //#endregion
223
+ export { getOpenSpecReadingSections as a, projectOpenSpecMarkdown as c, getOpenSpecProjectionAnnotation as i, OPEN_SPEC_SPEC_PROJECTION_ID as n, parseOpenSpecMarkdownToSpec as o, createOpenSpecReadingPlugin as r, projectAnnotatedOpenSpecToSpec as s, OPEN_SPEC_READING_SECTIONS_PROJECTION_ID as t };
@@ -0,0 +1,5 @@
1
+ import { a as OpenSpecReadingSectionsProjection, c as ProjectedOpenSpecDocument, d as getOpenSpecReadingSections, f as parseOpenSpecMarkdownToSpec, i as OpenSpecProjectionOptions, l as createOpenSpecReadingPlugin, m as projectOpenSpecMarkdown, n as OPEN_SPEC_SPEC_PROJECTION_ID, o as OpenSpecRequirementBlock, p as projectAnnotatedOpenSpecToSpec, r as OpenSpecHeadingSection, s as OpenSpecScenarioBlock, t as OPEN_SPEC_READING_SECTIONS_PROJECTION_ID, u as getOpenSpecProjectionAnnotation } from "./openspec-projection-DTuKPTgf.mjs";
2
+ import "./markdown-facts-f3kXnqXb.mjs";
3
+ import "./markdown-reading-D36W693c.mjs";
4
+ import "./openspec-annotations-CJmYcfAu.mjs";
5
+ export { OPEN_SPEC_READING_SECTIONS_PROJECTION_ID, OPEN_SPEC_SPEC_PROJECTION_ID, OpenSpecHeadingSection, OpenSpecProjectionOptions, OpenSpecReadingSectionsProjection, OpenSpecRequirementBlock, OpenSpecScenarioBlock, ProjectedOpenSpecDocument, createOpenSpecReadingPlugin, getOpenSpecProjectionAnnotation, getOpenSpecReadingSections, parseOpenSpecMarkdownToSpec, projectAnnotatedOpenSpecToSpec, projectOpenSpecMarkdown };
@@ -0,0 +1,6 @@
1
+ import "./markdown-facts-BmSmZmpB.mjs";
2
+ import "./markdown-reading-CrchEfoW.mjs";
3
+ import "./openspec-annotations-BMy9nWUe.mjs";
4
+ import { a as getOpenSpecReadingSections, c as projectOpenSpecMarkdown, i as getOpenSpecProjectionAnnotation, n as OPEN_SPEC_SPEC_PROJECTION_ID, o as parseOpenSpecMarkdownToSpec, r as createOpenSpecReadingPlugin, s as projectAnnotatedOpenSpecToSpec, t as OPEN_SPEC_READING_SECTIONS_PROJECTION_ID } from "./openspec-projection-DWqBxedv.mjs";
5
+
6
+ export { OPEN_SPEC_READING_SECTIONS_PROJECTION_ID, OPEN_SPEC_SPEC_PROJECTION_ID, createOpenSpecReadingPlugin, getOpenSpecProjectionAnnotation, getOpenSpecReadingSections, parseOpenSpecMarkdownToSpec, projectAnnotatedOpenSpecToSpec, projectOpenSpecMarkdown };
@@ -1,2 +1,2 @@
1
- import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-CuQyGB_A.mjs";
1
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-CkV9sq_j.mjs";
2
2
  export { VIRTUAL_PROJECT_DIRNAME, toOpsxDisplayPath };
@@ -1,3 +1,3 @@
1
- import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-B6Owu17P.mjs";
1
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-D4KLYRXQ.mjs";
2
2
 
3
3
  export { VIRTUAL_PROJECT_DIRNAME, toOpsxDisplayPath };
package/dist/sounds.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { C as SoundVolume, D as normalizeLegacySoundId, E as getBuiltinSoundUrl, O as soundIdFromCustomHash, S as SoundIdSchema, T as customHashFromSoundId, _ as DEFAULT_SOUND_VOLUME, a as BuiltinSoundOption, b as SoundConfigIdSchema, c as CustomSoundHashSchema, d as CustomSoundMetadata, f as CustomSoundMetadataFile, g as DEFAULT_NOTIFICATION_SOUND_ID, h as DEFAULT_BELL_SOUND_ID, i as BuiltinSoundIdSchema, l as CustomSoundId, m as CustomSoundMetadataSchema, n as BUILTIN_SOUND_OPTIONS, o as CUSTOM_SOUND_ADD_VALUE, p as CustomSoundMetadataFileSchema, r as BuiltinSoundId, s as CustomSoundHash, t as BUILTIN_SOUND_IDS, u as CustomSoundIdSchema, v as LEGACY_SOUND_ID_MAP, w as SoundVolumeSchema, x as SoundId, y as SILENT_SOUND_ID } from "./sounds-Bw-sSyFZ.mjs";
1
+ import { C as SoundVolume, D as normalizeLegacySoundId, E as getBuiltinSoundUrl, O as soundIdFromCustomHash, S as SoundIdSchema, T as customHashFromSoundId, _ as DEFAULT_SOUND_VOLUME, a as BuiltinSoundOption, b as SoundConfigIdSchema, c as CustomSoundHashSchema, d as CustomSoundMetadata, f as CustomSoundMetadataFile, g as DEFAULT_NOTIFICATION_SOUND_ID, h as DEFAULT_BELL_SOUND_ID, i as BuiltinSoundIdSchema, l as CustomSoundId, m as CustomSoundMetadataSchema, n as BUILTIN_SOUND_OPTIONS, o as CUSTOM_SOUND_ADD_VALUE, p as CustomSoundMetadataFileSchema, r as BuiltinSoundId, s as CustomSoundHash, t as BUILTIN_SOUND_IDS, u as CustomSoundIdSchema, v as LEGACY_SOUND_ID_MAP, w as SoundVolumeSchema, x as SoundId, y as SILENT_SOUND_ID } from "./sounds-CYxOpEdm.mjs";
2
2
  export { BUILTIN_SOUND_IDS, BUILTIN_SOUND_OPTIONS, BuiltinSoundId, BuiltinSoundIdSchema, BuiltinSoundOption, CUSTOM_SOUND_ADD_VALUE, CustomSoundHash, CustomSoundHashSchema, CustomSoundId, CustomSoundIdSchema, CustomSoundMetadata, CustomSoundMetadataFile, CustomSoundMetadataFileSchema, CustomSoundMetadataSchema, DEFAULT_BELL_SOUND_ID, DEFAULT_NOTIFICATION_SOUND_ID, DEFAULT_SOUND_VOLUME, LEGACY_SOUND_ID_MAP, SILENT_SOUND_ID, SoundConfigIdSchema, SoundId, SoundIdSchema, SoundVolume, SoundVolumeSchema, customHashFromSoundId, getBuiltinSoundUrl, normalizeLegacySoundId, soundIdFromCustomHash };
package/dist/sounds.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as customHashFromSoundId, a as CustomSoundHashSchema, b as soundIdFromCustomHash, c as CustomSoundMetadataSchema, d as DEFAULT_SOUND_VOLUME, f as LEGACY_SOUND_ID_MAP, g as SoundVolumeSchema, h as SoundIdSchema, i as CUSTOM_SOUND_ADD_VALUE, l as DEFAULT_BELL_SOUND_ID, m as SoundConfigIdSchema, n as BUILTIN_SOUND_OPTIONS, o as CustomSoundIdSchema, p as SILENT_SOUND_ID, r as BuiltinSoundIdSchema, s as CustomSoundMetadataFileSchema, t as BUILTIN_SOUND_IDS, u as DEFAULT_NOTIFICATION_SOUND_ID, v as getBuiltinSoundUrl, y as normalizeLegacySoundId } from "./sounds-C0dNSFm8.mjs";
1
+ import { _ as customHashFromSoundId, a as CustomSoundHashSchema, b as soundIdFromCustomHash, c as CustomSoundMetadataSchema, d as DEFAULT_SOUND_VOLUME, f as LEGACY_SOUND_ID_MAP, g as SoundVolumeSchema, h as SoundIdSchema, i as CUSTOM_SOUND_ADD_VALUE, l as DEFAULT_BELL_SOUND_ID, m as SoundConfigIdSchema, n as BUILTIN_SOUND_OPTIONS, o as CustomSoundIdSchema, p as SILENT_SOUND_ID, r as BuiltinSoundIdSchema, s as CustomSoundMetadataFileSchema, t as BUILTIN_SOUND_IDS, u as DEFAULT_NOTIFICATION_SOUND_ID, v as getBuiltinSoundUrl, y as normalizeLegacySoundId } from "./sounds-BzNKMW05.mjs";
2
2
 
3
3
  export { BUILTIN_SOUND_IDS, BUILTIN_SOUND_OPTIONS, BuiltinSoundIdSchema, CUSTOM_SOUND_ADD_VALUE, CustomSoundHashSchema, CustomSoundIdSchema, CustomSoundMetadataFileSchema, CustomSoundMetadataSchema, DEFAULT_BELL_SOUND_ID, DEFAULT_NOTIFICATION_SOUND_ID, DEFAULT_SOUND_VOLUME, LEGACY_SOUND_ID_MAP, SILENT_SOUND_ID, SoundConfigIdSchema, SoundIdSchema, SoundVolumeSchema, customHashFromSoundId, getBuiltinSoundUrl, normalizeLegacySoundId, soundIdFromCustomHash };
@@ -1,4 +1,4 @@
1
- import { x as SoundId } from "./sounds-Bw-sSyFZ.mjs";
1
+ import { x as SoundId } from "./sounds-CYxOpEdm.mjs";
2
2
  import * as zod0 from "zod";
3
3
 
4
4
  //#region src/terminal-audio.d.ts
@@ -1,4 +1,4 @@
1
- import { l as DEFAULT_BELL_SOUND_ID, m as SoundConfigIdSchema } from "./sounds-C0dNSFm8.mjs";
1
+ import { l as DEFAULT_BELL_SOUND_ID, m as SoundConfigIdSchema } from "./sounds-BzNKMW05.mjs";
2
2
 
3
3
  //#region src/terminal-audio.ts
4
4
  const TERMINAL_BELL_SOUND_VALUES = [
@@ -1,3 +1,3 @@
1
- import "./sounds-Bw-sSyFZ.mjs";
2
- import { i as TerminalBellSoundSchema, n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSound, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-8E82E0AM.mjs";
1
+ import "./sounds-CYxOpEdm.mjs";
2
+ import { i as TerminalBellSoundSchema, n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSound, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-U9Exv9A5.mjs";
3
3
  export { TERMINAL_BELL_SOUND_OPTIONS, TERMINAL_BELL_SOUND_VALUES, TerminalBellSound, TerminalBellSoundSchema };
@@ -1,4 +1,4 @@
1
- import "./sounds-C0dNSFm8.mjs";
2
- import { n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSoundSchema, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-DDwxz9sJ.mjs";
1
+ import "./sounds-BzNKMW05.mjs";
2
+ import { n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSoundSchema, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-UEv3j655.mjs";
3
3
 
4
4
  export { TERMINAL_BELL_SOUND_OPTIONS, TERMINAL_BELL_SOUND_VALUES, TerminalBellSoundSchema };
@@ -1,3 +1,3 @@
1
- import "./sounds-Bw-sSyFZ.mjs";
2
- import { A as TerminalNotificationProtocol, D as TerminalControlEvent, M as TerminalPromptState, N as TerminalTitleTarget, O as TerminalControlParseResult, P as terminalNotificationEventToPublishInput, j as TerminalProgressState, k as TerminalControlParser } from "./notifications-BWvRNkRJ.mjs";
1
+ import "./sounds-CYxOpEdm.mjs";
2
+ import { A as TerminalNotificationProtocol, D as TerminalControlEvent, M as TerminalPromptState, N as TerminalTitleTarget, O as TerminalControlParseResult, P as terminalNotificationEventToPublishInput, j as TerminalProgressState, k as TerminalControlParser } from "./notifications-C4amULI4.mjs";
3
3
  export { TerminalControlEvent, TerminalControlParseResult, TerminalControlParser, TerminalNotificationProtocol, TerminalProgressState, TerminalPromptState, TerminalTitleTarget, terminalNotificationEventToPublishInput };
@@ -1,3 +1,3 @@
1
- import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-DtBprY6-.mjs";
1
+ import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-Bxois59k.mjs";
2
2
 
3
3
  export { TerminalControlParser, terminalNotificationEventToPublishInput };
@@ -1,2 +1,2 @@
1
- import { A as renderTerminalSpawnCommand, C as TerminalSpawnCommand, D as getTerminalCommandParameters, E as getTerminalCommandDefaultValues, M as resolveTerminalShellDefaults, O as quoteTerminalShellArg, S as TerminalShellQuoteStyleSchema, T as fieldsToTerminalCommandParameters, _ as TerminalShellDefaults, a as TerminalCommandBuilder, b as TerminalShellProfileSchema, c as TerminalCommandFieldSchema, d as TerminalCommandJsonSchema, f as TerminalCommandJsonSchemaProperty, g as TerminalInvocationSettingsSchema, h as TerminalInvocationSettings, i as TerminalCommandArgument, j as renderTerminalSpawnCommandLine, k as renderTerminalCommandArgs, l as TerminalCommandFieldValue, m as TerminalCommandRenderResult, n as TERMINAL_COMMAND_FIELD_TYPE_VALUES, o as TerminalCommandBuilderPart, p as TerminalCommandParameters, r as TERMINAL_SHELL_QUOTE_STYLE_VALUES, s as TerminalCommandField, t as BUILTIN_TERMINAL_SPAWN_COMMANDS, u as TerminalCommandFieldValues, v as TerminalShellEnv, w as TerminalSpawnCommandSchema, x as TerminalShellQuoteStyle, y as TerminalShellProfile } from "./terminal-invocation-CGAgqosu.mjs";
1
+ import { A as renderTerminalSpawnCommand, C as TerminalSpawnCommand, D as getTerminalCommandParameters, E as getTerminalCommandDefaultValues, M as resolveTerminalShellDefaults, O as quoteTerminalShellArg, S as TerminalShellQuoteStyleSchema, T as fieldsToTerminalCommandParameters, _ as TerminalShellDefaults, a as TerminalCommandBuilder, b as TerminalShellProfileSchema, c as TerminalCommandFieldSchema, d as TerminalCommandJsonSchema, f as TerminalCommandJsonSchemaProperty, g as TerminalInvocationSettingsSchema, h as TerminalInvocationSettings, i as TerminalCommandArgument, j as renderTerminalSpawnCommandLine, k as renderTerminalCommandArgs, l as TerminalCommandFieldValue, m as TerminalCommandRenderResult, n as TERMINAL_COMMAND_FIELD_TYPE_VALUES, o as TerminalCommandBuilderPart, p as TerminalCommandParameters, r as TERMINAL_SHELL_QUOTE_STYLE_VALUES, s as TerminalCommandField, t as BUILTIN_TERMINAL_SPAWN_COMMANDS, u as TerminalCommandFieldValues, v as TerminalShellEnv, w as TerminalSpawnCommandSchema, x as TerminalShellQuoteStyle, y as TerminalShellProfile } from "./terminal-invocation-BmwWgwgY.mjs";
2
2
  export { BUILTIN_TERMINAL_SPAWN_COMMANDS, TERMINAL_COMMAND_FIELD_TYPE_VALUES, TERMINAL_SHELL_QUOTE_STYLE_VALUES, TerminalCommandArgument, TerminalCommandBuilder, TerminalCommandBuilderPart, TerminalCommandField, TerminalCommandFieldSchema, TerminalCommandFieldValue, TerminalCommandFieldValues, TerminalCommandJsonSchema, TerminalCommandJsonSchemaProperty, TerminalCommandParameters, TerminalCommandRenderResult, TerminalInvocationSettings, TerminalInvocationSettingsSchema, TerminalShellDefaults, TerminalShellEnv, TerminalShellProfile, TerminalShellProfileSchema, TerminalShellQuoteStyle, TerminalShellQuoteStyleSchema, TerminalSpawnCommand, TerminalSpawnCommandSchema, fieldsToTerminalCommandParameters, getTerminalCommandDefaultValues, getTerminalCommandParameters, quoteTerminalShellArg, renderTerminalCommandArgs, renderTerminalSpawnCommand, renderTerminalSpawnCommandLine, resolveTerminalShellDefaults };
@@ -1,3 +1,3 @@
1
- import { a as TerminalInvocationSettingsSchema, c as TerminalSpawnCommandSchema, d as getTerminalCommandParameters, f as quoteTerminalShellArg, g as resolveTerminalShellDefaults, h as renderTerminalSpawnCommandLine, i as TerminalCommandFieldSchema, l as fieldsToTerminalCommandParameters, m as renderTerminalSpawnCommand, n as TERMINAL_COMMAND_FIELD_TYPE_VALUES, o as TerminalShellProfileSchema, p as renderTerminalCommandArgs, r as TERMINAL_SHELL_QUOTE_STYLE_VALUES, s as TerminalShellQuoteStyleSchema, t as BUILTIN_TERMINAL_SPAWN_COMMANDS, u as getTerminalCommandDefaultValues } from "./terminal-invocation-Cdi6_Kl6.mjs";
1
+ import { a as TerminalInvocationSettingsSchema, c as TerminalSpawnCommandSchema, d as getTerminalCommandParameters, f as quoteTerminalShellArg, g as resolveTerminalShellDefaults, h as renderTerminalSpawnCommandLine, i as TerminalCommandFieldSchema, l as fieldsToTerminalCommandParameters, m as renderTerminalSpawnCommand, n as TERMINAL_COMMAND_FIELD_TYPE_VALUES, o as TerminalShellProfileSchema, p as renderTerminalCommandArgs, r as TERMINAL_SHELL_QUOTE_STYLE_VALUES, s as TerminalShellQuoteStyleSchema, t as BUILTIN_TERMINAL_SPAWN_COMMANDS, u as getTerminalCommandDefaultValues } from "./terminal-invocation-BRCuSBjE.mjs";
2
2
 
3
3
  export { BUILTIN_TERMINAL_SPAWN_COMMANDS, TERMINAL_COMMAND_FIELD_TYPE_VALUES, TERMINAL_SHELL_QUOTE_STYLE_VALUES, TerminalCommandFieldSchema, TerminalInvocationSettingsSchema, TerminalShellProfileSchema, TerminalShellQuoteStyleSchema, TerminalSpawnCommandSchema, fieldsToTerminalCommandParameters, getTerminalCommandDefaultValues, getTerminalCommandParameters, quoteTerminalShellArg, renderTerminalCommandArgs, renderTerminalSpawnCommand, renderTerminalSpawnCommandLine, resolveTerminalShellDefaults };
@@ -1,2 +1,2 @@
1
- import { a as TERMINAL_THEME_VALUES, i as TERMINAL_THEME_MODE_VALUES, n as DEFAULT_TERMINAL_LIGHT_THEME, o as TerminalThemeId, r as DEFAULT_TERMINAL_THEME_MODE, s as TerminalThemeMode, t as DEFAULT_TERMINAL_DARK_THEME } from "./terminal-theme-wbkK9vVH.mjs";
1
+ import { a as TERMINAL_THEME_VALUES, i as TERMINAL_THEME_MODE_VALUES, n as DEFAULT_TERMINAL_LIGHT_THEME, o as TerminalThemeId, r as DEFAULT_TERMINAL_THEME_MODE, s as TerminalThemeMode, t as DEFAULT_TERMINAL_DARK_THEME } from "./terminal-theme-lPZGfVA_.mjs";
2
2
  export { DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES, TerminalThemeId, TerminalThemeMode };
@@ -1,3 +1,3 @@
1
- import { a as TERMINAL_THEME_VALUES, i as TERMINAL_THEME_MODE_VALUES, n as DEFAULT_TERMINAL_LIGHT_THEME, r as DEFAULT_TERMINAL_THEME_MODE, t as DEFAULT_TERMINAL_DARK_THEME } from "./terminal-theme-CMQqJvIQ.mjs";
1
+ import { a as TERMINAL_THEME_VALUES, i as TERMINAL_THEME_MODE_VALUES, n as DEFAULT_TERMINAL_LIGHT_THEME, r as DEFAULT_TERMINAL_THEME_MODE, t as DEFAULT_TERMINAL_DARK_THEME } from "./terminal-theme-CIv3YMfi.mjs";
2
2
 
3
3
  export { DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openspecui/core",
3
- "version": "3.5.1",
3
+ "version": "3.6.0",
4
4
  "description": "Core OpenSpec adapter and parser",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",
@@ -22,6 +22,22 @@
22
22
  "import": "./dist/openspec-compat.mjs",
23
23
  "types": "./dist/openspec-compat.d.mts"
24
24
  },
25
+ "./markdown-facts": {
26
+ "import": "./dist/markdown-facts.mjs",
27
+ "types": "./dist/markdown-facts.d.mts"
28
+ },
29
+ "./markdown-reading": {
30
+ "import": "./dist/markdown-reading.mjs",
31
+ "types": "./dist/markdown-reading.d.mts"
32
+ },
33
+ "./openspec-annotations": {
34
+ "import": "./dist/openspec-annotations.mjs",
35
+ "types": "./dist/openspec-annotations.d.mts"
36
+ },
37
+ "./openspec-projection": {
38
+ "import": "./dist/openspec-projection.mjs",
39
+ "types": "./dist/openspec-projection.d.mts"
40
+ },
25
41
  "./opsx-display-path": {
26
42
  "import": "./dist/opsx-display-path.mjs",
27
43
  "types": "./dist/opsx-display-path.d.mts"
@@ -55,18 +71,24 @@
55
71
  "dist"
56
72
  ],
57
73
  "scripts": {
58
- "build": "tsdown src/index.ts src/dashboard-display.ts src/opsx-display-path.ts src/hosted-app.ts src/openspec-compat.ts src/notifications.ts src/sounds.ts src/terminal-theme.ts src/terminal-invocation.ts src/terminal-audio.ts src/terminal-control.ts --format esm --dts",
59
- "dev": "tsdown src/index.ts src/dashboard-display.ts src/opsx-display-path.ts src/hosted-app.ts src/openspec-compat.ts src/notifications.ts src/sounds.ts src/terminal-theme.ts src/terminal-invocation.ts src/terminal-audio.ts src/terminal-control.ts --format esm --dts --watch",
74
+ "build": "tsdown src/index.ts src/dashboard-display.ts src/opsx-display-path.ts src/hosted-app.ts src/openspec-compat.ts src/markdown-facts.ts src/markdown-reading.ts src/openspec-annotations.ts src/openspec-projection.ts src/notifications.ts src/sounds.ts src/terminal-theme.ts src/terminal-invocation.ts src/terminal-audio.ts src/terminal-control.ts --format esm --dts",
75
+ "dev": "tsdown src/index.ts src/dashboard-display.ts src/opsx-display-path.ts src/hosted-app.ts src/openspec-compat.ts src/markdown-facts.ts src/markdown-reading.ts src/openspec-annotations.ts src/openspec-projection.ts src/notifications.ts src/sounds.ts src/terminal-theme.ts src/terminal-invocation.ts src/terminal-audio.ts src/terminal-control.ts --format esm --dts --watch",
60
76
  "test": "vitest run",
61
77
  "test:watch": "vitest",
62
78
  "typecheck": "tsc --noEmit"
63
79
  },
64
80
  "dependencies": {
65
81
  "@parcel/watcher": "^2.5.1",
82
+ "mdast-util-from-markdown": "^2.0.2",
83
+ "mdast-util-gfm": "^3.1.0",
84
+ "mdast-util-to-string": "^4.0.0",
85
+ "micromark-extension-gfm": "^3.0.0",
66
86
  "yaml": "^2.8.2",
67
87
  "zod": "^3.24.1"
68
88
  },
69
89
  "devDependencies": {
90
+ "@types/mdast": "^4.0.4",
91
+ "@types/unist": "^3.0.3",
70
92
  "@vitest/coverage-v8": "^4.1.0",
71
93
  "tsdown": "^0.16.6",
72
94
  "typescript": "^5.7.2",