@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.
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 +62 -620
  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-CpdllJff.d.mts → terminal-invocation-BmwWgwgY.d.mts} +6 -6
  36. package/dist/terminal-invocation.d.mts +1 -1
  37. package/dist/terminal-invocation.mjs +1 -1
  38. package/dist/terminal-theme.d.mts +1 -1
  39. package/dist/terminal-theme.mjs +1 -1
  40. package/package.json +25 -3
  41. /package/dist/{hosted-app-CIOJpbzc.mjs → hosted-app-DFFffbJc.mjs} +0 -0
  42. /package/dist/{hosted-app-DaGUbBJn.d.mts → hosted-app-DZrYivji.d.mts} +0 -0
  43. /package/dist/{opsx-display-path-CuQyGB_A.d.mts → opsx-display-path-CkV9sq_j.d.mts} +0 -0
  44. /package/dist/{opsx-display-path-B6Owu17P.mjs → opsx-display-path-D4KLYRXQ.mjs} +0 -0
  45. /package/dist/{sounds-C0dNSFm8.mjs → sounds-BzNKMW05.mjs} +0 -0
  46. /package/dist/{sounds-Bw-sSyFZ.d.mts → sounds-CYxOpEdm.d.mts} +0 -0
  47. /package/dist/{terminal-control-DtBprY6-.mjs → terminal-control-Bxois59k.mjs} +0 -0
  48. /package/dist/{terminal-invocation-Cdi6_Kl6.mjs → terminal-invocation-BRCuSBjE.mjs} +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
