@openspecui/core 3.7.1 → 3.8.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 (72) hide show
  1. package/dist/document-translation-BU8CM7oy.d.mts +263 -0
  2. package/dist/{document-translation-CvUxMOPl.mjs → document-translation-BrE402YR.mjs} +16 -2
  3. package/dist/document-translation.d.mts +2 -2
  4. package/dist/document-translation.mjs +3 -2
  5. package/dist/hosted-app.d.mts +1 -1
  6. package/dist/hosted-app.mjs +1 -1
  7. package/dist/index.d.mts +190 -33
  8. package/dist/index.mjs +270 -23
  9. package/dist/local-download-profiles-BA0ArrI0.d.mts +100 -0
  10. package/dist/local-download-profiles-BppI_PAq.mjs +255 -0
  11. package/dist/local-download-profiles.d.mts +3 -0
  12. package/dist/local-download-profiles.mjs +3 -0
  13. package/dist/markdown-facts.d.mts +1 -1
  14. package/dist/markdown-facts.mjs +1 -1
  15. package/dist/{markdown-reading-CsL1q84q.mjs → markdown-reading-DYBp7qoI.mjs} +1 -1
  16. package/dist/{markdown-reading-BC6uFgx0.d.mts → markdown-reading-DvLPaaY1.d.mts} +1 -1
  17. package/dist/markdown-reading.d.mts +2 -2
  18. package/dist/markdown-reading.mjs +2 -2
  19. package/dist/{notifications-DXOoOJ3m.mjs → notifications-9vbSJQ8N.mjs} +2 -2
  20. package/dist/{notifications-Clq2bq-i.d.mts → notifications-DvyoW8gu.d.mts} +7 -7
  21. package/dist/notifications.d.mts +2 -2
  22. package/dist/notifications.mjs +3 -3
  23. package/dist/{openspec-annotations-D_xQqQOB.mjs → openspec-annotations-BxBoWlyv.mjs} +2 -2
  24. package/dist/{openspec-annotations-DKP1Uuho.d.mts → openspec-annotations-DVbFBz5J.d.mts} +2 -2
  25. package/dist/openspec-annotations.d.mts +3 -3
  26. package/dist/openspec-annotations.mjs +3 -3
  27. package/dist/{openspec-projection-DgnEag63.d.mts → openspec-projection-BA3r5CYl.d.mts} +3 -3
  28. package/dist/{openspec-projection-DLGD1JFD.mjs → openspec-projection-Cd6oydiK.mjs} +2 -2
  29. package/dist/openspec-projection.d.mts +5 -5
  30. package/dist/openspec-projection.mjs +4 -4
  31. package/dist/opsx-display-path.d.mts +1 -1
  32. package/dist/opsx-display-path.mjs +1 -1
  33. package/dist/{opsx-entity-BhvuPO8B.d.mts → opsx-entity-pnjptBhO.d.mts} +13 -13
  34. package/dist/opsx-entity.d.mts +2 -2
  35. package/dist/opsx-entity.mjs +1 -1
  36. package/dist/{opsx-schema-detail-SFENVa0g.d.mts → opsx-schema-detail-X1wHtEmS.d.mts} +1 -1
  37. package/dist/opsx-schema-detail.d.mts +3 -3
  38. package/dist/opsx-schema-detail.mjs +1 -1
  39. package/dist/{schemas-DZwT0am4.d.mts → schemas-P5NxTHR9.d.mts} +8 -8
  40. package/dist/{sounds-PZqzoKxJ.d.mts → sounds-CYknP1uN.d.mts} +8 -8
  41. package/dist/sounds.d.mts +1 -1
  42. package/dist/sounds.mjs +1 -1
  43. package/dist/{terminal-audio-BiQ9qJJW.mjs → terminal-audio-DVz0HA2H.mjs} +1 -1
  44. package/dist/{terminal-audio-Ci4x-tyQ.d.mts → terminal-audio-DcVgLNsd.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-owPZDVJF.d.mts → terminal-invocation-S8G5xSpv.d.mts} +57 -57
  50. package/dist/terminal-invocation.d.mts +1 -1
  51. package/dist/terminal-invocation.mjs +1 -1
  52. package/dist/terminal-theme.d.mts +1 -1
  53. package/dist/terminal-theme.mjs +1 -1
  54. package/dist/translator-C3LT7PqW.mjs +147 -0
  55. package/dist/translator-LOd1jBrH.d.mts +780 -0
  56. package/dist/translator.d.mts +2 -0
  57. package/dist/translator.mjs +3 -0
  58. package/package.json +15 -3
  59. package/dist/document-translation-VavI1QOl.d.mts +0 -140
  60. /package/dist/{hosted-app-Du65UHRo.mjs → hosted-app-CxpQvD1s.mjs} +0 -0
  61. /package/dist/{hosted-app-BqJw9WgW.d.mts → hosted-app-FuxG4-qA.d.mts} +0 -0
  62. /package/dist/{markdown-facts-BFqXdPfN.mjs → markdown-facts-B5RvYPKF.mjs} +0 -0
  63. /package/dist/{markdown-facts-DxElzSsp.d.mts → markdown-facts-DUsbNcjh.d.mts} +0 -0
  64. /package/dist/{opsx-display-path-BHEPZsJx.mjs → opsx-display-path-Bf89ZyM5.mjs} +0 -0
  65. /package/dist/{opsx-display-path-BKUYCqwP.d.mts → opsx-display-path-CbO6K0Qq.d.mts} +0 -0
  66. /package/dist/{opsx-entity-B_Od4N3r.mjs → opsx-entity-BR_6djiM.mjs} +0 -0
  67. /package/dist/{opsx-schema-detail-Bh-aNaSk.mjs → opsx-schema-detail-5Wv1oWLT.mjs} +0 -0
  68. /package/dist/{sounds-Ctm3QEtf.mjs → sounds-CB_gpY-y.mjs} +0 -0
  69. /package/dist/{terminal-control-CMkG-o9C.mjs → terminal-control-CNcEd9Rl.mjs} +0 -0
  70. /package/dist/{terminal-invocation-CX1LDM89.mjs → terminal-invocation-wUmtJMPl.mjs} +0 -0
  71. /package/dist/{terminal-theme-BOGPIiVm.mjs → terminal-theme-CHkfTDk4.mjs} +0 -0
  72. /package/dist/{terminal-theme-DdhVuegL.d.mts → terminal-theme-x_vAHvok.d.mts} +0 -0
