@openspecui/core 1.6.0 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -18,13 +18,13 @@ declare const ChangeFileSchema: z.ZodObject<{
18
18
  /** Optional byte size for files */
19
19
  size: z.ZodOptional<z.ZodNumber>;
20
20
  }, "strip", z.ZodTypeAny, {
21
- type: "file" | "directory";
22
21
  path: string;
22
+ type: "file" | "directory";
23
23
  content?: string | undefined;
24
24
  size?: number | undefined;
25
25
  }, {
26
- type: "file" | "directory";
27
26
  path: string;
27
+ type: "file" | "directory";
28
28
  content?: string | undefined;
29
29
  size?: number | undefined;
30
30
  }>;
@@ -678,14 +678,16 @@ declare class OpenSpecAdapter {
678
678
  listChanges(): Promise<string[]>;
679
679
  /**
680
680
  * List changes with metadata (id, name, progress, and time info)
681
- * Only returns changes that have valid proposal.md
681
+ * Returns every change directory, including schema-specific layouts that
682
+ * don't use proposal.md/tasks.md.
682
683
  * Sorted by updatedAt descending (most recent first)
683
684
  */
684
685
  listChangesWithMeta(): Promise<ChangeMeta[]>;
685
686
  listArchivedChanges(): Promise<string[]>;
686
687
  /**
687
688
  * List archived changes with metadata and time info
688
- * Only returns archives that have valid proposal.md
689
+ * Returns every archive directory, including schema-specific layouts that
690
+ * don't use proposal.md/tasks.md.
689
691
  * Sorted by updatedAt descending (most recent first)
690
692
  */
691
693
  listArchivedChangesWithMeta(): Promise<ArchiveMeta[]>;
@@ -1309,8 +1311,11 @@ declare function createFileChangeObservable(watcher: OpenSpecWatcher): {
1309
1311
  };
1310
1312
  //#endregion
1311
1313
  //#region src/config.d.ts
1314
+ declare const CODE_EDITOR_THEME_VALUES: readonly ["github", "material", "vscode", "tokyo", "gruvbox", "monokai", "nord"];
1312
1315
  declare const TerminalRendererEngineSchema: z.ZodEnum<["xterm", "ghostty"]>;
1313
1316
  type TerminalRendererEngine = z.infer<typeof TerminalRendererEngineSchema>;
1317
+ declare const CodeEditorThemeSchema: z.ZodEnum<["github", "material", "vscode", "tokyo", "gruvbox", "monokai", "nord"]>;
1318
+ type CodeEditorTheme = z.infer<typeof CodeEditorThemeSchema>;
1314
1319
  declare function isTerminalRendererEngine(value: string): value is TerminalRendererEngine;
1315
1320
  type RunnerId = 'configured' | 'openspec' | 'npx' | 'bunx' | 'deno' | 'pnpm' | 'yarn';
1316
1321
  interface CliRunnerCandidate {
@@ -1429,6 +1434,14 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1429
1434
  }>>;
1430
1435
  /** 主题 */
1431
1436
  theme: z.ZodDefault<z.ZodEnum<["light", "dark", "system"]>>;
1437
+ /** 代码编辑器配置 */
1438
+ codeEditor: z.ZodDefault<z.ZodObject<{
1439
+ theme: z.ZodDefault<z.ZodEnum<["github", "material", "vscode", "tokyo", "gruvbox", "monokai", "nord"]>>;
1440
+ }, "strip", z.ZodTypeAny, {
1441
+ theme: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord";
1442
+ }, {
1443
+ theme?: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord" | undefined;
1444
+ }>>;
1432
1445
  /** 终端配置 */
1433
1446
  terminal: z.ZodDefault<z.ZodObject<{
1434
1447
  fontSize: z.ZodDefault<z.ZodNumber>;
@@ -1461,11 +1474,14 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1461
1474
  trendPointLimit?: number | undefined;
1462
1475
  }>>;
1463
1476
  }, "strip", z.ZodTypeAny, {
1477
+ theme: "light" | "dark" | "system";
1464
1478
  cli: {
1465
1479
  command?: string | undefined;
1466
1480
  args?: string[] | undefined;
1467
1481
  };
1468
- theme: "light" | "dark" | "system";
1482
+ codeEditor: {
1483
+ theme: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord";
1484
+ };
1469
1485
  terminal: {
1470
1486
  fontSize: number;
1471
1487
  fontFamily: string;
@@ -1478,11 +1494,14 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1478
1494
  trendPointLimit: number;
1479
1495
  };
1480
1496
  }, {
1497
+ theme?: "light" | "dark" | "system" | undefined;
1481
1498
  cli?: {
1482
1499
  command?: string | undefined;
1483
1500
  args?: string[] | undefined;
1484
1501
  } | undefined;
1485
- theme?: "light" | "dark" | "system" | undefined;
1502
+ codeEditor?: {
1503
+ theme?: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord" | undefined;
1504
+ } | undefined;
1486
1505
  terminal?: {
1487
1506
  fontSize?: number | undefined;
1488
1507
  fontFamily?: string | undefined;
@@ -1502,6 +1521,7 @@ type OpenSpecUIConfigUpdate = {
1502
1521
  args?: string[] | null;
1503
1522
  };
1504
1523
  theme?: OpenSpecUIConfig['theme'];
1524
+ codeEditor?: Partial<OpenSpecUIConfig['codeEditor']>;
1505
1525
  terminal?: Partial<TerminalConfig>;
1506
1526
  dashboard?: Partial<DashboardConfig>;
1507
1527
  };
@@ -1825,14 +1845,14 @@ declare const ArtifactStatusSchema: z.ZodObject<{
1825
1845
  missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1826
1846
  relativePath: z.ZodOptional<z.ZodString>;
1827
1847
  }, "strip", z.ZodTypeAny, {
1828
- status: "done" | "ready" | "blocked";
1829
1848
  id: string;
1849
+ status: "done" | "ready" | "blocked";
1830
1850
  outputPath: string;
1831
1851
  missingDeps?: string[] | undefined;
1832
1852
  relativePath?: string | undefined;
1833
1853
  }, {
1834
- status: "done" | "ready" | "blocked";
1835
1854
  id: string;
1855
+ status: "done" | "ready" | "blocked";
1836
1856
  outputPath: string;
1837
1857
  missingDeps?: string[] | undefined;
1838
1858
  relativePath?: string | undefined;
@@ -1850,14 +1870,14 @@ declare const ChangeStatusSchema: z.ZodObject<{
1850
1870
  missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1851
1871
  relativePath: z.ZodOptional<z.ZodString>;
1852
1872
  }, "strip", z.ZodTypeAny, {
1853
- status: "done" | "ready" | "blocked";
1854
1873
  id: string;
1874
+ status: "done" | "ready" | "blocked";
1855
1875
  outputPath: string;
1856
1876
  missingDeps?: string[] | undefined;
1857
1877
  relativePath?: string | undefined;
1858
1878
  }, {
1859
- status: "done" | "ready" | "blocked";
1860
1879
  id: string;
1880
+ status: "done" | "ready" | "blocked";
1861
1881
  outputPath: string;
1862
1882
  missingDeps?: string[] | undefined;
1863
1883
  relativePath?: string | undefined;
@@ -1868,8 +1888,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
1868
1888
  isComplete: boolean;
1869
1889
  applyRequires: string[];
1870
1890
  artifacts: {
1871
- status: "done" | "ready" | "blocked";
1872
1891
  id: string;
1892
+ status: "done" | "ready" | "blocked";
1873
1893
  outputPath: string;
1874
1894
  missingDeps?: string[] | undefined;
1875
1895
  relativePath?: string | undefined;
@@ -1880,8 +1900,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
1880
1900
  isComplete: boolean;
1881
1901
  applyRequires: string[];
1882
1902
  artifacts: {
1883
- status: "done" | "ready" | "blocked";
1884
1903
  id: string;
1904
+ status: "done" | "ready" | "blocked";
1885
1905
  outputPath: string;
1886
1906
  missingDeps?: string[] | undefined;
1887
1907
  relativePath?: string | undefined;
@@ -1894,13 +1914,13 @@ declare const DependencyInfoSchema: z.ZodObject<{
1894
1914
  path: z.ZodString;
1895
1915
  description: z.ZodString;
1896
1916
  }, "strip", z.ZodTypeAny, {
1897
- path: string;
1898
1917
  id: string;
1918
+ path: string;
1899
1919
  description: string;
1900
1920
  done: boolean;
1901
1921
  }, {
1902
- path: string;
1903
1922
  id: string;
1923
+ path: string;
1904
1924
  description: string;
1905
1925
  done: boolean;
1906
1926
  }>;
@@ -2008,13 +2028,13 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2008
2028
  path: z.ZodString;
2009
2029
  description: z.ZodString;
2010
2030
  }, "strip", z.ZodTypeAny, {
2011
- path: string;
2012
2031
  id: string;
2032
+ path: string;
2013
2033
  description: string;
2014
2034
  done: boolean;
2015
2035
  }, {
2016
- path: string;
2017
2036
  id: string;
2037
+ path: string;
2018
2038
  description: string;
2019
2039
  done: boolean;
2020
2040
  }>, "many">;
@@ -2028,8 +2048,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2028
2048
  artifactId: string;
2029
2049
  template: string;
2030
2050
  dependencies: {
2031
- path: string;
2032
2051
  id: string;
2052
+ path: string;
2033
2053
  description: string;
2034
2054
  done: boolean;
2035
2055
  }[];
@@ -2046,8 +2066,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2046
2066
  artifactId: string;
2047
2067
  template: string;
2048
2068
  dependencies: {
2049
- path: string;
2050
2069
  id: string;
2070
+ path: string;
2051
2071
  description: string;
2052
2072
  done: boolean;
2053
2073
  }[];
@@ -2093,8 +2113,8 @@ declare const SchemaResolutionSchema: z.ZodObject<{
2093
2113
  displayPath?: string | undefined;
2094
2114
  }>, "many">;
2095
2115
  }, "strip", z.ZodTypeAny, {
2096
- path: string;
2097
2116
  name: string;
2117
+ path: string;
2098
2118
  source: "project" | "user" | "package";
2099
2119
  shadows: {
2100
2120
  path: string;
@@ -2103,8 +2123,8 @@ declare const SchemaResolutionSchema: z.ZodObject<{
2103
2123
  }[];
2104
2124
  displayPath?: string | undefined;
2105
2125
  }, {
2106
- path: string;
2107
2126
  name: string;
2127
+ path: string;
2108
2128
  source: "project" | "user" | "package";
2109
2129
  shadows: {
2110
2130
  path: string;
@@ -2444,22 +2464,22 @@ declare const PtySessionInfoSchema: z.ZodObject<{
2444
2464
  closeTip: z.ZodOptional<z.ZodString>;
2445
2465
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2446
2466
  }, "strip", z.ZodTypeAny, {
2467
+ id: string;
2447
2468
  command: string;
2448
2469
  args: string[];
2449
2470
  platform: "windows" | "macos" | "common";
2450
2471
  exitCode: number | null;
2451
2472
  title: string;
2452
- id: string;
2453
2473
  isExited: boolean;
2454
2474
  closeTip?: string | undefined;
2455
2475
  closeCallbackUrl?: string | Record<string, string> | undefined;
2456
2476
  }, {
2477
+ id: string;
2457
2478
  command: string;
2458
2479
  args: string[];
2459
2480
  platform: "windows" | "macos" | "common";
2460
2481
  exitCode: number | null;
2461
2482
  title: string;
2462
- id: string;
2463
2483
  isExited: boolean;
2464
2484
  closeTip?: string | undefined;
2465
2485
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2476,19 +2496,19 @@ declare const PtyCreateMessageSchema: z.ZodObject<{
2476
2496
  }, "strip", z.ZodTypeAny, {
2477
2497
  type: "create";
2478
2498
  requestId: string;
2479
- cols?: number | undefined;
2480
- rows?: number | undefined;
2481
2499
  command?: string | undefined;
2482
2500
  args?: string[] | undefined;
2501
+ cols?: number | undefined;
2502
+ rows?: number | undefined;
2483
2503
  closeTip?: string | undefined;
2484
2504
  closeCallbackUrl?: string | Record<string, string> | undefined;
2485
2505
  }, {
2486
2506
  type: "create";
2487
2507
  requestId: string;
2488
- cols?: number | undefined;
2489
- rows?: number | undefined;
2490
2508
  command?: string | undefined;
2491
2509
  args?: string[] | undefined;
2510
+ cols?: number | undefined;
2511
+ rows?: number | undefined;
2492
2512
  closeTip?: string | undefined;
2493
2513
  closeCallbackUrl?: string | Record<string, string> | undefined;
2494
2514
  }>;
@@ -2566,19 +2586,19 @@ declare const PtyClientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2566
2586
  }, "strip", z.ZodTypeAny, {
2567
2587
  type: "create";
2568
2588
  requestId: string;
2569
- cols?: number | undefined;
2570
- rows?: number | undefined;
2571
2589
  command?: string | undefined;
2572
2590
  args?: string[] | undefined;
2591
+ cols?: number | undefined;
2592
+ rows?: number | undefined;
2573
2593
  closeTip?: string | undefined;
2574
2594
  closeCallbackUrl?: string | Record<string, string> | undefined;
2575
2595
  }, {
2576
2596
  type: "create";
2577
2597
  requestId: string;
2578
- cols?: number | undefined;
2579
- rows?: number | undefined;
2580
2598
  command?: string | undefined;
2581
2599
  args?: string[] | undefined;
2600
+ cols?: number | undefined;
2601
+ rows?: number | undefined;
2582
2602
  closeTip?: string | undefined;
2583
2603
  closeCallbackUrl?: string | Record<string, string> | undefined;
2584
2604
  }>, z.ZodObject<{
@@ -2720,22 +2740,22 @@ declare const PtyListResponseSchema: z.ZodObject<{
2720
2740
  closeTip: z.ZodOptional<z.ZodString>;
2721
2741
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2722
2742
  }, "strip", z.ZodTypeAny, {
2743
+ id: string;
2723
2744
  command: string;
2724
2745
  args: string[];
2725
2746
  platform: "windows" | "macos" | "common";
2726
2747
  exitCode: number | null;
2727
2748
  title: string;
2728
- id: string;
2729
2749
  isExited: boolean;
2730
2750
  closeTip?: string | undefined;
2731
2751
  closeCallbackUrl?: string | Record<string, string> | undefined;
2732
2752
  }, {
2753
+ id: string;
2733
2754
  command: string;
2734
2755
  args: string[];
2735
2756
  platform: "windows" | "macos" | "common";
2736
2757
  exitCode: number | null;
2737
2758
  title: string;
2738
- id: string;
2739
2759
  isExited: boolean;
2740
2760
  closeTip?: string | undefined;
2741
2761
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2743,12 +2763,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2743
2763
  }, "strip", z.ZodTypeAny, {
2744
2764
  type: "list";
2745
2765
  sessions: {
2766
+ id: string;
2746
2767
  command: string;
2747
2768
  args: string[];
2748
2769
  platform: "windows" | "macos" | "common";
2749
2770
  exitCode: number | null;
2750
2771
  title: string;
2751
- id: string;
2752
2772
  isExited: boolean;
2753
2773
  closeTip?: string | undefined;
2754
2774
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2756,12 +2776,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2756
2776
  }, {
2757
2777
  type: "list";
2758
2778
  sessions: {
2779
+ id: string;
2759
2780
  command: string;
2760
2781
  args: string[];
2761
2782
  platform: "windows" | "macos" | "common";
2762
2783
  exitCode: number | null;
2763
2784
  title: string;
2764
- id: string;
2765
2785
  isExited: boolean;
2766
2786
  closeTip?: string | undefined;
2767
2787
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2774,14 +2794,14 @@ declare const PtyErrorResponseSchema: z.ZodObject<{
2774
2794
  message: z.ZodString;
2775
2795
  sessionId: z.ZodOptional<z.ZodString>;
2776
2796
  }, "strip", z.ZodTypeAny, {
2777
- type: "error";
2778
2797
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2779
2798
  message: string;
2799
+ type: "error";
2780
2800
  sessionId?: string | undefined;
2781
2801
  }, {
2782
- type: "error";
2783
2802
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2784
2803
  message: string;
2804
+ type: "error";
2785
2805
  sessionId?: string | undefined;
2786
2806
  }>;
2787
2807
  declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2860,22 +2880,22 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2860
2880
  closeTip: z.ZodOptional<z.ZodString>;
2861
2881
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2862
2882
  }, "strip", z.ZodTypeAny, {
2883
+ id: string;
2863
2884
  command: string;
2864
2885
  args: string[];
2865
2886
  platform: "windows" | "macos" | "common";
2866
2887
  exitCode: number | null;
2867
2888
  title: string;
2868
- id: string;
2869
2889
  isExited: boolean;
2870
2890
  closeTip?: string | undefined;
2871
2891
  closeCallbackUrl?: string | Record<string, string> | undefined;
2872
2892
  }, {
2893
+ id: string;
2873
2894
  command: string;
2874
2895
  args: string[];
2875
2896
  platform: "windows" | "macos" | "common";
2876
2897
  exitCode: number | null;
2877
2898
  title: string;
2878
- id: string;
2879
2899
  isExited: boolean;
2880
2900
  closeTip?: string | undefined;
2881
2901
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2883,12 +2903,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2883
2903
  }, "strip", z.ZodTypeAny, {
2884
2904
  type: "list";
2885
2905
  sessions: {
2906
+ id: string;
2886
2907
  command: string;
2887
2908
  args: string[];
2888
2909
  platform: "windows" | "macos" | "common";
2889
2910
  exitCode: number | null;
2890
2911
  title: string;
2891
- id: string;
2892
2912
  isExited: boolean;
2893
2913
  closeTip?: string | undefined;
2894
2914
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2896,12 +2916,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2896
2916
  }, {
2897
2917
  type: "list";
2898
2918
  sessions: {
2919
+ id: string;
2899
2920
  command: string;
2900
2921
  args: string[];
2901
2922
  platform: "windows" | "macos" | "common";
2902
2923
  exitCode: number | null;
2903
2924
  title: string;
2904
- id: string;
2905
2925
  isExited: boolean;
2906
2926
  closeTip?: string | undefined;
2907
2927
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2912,14 +2932,14 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2912
2932
  message: z.ZodString;
2913
2933
  sessionId: z.ZodOptional<z.ZodString>;
2914
2934
  }, "strip", z.ZodTypeAny, {
2915
- type: "error";
2916
2935
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2917
2936
  message: string;
2937
+ type: "error";
2918
2938
  sessionId?: string | undefined;
2919
2939
  }, {
2920
- type: "error";
2921
2940
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
2922
2941
  message: string;
2942
+ type: "error";
2923
2943
  sessionId?: string | undefined;
2924
2944
  }>]>;
2925
2945
  type PtyClientMessage = z.infer<typeof PtyClientMessageSchema>;
@@ -2927,4 +2947,4 @@ type PtyServerMessage = z.infer<typeof PtyServerMessageSchema>;
2927
2947
  type PtySessionInfo = z.infer<typeof PtySessionInfoSchema>;
2928
2948
  type PtyPlatform = z.infer<typeof PtyPlatformSchema>;
2929
2949
  //#endregion
2930
- export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliRunnerAttempt, type CliSniffResult, type CliStreamEvent, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, type DashboardCardAvailability, type DashboardConfig, DashboardConfigSchema, type DashboardGitCommitEntry, type DashboardGitDiffStats, type DashboardGitEntry, type DashboardGitSnapshot, type DashboardGitUncommittedEntry, type DashboardGitWorktree, type DashboardMetricKey, type DashboardOverview, type DashboardSummary, type DashboardTrendKind, type DashboardTrendMeta, type DashboardTrendPoint, type DashboardTriColorTrendPoint, type Delta, type DeltaOperation, DeltaOperationType, DeltaSchema, type DeltaSpec, DeltaSpecSchema, type DependencyInfo, DependencyInfoSchema, type ExportSnapshot, type FileChangeEvent, type FileChangeType, MarkdownParser, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, OpsxKernel, type PathCallback, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, PtyAttachMessageSchema, PtyBufferResponseSchema, type PtyClientMessage, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, type PtyPlatform, PtyPlatformSchema, PtyResizeMessageSchema, type PtyServerMessage, PtyServerMessageSchema, type PtySessionInfo, PtyTitleResponseSchema, ReactiveContext, ReactiveState, type ReactiveStateOptions, type Requirement, RequirementSchema, type ResolvedCliRunner, type SchemaArtifact, SchemaArtifactSchema, type SchemaDetail, SchemaDetailSchema, type SchemaInfo, SchemaInfoSchema, type SchemaResolution, SchemaResolutionSchema, type Spec, type SpecMeta, SpecSchema, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli, toOpsxDisplayPath };
2950
+ export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsSchema, type ApplyTask, ApplyTaskSchema, type ArchiveMeta, type ArtifactInstructions, ArtifactInstructionsSchema, type ArtifactStatus, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, type Change, type ChangeFile, ChangeFileSchema, type ChangeMeta, ChangeSchema, type ChangeStatus, ChangeStatusSchema, CliExecutor, type CliResult, type CliRunnerAttempt, type CliSniffResult, type CliStreamEvent, type CodeEditorTheme, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, type DashboardCardAvailability, type DashboardConfig, DashboardConfigSchema, type DashboardGitCommitEntry, type DashboardGitDiffStats, type DashboardGitEntry, type DashboardGitSnapshot, type DashboardGitUncommittedEntry, type DashboardGitWorktree, type DashboardMetricKey, type DashboardOverview, type DashboardSummary, type DashboardTrendKind, type DashboardTrendMeta, type DashboardTrendPoint, type DashboardTriColorTrendPoint, type Delta, type DeltaOperation, DeltaOperationType, DeltaSchema, type DeltaSpec, DeltaSpecSchema, type DependencyInfo, DependencyInfoSchema, type ExportSnapshot, type FileChangeEvent, type FileChangeType, MarkdownParser, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, OpsxKernel, type PathCallback, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, PtyAttachMessageSchema, PtyBufferResponseSchema, type PtyClientMessage, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, type PtyPlatform, PtyPlatformSchema, PtyResizeMessageSchema, type PtyServerMessage, PtyServerMessageSchema, type PtySessionInfo, PtyTitleResponseSchema, ReactiveContext, ReactiveState, type ReactiveStateOptions, type Requirement, RequirementSchema, type ResolvedCliRunner, type SchemaArtifact, SchemaArtifactSchema, type SchemaDetail, SchemaDetailSchema, type SchemaInfo, SchemaInfoSchema, type SchemaResolution, SchemaResolutionSchema, type Spec, type SpecMeta, SpecSchema, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli, toOpsxDisplayPath };
package/dist/index.mjs CHANGED
@@ -1364,47 +1364,50 @@ var OpenSpecAdapter = class {
1364
1364
  }
1365
1365
  /**
1366
1366
  * List changes with metadata (id, name, progress, and time info)
1367
- * Only returns changes that have valid proposal.md
1367
+ * Returns every change directory, including schema-specific layouts that
1368
+ * don't use proposal.md/tasks.md.
1368
1369
  * Sorted by updatedAt descending (most recent first)
1369
1370
  */
1370
1371
  async listChangesWithMeta() {
1371
1372
  const ids = await this.listChanges();
1372
1373
  return (await Promise.all(ids.map(async (id) => {
1373
1374
  const change = await this.readChange(id);
1374
- if (!change) return null;
1375
- const proposalPath = join(this.changesDir, id, "proposal.md");
1376
- const timeInfo = await this.getFileTimeInfo(proposalPath);
1375
+ const changeDir = join(this.changesDir, id);
1376
+ const timeInfo = await this.getFileTimeInfo(changeDir);
1377
1377
  return {
1378
1378
  id,
1379
- name: change.name,
1380
- progress: change.progress,
1379
+ name: change?.name ?? id,
1380
+ progress: change?.progress ?? {
1381
+ total: 0,
1382
+ completed: 0
1383
+ },
1381
1384
  createdAt: timeInfo?.createdAt ?? 0,
1382
1385
  updatedAt: timeInfo?.updatedAt ?? 0
1383
1386
  };
1384
- }))).filter((r) => r !== null).sort((a, b) => b.updatedAt - a.updatedAt);
1387
+ }))).sort((a, b) => b.updatedAt - a.updatedAt);
1385
1388
  }
1386
1389
  async listArchivedChanges() {
1387
1390
  return reactiveReadDir(this.archiveDir, { directoriesOnly: true });
1388
1391
  }
1389
1392
  /**
1390
1393
  * List archived changes with metadata and time info
1391
- * Only returns archives that have valid proposal.md
1394
+ * Returns every archive directory, including schema-specific layouts that
1395
+ * don't use proposal.md/tasks.md.
1392
1396
  * Sorted by updatedAt descending (most recent first)
1393
1397
  */
1394
1398
  async listArchivedChangesWithMeta() {
1395
1399
  const ids = await this.listArchivedChanges();
1396
1400
  return (await Promise.all(ids.map(async (id) => {
1397
1401
  const change = await this.readArchivedChange(id);
1398
- if (!change) return null;
1399
- const proposalPath = join(this.archiveDir, id, "proposal.md");
1400
- const timeInfo = await this.getFileTimeInfo(proposalPath);
1402
+ const archiveDir = join(this.archiveDir, id);
1403
+ const timeInfo = await this.getFileTimeInfo(archiveDir);
1401
1404
  return {
1402
1405
  id,
1403
- name: change.name,
1406
+ name: change?.name ?? id,
1404
1407
  createdAt: timeInfo?.createdAt ?? 0,
1405
1408
  updatedAt: timeInfo?.updatedAt ?? 0
1406
1409
  };
1407
- }))).filter((r) => r !== null).sort((a, b) => b.updatedAt - a.updatedAt);
1410
+ }))).sort((a, b) => b.updatedAt - a.updatedAt);
1408
1411
  }
