@openspecui/core 3.6.1 → 3.7.1

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 (64) hide show
  1. package/dist/document-translation-CvUxMOPl.mjs +44 -0
  2. package/dist/document-translation-VavI1QOl.d.mts +140 -0
  3. package/dist/document-translation.d.mts +2 -0
  4. package/dist/document-translation.mjs +3 -0
  5. package/dist/hosted-app-BqJw9WgW.d.mts +43 -0
  6. package/dist/{hosted-app-DFFffbJc.mjs → hosted-app-Du65UHRo.mjs} +24 -3
  7. package/dist/hosted-app.d.mts +2 -2
  8. package/dist/hosted-app.mjs +2 -2
  9. package/dist/index.d.mts +96 -428
  10. package/dist/index.mjs +141 -75
  11. package/dist/markdown-facts.d.mts +1 -1
  12. package/dist/markdown-facts.mjs +1 -1
  13. package/dist/{markdown-reading-D36W693c.d.mts → markdown-reading-BC6uFgx0.d.mts} +10 -2
  14. package/dist/{markdown-reading-CrchEfoW.mjs → markdown-reading-CsL1q84q.mjs} +23 -4
  15. package/dist/markdown-reading.d.mts +3 -3
  16. package/dist/markdown-reading.mjs +3 -3
  17. package/dist/{notifications-CCV2bgWG.d.mts → notifications-Clq2bq-i.d.mts} +3 -3
  18. package/dist/{notifications-fD-V5hyP.mjs → notifications-DXOoOJ3m.mjs} +2 -2
  19. package/dist/notifications.d.mts +2 -2
  20. package/dist/notifications.mjs +3 -3
  21. package/dist/{openspec-annotations-CJmYcfAu.d.mts → openspec-annotations-DKP1Uuho.d.mts} +2 -2
  22. package/dist/{openspec-annotations-BMy9nWUe.mjs → openspec-annotations-D_xQqQOB.mjs} +2 -2
  23. package/dist/openspec-annotations.d.mts +3 -3
  24. package/dist/openspec-annotations.mjs +3 -3
  25. package/dist/{openspec-projection-DWqBxedv.mjs → openspec-projection-DLGD1JFD.mjs} +2 -2
  26. package/dist/openspec-projection-DgnEag63.d.mts +52 -0
  27. package/dist/openspec-projection.d.mts +5 -4
  28. package/dist/openspec-projection.mjs +4 -4
  29. package/dist/opsx-display-path.d.mts +1 -1
  30. package/dist/opsx-display-path.mjs +1 -1
  31. package/dist/opsx-entity-B_Od4N3r.mjs +144 -0
  32. package/dist/opsx-entity-BhvuPO8B.d.mts +453 -0
  33. package/dist/opsx-entity.d.mts +3 -0
  34. package/dist/opsx-entity.mjs +3 -0
  35. package/dist/opsx-schema-detail-Bh-aNaSk.mjs +114 -0
  36. package/dist/opsx-schema-detail-SFENVa0g.d.mts +12 -0
  37. package/dist/opsx-schema-detail.d.mts +4 -0
  38. package/dist/opsx-schema-detail.mjs +3 -0
  39. package/dist/{openspec-projection-DmB448No.d.mts → schemas-DZwT0am4.d.mts} +1 -50
  40. package/dist/{sounds-B0sH3QwE.d.mts → sounds-PZqzoKxJ.d.mts} +4 -4
  41. package/dist/sounds.d.mts +1 -1
  42. package/dist/sounds.mjs +1 -1
  43. package/dist/{terminal-audio-UEv3j655.mjs → terminal-audio-BiQ9qJJW.mjs} +1 -1
  44. package/dist/{terminal-audio-qSc6nZUI.d.mts → terminal-audio-Ci4x-tyQ.d.mts} +1 -1
  45. package/dist/terminal-audio.d.mts +2 -2
  46. package/dist/terminal-audio.mjs +2 -2
  47. package/dist/terminal-control.d.mts +2 -2
  48. package/dist/terminal-control.mjs +1 -1
  49. package/dist/terminal-invocation.d.mts +1 -1
  50. package/dist/terminal-invocation.mjs +1 -1
  51. package/dist/terminal-theme.d.mts +1 -1
  52. package/dist/terminal-theme.mjs +1 -1
  53. package/package.json +51 -3
  54. package/dist/hosted-app-DZrYivji.d.mts +0 -31
  55. /package/dist/{markdown-facts-BmSmZmpB.mjs → markdown-facts-BFqXdPfN.mjs} +0 -0
  56. /package/dist/{markdown-facts-f3kXnqXb.d.mts → markdown-facts-DxElzSsp.d.mts} +0 -0
  57. /package/dist/{opsx-display-path-D4KLYRXQ.mjs → opsx-display-path-BHEPZsJx.mjs} +0 -0
  58. /package/dist/{opsx-display-path-CkV9sq_j.d.mts → opsx-display-path-BKUYCqwP.d.mts} +0 -0
  59. /package/dist/{sounds-BzNKMW05.mjs → sounds-Ctm3QEtf.mjs} +0 -0
  60. /package/dist/{terminal-control-Bxois59k.mjs → terminal-control-CMkG-o9C.mjs} +0 -0
  61. /package/dist/{terminal-invocation-BRCuSBjE.mjs → terminal-invocation-CX1LDM89.mjs} +0 -0
  62. /package/dist/{terminal-invocation-BCqjtd4p.d.mts → terminal-invocation-owPZDVJF.d.mts} +0 -0
  63. /package/dist/{terminal-theme-CIv3YMfi.mjs → terminal-theme-BOGPIiVm.mjs} +0 -0
  64. /package/dist/{terminal-theme-lPZGfVA_.d.mts → terminal-theme-DdhVuegL.d.mts} +0 -0