package/dist/index.mjs CHANGED
@@ -1,18 +1,20 @@
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";
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-BR_6djiM.mjs";
2
+ import { n as toMarkdownFactKind, t as parseMarkdownFacts } from "./markdown-facts-B5RvYPKF.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-DYBp7qoI.mjs";
4
+ import { a as getOpenSpecAnnotationsForFact, i as getOpenSpecAnnotation, n as annotateOpenSpecMarkdown, o as openSpecAnnotationRules, r as builtinOpenSpecReadingPlugin, t as annotateOpenSpecFacts } from "./openspec-annotations-BxBoWlyv.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-Cd6oydiK.mjs";
6
+ import { _ as TranslationLocalSettingsSchema, a as LocalModelAssetPlanSnapshotSchema, c as SERVICE_TRANSLATION_ENGINE_IDS, d as TRANSLATION_ENGINE_MANIFESTS, f as TRANSLATOR_CONTRACT_VERSION, g as TranslationEngineIdSchema, h as TranslationEngineGlobalSettingsSchema, i as LocalModelAssetLogSchema, l as ServiceTranslationEngineIdSchema, m as TranslationDownloadGroupPlanSchema, n as BatchTranslateInputSchema, o as LocalModelAssetStateSchema, p as TranslationDownloadFilePlanSchema, r as DEFAULT_TRANSLATION_ENGINE_ID, s as LocalModelDownloadStatusSchema, t as BatchTranslateEventSchema, u as TRANSLATION_ENGINE_IDS, v as TranslationOpenAISettingsSchema, y as getTranslationEngineManifest } from "./translator-C3LT7PqW.mjs";
7
+ 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, p as TranslationEngineProjectSettingsSchema, r as DocumentTranslationConfigSchema, s as TRANSLATION_CACHE_POLICY_VERSION, t as DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT, u as TranslationCacheSettingsSchema } from "./document-translation-BrE402YR.mjs";
8
+ 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-CB_gpY-y.mjs";
9
+ import { n as terminalNotificationEventToPublishInput, t as TerminalControlParser } from "./terminal-control-CNcEd9Rl.mjs";
10
+ 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-9vbSJQ8N.mjs";
11
+ import { n as TERMINAL_BELL_SOUND_VALUES, r as TerminalBellSoundSchema, t as TERMINAL_BELL_SOUND_OPTIONS } from "./terminal-audio-DVz0HA2H.mjs";
12
+ 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-CHkfTDk4.mjs";
13
+ import { i as selectLocalDownloadGroup, n as buildLocalDownloadPlanFromRepositoryFiles, r as buildLocalDownloadPlanFromRuntimeProfileFiles, t as LOCAL_MODEL_PROFILE_DEFINITIONS } from "./local-download-profiles-BppI_PAq.mjs";
14
+ 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-CxpQvD1s.mjs";
15
+ import { n as toOpsxDisplayPath, t as VIRTUAL_PROJECT_DIRNAME } from "./opsx-display-path-Bf89ZyM5.mjs";
16
+ 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-wUmtJMPl.mjs";
17
+ import { t as parseOpsxSchemaDetail } from "./opsx-schema-detail-5Wv1oWLT.mjs";
16
18
  import { mkdir, readFile, rename, writeFile } from "fs/promises";