package/dist/index.mjs CHANGED
@@ -1,11 +1,15 @@
1
- import { _ as customHashFromSoundId, a as CustomSoundHashSchema, b as soundIdFromCustomHash, c as CustomSoundMetadataSchema, 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";
2
- import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-DtBprY6-.mjs";
3
- import { a as NotificationPublishInputSchema, c as NotificationSoundSchema, h as groupNotifications, i as NotificationGroupKeySchema, l as NotificationSourceSchema, m as getNotificationGroupLabel, n as NOTIFICATION_SOUND_VALUES, o as NotificationRecordSchema, p as getNotificationGroupKey, r as NotificationActionSchema, s as NotificationSettingsSchema, t as NOTIFICATION_SOUND_OPTIONS, u as TerminalNotificationParser } from "./notifications-F81mmO55.mjs";
4
- import { n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSoundSchema, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-DDwxz9sJ.mjs";
5
- 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";
6
- import { a as isHostedBackendHealthResponse, c as normalizeHostedAppBaseUrl, i as buildHostedLaunchUrl, l as resolveHostedAppBaseUrl, n as OFFICIAL_APP_BASE_URL, o as isSupportedEmbeddedUiUrl, r as buildEmbeddedUiLaunchUrl, s as normalizeEmbeddedUiUrl, t as HOSTED_SHELL_PROTOCOL_VERSION } from "./hosted-app-CIOJpbzc.mjs";
7
- import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-B6Owu17P.mjs";
8
- import { a as TerminalInvocationSettingsSchema, c as TerminalSpawnCommandSchema, f as quoteTerminalShellArg, g as resolveTerminalShellDefaults, h as renderTerminalSpawnCommandLine, i as TerminalCommandFieldSchema, 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 { n as toMarkdownFactKind, t as parseMarkdownFacts } from "./markdown-facts-BmSmZmpB.mjs";
2
+ import { a as getMarkdownAnnotationsForFact, c as getMarkdownHeadingFacts, i as getMarkdownAnnotation, l as trimMarkdownSlice, n as createMarkdownReadingDocument, o as getMarkdownFactSpan, r as createMarkdownReadingDocumentFromFacts, s as getMarkdownHeadingEnd, t as buildMarkdownParentMap } from "./markdown-reading-CrchEfoW.mjs";
3
+ import { a as getOpenSpecAnnotationsForFact, i as getOpenSpecAnnotation, n as annotateOpenSpecMarkdown, o as openSpecAnnotationRules, r as builtinOpenSpecReadingPlugin, t as annotateOpenSpecFacts } from "./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
+ import { _ as customHashFromSoundId, a as CustomSoundHashSchema, b as soundIdFromCustomHash, c as CustomSoundMetadataSchema, 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";
6
+ import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-Bxois59k.mjs";
7
+ import { a as NotificationPublishInputSchema, c as NotificationSoundSchema, h as groupNotifications, i as NotificationGroupKeySchema, l as NotificationSourceSchema, m as getNotificationGroupLabel, n as NOTIFICATION_SOUND_VALUES, o as NotificationRecordSchema, p as getNotificationGroupKey, r as NotificationActionSchema, s as NotificationSettingsSchema, t as NOTIFICATION_SOUND_OPTIONS, u as TerminalNotificationParser } from "./notifications-fD-V5hyP.mjs";
8
+ import { n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSoundSchema, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-UEv3j655.mjs";
9
+ 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";
10
+ import { a as isHostedBackendHealthResponse, c as normalizeHostedAppBaseUrl, i as buildHostedLaunchUrl, l as resolveHostedAppBaseUrl, n as OFFICIAL_APP_BASE_URL, o as isSupportedEmbeddedUiUrl, r as buildEmbeddedUiLaunchUrl, s as normalizeEmbeddedUiUrl, t as HOSTED_SHELL_PROTOCOL_VERSION } from "./hosted-app-DFFffbJc.mjs";
11
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-D4KLYRXQ.mjs";
12
+ import { a as TerminalInvocationSettingsSchema, c as TerminalSpawnCommandSchema, f as quoteTerminalShellArg, g as resolveTerminalShellDefaults, h as renderTerminalSpawnCommandLine, i as TerminalCommandFieldSchema, 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";
9
13
  import { mkdir, readFile, rename, writeFile } from "fs/promises";
10
14
  import { dirname, join } from "path";
11
15
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -21,6 +25,27 @@ import { homedir } from "node:os";
21
25
  import { parse } from "yaml";
22
26
 
23
27
  //#region src/parser.ts
28
+ const SCENARIO_STEP_PATTERN = new RegExp(`^\\s*[-*+]\\s+(?:\\*\\*)?(${[
29
+ "GIVEN",
30
+ "WHEN",
31
+ "THEN",
32
+ "AND",
33
+ "BUT"
34
+ ].join("|")})\\b(?:\\*\\*)?\\s*:?\\s*(.+?)\\s*$`, "i");
35
+ function parseScenarioSteps(bodyMarkdown) {
36
+ const steps = [];
37
+ for (const line of bodyMarkdown.split("\n")) {
38
+ const match = line.match(SCENARIO_STEP_PATTERN);
39
+ if (!match) continue;
40
+ const keyword = match[1].toUpperCase();
41
+ steps.push({
42
+ keyword,
43
+ contentMarkdown: match[2].trim(),
44
+ rawText: line.trim()
45
+ });
46
+ }
47
+ return steps;
48
+ }
24
49
  /**
25
50
  * Markdown parser for OpenSpec documents
26
51
  */
@@ -29,85 +54,7 @@ var MarkdownParser = class {
29
54
  * Parse a spec markdown content into a Spec object
30
55
  */
31
56
  parseSpec(specId, content) {
32
- const lines = content.split("\n");
33
- let name = specId;
34
- let overview = "";
35
- const requirements = [];
36
- let currentSection = "";
37
- let currentRequirement = null;
38
- let currentScenarioText = "";
39
- let reqIndex = 0;
40
- for (let i = 0; i < lines.length; i++) {
41
- const line = lines[i];
42
- if (line.startsWith("# ") && name === specId) {
43
- name = line.slice(2).trim();
44
- continue;
45
- }
46
- if (line.startsWith("## ")) {
47
- const sectionTitle = line.slice(3).trim().toLowerCase();
48
- if (sectionTitle.includes("purpose") || sectionTitle.includes("overview")) currentSection = "overview";
49
- else if (sectionTitle.includes("requirement")) currentSection = "requirements";
50
- else currentSection = sectionTitle;
51
- continue;
52
- }
53
- if (line.startsWith("### Requirement:") || line.startsWith("### ") && currentSection === "requirements") {
54
- if (currentRequirement) {
55
- if (currentScenarioText.trim()) {
56
- currentRequirement.scenarios = currentRequirement.scenarios || [];
57
- currentRequirement.scenarios.push({ rawText: currentScenarioText.trim() });
58
- }
59
- requirements.push({
60
- id: currentRequirement.id || `req-${reqIndex}`,
61
- text: currentRequirement.text || "",
62
- scenarios: currentRequirement.scenarios || []
63
- });
64
- }
65
- reqIndex++;
66
- const reqTitle = line.replace(/^###\s*(Requirement:\s*)?/, "").trim();
67
- currentRequirement = {
68
- id: `req-${reqIndex}`,
69
- text: reqTitle,
70
- scenarios: []
71
- };
72
- currentScenarioText = "";
73
- continue;
74
- }
75
- if (line.startsWith("#### Scenario:") || line.startsWith("#### ")) {
76
- if (currentScenarioText.trim() && currentRequirement) {
77
- currentRequirement.scenarios = currentRequirement.scenarios || [];
78
- currentRequirement.scenarios.push({ rawText: currentScenarioText.trim() });
79
- }
80
- currentScenarioText = line.replace(/^####\s*(Scenario:\s*)?/, "").trim() + "\n";
81
- continue;
82
- }
83
- if (currentSection === "overview" && !currentRequirement) overview += line + "\n";
84
- else if (currentRequirement && line.trim()) {
85
- if (line.startsWith("- ") || line.startsWith("* ")) currentScenarioText += line + "\n";
86
- else if (!line.startsWith("#")) if (currentRequirement.text && !currentScenarioText) currentRequirement.text += " " + line.trim();
87
- else currentScenarioText += line + "\n";
88
- }
89
- }
90
- if (currentRequirement) {
91
- if (currentScenarioText.trim()) {
92
- currentRequirement.scenarios = currentRequirement.scenarios || [];
93
- currentRequirement.scenarios.push({ rawText: currentScenarioText.trim() });
94
- }
95
- requirements.push({
96
- id: currentRequirement.id || `req-${reqIndex}`,
97
- text: currentRequirement.text || "",
98
- scenarios: currentRequirement.scenarios || []
99
- });
100
- }
101
- return {
102
- id: specId,
103
- name: name || specId,
104
- overview: overview.trim(),
105
- requirements,
106
- metadata: {
107
- version: "1.0.0",
108
- format: "openspec"
109
- }
110
- };
57
+ return parseOpenSpecMarkdownToSpec(specId, content);
111
58
  }
112
59
  /**
113
60
  * Parse a change proposal markdown content into a Change object
@@ -198,14 +145,28 @@ var MarkdownParser = class {
198
145
  let reqIndex = 0;
199
146
  const finalizeRequirement = () => {
200
147
  if (!currentOperation || !currentRequirement) return;
201
- const scenarios = currentRequirement.scenarios.map((scenario) => {
202
- const rawText = [scenario.title, ...scenario.lines].join("\n").trim();
203
- return rawText ? { rawText } : null;
204
- }).filter((s) => Boolean(s));
205
- const descriptionText = currentRequirement.descriptionLines.map((l) => l.trim()).filter(Boolean).join(" ");
148
+ const scenarios = currentRequirement.scenarios.reduce((acc, scenario) => {
149
+ const bodyMarkdown$1 = scenario.lines.join("\n").trim();
150
+ const rawText = [scenario.title, bodyMarkdown$1].filter((part) => part.trim()).join("\n");
151
+ if (rawText) acc.push({
152
+ title: scenario.title,
153
+ bodyMarkdown: bodyMarkdown$1,
154
+ rawText,
155
+ steps: parseScenarioSteps(bodyMarkdown$1)
156
+ });
157
+ return acc;
158
+ }, []);
159
+ const bodyMarkdown = currentRequirement.descriptionLines.join("\n").trim();
160
+ const text = [
161
+ currentRequirement.title,
162
+ bodyMarkdown,
163
+ ...scenarios.map((s) => s.rawText)
164
+ ].filter((part) => part.trim()).join("\n\n");
206
165
  const requirement = {
207
166
  id: `${deltaSpec.specId}-${currentOperation.toLowerCase()}-${++reqIndex}`,
208
- text: descriptionText || currentRequirement.title,
167
+ title: currentRequirement.title,
168
+ bodyMarkdown,
169
+ text,
209
170
  scenarios
210
171
  };
211
172
  deltas.push({
@@ -314,8 +275,12 @@ var MarkdownParser = class {
314
275
  content += `## Purpose\n${spec.overview}\n\n`;
315
276
  content += `## Requirements\n`;
316
277
  for (const req of spec.requirements) {
317
- content += `\n### Requirement: ${req.text}\n`;
318
- for (const scenario of req.scenarios) content += `\n#### Scenario\n${scenario.rawText}\n`;
278
+ content += `\n### Requirement: ${req.title}\n`;
279
+ if (req.bodyMarkdown.trim()) content += `${req.bodyMarkdown.trim()}\n`;
280
+ for (const scenario of req.scenarios) {
281
+ content += `\n#### Scenario: ${scenario.title}\n`;
282
+ if (scenario.bodyMarkdown.trim()) content += `${scenario.bodyMarkdown.trim()}\n`;
283
+ }
319
284
  }
320
285
  return content;
321
286
  }
@@ -1782,14 +1747,33 @@ const ChangeFileSchema = z.object({
1782
1747
  content: z.string().optional(),
1783
1748
  size: z.number().optional()
1784
1749
  });
1750
+ const ScenarioStepKeywordSchema = z.enum([
1751
+ "GIVEN",
1752
+ "WHEN",
1753
+ "THEN",
1754
+ "AND",
1755
+ "BUT"
1756
+ ]);
1757
+ const ScenarioStepSchema = z.object({
1758
+ keyword: ScenarioStepKeywordSchema,
1759
+ contentMarkdown: z.string(),
1760
+ rawText: z.string()
1761
+ });
1785
1762
  /**
1786
1763
  * A requirement within a specification.
1787
1764
  * Requirements should use RFC 2119 keywords (SHALL, MUST, etc.)
1788
1765
  */
1789
1766
  const RequirementSchema = z.object({
1790
1767
  id: z.string(),
1768
+ title: z.string(),
1769
+ bodyMarkdown: z.string(),
1791
1770
  text: z.string(),
1792
- scenarios: z.array(z.object({ rawText: z.string() }))
1771
+ scenarios: z.array(z.object({
1772
+ title: z.string(),
1773
+ bodyMarkdown: z.string(),
1774
+ rawText: z.string(),
1775
+ steps: z.array(ScenarioStepSchema).optional()
1776
+ }))
1793
1777
  });
1794
1778
  /**
1795
1779
  * A specification document.
@@ -4706,4 +4690,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4706
4690
  ]);
4707
4691
 
4708
4692
  //#endregion
4709
- export { AI_TOOLS, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, BUILTIN_SOUND_IDS, BUILTIN_SOUND_OPTIONS, BUILTIN_TERMINAL_SPAWN_COMMANDS, BuiltinSoundIdSchema, CODE_EDITOR_THEME_VALUES, CUSTOM_SOUND_ADD_VALUE, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, CustomSoundHashSchema, CustomSoundIdSchema, CustomSoundMetadataFileSchema, CustomSoundMetadataSchema, DASHBOARD_METRIC_KEYS, DEFAULT_BELL_SOUND_ID, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DEFAULT_NOTIFICATION_SOUND_ID, DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, GitConfigSchema, HOSTED_SHELL_PROTOCOL_VERSION, LEGACY_SOUND_ID_MAP, MarkdownParser, NOTIFICATION_SOUND_OPTIONS, NOTIFICATION_SOUND_VALUES, NotificationActionSchema, NotificationGroupKeySchema, NotificationPublishInputSchema, NotificationRecordSchema, NotificationSettingsSchema, NotificationSoundSchema, NotificationSourceSchema, OFFICIAL_APP_BASE_URL, OPENSPECUI_HOOKS_VERSION, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxAgentInvocationModeSchema, OpsxConfigSchema, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBellResponseSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyProcessTitleResponseSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SILENT_SOUND_ID, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SoundConfigIdSchema, SoundIdSchema, SpecSchema, TERMINAL_BELL_SOUND_OPTIONS, TERMINAL_BELL_SOUND_VALUES, TERMINAL_COMMAND_FIELD_TYPE_VALUES, TERMINAL_SHELL_QUOTE_STYLE_VALUES, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalBellSoundSchema, TerminalCommandFieldSchema, TerminalConfigSchema, TerminalControlParser, TerminalInvocationSettingsSchema, TerminalNotificationParser, TerminalRendererEngineSchema, TerminalShellProfileSchema, TerminalShellQuoteStyleSchema, TerminalSpawnCommandSchema, TerminalThemeModeSchema, TerminalThemeSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, customHashFromSoundId, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getBuiltinSoundUrl, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getNotificationGroupKey, getNotificationGroupLabel, getProjectWatcher, getTerminalCommandDefaultValues, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, groupNotifications, initWatcherPool, isGlobPattern, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, normalizeLegacySoundId, parseCliCommand, quoteTerminalShellArg, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, renderTerminalCommandArgs, renderTerminalSpawnCommandLine, resolveHostedAppBaseUrl, resolveTerminalShellDefaults, sniffGlobalCli, soundIdFromCustomHash, subscribeWatcherRuntimeStatus, terminalNotificationEventToPublishInput, toOpsxDisplayPath };
4693
+ export { AI_TOOLS, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, BUILTIN_SOUND_IDS, BUILTIN_SOUND_OPTIONS, BUILTIN_TERMINAL_SPAWN_COMMANDS, BuiltinSoundIdSchema, CODE_EDITOR_THEME_VALUES, CUSTOM_SOUND_ADD_VALUE, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, CustomSoundHashSchema, CustomSoundIdSchema, CustomSoundMetadataFileSchema, CustomSoundMetadataSchema, DASHBOARD_METRIC_KEYS, DEFAULT_BELL_SOUND_ID, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DEFAULT_NOTIFICATION_SOUND_ID, DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, GitConfigSchema, HOSTED_SHELL_PROTOCOL_VERSION, LEGACY_SOUND_ID_MAP, MarkdownParser, NOTIFICATION_SOUND_OPTIONS, NOTIFICATION_SOUND_VALUES, NotificationActionSchema, NotificationGroupKeySchema, NotificationPublishInputSchema, NotificationRecordSchema, NotificationSettingsSchema, NotificationSoundSchema, NotificationSourceSchema, OFFICIAL_APP_BASE_URL, OPENSPECUI_HOOKS_VERSION, OPEN_SPEC_READING_SECTIONS_PROJECTION_ID, OPEN_SPEC_SPEC_PROJECTION_ID, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxAgentInvocationModeSchema, OpsxConfigSchema, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBellResponseSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyProcessTitleResponseSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SILENT_SOUND_ID, ScenarioStepKeywordSchema, ScenarioStepSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SoundConfigIdSchema, SoundIdSchema, SpecSchema, TERMINAL_BELL_SOUND_OPTIONS, TERMINAL_BELL_SOUND_VALUES, TERMINAL_COMMAND_FIELD_TYPE_VALUES, TERMINAL_SHELL_QUOTE_STYLE_VALUES, TERMINAL_THEME_MODE_VALUES, TERMINAL_THEME_VALUES, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalBellSoundSchema, TerminalCommandFieldSchema, TerminalConfigSchema, TerminalControlParser, TerminalInvocationSettingsSchema, TerminalNotificationParser, TerminalRendererEngineSchema, TerminalShellProfileSchema, TerminalShellQuoteStyleSchema, TerminalSpawnCommandSchema, TerminalThemeModeSchema, TerminalThemeSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, annotateOpenSpecFacts, annotateOpenSpecMarkdown, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, buildMarkdownParentMap, builtinOpenSpecReadingPlugin, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, createMarkdownReadingDocument, createMarkdownReadingDocumentFromFacts, createOpenSpecReadingPlugin, customHashFromSoundId, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getBuiltinSoundUrl, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getMarkdownAnnotation, getMarkdownAnnotationsForFact, getMarkdownFactSpan, getMarkdownHeadingEnd, getMarkdownHeadingFacts, getNotificationGroupKey, getNotificationGroupLabel, getOpenSpecAnnotation, getOpenSpecAnnotationsForFact, getOpenSpecProjectionAnnotation, getOpenSpecReadingSections, getProjectWatcher, getTerminalCommandDefaultValues, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, groupNotifications, initWatcherPool, isGlobPattern, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, normalizeLegacySoundId, openSpecAnnotationRules, parseCliCommand, parseMarkdownFacts, parseOpenSpecMarkdownToSpec, projectAnnotatedOpenSpecToSpec, projectOpenSpecMarkdown, quoteTerminalShellArg, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, renderTerminalCommandArgs, renderTerminalSpawnCommandLine, resolveHostedAppBaseUrl, resolveTerminalShellDefaults, sniffGlobalCli, soundIdFromCustomHash, subscribeWatcherRuntimeStatus, terminalNotificationEventToPublishInput, toMarkdownFactKind, toOpsxDisplayPath, trimMarkdownSlice };
@@ -0,0 +1,136 @@
1
+ import { fromMarkdown } from "mdast-util-from-markdown";
2
+ import { gfmFromMarkdown } from "mdast-util-gfm";
3
+ import { toString } from "mdast-util-to-string";
4
+ import { gfm } from "micromark-extension-gfm";
5
+
6
+ //#region src/markdown-facts.ts
7
+ function toMarkdownFactKind(type) {
8
+ switch (type) {
9
+ case "root":
10
+ case "heading":
11
+ case "paragraph":
12
+ case "list":
13
+ case "listItem":
14
+ case "blockquote":
15
+ case "table":
16
+ case "tableRow":
17
+ case "tableCell":
18
+ case "code":
19
+ case "thematicBreak":
20
+ case "html":
21
+ case "definition":
22
+ case "footnoteDefinition": return type;
23
+ default: return "unknown";
24
+ }
25
+ }
26
+ function parseMarkdownFacts(sourceMarkdown) {
27
+ const root = fromMarkdown(sourceMarkdown, {
28
+ extensions: [gfm()],
29
+ mdastExtensions: [gfmFromMarkdown()]
30
+ });
31
+ const facts = [];
32
+ const nodeIdByNode = /* @__PURE__ */ new Map();
33
+ const visit = (node, parentId) => {
34
+ const fact = createFact(node, sourceMarkdown, facts.length, parentId);
35
+ facts.push(fact);
36
+ nodeIdByNode.set(node, fact.id);
37
+ if (isParentNode(node)) for (const child of node.children) {
38
+ if (!isSupportedNode(child)) continue;
39
+ visit(child, fact.id);
40
+ const childId = nodeIdByNode.get(child);
41
+ if (childId) fact.children.push(childId);
42
+ }
43
+ };
44
+ visit(root);
45
+ return {
46
+ sourceMarkdown,
47
+ rootId: "md-1",
48
+ facts
49
+ };
50
+ }
51
+ function createFact(node, sourceMarkdown, index, parentId) {
52
+ const base = {
53
+ id: `md-${index + 1}`,
54
+ kind: toMarkdownFactKind(node.type),
55
+ mdastType: node.type,
56
+ text: getNodeText(node),
57
+ children: [],
58
+ range: toSourceRange(sourceMarkdown, node.position),
59
+ ...parentId ? { parentId } : {}
60
+ };
61
+ switch (node.type) {
62
+ case "heading": return {
63
+ ...base,
64
+ depth: node.depth
65
+ };
66
+ case "list": return {
67
+ ...base,
68
+ ordered: Boolean(node.ordered)
69
+ };
70
+ case "listItem": return {
71
+ ...base,
72
+ ...typeof node.checked === "boolean" ? { checked: node.checked } : {}
73
+ };
74
+ case "code": return {
75
+ ...base,
76
+ text: node.value,
77
+ value: node.value,
78
+ ...node.lang ? { language: node.lang } : {}
79
+ };
80
+ case "html": return {
81
+ ...base,
82
+ value: node.value
83
+ };
84
+ default: return base;
85
+ }
86
+ }
87
+ function toSourceRange(sourceMarkdown, position) {
88
+ if (!position) return void 0;
89
+ const startOffset = position.start.offset;
90
+ const endOffset = position.end.offset;
91
+ const rawMarkdown = typeof startOffset === "number" && typeof endOffset === "number" ? sourceMarkdown.slice(startOffset, endOffset) : "";
92
+ return {
93
+ start: {
94
+ line: position.start.line,
95
+ column: position.start.column,
96
+ ...typeof startOffset === "number" ? { offset: startOffset } : {}
97
+ },
98
+ end: {
99
+ line: position.end.line,
100
+ column: position.end.column,
101
+ ...typeof endOffset === "number" ? { offset: endOffset } : {}
102
+ },
103
+ rawMarkdown
104
+ };
105
+ }
106
+ function getNodeText(node) {
107
+ if (node.type === "code" || node.type === "html") return node.value;
108
+ return toString(node, {
109
+ includeHtml: true,
110
+ includeImageAlt: true
111
+ }).trim();
112
+ }
113
+ function isParentNode(node) {
114
+ return Array.isArray(node.children);
115
+ }
116
+ function isSupportedNode(node) {
117
+ switch (node.type) {
118
+ case "blockquote":
119
+ case "code":
120
+ case "definition":
121
+ case "footnoteDefinition":
122
+ case "heading":
123
+ case "html":
124
+ case "list":
125
+ case "listItem":
126
+ case "paragraph":
127
+ case "table":
128
+ case "tableRow":
129
+ case "tableCell":
130
+ case "thematicBreak": return true;
131
+ default: return isParentNode(node);
132
+ }
133
+ }
134
+
135
+ //#endregion
136
+ export { toMarkdownFactKind as n, parseMarkdownFacts as t };
@@ -0,0 +1,39 @@
1
+ //#region src/markdown-facts.d.ts
2
+ type MarkdownFactKind = 'root' | 'heading' | 'paragraph' | 'list' | 'listItem' | 'blockquote' | 'table' | 'tableRow' | 'tableCell' | 'code' | 'thematicBreak' | 'html' | 'definition' | 'footnoteDefinition' | 'unknown';
3
+ interface MarkdownSourcePoint {
4
+ line: number;
5
+ column: number;
6
+ offset?: number;
7
+ }
8
+ interface MarkdownSourceRange {
9
+ start: MarkdownSourcePoint;
10
+ end: MarkdownSourcePoint;
11
+ rawMarkdown: string;
12
+ }
13
+ interface MarkdownFact {
14
+ id: string;
15
+ kind: MarkdownFactKind;
16
+ /**
17
+ * Original mdast node type. Useful when `kind` is `unknown` or when upstream
18
+ * syntax extensions add new node types before OpenSpecUI teaches semantics.
19
+ */
20
+ mdastType: string;
21
+ text: string;
22
+ parentId?: string;
23
+ children: string[];
24
+ range?: MarkdownSourceRange;
25
+ depth?: 1 | 2 | 3 | 4 | 5 | 6;
26
+ ordered?: boolean;
27
+ checked?: boolean;
28
+ language?: string;
29
+ value?: string;
30
+ }
31
+ interface MarkdownFactsDocument {
32
+ sourceMarkdown: string;
33
+ rootId: string;
34
+ facts: MarkdownFact[];
35
+ }
36
+ declare function toMarkdownFactKind(type: string): MarkdownFactKind;
37
+ declare function parseMarkdownFacts(sourceMarkdown: string): MarkdownFactsDocument;
38
+ //#endregion
39
+ export { MarkdownSourceRange as a, MarkdownSourcePoint as i, MarkdownFactKind as n, parseMarkdownFacts as o, MarkdownFactsDocument as r, toMarkdownFactKind as s, MarkdownFact as t };
@@ -0,0 +1,2 @@
1
+ import { a as MarkdownSourceRange, i as MarkdownSourcePoint, n as MarkdownFactKind, o as parseMarkdownFacts, r as MarkdownFactsDocument, s as toMarkdownFactKind, t as MarkdownFact } from "./markdown-facts-f3kXnqXb.mjs";
2
+ export { MarkdownFact, MarkdownFactKind, MarkdownFactsDocument, MarkdownSourcePoint, MarkdownSourceRange, parseMarkdownFacts, toMarkdownFactKind };
@@ -0,0 +1,3 @@
1
+ import { n as toMarkdownFactKind, t as parseMarkdownFacts } from "./markdown-facts-BmSmZmpB.mjs";
2
+
3
+ export { parseMarkdownFacts, toMarkdownFactKind };
@@ -0,0 +1,104 @@
1
+ import { t as parseMarkdownFacts } from "./markdown-facts-BmSmZmpB.mjs";
2
+
3
+ //#region src/markdown-reading.ts
4
+ function createMarkdownReadingDocument(sourceMarkdown, plugins = []) {
5
+ return createMarkdownReadingDocumentFromFacts(parseMarkdownFacts(sourceMarkdown), plugins);
6
+ }
7
+ function createMarkdownReadingDocumentFromFacts(factsDocument, plugins = []) {
8
+ const lookup = createLookup(factsDocument);
9
+ const annotations = [];
10
+ for (const rule of plugins.flatMap((plugin) => plugin.annotationRules ?? [])) {
11
+ const context = createAnnotationContext(lookup, annotations);
12
+ for (const input of rule.annotate(context)) annotations.push({
13
+ id: `${rule.id}:${annotations.length + 1}`,
14
+ ruleId: rule.id,
15
+ kind: input.kind,
16
+ targetFactId: input.targetFactId,
17
+ ...input.sourceSpan ? { sourceSpan: input.sourceSpan } : {},
18
+ ...input.textSpan ? { textSpan: input.textSpan } : {},
19
+ confidence: input.confidence,
20
+ ...input.metadata ? { metadata: input.metadata } : {}
21
+ });
22
+ }
23
+ const projections = {};
24
+ for (const rule of plugins.flatMap((plugin) => plugin.projectionRules ?? [])) {
25
+ const context = createProjectionContext(lookup, annotations, projections);
26
+ const output = rule.project(context);
27
+ if (output !== void 0) projections[rule.id] = output;
28
+ }
29
+ return {
30
+ ...factsDocument,
31
+ annotations,
32
+ projections
33
+ };
34
+ }
35
+ function getMarkdownFactSpan(fact) {
36
+ const start = fact.range?.start.offset;
37
+ const end = fact.range?.end.offset;
38
+ if (typeof start !== "number" || typeof end !== "number") return void 0;
39
+ return {
40
+ start,
41
+ end
42
+ };
43
+ }
44
+ function trimMarkdownSlice(sourceMarkdown, start, end) {
45
+ return sourceMarkdown.slice(start, Math.max(start, end)).trim();
46
+ }
47
+ function getMarkdownHeadingFacts(document) {
48
+ return document.facts.filter((fact) => fact.kind === "heading" && typeof fact.depth === "number");
49
+ }
50
+ function getMarkdownHeadingEnd(headings, index, sourceLength) {
51
+ const heading = headings[index];
52
+ if (!heading) return sourceLength;
53
+ const headingDepth = heading.depth ?? 6;
54
+ for (let i = index + 1; i < headings.length; i++) {
55
+ const next = headings[i];
56
+ if (next && (next.depth ?? 6) <= headingDepth) return getMarkdownFactSpan(next)?.start ?? sourceLength;
57
+ }
58
+ return sourceLength;
59
+ }
60
+ function getMarkdownAnnotationsForFact(annotations, factId, kind) {
61
+ return annotations.filter((annotation) => annotation.targetFactId === factId && (!kind || annotation.kind === kind));
62
+ }
63
+ function getMarkdownAnnotation(annotations, factId, kind) {
64
+ return annotations.find((annotation) => annotation.targetFactId === factId && annotation.kind === kind);
65
+ }
66
+ function buildMarkdownParentMap(facts) {
67
+ const factById = new Map(facts.map((fact) => [fact.id, fact]));
68
+ const parentById = /* @__PURE__ */ new Map();
69
+ for (const fact of facts) {
70
+ if (!fact.parentId) continue;
71
+ const parent = factById.get(fact.parentId);
72
+ if (parent) parentById.set(fact.id, parent);
73
+ }
74
+ return parentById;
75
+ }
76
+ function createLookup(document) {
77
+ return {
78
+ sourceMarkdown: document.sourceMarkdown,
79
+ rootId: document.rootId,
80
+ facts: document.facts,
81
+ factById: new Map(document.facts.map((fact) => [fact.id, fact])),
82
+ parentById: buildMarkdownParentMap(document.facts)
83
+ };
84
+ }
85
+ function createAnnotationContext(lookup, previousAnnotations) {
86
+ return {
87
+ ...lookup,
88
+ previousAnnotations,
89
+ getAnnotationsForFact: (factId, kind) => getMarkdownAnnotationsForFact(previousAnnotations, factId, kind),
90
+ getAnnotation: (factId, kind) => getMarkdownAnnotation(previousAnnotations, factId, kind)
91
+ };
92
+ }
93
+ function createProjectionContext(lookup, annotations, projections) {
94
+ return {
95
+ ...lookup,
96
+ annotations,
97
+ projections,
98
+ getAnnotationsForFact: (factId, kind) => getMarkdownAnnotationsForFact(annotations, factId, kind),
99
+ getAnnotation: (factId, kind) => getMarkdownAnnotation(annotations, factId, kind)
100
+ };
101
+ }
102
+
103
+ //#endregion
104
+ export { getMarkdownAnnotationsForFact as a, getMarkdownHeadingFacts as c, getMarkdownAnnotation as i, trimMarkdownSlice as l, createMarkdownReadingDocument as n, getMarkdownFactSpan as o, createMarkdownReadingDocumentFromFacts as r, getMarkdownHeadingEnd as s, buildMarkdownParentMap as t };
@@ -0,0 +1,74 @@
1
+ import { r as MarkdownFactsDocument, t as MarkdownFact } from "./markdown-facts-f3kXnqXb.mjs";
2
+
3
+ //#region src/markdown-reading.d.ts
4
+ type MarkdownAnnotationConfidence = 'strong' | 'weak';
5
+ interface MarkdownAnnotation<Kind extends string = string, Metadata extends object = object> {
6
+ id: string;
7
+ kind: Kind;
8
+ targetFactId: string;
9
+ sourceSpan?: MarkdownFactSpan;
10
+ textSpan?: MarkdownFactSpan;
11
+ ruleId: string;
12
+ confidence: MarkdownAnnotationConfidence;
13
+ metadata?: Readonly<Metadata>;
14
+ }
15
+ interface MarkdownAnnotationInput<Kind extends string = string, Metadata extends object = object> {
16
+ kind: Kind;
17
+ targetFactId: string;
18
+ sourceSpan?: MarkdownFactSpan;
19
+ textSpan?: MarkdownFactSpan;
20
+ confidence: MarkdownAnnotationConfidence;
21
+ metadata?: Readonly<Metadata>;
22
+ }
23
+ interface MarkdownReadingLookup {
24
+ sourceMarkdown: string;
25
+ rootId: string;
26
+ facts: readonly MarkdownFact[];
27
+ factById: ReadonlyMap<string, MarkdownFact>;
28
+ parentById: ReadonlyMap<string, MarkdownFact>;
29
+ }
30
+ interface MarkdownAnnotationContext extends MarkdownReadingLookup {
31
+ previousAnnotations: readonly MarkdownAnnotation[];
32
+ getAnnotationsForFact(factId: string, kind?: string): MarkdownAnnotation[];
33
+ getAnnotation(factId: string, kind: string): MarkdownAnnotation | undefined;
34
+ }
35
+ interface MarkdownProjectionContext extends MarkdownReadingLookup {
36
+ annotations: readonly MarkdownAnnotation[];
37
+ projections: Readonly<Record<string, unknown>>;
38
+ getAnnotationsForFact(factId: string, kind?: string): MarkdownAnnotation[];
39
+ getAnnotation(factId: string, kind: string): MarkdownAnnotation | undefined;
40
+ }
41
+ interface MarkdownAnnotationRule {
42
+ id: string;
43
+ annotate(context: MarkdownAnnotationContext): readonly MarkdownAnnotationInput[];
44
+ }
45
+ interface MarkdownProjectionRule<Output = unknown> {
46
+ id: string;
47
+ project(context: MarkdownProjectionContext): Output | undefined;
48
+ }
49
+ interface MarkdownReadingPlugin {
50
+ id: string;
51
+ annotationRules?: readonly MarkdownAnnotationRule[];
52
+ projectionRules?: readonly MarkdownProjectionRule[];
53
+ }
54
+ interface MarkdownReadingDocument extends MarkdownFactsDocument {
55
+ annotations: MarkdownAnnotation[];
56
+ projections: Record<string, unknown>;
57
+ }
58
+ interface MarkdownFactSpan {
59
+ start: number;
60
+ end: number;
61
+ }
62
+ declare function createMarkdownReadingDocument(sourceMarkdown: string, plugins?: readonly MarkdownReadingPlugin[]): MarkdownReadingDocument;
63
+ declare function createMarkdownReadingDocumentFromFacts(factsDocument: MarkdownFactsDocument, plugins?: readonly MarkdownReadingPlugin[]): MarkdownReadingDocument;
64
+ declare function getMarkdownFactSpan(fact: MarkdownFact): MarkdownFactSpan | undefined;
65
+ declare function trimMarkdownSlice(sourceMarkdown: string, start: number, end: number): string;
66
+ declare function getMarkdownHeadingFacts(document: {
67
+ facts: readonly MarkdownFact[];
68
+ }): MarkdownFact[];
69
+ declare function getMarkdownHeadingEnd(headings: readonly MarkdownFact[], index: number, sourceLength: number): number;
70
+ declare function getMarkdownAnnotationsForFact(annotations: readonly MarkdownAnnotation[], factId: string, kind?: string): MarkdownAnnotation[];
71
+ declare function getMarkdownAnnotation(annotations: readonly MarkdownAnnotation[], factId: string, kind: string): MarkdownAnnotation | undefined;
72
+ declare function buildMarkdownParentMap(facts: readonly MarkdownFact[]): Map<string, MarkdownFact>;
73
+ //#endregion
74
+ export { getMarkdownFactSpan as _, MarkdownAnnotationRule as a, trimMarkdownSlice as b, MarkdownProjectionRule as c, MarkdownReadingPlugin as d, buildMarkdownParentMap as f, getMarkdownAnnotationsForFact as g, getMarkdownAnnotation as h, MarkdownAnnotationInput as i, MarkdownReadingDocument as l, createMarkdownReadingDocumentFromFacts as m, MarkdownAnnotationConfidence as n, MarkdownFactSpan as o, createMarkdownReadingDocument as p, MarkdownAnnotationContext as r, MarkdownProjectionContext as s, MarkdownAnnotation as t, MarkdownReadingLookup as u, getMarkdownHeadingEnd as v, getMarkdownHeadingFacts as y };
@@ -0,0 +1,3 @@
1
+ import "./markdown-facts-f3kXnqXb.mjs";
2
+ import { _ as getMarkdownFactSpan, a as MarkdownAnnotationRule, b as trimMarkdownSlice, c as MarkdownProjectionRule, d as MarkdownReadingPlugin, f as buildMarkdownParentMap, g as getMarkdownAnnotationsForFact, h as getMarkdownAnnotation, i as MarkdownAnnotationInput, l as MarkdownReadingDocument, m as createMarkdownReadingDocumentFromFacts, n as MarkdownAnnotationConfidence, o as MarkdownFactSpan, p as createMarkdownReadingDocument, r as MarkdownAnnotationContext, s as MarkdownProjectionContext, t as MarkdownAnnotation, u as MarkdownReadingLookup, v as getMarkdownHeadingEnd, y as getMarkdownHeadingFacts } from "./markdown-reading-D36W693c.mjs";
3
+ export { MarkdownAnnotation, MarkdownAnnotationConfidence, MarkdownAnnotationContext, MarkdownAnnotationInput, MarkdownAnnotationRule, MarkdownFactSpan, MarkdownProjectionContext, MarkdownProjectionRule, MarkdownReadingDocument, MarkdownReadingLookup, MarkdownReadingPlugin, buildMarkdownParentMap, createMarkdownReadingDocument, createMarkdownReadingDocumentFromFacts, getMarkdownAnnotation, getMarkdownAnnotationsForFact, getMarkdownFactSpan, getMarkdownHeadingEnd, getMarkdownHeadingFacts, trimMarkdownSlice };
@@ -0,0 +1,4 @@
1
+ import "./markdown-facts-BmSmZmpB.mjs";
2
+ import { a as getMarkdownAnnotationsForFact, c as getMarkdownHeadingFacts, i as getMarkdownAnnotation, l as trimMarkdownSlice, n as createMarkdownReadingDocument, o as getMarkdownFactSpan, r as createMarkdownReadingDocumentFromFacts, s as getMarkdownHeadingEnd, t as buildMarkdownParentMap } from "./markdown-reading-CrchEfoW.mjs";
3
+
4
+ export { buildMarkdownParentMap, createMarkdownReadingDocument, createMarkdownReadingDocumentFromFacts, getMarkdownAnnotation, getMarkdownAnnotationsForFact, getMarkdownFactSpan, getMarkdownHeadingEnd, getMarkdownHeadingFacts, trimMarkdownSlice };
@@ -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 { z } from "zod";
3
3
 
4
4
  //#region src/terminal-control.d.ts
@@ -1,5 +1,5 @@
1
- import { g as SoundVolumeSchema, m as SoundConfigIdSchema, u as DEFAULT_NOTIFICATION_SOUND_ID } from "./sounds-C0dNSFm8.mjs";
2
- import { t as TerminalControlParser } from "./terminal-control-DtBprY6-.mjs";
1
+ import { g as SoundVolumeSchema, m as SoundConfigIdSchema, u as DEFAULT_NOTIFICATION_SOUND_ID } from "./sounds-BzNKMW05.mjs";
2
+ import { t as TerminalControlParser } from "./terminal-control-Bxois59k.mjs";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/notifications.ts
@@ -1,3 +1,3 @@
1
- import "./sounds-Bw-sSyFZ.mjs";
2
- import { C as getNotificationAggregateKey, E as groupNotifications, P as terminalNotificationEventToPublishInput, S as aggregateNotifications, T as getNotificationGroupLabel, _ as NotificationSource, a as NotificationAggregate, b as TerminalNotificationParseResult, c as NotificationGroupKeySchema, d as NotificationRecord, f as NotificationRecordSchema, g as NotificationSoundSchema, h as NotificationSound, i as NotificationActionSchema, k as TerminalControlParser, l as NotificationPublishInput, m as NotificationSettingsSchema, n as NOTIFICATION_SOUND_VALUES, o as NotificationGroup, p as NotificationSettings, r as NotificationAction, s as NotificationGroupKey, t as NOTIFICATION_SOUND_OPTIONS, u as NotificationPublishInputSchema, v as NotificationSourceSchema, w as getNotificationGroupKey, x as TerminalNotificationParser, y as TerminalNotificationEvent } from "./notifications-BWvRNkRJ.mjs";
1
+ import "./sounds-CYxOpEdm.mjs";
2
+ import { C as getNotificationAggregateKey, E as groupNotifications, P as terminalNotificationEventToPublishInput, S as aggregateNotifications, T as getNotificationGroupLabel, _ as NotificationSource, a as NotificationAggregate, b as TerminalNotificationParseResult, c as NotificationGroupKeySchema, d as NotificationRecord, f as NotificationRecordSchema, g as NotificationSoundSchema, h as NotificationSound, i as NotificationActionSchema, k as TerminalControlParser, l as NotificationPublishInput, m as NotificationSettingsSchema, n as NOTIFICATION_SOUND_VALUES, o as NotificationGroup, p as NotificationSettings, r as NotificationAction, s as NotificationGroupKey, t as NOTIFICATION_SOUND_OPTIONS, u as NotificationPublishInputSchema, v as NotificationSourceSchema, w as getNotificationGroupKey, x as TerminalNotificationParser, y as TerminalNotificationEvent } from "./notifications-C4amULI4.mjs";
3
3
  export { NOTIFICATION_SOUND_OPTIONS, NOTIFICATION_SOUND_VALUES, NotificationAction, NotificationActionSchema, NotificationAggregate, NotificationGroup, NotificationGroupKey, NotificationGroupKeySchema, NotificationPublishInput, NotificationPublishInputSchema, NotificationRecord, NotificationRecordSchema, NotificationSettings, NotificationSettingsSchema, NotificationSound, NotificationSoundSchema, NotificationSource, NotificationSourceSchema, TerminalControlParser, TerminalNotificationEvent, TerminalNotificationParseResult, TerminalNotificationParser, aggregateNotifications, getNotificationAggregateKey, getNotificationGroupKey, getNotificationGroupLabel, groupNotifications, terminalNotificationEventToPublishInput };