1409
1412
  /**
1410
1413
  * Read project.md content (reactive)
@@ -1958,8 +1961,18 @@ const CURSOR_STYLE_VALUES = [
1958
1961
  "underline",
1959
1962
  "bar"
1960
1963
  ];
1964
+ const CODE_EDITOR_THEME_VALUES = [
1965
+ "github",
1966
+ "material",
1967
+ "vscode",
1968
+ "tokyo",
1969
+ "gruvbox",
1970
+ "monokai",
1971
+ "nord"
1972
+ ];
1961
1973
  const TERMINAL_RENDERER_ENGINE_VALUES = ["xterm", "ghostty"];
1962
1974
  const TerminalRendererEngineSchema = z.enum(TERMINAL_RENDERER_ENGINE_VALUES);
1975
+ const CodeEditorThemeSchema = z.enum(CODE_EDITOR_THEME_VALUES);
1963
1976
  function isTerminalRendererEngine(value) {
1964
1977
  return TERMINAL_RENDERER_ENGINE_VALUES.includes(value);
1965
1978
  }
@@ -2304,6 +2317,7 @@ const TerminalConfigSchema = z.object({
2304
2317
  rendererEngine: z.string().default("xterm")
2305
2318
  });
2306
2319
  const DashboardConfigSchema = z.object({ trendPointLimit: z.number().int().min(20).max(500).default(100) });
2320
+ const CodeEditorConfigSchema = z.object({ theme: CodeEditorThemeSchema.default("github") });
2307
2321
  /**
2308
2322
  * OpenSpecUI 配置 Schema
2309
2323
  *
@@ -2315,6 +2329,7 @@ const OpenSpecUIConfigSchema = z.object({
2315
2329
  args: z.array(z.string()).optional()
2316
2330
  }).default({}),
2317
2331
  theme: z.enum(THEME_VALUES).default("system"),
2332
+ codeEditor: CodeEditorConfigSchema.default(CodeEditorConfigSchema.parse({})),
2318
2333
  terminal: TerminalConfigSchema.default(TerminalConfigSchema.parse({})),
2319
2334
  dashboard: DashboardConfigSchema.default(DashboardConfigSchema.parse({}))
2320
2335
  });
@@ -2322,6 +2337,7 @@ const OpenSpecUIConfigSchema = z.object({
2322
2337
  const DEFAULT_CONFIG = {
2323
2338
  cli: {},
2324
2339
  theme: "system",
2340
+ codeEditor: CodeEditorConfigSchema.parse({}),
2325
2341
  terminal: TerminalConfigSchema.parse({}),
2326
2342
  dashboard: DashboardConfigSchema.parse({})
2327
2343
  };
@@ -2386,6 +2402,10 @@ var ConfigManager = class {
2386
2402
  ...current,
2387
2403
  cli: nextCli,
2388
2404
  theme: config.theme ?? current.theme,
2405
+ codeEditor: {
2406
+ ...current.codeEditor,
2407
+ ...config.codeEditor
2408
+ },
2389
2409
  terminal: {
2390
2410
  ...current.terminal,
2391
2411
  ...config.terminal
@@ -4035,4 +4055,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4035
4055
  ]);
4036
4056
 
4037
4057
  //#endregion
4038
- export { AI_TOOLS, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, MarkdownParser, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SpecSchema, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli, toOpsxDisplayPath };
4058
+ export { AI_TOOLS, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, MarkdownParser, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxKernel, ProjectWatcher, PtyAttachMessageSchema, PtyBufferResponseSchema, PtyClientMessageSchema, PtyCloseMessageSchema, PtyCreateMessageSchema, PtyCreatedResponseSchema, PtyErrorCodeSchema, PtyErrorResponseSchema, PtyExitResponseSchema, PtyInputMessageSchema, PtyListMessageSchema, PtyListResponseSchema, PtyOutputResponseSchema, PtyPlatformSchema, PtyResizeMessageSchema, PtyServerMessageSchema, PtyTitleResponseSchema, ReactiveContext, ReactiveState, RequirementSchema, SchemaArtifactSchema, SchemaDetailSchema, SchemaInfoSchema, SchemaResolutionSchema, SpecSchema, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getProjectWatcher, getToolById, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, sniffGlobalCli, toOpsxDisplayPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openspecui/core",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Core OpenSpec adapter and parser",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",