17
19
  import { dirname, join } from "path";
18
20
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -2002,6 +2004,56 @@ function createFileChangeObservable(watcher) {
2002
2004
  } };
2003
2005
  }
2004
2006
 
2007
+ //#endregion
2008
+ //#region src/persisted-settings-sanitize.ts
2009
+ function isPlainObject(value) {
2010
+ return value !== null && typeof value === "object" && !Array.isArray(value);
2011
+ }
2012
+ function readPath(value, path) {
2013
+ let current = value;
2014
+ for (const key of path) {
2015
+ if (!isPlainObject(current) || !Object.prototype.hasOwnProperty.call(current, key)) return {
2016
+ exists: false,
2017
+ value: void 0
2018
+ };
2019
+ current = current[key];
2020
+ }
2021
+ return {
2022
+ exists: true,
2023
+ value: current
2024
+ };
2025
+ }
2026
+ function writePath(value, path, nextValue) {
2027
+ if (!isPlainObject(value)) return value;
2028
+ const [head, ...tail] = path;
2029
+ const clone = { ...value };
2030
+ if (tail.length === 0) {
2031
+ if (nextValue === void 0) delete clone[head];
2032
+ else clone[head] = nextValue;
2033
+ return clone;
2034
+ }
2035
+ const currentChild = clone[head];
2036
+ clone[head] = writePath(isPlainObject(currentChild) ? currentChild : {}, tail, nextValue);
2037
+ return clone;
2038
+ }
2039
+ /**
2040
+ * Treat persisted settings/config as untrusted input and repair known invalid
2041
+ * fields before the authoritative schema parse runs.
2042
+ */
2043
+ function sanitizePersistedSettings(value, rules) {
2044
+ let sanitized = value;
2045
+ for (const rule of rules) {
2046
+ const current = readPath(sanitized, rule.path);
2047
+ if (!current.exists) continue;
2048
+ if (rule.kind === "object") {
2049
+ if (!isPlainObject(current.value)) sanitized = writePath(sanitized, rule.path, rule.fallback);
2050
+ continue;
2051
+ }
2052
+ if (!rule.schema.safeParse(current.value).success) sanitized = writePath(sanitized, rule.path, rule.fallback);
2053
+ }
2054
+ return sanitized;
2055
+ }
2056
+
2005
2057
  //#endregion
2006
2058
  //#region src/spawn-safe.ts