package/dist/index.mjs CHANGED
@@ -1,19 +1,22 @@
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";
1
+ import { a as normalizeOpsxEntityPath, c as parseOpsxEntityMetadata, i as isOpsxGlobPattern, n as getOpsxEntityMetadataPath, o as opsxGlobToRegex, r as getOpsxEntityRootRelativePath, s as opsxPathMatchesPattern, t as buildOpsxEntityDetail } from "./opsx-entity-B_Od4N3r.mjs";
2
+ import { n as toMarkdownFactKind, t as parseMarkdownFacts } from "./markdown-facts-BFqXdPfN.mjs";
3
+ import { a as getMarkdownAnnotation, c as getMarkdownHeadingEnd, d as trimMarkdownSlice, i as createMarkdownReadingDocumentFromFacts, l as getMarkdownHeadingFacts, n as buildMarkdownParentMap, o as getMarkdownAnnotationsForFact, r as createMarkdownReadingDocument, s as getMarkdownFactSpan, t as MarkdownReadingPluginRegistry, u as sortMarkdownReadingPlugins } from "./markdown-reading-CsL1q84q.mjs";
4
+ import { a as getOpenSpecAnnotationsForFact, i as getOpenSpecAnnotation, n as annotateOpenSpecMarkdown, o as openSpecAnnotationRules, r as builtinOpenSpecReadingPlugin, t as annotateOpenSpecFacts } from "./openspec-annotations-D_xQqQOB.mjs";
5
+ 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-DLGD1JFD.mjs";
6
+ import { a as MAX_TRANSLATION_CACHE_ENTRY_LIMIT, c as TranslationCacheEntrySchema, d as TranslationCacheStatsSchema, f as TranslationCacheWriteInputSchema, i as DocumentTranslationDisplayModeSchema, l as TranslationCacheReadInputSchema, n as DOCUMENT_TRANSLATION_DISPLAY_MODES, o as MIN_TRANSLATION_CACHE_ENTRY_LIMIT, r as DocumentTranslationConfigSchema, s as TRANSLATION_CACHE_POLICY_VERSION, t as DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT, u as TranslationCacheSettingsSchema } from "./document-translation-CvUxMOPl.mjs";
7
+ 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-Ctm3QEtf.mjs";
8
+ import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-CMkG-o9C.mjs";
9
+ 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-DXOoOJ3m.mjs";
10
+ import { n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSoundSchema, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-BiQ9qJJW.mjs";
11
+ 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-BOGPIiVm.mjs";
12
+ import { a as buildEmbeddedUiLaunchUrl, c as isHostedBackendHealthResponse, d as normalizeHostedAppBaseUrl, f as resolveHostedAppBaseUrl, i as buildBackendHealthPayload, l as isSupportedEmbeddedUiUrl, n as OFFICIAL_APP_BASE_URL, o as buildHostedLaunchUrl, r as OPENSPECUI_RUNTIME_CAPABILITIES, s as isBackendHealthRuntimeMetadata, t as HOSTED_SHELL_PROTOCOL_VERSION, u as normalizeEmbeddedUiUrl } from "./hosted-app-Du65UHRo.mjs";
13
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-BHEPZsJx.mjs";
14
+ 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-CX1LDM89.mjs";
15
+ import { t as parseOpsxSchemaDetail } from "./opsx-schema-detail-Bh-aNaSk.mjs";
13
16
  import { mkdir, readFile, rename, writeFile } from "fs/promises";
14
17
  import { dirname, join } from "path";
15
18
  import { AsyncLocalStorage } from "node:async_hooks";
16
- import { readFile as readFile$1, readdir, stat } from "node:fs/promises";
19
+ import { mkdir as mkdir$1, readFile as readFile$1, readdir, stat, writeFile as writeFile$1 } from "node:fs/promises";
17
20
  import { dirname as dirname$1, join as join$1, matchesGlob, relative, resolve, sep } from "node:path";
18
21
  import { existsSync, lstatSync, realpathSync } from "node:fs";
19
22
  import { z } from "zod";
@@ -22,7 +25,6 @@ import { watch } from "fs";
22
25
  import { exec, execFile, spawn } from "child_process";
23
26
  import { promisify } from "util";
24
27
  import { homedir } from "node:os";
25
- import { parse } from "yaml";
26
28
 
27
29
  //#region src/parser.ts
28
30
  const SCENARIO_STEP_PATTERN = new RegExp(`^\\s*[-*+]\\s+(?:\\*\\*)?(${[
@@ -1449,12 +1451,11 @@ var OpenSpecAdapter = class {
1449
1451
  async listArchivedChangesWithMeta() {
1450
1452
  const ids = await this.listArchivedChanges();
1451
1453
  return (await Promise.all(ids.map(async (id) => {
1452
- const change = await this.readArchivedChange(id);
1453
1454
  const archiveDir = join(this.archiveDir, id);
1454
1455
  const timeInfo = await this.getFileTimeInfo(archiveDir);
1455
1456
  return {
1456
1457
  id,
1457
- name: change?.name ?? id,
1458
+ name: id,
1458
1459
  createdAt: timeInfo?.createdAt ?? 0,
1459
1460
  updatedAt: timeInfo?.updatedAt ?? 0
1460
1461
  };
@@ -1504,6 +1505,20 @@ var OpenSpecAdapter = class {
1504
1505
  const archiveRoot = join(this.archiveDir, changeId);
1505
1506
  return this.readFilesUnderRoot(archiveRoot);
1506
1507
  }
1508
+ async readEntityDetail(stage, id, options = {}) {
1509
+ const root = stage === "change" ? join(this.changesDir, id) : join(this.archiveDir, id);
1510
+ const files = await this.readFilesUnderRoot(root);
1511
+ if (files.length === 0) {
1512
+ if (!(await reactiveStat(root))?.isDirectory) return null;
1513
+ }
1514
+ return buildOpsxEntityDetail({
1515
+ stage,
1516
+ id,
1517
+ files,
1518
+ schemas: options.schemas,
1519
+ schemaDiagnostics: options.schemaDiagnostics
1520
+ });
1521
+ }
1507
1522
  async readFilesUnderRoot(root) {
1508
1523
  if (!(await reactiveStat(root))?.isDirectory) return [];
1509
1524
  return (await this.collectChangeFiles(root, root)).sort((a, b) => {
@@ -2512,7 +2527,8 @@ const OpenSpecUIConfigSchema = z.object({
2512
2527
  terminal: TerminalConfigSchema.default(TerminalConfigSchema.parse({})),
2513
2528
  dashboard: DashboardConfigSchema.default(DashboardConfigSchema.parse({})),
2514
2529
  git: GitConfigSchema.default(GitConfigSchema.parse({})),
2515
- notifications: NotificationSettingsSchema.default(NotificationSettingsSchema.parse({}))
2530
+ notifications: NotificationSettingsSchema.default(NotificationSettingsSchema.parse({})),
2531
+ translation: DocumentTranslationConfigSchema.default(DocumentTranslationConfigSchema.parse({}))
2516
2532
  });
2517
2533
  /** 默认配置(静态,用于测试和类型) */
2518
2534
  const DEFAULT_CONFIG = {
@@ -2524,7 +2540,8 @@ const DEFAULT_CONFIG = {
2524
2540
  terminal: TerminalConfigSchema.parse({}),
2525
2541
  dashboard: DashboardConfigSchema.parse({}),
2526
2542
  git: GitConfigSchema.parse({}),
2527
- notifications: NotificationSettingsSchema.parse({})
2543
+ notifications: NotificationSettingsSchema.parse({}),
2544
+ translation: DocumentTranslationConfigSchema.parse({})
2528
2545
  };
2529
2546
  function areStringArraysEqual(left, right) {
2530
2547
  if (left === right) return true;
@@ -2532,19 +2549,19 @@ function areStringArraysEqual(left, right) {
2532
2549
  if (left.length !== right.length) return false;
2533
2550
  return left.every((value, index) => value === right[index]);
2534
2551
  }
2535
- function pruneNullish(value) {
2552
+ function pruneNullish$1(value) {
2536
2553
  if (value === null || value === void 0) return;
2537
- if (Array.isArray(value)) return value.map((entry) => pruneNullish(entry)).filter((entry) => entry !== void 0);
2554
+ if (Array.isArray(value)) return value.map((entry) => pruneNullish$1(entry)).filter((entry) => entry !== void 0);
2538
2555
  if (typeof value === "object") {
2539
2556
  const normalizedEntries = Object.entries(value).flatMap(([key, entryValue]) => {
2540
- const nextValue = pruneNullish(entryValue);
2557
+ const nextValue = pruneNullish$1(entryValue);
2541
2558
  return nextValue === void 0 ? [] : [[key, nextValue]];
2542
2559
  });
2543
2560
  return Object.fromEntries(normalizedEntries);
2544
2561
  }
2545
2562
  return value;
2546
2563
  }
2547
- function hasOwnEntries(value) {
2564
+ function hasOwnEntries$1(value) {
2548
2565
  return Object.keys(value).length > 0;
2549
2566
  }
2550
2567
  function toPersistedConfig(config, options = {}) {
@@ -2562,11 +2579,11 @@ function toPersistedConfig(config, options = {}) {
2562
2579
  if (config.theme !== DEFAULT_CONFIG.theme) persisted.theme = config.theme;
2563
2580
  const codeEditor = {};
2564
2581
  if (config.codeEditor.theme !== DEFAULT_CONFIG.codeEditor.theme) codeEditor.theme = config.codeEditor.theme;
2565
- if (hasOwnEntries(codeEditor)) persisted.codeEditor = codeEditor;
2582
+ if (hasOwnEntries$1(codeEditor)) persisted.codeEditor = codeEditor;
2566
2583
  if (config.appBaseUrl !== DEFAULT_CONFIG.appBaseUrl) persisted.appBaseUrl = config.appBaseUrl;
2567
2584
  const opsx = {};
2568
2585
  if (config.opsx.agentInvocationMode !== DEFAULT_CONFIG.opsx.agentInvocationMode) opsx.agentInvocationMode = config.opsx.agentInvocationMode;
2569
- if (hasOwnEntries(opsx)) persisted.opsx = opsx;
2586
+ if (hasOwnEntries$1(opsx)) persisted.opsx = opsx;
2570
2587
  const terminal = {};
2571
2588
  if (config.terminal.fontSize !== DEFAULT_CONFIG.terminal.fontSize) terminal.fontSize = config.terminal.fontSize;
2572
2589
  if (config.terminal.fontFamily !== DEFAULT_CONFIG.terminal.fontFamily) terminal.fontFamily = config.terminal.fontFamily;
@@ -2579,22 +2596,28 @@ function toPersistedConfig(config, options = {}) {
2579
2596
  if (config.terminal.rendererEngine !== DEFAULT_CONFIG.terminal.rendererEngine) terminal.rendererEngine = config.terminal.rendererEngine;
2580
2597
  if (config.terminal.bellSound !== DEFAULT_CONFIG.terminal.bellSound) terminal.bellSound = config.terminal.bellSound;
2581
2598
  if (config.terminal.bellVolume !== DEFAULT_CONFIG.terminal.bellVolume) terminal.bellVolume = config.terminal.bellVolume;
2582
- if (hasOwnEntries(terminal)) persisted.terminal = terminal;
2599
+ if (hasOwnEntries$1(terminal)) persisted.terminal = terminal;
2583
2600
  const dashboard = {};
2584
2601
  if (config.dashboard.trendPointLimit !== DEFAULT_CONFIG.dashboard.trendPointLimit) dashboard.trendPointLimit = config.dashboard.trendPointLimit;
2585
- if (hasOwnEntries(dashboard)) persisted.dashboard = dashboard;
2602
+ if (hasOwnEntries$1(dashboard)) persisted.dashboard = dashboard;
2586
2603
  const git = {};
2587
2604
  if (config.git.diffEagerLineBudget !== DEFAULT_CONFIG.git.diffEagerLineBudget) git.diffEagerLineBudget = config.git.diffEagerLineBudget;
2588
- if (hasOwnEntries(git)) persisted.git = git;
2605
+ if (hasOwnEntries$1(git)) persisted.git = git;
2589
2606
  const notifications = {};
2590
2607
  if (config.notifications.sound !== DEFAULT_CONFIG.notifications.sound) notifications.sound = config.notifications.sound;
2591
2608
  if (config.notifications.volume !== DEFAULT_CONFIG.notifications.volume) notifications.volume = config.notifications.volume;
2592
2609
  if (config.notifications.systemNotificationsEnabled !== DEFAULT_CONFIG.notifications.systemNotificationsEnabled) notifications.systemNotificationsEnabled = config.notifications.systemNotificationsEnabled;
2593
- if (hasOwnEntries(notifications)) persisted.notifications = notifications;
2610
+ if (hasOwnEntries$1(notifications)) persisted.notifications = notifications;
2611
+ const translation = {};
2612
+ if (config.translation.enabled !== DEFAULT_CONFIG.translation.enabled) translation.enabled = config.translation.enabled;
2613
+ if (config.translation.targetLanguage !== DEFAULT_CONFIG.translation.targetLanguage) translation.targetLanguage = config.translation.targetLanguage;
2614
+ if (config.translation.displayMode !== DEFAULT_CONFIG.translation.displayMode) translation.displayMode = config.translation.displayMode;
2615
+ if (config.translation.cacheEnabled !== DEFAULT_CONFIG.translation.cacheEnabled) translation.cacheEnabled = config.translation.cacheEnabled;
2616
+ if (hasOwnEntries$1(translation)) persisted.translation = translation;
2594
2617
  return persisted;
2595
2618
  }
2596
2619
  function isPersistedConfigEmpty(config) {
2597
- return !hasOwnEntries(config);
2620
+ return !hasOwnEntries$1(config);
2598
2621
  }
2599
2622
  /**
2600
2623
  * 配置管理器
@@ -2617,7 +2640,7 @@ var ConfigManager = class {
2617
2640
  parseConfigContent(content) {
2618
2641
  if (!content) return DEFAULT_CONFIG;
2619
2642
  try {
2620
- const normalized = pruneNullish(JSON.parse(content)) ?? {};
2643
+ const normalized = pruneNullish$1(JSON.parse(content)) ?? {};
2621
2644
  const result = OpenSpecUIConfigSchema.safeParse(normalized);
2622
2645
  if (result.success) return result.data;
2623
2646
  console.warn("Invalid config format, using defaults:", result.error.message);
@@ -2689,6 +2712,10 @@ var ConfigManager = class {
2689
2712
  notifications: {
2690
2713
  ...current.notifications,
2691
2714
  ...config.notifications
2715
+ },
2716
+ translation: {
2717
+ ...current.translation,
2718
+ ...config.translation
2692
2719
  }
2693
2720
  });
2694
2721
  if (isPersistedConfigEmpty(persisted) && !fileExists) return;
@@ -2813,6 +2840,86 @@ var ConfigManager = class {
2813
2840
  }
2814
2841
  };
2815
2842
 
2843
+ //#endregion
2844
+ //#region src/global-settings.ts
2845
+ const OpenSpecUIGlobalSettingsSchema = z.object({ translationCache: TranslationCacheSettingsSchema.default(TranslationCacheSettingsSchema.parse({})) });
2846
+ const DEFAULT_GLOBAL_SETTINGS = OpenSpecUIGlobalSettingsSchema.parse({});
2847
+ function getDefaultGlobalSettingsPath() {
2848
+ return join$1(homedir(), ".openspecui", "settings.json");
2849
+ }
2850
+ function pruneNullish(value) {
2851
+ if (value === null || value === void 0) return void 0;
2852
+ if (Array.isArray(value)) return value.map((entry) => pruneNullish(entry)).filter((entry) => entry !== void 0);
2853
+ if (typeof value === "object") return Object.fromEntries(Object.entries(value).flatMap(([key, entryValue]) => {
2854
+ const nextValue = pruneNullish(entryValue);
2855
+ return nextValue === void 0 ? [] : [[key, nextValue]];
2856
+ }));
2857
+ return value;
2858
+ }
2859
+ function hasOwnEntries(value) {
2860
+ return Object.keys(value).length > 0;
2861
+ }
2862
+ function toPersistedGlobalSettings(settings) {
2863
+ const persisted = {};
2864
+ const translationCache = {};
2865
+ if (settings.translationCache.entryLimit !== DEFAULT_GLOBAL_SETTINGS.translationCache.entryLimit) translationCache.entryLimit = settings.translationCache.entryLimit;
2866
+ if (hasOwnEntries(translationCache)) persisted.translationCache = translationCache;
2867
+ return persisted;
2868
+ }
2869
+ function isPersistedGlobalSettingsEmpty(settings) {
2870
+ return !hasOwnEntries(settings);
2871
+ }
2872
+ /**
2873
+ * User-level OpenSpecUI settings stored outside project worktrees.
2874
+ *
2875
+ * This manager owns cross-project policy only; project opt-in remains in
2876
+ * `openspec/.openspecui.json`.
2877
+ */
2878
+ var GlobalSettingsManager = class {
2879
+ settingsPath;
2880
+ constructor(settingsPath = getDefaultGlobalSettingsPath()) {
2881
+ this.settingsPath = settingsPath;
2882
+ }
2883
+ getSettingsPath() {
2884
+ return this.settingsPath;
2885
+ }
2886
+ parseSettingsContent(content) {
2887
+ if (!content) return DEFAULT_GLOBAL_SETTINGS;
2888
+ try {
2889
+ const normalized = pruneNullish(JSON.parse(content)) ?? {};
2890
+ const result = OpenSpecUIGlobalSettingsSchema.safeParse(normalized);
2891
+ if (result.success) return result.data;
2892
+ console.warn("Invalid global settings format, using defaults:", result.error.message);
2893
+ return DEFAULT_GLOBAL_SETTINGS;
2894
+ } catch (error) {
2895
+ console.warn("Failed to parse global settings, using defaults:", error);
2896
+ return DEFAULT_GLOBAL_SETTINGS;
2897
+ }
2898
+ }
2899
+ async readSettings() {
2900
+ const content = await reactiveReadFile(this.settingsPath);
2901
+ return this.parseSettingsContent(content);
2902
+ }
2903
+ async writeSettings(update) {
2904
+ const currentContent = await reactiveReadFile(this.settingsPath);
2905
+ const fileExists = currentContent !== null;
2906
+ const current = this.parseSettingsContent(currentContent);
2907
+ const persisted = toPersistedGlobalSettings(OpenSpecUIGlobalSettingsSchema.parse({
2908
+ ...current,
2909
+ translationCache: {
2910
+ ...current.translationCache,
2911
+ ...update.translationCache
2912
+ }
2913
+ }));
2914
+ if (isPersistedGlobalSettingsEmpty(persisted) && !fileExists) return;
2915
+ const serialized = isPersistedGlobalSettingsEmpty(persisted) ? "{}" : JSON.stringify(persisted, null, 2);
2916
+ if (currentContent === serialized) return;
2917
+ await mkdir$1(dirname$1(this.settingsPath), { recursive: true });
2918
+ await writeFile$1(this.settingsPath, serialized, "utf-8");
2919
+ updateReactiveFileCache(this.settingsPath, serialized);
2920
+ }
2921
+ };
2922
+
2816
2923
  //#endregion
2817
2924
  //#region src/cli-executor.ts
2818
2925
  /**
@@ -4361,7 +4468,7 @@ var OpsxKernel = class {
4361
4468
  const schemaPath = join$1(this.getSchemaResolution(name).path, "schema.yaml");
4362
4469
  const content = await reactiveReadFile(schemaPath);
4363
4470
  if (!content) throw new Error(`schema.yaml not found at ${schemaPath}`);
4364
- return parseSchemaYamlInline(content);
4471
+ return parseSchemaYamlInline(content, name, schemaPath);
4365
4472
  }
4366
4473
  async fetchSchemaFiles(name) {
4367
4474
  await touchOpsxProjectDeps(this.projectDir);
@@ -4488,49 +4595,8 @@ var OpsxKernel = class {
4488
4595
  return ctrl.signal;
4489
4596
  }
4490
4597
  };
4491
- const SchemaYamlArtifactSchema = z.object({
4492
- id: z.string(),
4493
- generates: z.string(),
4494
- description: z.string().optional(),
4495
- template: z.string().optional(),
4496
- instruction: z.string().optional(),
4497
- requires: z.array(z.string()).optional()
4498
- });
4499
- const SchemaYamlSchema = z.object({
4500
- name: z.string(),
4501
- version: z.union([z.string(), z.number()]).optional(),
4502
- description: z.string().optional(),
4503
- artifacts: z.array(SchemaYamlArtifactSchema),
4504
- apply: z.object({
4505
- requires: z.array(z.string()).optional(),
4506
- tracks: z.string().optional(),
4507
- instruction: z.string().optional()
4508
- }).optional()
4509
- });
4510
- function parseSchemaYamlInline(content) {
4511
- const raw = parse(content);
4512
- const parsed = SchemaYamlSchema.safeParse(raw);
4513
- if (!parsed.success) throw new Error(`Invalid schema.yaml: ${parsed.error.message}`);
4514
- const { artifacts, apply, name, description, version } = parsed.data;
4515
- const detail = {
4516
- name,
4517
- description,
4518
- version,
4519
- artifacts: artifacts.map((artifact) => ({
4520
- id: artifact.id,
4521
- outputPath: artifact.generates,
4522
- description: artifact.description,
4523
- template: artifact.template,
4524
- instruction: artifact.instruction,
4525
- requires: artifact.requires ?? []
4526
- })),
4527
- applyRequires: apply?.requires ?? [],
4528
- applyTracks: apply?.tracks,
4529
- applyInstruction: apply?.instruction
4530
- };
4531
- const validated = SchemaDetailSchema.safeParse(detail);
4532
- if (!validated.success) throw new Error(`Invalid schema detail: ${validated.error.message}`);
4533
- return validated.data;
4598
+ function parseSchemaYamlInline(content, fallbackName, path) {
4599
+ return parseOpsxSchemaDetail(content, fallbackName, { path }).detail;
4534
4600
  }
4535
4601
 
4536
4602
  //#endregion
@@ -4690,4 +4756,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4690
4756
  ]);
4691
4757
 
4692
4758
  //#endregion
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 };
4759
+ 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_GLOBAL_SETTINGS, DEFAULT_NOTIFICATION_SOUND_ID, DEFAULT_TERMINAL_DARK_THEME, DEFAULT_TERMINAL_LIGHT_THEME, DEFAULT_TERMINAL_THEME_MODE, DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT, DOCUMENT_TRANSLATION_DISPLAY_MODES, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, DocumentTranslationConfigSchema, DocumentTranslationDisplayModeSchema, GitConfigSchema, GlobalSettingsManager, HOSTED_SHELL_PROTOCOL_VERSION, LEGACY_SOUND_ID_MAP, MAX_TRANSLATION_CACHE_ENTRY_LIMIT, MIN_TRANSLATION_CACHE_ENTRY_LIMIT, MarkdownParser, MarkdownReadingPluginRegistry, NOTIFICATION_SOUND_OPTIONS, NOTIFICATION_SOUND_VALUES, NotificationActionSchema, NotificationGroupKeySchema, NotificationPublishInputSchema, NotificationRecordSchema, NotificationSettingsSchema, NotificationSoundSchema, NotificationSourceSchema, OFFICIAL_APP_BASE_URL, OPENSPECUI_HOOKS_VERSION, OPENSPECUI_RUNTIME_CAPABILITIES, OPEN_SPEC_READING_SECTIONS_PROJECTION_ID, OPEN_SPEC_SPEC_PROJECTION_ID, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecUIGlobalSettingsSchema, 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, TRANSLATION_CACHE_POLICY_VERSION, TaskSchema, TemplatesSchema, TerminalBellSoundSchema, TerminalCommandFieldSchema, TerminalConfigSchema, TerminalControlParser, TerminalInvocationSettingsSchema, TerminalNotificationParser, TerminalRendererEngineSchema, TerminalShellProfileSchema, TerminalShellQuoteStyleSchema, TerminalSpawnCommandSchema, TerminalThemeModeSchema, TerminalThemeSchema, TranslationCacheEntrySchema, TranslationCacheReadInputSchema, TranslationCacheSettingsSchema, TranslationCacheStatsSchema, TranslationCacheWriteInputSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, annotateOpenSpecFacts, annotateOpenSpecMarkdown, buildBackendHealthPayload, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, buildMarkdownParentMap, buildOpsxEntityDetail, builtinOpenSpecReadingPlugin, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, createMarkdownReadingDocument, createMarkdownReadingDocumentFromFacts, createOpenSpecReadingPlugin, customHashFromSoundId, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getBuiltinSoundUrl, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDefaultGlobalSettingsPath, getDetectedProjectTools, getMarkdownAnnotation, getMarkdownAnnotationsForFact, getMarkdownFactSpan, getMarkdownHeadingEnd, getMarkdownHeadingFacts, getNotificationGroupKey, getNotificationGroupLabel, getOpenSpecAnnotation, getOpenSpecAnnotationsForFact, getOpenSpecProjectionAnnotation, getOpenSpecReadingSections, getOpsxEntityMetadataPath, getOpsxEntityRootRelativePath, getProjectWatcher, getTerminalCommandDefaultValues, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, groupNotifications, initWatcherPool, isBackendHealthRuntimeMetadata, isGlobPattern, isHostedBackendHealthResponse, isOpsxGlobPattern, isSupportedEmbeddedUiUrl, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, normalizeLegacySoundId, normalizeOpsxEntityPath, openSpecAnnotationRules, opsxGlobToRegex, opsxPathMatchesPattern, parseCliCommand, parseMarkdownFacts, parseOpenSpecMarkdownToSpec, parseOpsxEntityMetadata, parseOpsxSchemaDetail, projectAnnotatedOpenSpecToSpec, projectOpenSpecMarkdown, quoteTerminalShellArg, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, renderTerminalCommandArgs, renderTerminalSpawnCommandLine, resolveHostedAppBaseUrl, resolveTerminalShellDefaults, sniffGlobalCli, sortMarkdownReadingPlugins, soundIdFromCustomHash, subscribeWatcherRuntimeStatus, terminalNotificationEventToPublishInput, toMarkdownFactKind, toOpsxDisplayPath, toPersistedGlobalSettings, trimMarkdownSlice };
@@ -1,2 +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";
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-DxElzSsp.mjs";
2
2
  export { MarkdownFact, MarkdownFactKind, MarkdownFactsDocument, MarkdownSourcePoint, MarkdownSourceRange, parseMarkdownFacts, toMarkdownFactKind };
@@ -1,3 +1,3 @@
1
- import { n as toMarkdownFactKind, t as parseMarkdownFacts } from "./markdown-facts-BmSmZmpB.mjs";
1
+ import { n as toMarkdownFactKind, t as parseMarkdownFacts } from "./markdown-facts-BFqXdPfN.mjs";
2
2
 
3
3
  export { parseMarkdownFacts, toMarkdownFactKind };
@@ -1,4 +1,4 @@
1
- import { r as MarkdownFactsDocument, t as MarkdownFact } from "./markdown-facts-f3kXnqXb.mjs";
1
+ import { r as MarkdownFactsDocument, t as MarkdownFact } from "./markdown-facts-DxElzSsp.mjs";
2
2
 
3
3
  //#region src/markdown-reading.d.ts
4
4
  type MarkdownAnnotationConfidence = 'strong' | 'weak';
@@ -48,6 +48,7 @@ interface MarkdownProjectionRule<Output = unknown> {
48
48
  }
49
49
  interface MarkdownReadingPlugin {
50
50
  id: string;
51
+ order?: number;
51
52
  annotationRules?: readonly MarkdownAnnotationRule[];
52
53
  projectionRules?: readonly MarkdownProjectionRule[];
53
54
  }
@@ -59,6 +60,13 @@ interface MarkdownFactSpan {
59
60
  start: number;
60
61
  end: number;
61
62
  }
63
+ declare class MarkdownReadingPluginRegistry {
64
+ private plugins;
65
+ constructor(plugins?: readonly MarkdownReadingPlugin[]);
66
+ register(plugin: MarkdownReadingPlugin): void;
67
+ resolve(): MarkdownReadingPlugin[];
68
+ }
69
+ declare function sortMarkdownReadingPlugins(plugins: readonly MarkdownReadingPlugin[]): MarkdownReadingPlugin[];
62
70
  declare function createMarkdownReadingDocument(sourceMarkdown: string, plugins?: readonly MarkdownReadingPlugin[]): MarkdownReadingDocument;
63
71
  declare function createMarkdownReadingDocumentFromFacts(factsDocument: MarkdownFactsDocument, plugins?: readonly MarkdownReadingPlugin[]): MarkdownReadingDocument;
64
72
  declare function getMarkdownFactSpan(fact: MarkdownFact): MarkdownFactSpan | undefined;
@@ -71,4 +79,4 @@ declare function getMarkdownAnnotationsForFact(annotations: readonly MarkdownAnn
71
79
  declare function getMarkdownAnnotation(annotations: readonly MarkdownAnnotation[], factId: string, kind: string): MarkdownAnnotation | undefined;
72
80
  declare function buildMarkdownParentMap(facts: readonly MarkdownFact[]): Map<string, MarkdownFact>;
73
81
  //#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 };
82
+ export { trimMarkdownSlice as S, getMarkdownAnnotationsForFact as _, MarkdownAnnotationRule as a, getMarkdownHeadingFacts as b, MarkdownProjectionRule as c, MarkdownReadingPlugin as d, MarkdownReadingPluginRegistry as f, getMarkdownAnnotation as g, createMarkdownReadingDocumentFromFacts as h, MarkdownAnnotationInput as i, MarkdownReadingDocument as l, createMarkdownReadingDocument as m, MarkdownAnnotationConfidence as n, MarkdownFactSpan as o, buildMarkdownParentMap as p, MarkdownAnnotationContext as r, MarkdownProjectionContext as s, MarkdownAnnotation as t, MarkdownReadingLookup as u, getMarkdownFactSpan as v, sortMarkdownReadingPlugins as x, getMarkdownHeadingEnd as y };
@@ -1,13 +1,32 @@
1
- import { t as parseMarkdownFacts } from "./markdown-facts-BmSmZmpB.mjs";
1
+ import { t as parseMarkdownFacts } from "./markdown-facts-BFqXdPfN.mjs";
2
2
 
3
3
  //#region src/markdown-reading.ts
4
+ var MarkdownReadingPluginRegistry = class {
5
+ plugins = /* @__PURE__ */ new Map();
6
+ constructor(plugins = []) {
7
+ for (const plugin of plugins) this.register(plugin);
8
+ }
9
+ register(plugin) {
10
+ this.plugins.set(plugin.id, plugin);
11
+ }
12
+ resolve() {
13
+ return sortMarkdownReadingPlugins(Array.from(this.plugins.values()));
14
+ }
15
+ };
16
+ function sortMarkdownReadingPlugins(plugins) {
17
+ return [...plugins].sort((left, right) => {
18
+ const orderDiff = (left.order ?? 0) - (right.order ?? 0);
19
+ return orderDiff === 0 ? left.id.localeCompare(right.id) : orderDiff;
20
+ });
21
+ }
4
22
  function createMarkdownReadingDocument(sourceMarkdown, plugins = []) {
5
23
  return createMarkdownReadingDocumentFromFacts(parseMarkdownFacts(sourceMarkdown), plugins);
6
24
  }
7
25
  function createMarkdownReadingDocumentFromFacts(factsDocument, plugins = []) {
26
+ const orderedPlugins = sortMarkdownReadingPlugins(plugins);
8
27
  const lookup = createLookup(factsDocument);
9
28
  const annotations = [];
10
- for (const rule of plugins.flatMap((plugin) => plugin.annotationRules ?? [])) {
29
+ for (const rule of orderedPlugins.flatMap((plugin) => plugin.annotationRules ?? [])) {
11
30
  const context = createAnnotationContext(lookup, annotations);
12
31
  for (const input of rule.annotate(context)) annotations.push({
13
32
  id: `${rule.id}:${annotations.length + 1}`,
@@ -21,7 +40,7 @@ function createMarkdownReadingDocumentFromFacts(factsDocument, plugins = []) {
21
40
  });
22
41
  }
23
42
  const projections = {};
24
- for (const rule of plugins.flatMap((plugin) => plugin.projectionRules ?? [])) {
43
+ for (const rule of orderedPlugins.flatMap((plugin) => plugin.projectionRules ?? [])) {
25
44
  const context = createProjectionContext(lookup, annotations, projections);
26
45
  const output = rule.project(context);
27
46
  if (output !== void 0) projections[rule.id] = output;
@@ -101,4 +120,4 @@ function createProjectionContext(lookup, annotations, projections) {
101
120
  }
102
121
 
103
122
  //#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 };
123
+ export { getMarkdownAnnotation as a, getMarkdownHeadingEnd as c, trimMarkdownSlice as d, createMarkdownReadingDocumentFromFacts as i, getMarkdownHeadingFacts as l, buildMarkdownParentMap as n, getMarkdownAnnotationsForFact as o, createMarkdownReadingDocument as r, getMarkdownFactSpan as s, MarkdownReadingPluginRegistry as t, sortMarkdownReadingPlugins as u };
@@ -1,3 +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 };
1
+ import "./markdown-facts-DxElzSsp.mjs";
2
+ import { S as trimMarkdownSlice, _ as getMarkdownAnnotationsForFact, a as MarkdownAnnotationRule, b as getMarkdownHeadingFacts, c as MarkdownProjectionRule, d as MarkdownReadingPlugin, f as MarkdownReadingPluginRegistry, g as getMarkdownAnnotation, h as createMarkdownReadingDocumentFromFacts, i as MarkdownAnnotationInput, l as MarkdownReadingDocument, m as createMarkdownReadingDocument, n as MarkdownAnnotationConfidence, o as MarkdownFactSpan, p as buildMarkdownParentMap, r as MarkdownAnnotationContext, s as MarkdownProjectionContext, t as MarkdownAnnotation, u as MarkdownReadingLookup, v as getMarkdownFactSpan, x as sortMarkdownReadingPlugins, y as getMarkdownHeadingEnd } from "./markdown-reading-BC6uFgx0.mjs";
3
+ export { MarkdownAnnotation, MarkdownAnnotationConfidence, MarkdownAnnotationContext, MarkdownAnnotationInput, MarkdownAnnotationRule, MarkdownFactSpan, MarkdownProjectionContext, MarkdownProjectionRule, MarkdownReadingDocument, MarkdownReadingLookup, MarkdownReadingPlugin, MarkdownReadingPluginRegistry, buildMarkdownParentMap, createMarkdownReadingDocument, createMarkdownReadingDocumentFromFacts, getMarkdownAnnotation, getMarkdownAnnotationsForFact, getMarkdownFactSpan, getMarkdownHeadingEnd, getMarkdownHeadingFacts, sortMarkdownReadingPlugins, trimMarkdownSlice };
@@ -1,4 +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";
1
+ import "./markdown-facts-BFqXdPfN.mjs";
2
+ import { a as getMarkdownAnnotation, c as getMarkdownHeadingEnd, d as trimMarkdownSlice, i as createMarkdownReadingDocumentFromFacts, l as getMarkdownHeadingFacts, n as buildMarkdownParentMap, o as getMarkdownAnnotationsForFact, r as createMarkdownReadingDocument, s as getMarkdownFactSpan, t as MarkdownReadingPluginRegistry, u as sortMarkdownReadingPlugins } from "./markdown-reading-CsL1q84q.mjs";
3
3
 
4
- export { buildMarkdownParentMap, createMarkdownReadingDocument, createMarkdownReadingDocumentFromFacts, getMarkdownAnnotation, getMarkdownAnnotationsForFact, getMarkdownFactSpan, getMarkdownHeadingEnd, getMarkdownHeadingFacts, trimMarkdownSlice };
4
+ export { MarkdownReadingPluginRegistry, buildMarkdownParentMap, createMarkdownReadingDocument, createMarkdownReadingDocumentFromFacts, getMarkdownAnnotation, getMarkdownAnnotationsForFact, getMarkdownFactSpan, getMarkdownHeadingEnd, getMarkdownHeadingFacts, sortMarkdownReadingPlugins, trimMarkdownSlice };
@@ -1,4 +1,4 @@
1
- import { x as SoundId } from "./sounds-B0sH3QwE.mjs";
1
+ import { x as SoundId } from "./sounds-PZqzoKxJ.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/terminal-control.d.ts
@@ -446,8 +446,8 @@ declare const NotificationRecordSchema: z.ZodObject<{
446
446
  createdAt: z.ZodNumber;
447
447
  groupKey: z.ZodString;
448
448
  }, "strip", z.ZodTypeAny, {
449
- id: string;
450
449
  createdAt: number;
450
+ id: string;
451
451
  title: string;
452
452
  body: string;
453
453
  source: {
@@ -483,8 +483,8 @@ declare const NotificationRecordSchema: z.ZodObject<{
483
483
  level: "info" | "success" | "warning" | "error";
484
484
  groupKey: string;
485
485
  }, {
486
- id: string;
487
486
  createdAt: number;
487
+ id: string;
488
488
  title: string;
489
489
  source: {
490
490
  type: "terminal";
@@ -1,5 +1,5 @@
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";
1
+ import { g as SoundVolumeSchema, m as SoundConfigIdSchema, u as DEFAULT_NOTIFICATION_SOUND_ID } from "./sounds-Ctm3QEtf.mjs";
2
+ import { t as TerminalControlParser } from "./terminal-control-CMkG-o9C.mjs";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/notifications.ts
@@ -1,3 +1,3 @@
1
- import "./sounds-B0sH3QwE.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-CCV2bgWG.mjs";
1
+ import "./sounds-PZqzoKxJ.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-Clq2bq-i.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 };
@@ -1,5 +1,5 @@
1
- import "./sounds-BzNKMW05.mjs";
2
- import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-Bxois59k.mjs";
3
- import { a as NotificationPublishInputSchema, c as NotificationSoundSchema, d as aggregateNotifications, f as getNotificationAggregateKey, 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";
1
+ import "./sounds-Ctm3QEtf.mjs";
2
+ import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-CMkG-o9C.mjs";
3
+ import { a as NotificationPublishInputSchema, c as NotificationSoundSchema, d as aggregateNotifications, f as getNotificationAggregateKey, 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-DXOoOJ3m.mjs";
4
4
 
5
5
  export { NOTIFICATION_SOUND_OPTIONS, NOTIFICATION_SOUND_VALUES, NotificationActionSchema, NotificationGroupKeySchema, NotificationPublishInputSchema, NotificationRecordSchema, NotificationSettingsSchema, NotificationSoundSchema, NotificationSourceSchema, TerminalControlParser, TerminalNotificationParser, aggregateNotifications, getNotificationAggregateKey, getNotificationGroupKey, getNotificationGroupLabel, groupNotifications, terminalNotificationEventToPublishInput };
@@ -1,5 +1,5 @@
1
- import { r as MarkdownFactsDocument } from "./markdown-facts-f3kXnqXb.mjs";
2
- import { a as MarkdownAnnotationRule, d as MarkdownReadingPlugin, l as MarkdownReadingDocument, n as MarkdownAnnotationConfidence, t as MarkdownAnnotation } from "./markdown-reading-D36W693c.mjs";
1
+ import { r as MarkdownFactsDocument } from "./markdown-facts-DxElzSsp.mjs";
2
+ import { a as MarkdownAnnotationRule, d as MarkdownReadingPlugin, l as MarkdownReadingDocument, n as MarkdownAnnotationConfidence, t as MarkdownAnnotation } from "./markdown-reading-BC6uFgx0.mjs";
3
3
 
4
4
  //#region src/openspec-annotations.d.ts
5
5
  type OpenSpecSemanticKind = 'document-title' | 'purpose-section' | 'requirements-section' | 'requirement' | 'scenario' | 'scenario-step' | 'keyword';
@@ -1,5 +1,5 @@
1
- import { t as parseMarkdownFacts } from "./markdown-facts-BmSmZmpB.mjs";
2
- import { c as getMarkdownHeadingFacts, o as getMarkdownFactSpan, r as createMarkdownReadingDocumentFromFacts, s as getMarkdownHeadingEnd } from "./markdown-reading-CrchEfoW.mjs";
1
+ import { t as parseMarkdownFacts } from "./markdown-facts-BFqXdPfN.mjs";
2
+ import { c as getMarkdownHeadingEnd, i as createMarkdownReadingDocumentFromFacts, l as getMarkdownHeadingFacts, s as getMarkdownFactSpan } from "./markdown-reading-CsL1q84q.mjs";
3
3
 
4
4
  //#region src/openspec-annotations.ts
5
5
  const OPEN_SPEC_ANNOTATION_RULES = {
@@ -1,4 +1,4 @@
1
- import "./markdown-facts-f3kXnqXb.mjs";
2
- import "./markdown-reading-D36W693c.mjs";
3
- import { a as OpenSpecKeyword, c as OpenSpecScenarioStepKeyword, d as annotateOpenSpecMarkdown, f as builtinOpenSpecReadingPlugin, h as openSpecAnnotationRules, i as OpenSpecAnnotationMetadata, l as OpenSpecSemanticKind, m as getOpenSpecAnnotationsForFact, n as OpenSpecAnnotation, o as OpenSpecKeywordRole, p as getOpenSpecAnnotation, r as OpenSpecAnnotationConfidence, s as OpenSpecRequirementKeyword, t as AnnotatedOpenSpecDocument, u as annotateOpenSpecFacts } from "./openspec-annotations-CJmYcfAu.mjs";
1
+ import "./markdown-facts-DxElzSsp.mjs";
2
+ import "./markdown-reading-BC6uFgx0.mjs";
3
+ import { a as OpenSpecKeyword, c as OpenSpecScenarioStepKeyword, d as annotateOpenSpecMarkdown, f as builtinOpenSpecReadingPlugin, h as openSpecAnnotationRules, i as OpenSpecAnnotationMetadata, l as OpenSpecSemanticKind, m as getOpenSpecAnnotationsForFact, n as OpenSpecAnnotation, o as OpenSpecKeywordRole, p as getOpenSpecAnnotation, r as OpenSpecAnnotationConfidence, s as OpenSpecRequirementKeyword, t as AnnotatedOpenSpecDocument, u as annotateOpenSpecFacts } from "./openspec-annotations-DKP1Uuho.mjs";
4
4
  export { AnnotatedOpenSpecDocument, OpenSpecAnnotation, OpenSpecAnnotationConfidence, OpenSpecAnnotationMetadata, OpenSpecKeyword, OpenSpecKeywordRole, OpenSpecRequirementKeyword, OpenSpecScenarioStepKeyword, OpenSpecSemanticKind, annotateOpenSpecFacts, annotateOpenSpecMarkdown, builtinOpenSpecReadingPlugin, getOpenSpecAnnotation, getOpenSpecAnnotationsForFact, openSpecAnnotationRules };
@@ -1,5 +1,5 @@
1
- import "./markdown-facts-BmSmZmpB.mjs";
2
- import "./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";
1
+ import "./markdown-facts-BFqXdPfN.mjs";
2
+ import "./markdown-reading-CsL1q84q.mjs";
3
+ import { a as getOpenSpecAnnotationsForFact, i as getOpenSpecAnnotation, n as annotateOpenSpecMarkdown, o as openSpecAnnotationRules, r as builtinOpenSpecReadingPlugin, t as annotateOpenSpecFacts } from "./openspec-annotations-D_xQqQOB.mjs";
4
4
 
5
5
  export { annotateOpenSpecFacts, annotateOpenSpecMarkdown, builtinOpenSpecReadingPlugin, getOpenSpecAnnotation, getOpenSpecAnnotationsForFact, openSpecAnnotationRules };
@@ -1,5 +1,5 @@
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";
1
+ import { c as getMarkdownHeadingEnd, d as trimMarkdownSlice, l as getMarkdownHeadingFacts, r as createMarkdownReadingDocument, s as getMarkdownFactSpan } from "./markdown-reading-CsL1q84q.mjs";
2
+ import { r as builtinOpenSpecReadingPlugin } from "./openspec-annotations-D_xQqQOB.mjs";
3
3
 
4
4
  //#region src/openspec-projection.ts
5
5
  const OPEN_SPEC_SPEC_PROJECTION_ID = "openspec.projection.spec.v2";