2007
2059
  function getSpawnErrorCode(err) {
@@ -2501,7 +2553,7 @@ const TerminalConfigSchema = z.object({
2501
2553
  useTheme: TerminalThemeModeSchema.default(DEFAULT_TERMINAL_THEME_MODE),
2502
2554
  lightTheme: TerminalThemeSchema.default(DEFAULT_TERMINAL_LIGHT_THEME),
2503
2555
  darkTheme: TerminalThemeSchema.default(DEFAULT_TERMINAL_DARK_THEME),
2504
- rendererEngine: z.string().default("xterm"),
2556
+ rendererEngine: TerminalRendererEngineSchema.default("xterm"),
2505
2557
  bellSound: TerminalBellSoundSchema.default(DEFAULT_BELL_SOUND_ID),
2506
2558
  bellVolume: SoundVolumeSchema
2507
2559
  });
@@ -2543,6 +2595,133 @@ const DEFAULT_CONFIG = {
2543
2595
  notifications: NotificationSettingsSchema.parse({}),
2544
2596
  translation: DocumentTranslationConfigSchema.parse({})
2545
2597
  };
2598
+ const PERSISTED_CONFIG_SANITIZE_RULES = [
2599
+ {
2600
+ kind: "object",
2601
+ path: ["cli"],
2602
+ fallback: {}
2603
+ },
2604
+ {
2605
+ kind: "field",
2606
+ path: ["theme"],
2607
+ schema: z.enum(THEME_VALUES),
2608
+ fallback: DEFAULT_CONFIG.theme
2609
+ },
2610
+ {
2611
+ kind: "object",
2612
+ path: ["codeEditor"],
2613
+ fallback: {}
2614
+ },
2615
+ {
2616
+ kind: "field",
2617
+ path: ["codeEditor", "theme"],
2618
+ schema: CodeEditorThemeSchema,
2619
+ fallback: DEFAULT_CONFIG.codeEditor.theme
2620
+ },
2621
+ {
2622
+ kind: "object",
2623
+ path: ["opsx"],
2624
+ fallback: {}
2625
+ },
2626
+ {
2627
+ kind: "field",
2628
+ path: ["opsx", "agentInvocationMode"],
2629
+ schema: OpsxAgentInvocationModeSchema,
2630
+ fallback: DEFAULT_CONFIG.opsx.agentInvocationMode
2631
+ },
2632
+ {
2633
+ kind: "object",
2634
+ path: ["terminal"],
2635
+ fallback: {}
2636
+ },
2637
+ {
2638
+ kind: "field",
2639
+ path: ["terminal", "cursorStyle"],
2640
+ schema: z.enum(CURSOR_STYLE_VALUES),
2641
+ fallback: DEFAULT_CONFIG.terminal.cursorStyle
2642
+ },
2643
+ {
2644
+ kind: "field",
2645
+ path: ["terminal", "useTheme"],
2646
+ schema: TerminalThemeModeSchema,
2647
+ fallback: DEFAULT_CONFIG.terminal.useTheme
2648
+ },
2649
+ {
2650
+ kind: "field",
2651
+ path: ["terminal", "lightTheme"],
2652
+ schema: TerminalThemeSchema,
2653
+ fallback: DEFAULT_CONFIG.terminal.lightTheme
2654
+ },
2655
+ {
2656
+ kind: "field",
2657
+ path: ["terminal", "darkTheme"],
2658
+ schema: TerminalThemeSchema,
2659
+ fallback: DEFAULT_CONFIG.terminal.darkTheme
2660
+ },
2661
+ {
2662
+ kind: "field",
2663
+ path: ["terminal", "rendererEngine"],
2664
+ schema: TerminalRendererEngineSchema,
2665
+ fallback: DEFAULT_CONFIG.terminal.rendererEngine
2666
+ },
2667
+ {
2668
+ kind: "field",
2669
+ path: ["terminal", "bellSound"],
2670
+ schema: TerminalBellSoundSchema,
2671
+ fallback: DEFAULT_CONFIG.terminal.bellSound
2672
+ },
2673
+ {
2674
+ kind: "object",
2675
+ path: ["notifications"],
2676
+ fallback: {}
2677
+ },
2678
+ {
2679
+ kind: "field",
2680
+ path: ["notifications", "sound"],
2681
+ schema: NotificationSettingsSchema.shape.sound,
2682
+ fallback: DEFAULT_CONFIG.notifications.sound
2683
+ },
2684
+ {
2685
+ kind: "object",
2686
+ path: ["translation"],
2687
+ fallback: {}
2688
+ },
2689
+ {
2690
+ kind: "object",
2691
+ path: ["translation", "engines"],
2692
+ fallback: {}
2693
+ },
2694
+ {
2695
+ kind: "object",
2696
+ path: [
2697
+ "translation",
2698
+ "engines",
2699
+ "local"
2700
+ ],
2701
+ fallback: {}
2702
+ },
2703
+ {
2704
+ kind: "object",
2705
+ path: [
2706
+ "translation",
2707
+ "engines",
2708
+ "openai"
2709
+ ],
2710
+ fallback: {}
2711
+ },
2712
+ {
2713
+ kind: "field",
2714
+ path: ["translation", "displayMode"],
2715
+ schema: DocumentTranslationConfigSchema.shape.displayMode,
2716
+ fallback: DEFAULT_CONFIG.translation.displayMode
2717
+ },
2718
+ {
2719
+ kind: "field",
2720
+ path: ["translation", "engineId"],
2721
+ schema: DocumentTranslationConfigSchema.shape.engineId,
2722
+ fallback: DEFAULT_CONFIG.translation.engineId
2723
+ }
2724
+ ];
2546
2725
  function areStringArraysEqual(left, right) {
2547
2726
  if (left === right) return true;
2548
2727
  if (!left || !right) return !left && !right;
@@ -2613,6 +2792,14 @@ function toPersistedConfig(config, options = {}) {
2613
2792
  if (config.translation.targetLanguage !== DEFAULT_CONFIG.translation.targetLanguage) translation.targetLanguage = config.translation.targetLanguage;
2614
2793
  if (config.translation.displayMode !== DEFAULT_CONFIG.translation.displayMode) translation.displayMode = config.translation.displayMode;
2615
2794
  if (config.translation.cacheEnabled !== DEFAULT_CONFIG.translation.cacheEnabled) translation.cacheEnabled = config.translation.cacheEnabled;
2795
+ if (config.translation.engineId !== DEFAULT_CONFIG.translation.engineId) translation.engineId = config.translation.engineId;
2796
+ const translationEngines = {};
2797
+ const localEngine = {};
2798
+ if (config.translation.engines.local.model !== DEFAULT_CONFIG.translation.engines.local.model) localEngine.model = config.translation.engines.local.model;
2799
+ if (config.translation.engines.local.selectedGroupId !== DEFAULT_CONFIG.translation.engines.local.selectedGroupId) localEngine.selectedGroupId = config.translation.engines.local.selectedGroupId;
2800
+ if (localEngine && hasOwnEntries$1(localEngine)) translationEngines.local = localEngine;
2801
+ if (config.translation.engines.openai.model !== DEFAULT_CONFIG.translation.engines.openai.model) translationEngines.openai = { model: config.translation.engines.openai.model };
2802
+ if (hasOwnEntries$1(translationEngines)) translation.engines = translationEngines;
2616
2803
  if (hasOwnEntries$1(translation)) persisted.translation = translation;
2617
2804
  return persisted;
2618
2805
  }
@@ -2640,8 +2827,8 @@ var ConfigManager = class {
2640
2827
  parseConfigContent(content) {
2641
2828
  if (!content) return DEFAULT_CONFIG;
2642
2829
  try {
2643
- const normalized = pruneNullish$1(JSON.parse(content)) ?? {};
2644
- const result = OpenSpecUIConfigSchema.safeParse(normalized);
2830
+ const sanitized = sanitizePersistedSettings(pruneNullish$1(JSON.parse(content)) ?? {}, PERSISTED_CONFIG_SANITIZE_RULES);
2831
+ const result = OpenSpecUIConfigSchema.safeParse(sanitized);
2645
2832
  if (result.success) return result.data;
2646
2833
  console.warn("Invalid config format, using defaults:", result.error.message);
2647
2834
  return DEFAULT_CONFIG;
@@ -2715,7 +2902,17 @@ var ConfigManager = class {
2715
2902
  },
2716
2903
  translation: {
2717
2904
  ...current.translation,
2718
- ...config.translation
2905
+ ...config.translation,
2906
+ engines: {
2907
+ local: {
2908
+ ...current.translation.engines.local,
2909
+ ...config.translation?.engines?.local
2910
+ },
2911
+ openai: {
2912
+ ...current.translation.engines.openai,
2913
+ ...config.translation?.engines?.openai
2914
+ }
2915
+ }
2719
2916
  }
2720
2917
  });
2721
2918
  if (isPersistedConfigEmpty(persisted) && !fileExists) return;
@@ -2842,8 +3039,33 @@ var ConfigManager = class {
2842
3039
 
2843
3040
  //#endregion
2844
3041
  //#region src/global-settings.ts
2845
- const OpenSpecUIGlobalSettingsSchema = z.object({ translationCache: TranslationCacheSettingsSchema.default(TranslationCacheSettingsSchema.parse({})) });
3042
+ const OpenSpecUIGlobalSettingsSchema = z.object({
3043
+ translationCache: TranslationCacheSettingsSchema.default(TranslationCacheSettingsSchema.parse({})),
3044
+ translationEngines: TranslationEngineGlobalSettingsSchema.default(TranslationEngineGlobalSettingsSchema.parse({}))
3045
+ });
2846
3046
  const DEFAULT_GLOBAL_SETTINGS = OpenSpecUIGlobalSettingsSchema.parse({});
3047
+ const PERSISTED_GLOBAL_SETTINGS_SANITIZE_RULES = [
3048
+ {
3049
+ kind: "object",
3050
+ path: ["translationCache"],
3051
+ fallback: {}
3052
+ },
3053
+ {
3054
+ kind: "object",
3055
+ path: ["translationEngines"],
3056
+ fallback: {}
3057
+ },
3058
+ {
3059
+ kind: "object",
3060
+ path: ["translationEngines", "openai"],
3061
+ fallback: {}
3062
+ },
3063
+ {
3064
+ kind: "object",
3065
+ path: ["translationEngines", "local"],
3066
+ fallback: {}
3067
+ }
3068
+ ];
2847
3069
  function getDefaultGlobalSettingsPath() {
2848
3070
  return join$1(homedir(), ".openspecui", "settings.json");
2849
3071
  }
@@ -2864,6 +3086,19 @@ function toPersistedGlobalSettings(settings) {
2864
3086
  const translationCache = {};
2865
3087
  if (settings.translationCache.entryLimit !== DEFAULT_GLOBAL_SETTINGS.translationCache.entryLimit) translationCache.entryLimit = settings.translationCache.entryLimit;
2866
3088
  if (hasOwnEntries(translationCache)) persisted.translationCache = translationCache;
3089
+ const translationEngines = {};
3090
+ const defaultTranslationEngines = DEFAULT_GLOBAL_SETTINGS.translationEngines;
3091
+ const openai = {};
3092
+ if (settings.translationEngines.openai.baseUrl !== defaultTranslationEngines.openai.baseUrl) openai.baseUrl = settings.translationEngines.openai.baseUrl;
3093
+ if (settings.translationEngines.openai.token !== defaultTranslationEngines.openai.token) openai.token = settings.translationEngines.openai.token;
3094
+ if (settings.translationEngines.openai.model !== defaultTranslationEngines.openai.model) openai.model = settings.translationEngines.openai.model;
3095
+ if (hasOwnEntries(openai)) translationEngines.openai = openai;
3096
+ const local = {};
3097
+ if (settings.translationEngines.local.model !== defaultTranslationEngines.local.model) local.model = settings.translationEngines.local.model;
3098
+ if (settings.translationEngines.local.selectedGroupId !== defaultTranslationEngines.local.selectedGroupId) local.selectedGroupId = settings.translationEngines.local.selectedGroupId;
3099
+ if (settings.translationEngines.local.hfEndpoint !== defaultTranslationEngines.local.hfEndpoint) local.hfEndpoint = settings.translationEngines.local.hfEndpoint;
3100
+ if (hasOwnEntries(local)) translationEngines.local = local;
3101
+ if (hasOwnEntries(translationEngines)) persisted.translationEngines = translationEngines;
2867
3102
  return persisted;
2868
3103
  }
2869
3104
  function isPersistedGlobalSettingsEmpty(settings) {
@@ -2886,8 +3121,8 @@ var GlobalSettingsManager = class {
2886
3121
  parseSettingsContent(content) {
2887
3122
  if (!content) return DEFAULT_GLOBAL_SETTINGS;
2888
3123
  try {
2889
- const normalized = pruneNullish(JSON.parse(content)) ?? {};
2890
- const result = OpenSpecUIGlobalSettingsSchema.safeParse(normalized);
3124
+ const sanitized = sanitizePersistedSettings(pruneNullish(JSON.parse(content)) ?? {}, PERSISTED_GLOBAL_SETTINGS_SANITIZE_RULES);
3125
+ const result = OpenSpecUIGlobalSettingsSchema.safeParse(sanitized);
2891
3126
  if (result.success) return result.data;
2892
3127
  console.warn("Invalid global settings format, using defaults:", result.error.message);
2893
3128
  return DEFAULT_GLOBAL_SETTINGS;
@@ -2909,6 +3144,17 @@ var GlobalSettingsManager = class {
2909
3144
  translationCache: {
2910
3145
  ...current.translationCache,
2911
3146
  ...update.translationCache
3147
+ },
3148
+ translationEngines: {
3149
+ ...current.translationEngines,
3150
+ openai: {
3151
+ ...current.translationEngines.openai,
3152
+ ...update.translationEngines?.openai
3153
+ },
3154
+ local: {
3155
+ ...current.translationEngines.local,
3156
+ ...update.translationEngines?.local
3157
+ }
2912
3158
  }
2913
3159
  }));
2914
3160
  if (isPersistedGlobalSettingsEmpty(persisted) && !fileExists) return;
@@ -4034,6 +4280,7 @@ async function touchOpsxChangeDeps(projectDir, changeId) {
4034
4280
  const changeDir = join$1(projectDir, "openspec", "changes", changeId);
4035
4281
  await reactiveReadDir(changeDir, { includeHidden: true });
4036
4282
  await reactiveReadFile(join$1(changeDir, ".openspec.yaml"));
4283
+ await touchDirectoryTree(changeDir);
4037
4284
  }
4038
4285
  async function touchDirectoryPathDeps(rootDir, relativePath) {
4039
4286
  let currentPath = rootDir;
@@ -4756,4 +5003,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4756
5003
  ]);
4757
5004
 
4758
5005
  //#endregion
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 };
5006
+ export { AI_TOOLS, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, BUILTIN_SOUND_IDS, BUILTIN_SOUND_OPTIONS, BUILTIN_TERMINAL_SPAWN_COMMANDS, BatchTranslateEventSchema, BatchTranslateInputSchema, 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, DEFAULT_TRANSLATION_ENGINE_ID, DOCUMENT_TRANSLATION_DISPLAY_MODES, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, DocumentTranslationConfigSchema, DocumentTranslationDisplayModeSchema, GitConfigSchema, GlobalSettingsManager, HOSTED_SHELL_PROTOCOL_VERSION, LEGACY_SOUND_ID_MAP, LOCAL_MODEL_PROFILE_DEFINITIONS, LocalModelAssetLogSchema, LocalModelAssetPlanSnapshotSchema, LocalModelAssetStateSchema, LocalModelDownloadStatusSchema, 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, SERVICE_TRANSLATION_ENGINE_IDS, SILENT_SOUND_ID, ScenarioStepKeywordSchema, ScenarioStepSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, ServiceTranslationEngineIdSchema, 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, TRANSLATION_ENGINE_IDS, TRANSLATION_ENGINE_MANIFESTS, TRANSLATOR_CONTRACT_VERSION, TaskSchema, TemplatesSchema, TerminalBellSoundSchema, TerminalCommandFieldSchema, TerminalConfigSchema, TerminalControlParser, TerminalInvocationSettingsSchema, TerminalNotificationParser, TerminalRendererEngineSchema, TerminalShellProfileSchema, TerminalShellQuoteStyleSchema, TerminalSpawnCommandSchema, TerminalThemeModeSchema, TerminalThemeSchema, TranslationCacheEntrySchema, TranslationCacheReadInputSchema, TranslationCacheSettingsSchema, TranslationCacheStatsSchema, TranslationCacheWriteInputSchema, TranslationDownloadFilePlanSchema, TranslationDownloadGroupPlanSchema, TranslationEngineGlobalSettingsSchema, TranslationEngineIdSchema, TranslationEngineProjectSettingsSchema, TranslationLocalSettingsSchema, TranslationOpenAISettingsSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, annotateOpenSpecFacts, annotateOpenSpecMarkdown, buildBackendHealthPayload, buildCliRunnerCandidates, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, buildLocalDownloadPlanFromRepositoryFiles, buildLocalDownloadPlanFromRuntimeProfileFiles, 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, getTranslationEngineManifest, 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, selectLocalDownloadGroup, sniffGlobalCli, sortMarkdownReadingPlugins, soundIdFromCustomHash, subscribeWatcherRuntimeStatus, terminalNotificationEventToPublishInput, toMarkdownFactKind, toOpsxDisplayPath, toPersistedGlobalSettings, trimMarkdownSlice };
@@ -0,0 +1,100 @@
1
+ import { D as TranslationDownloadGroupPlan, z as TranslationModelDownloadPlan } from "./translator-LOd1jBrH.mjs";
2
+
3
+ //#region src/local-download-profiles.d.ts
4
+ declare const LOCAL_MODEL_PROFILE_DEFINITIONS: readonly [{
5
+ readonly id: "q1";
6
+ readonly label: "q1";
7
+ readonly dtype: "q1";
8
+ readonly suffix: "_q1";
9
+ readonly description: "1-bit quantized ONNX profile.";
10
+ }, {
11
+ readonly id: "q1f16";
12
+ readonly label: "q1f16";
13
+ readonly dtype: "q1f16";
14
+ readonly suffix: "_q1f16";
15
+ readonly description: "1-bit block quantized fp16 ONNX profile.";
16
+ }, {
17
+ readonly id: "q2";
18
+ readonly label: "q2";
19
+ readonly dtype: "q2";
20
+ readonly suffix: "_q2";
21
+ readonly description: "2-bit quantized ONNX profile.";
22
+ }, {
23
+ readonly id: "q2f16";
24
+ readonly label: "q2f16";
25
+ readonly dtype: "q2f16";
26
+ readonly suffix: "_q2f16";
27
+ readonly description: "2-bit block quantized fp16 ONNX profile.";
28
+ }, {
29
+ readonly id: "q4";
30
+ readonly label: "q4";
31
+ readonly dtype: "q4";
32
+ readonly suffix: "_q4";
33
+ readonly description: "4-bit quantized ONNX profile.";
34
+ }, {
35
+ readonly id: "q4f16";
36
+ readonly label: "q4f16";
37
+ readonly dtype: "q4f16";
38
+ readonly suffix: "_q4f16";
39
+ readonly description: "4-bit block quantized fp16 ONNX profile.";
40
+ }, {
41
+ readonly id: "bnb4";
42
+ readonly label: "bnb4";
43
+ readonly dtype: "bnb4";
44
+ readonly suffix: "_bnb4";
45
+ readonly description: "bitsandbytes 4-bit ONNX profile.";
46
+ }, {
47
+ readonly id: "q8";
48
+ readonly label: "q8";
49
+ readonly dtype: "q8";
50
+ readonly suffix: "_quantized";
51
+ readonly description: "8-bit quantized ONNX profile.";
52
+ }, {
53
+ readonly id: "int8";
54
+ readonly label: "int8";
55
+ readonly dtype: "int8";
56
+ readonly suffix: "_int8";
57
+ readonly description: "int8 ONNX profile.";
58
+ }, {
59
+ readonly id: "uint8";
60
+ readonly label: "uint8";
61
+ readonly dtype: "uint8";
62
+ readonly suffix: "_uint8";
63
+ readonly description: "uint8 ONNX profile.";
64
+ }, {
65
+ readonly id: "fp16";
66
+ readonly label: "fp16";
67
+ readonly dtype: "fp16";
68
+ readonly suffix: "_fp16";
69
+ readonly description: "fp16 ONNX profile.";
70
+ }, {
71
+ readonly id: "fp32";
72
+ readonly label: "fp32";
73
+ readonly dtype: "fp32";
74
+ readonly suffix: "";
75
+ readonly description: "fp32 ONNX profile.";
76
+ }];
77
+ type LocalModelProfileId = (typeof LOCAL_MODEL_PROFILE_DEFINITIONS)[number]['id'];
78
+ interface LocalRepositoryFile {
79
+ path: string;
80
+ sizeBytes?: number;
81
+ }
82
+ interface LocalRuntimeProfileFiles {
83
+ profile: LocalModelProfileId;
84
+ dtype: string;
85
+ files: ReadonlyArray<LocalRepositoryFile>;
86
+ }
87
+ declare function buildLocalDownloadPlanFromRepositoryFiles(input: {
88
+ modelId: string;
89
+ files: ReadonlyArray<LocalRepositoryFile>;
90
+ isEncoderDecoder?: boolean;
91
+ selectedGroupId?: string;
92
+ }): TranslationModelDownloadPlan | null;
93
+ declare function buildLocalDownloadPlanFromRuntimeProfileFiles(input: {
94
+ modelId: string;
95
+ groups: ReadonlyArray<LocalRuntimeProfileFiles>;
96
+ selectedGroupId?: string;
97
+ }): TranslationModelDownloadPlan | null;
98
+ declare function selectLocalDownloadGroup(plan: TranslationModelDownloadPlan | null, selectedGroupId: string | undefined): TranslationDownloadGroupPlan | null;
99
+ //#endregion
100
+ export { buildLocalDownloadPlanFromRepositoryFiles as a, LocalRuntimeProfileFiles as i, LocalModelProfileId as n, buildLocalDownloadPlanFromRuntimeProfileFiles as o, LocalRepositoryFile as r, selectLocalDownloadGroup as s, LOCAL_MODEL_PROFILE_DEFINITIONS as t };