@openspecui/core 3.0.0 → 3.0.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.
package/dist/index.d.mts CHANGED
@@ -19,13 +19,13 @@ declare const ChangeFileSchema: z.ZodObject<{
19
19
  /** Optional byte size for files */
20
20
  size: z.ZodOptional<z.ZodNumber>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- path: string;
23
22
  type: "file" | "directory";
23
+ path: string;
24
24
  content?: string | undefined;
25
25
  size?: number | undefined;
26
26
  }, {
27
- path: string;
28
27
  type: "file" | "directory";
28
+ path: string;
29
29
  content?: string | undefined;
30
30
  size?: number | undefined;
31
31
  }>;
@@ -1326,8 +1326,11 @@ declare function createFileChangeObservable(watcher: OpenSpecWatcher): {
1326
1326
  //#endregion
1327
1327
  //#region src/config.d.ts
1328
1328
  declare const CODE_EDITOR_THEME_VALUES: readonly ["github", "material", "vscode", "tokyo", "gruvbox", "monokai", "nord"];
1329
+ declare const OPSX_AGENT_INVOCATION_MODE_VALUES: readonly ["compose", "command"];
1329
1330
  declare const TerminalRendererEngineSchema: z.ZodEnum<["xterm", "ghostty"]>;
1330
1331
  type TerminalRendererEngine = z.infer<typeof TerminalRendererEngineSchema>;
1332
+ declare const OpsxAgentInvocationModeSchema: z.ZodEnum<["compose", "command"]>;
1333
+ type OpsxAgentInvocationMode = z.infer<typeof OpsxAgentInvocationModeSchema>;
1331
1334
  declare const CodeEditorThemeSchema: z.ZodEnum<["github", "material", "vscode", "tokyo", "gruvbox", "monokai", "nord"]>;
1332
1335
  type CodeEditorTheme = z.infer<typeof CodeEditorThemeSchema>;
1333
1336
  declare function isTerminalRendererEngine(value: string): value is TerminalRendererEngine;
@@ -1436,6 +1439,14 @@ declare const GitConfigSchema: z.ZodObject<{
1436
1439
  diffEagerLineBudget?: number | undefined;
1437
1440
  }>;
1438
1441
  type GitConfig = z.infer<typeof GitConfigSchema>;
1442
+ declare const OpsxConfigSchema: z.ZodObject<{
1443
+ agentInvocationMode: z.ZodDefault<z.ZodEnum<["compose", "command"]>>;
1444
+ }, "strip", z.ZodTypeAny, {
1445
+ agentInvocationMode: "command" | "compose";
1446
+ }, {
1447
+ agentInvocationMode?: "command" | "compose" | undefined;
1448
+ }>;
1449
+ type OpsxConfig = z.infer<typeof OpsxConfigSchema>;
1439
1450
  /**
1440
1451
  * OpenSpecUI 配置 Schema
1441
1452
  *
@@ -1467,6 +1478,14 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1467
1478
  }>>;
1468
1479
  /** Hosted app 基础 URL(空字符串表示使用官方默认值) */
1469
1480
  appBaseUrl: z.ZodDefault<z.ZodString>;
1481
+ /** OPSX workflow invocation preferences */
1482
+ opsx: z.ZodDefault<z.ZodObject<{
1483
+ agentInvocationMode: z.ZodDefault<z.ZodEnum<["compose", "command"]>>;
1484
+ }, "strip", z.ZodTypeAny, {
1485
+ agentInvocationMode: "command" | "compose";
1486
+ }, {
1487
+ agentInvocationMode?: "command" | "compose" | undefined;
1488
+ }>>;
1470
1489
  /** 终端配置 */
1471
1490
  terminal: z.ZodDefault<z.ZodObject<{
1472
1491
  fontSize: z.ZodDefault<z.ZodNumber>;
@@ -1516,6 +1535,9 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1516
1535
  theme: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord";
1517
1536
  };
1518
1537
  appBaseUrl: string;
1538
+ opsx: {
1539
+ agentInvocationMode: "command" | "compose";
1540
+ };
1519
1541
  terminal: {
1520
1542
  fontSize: number;
1521
1543
  fontFamily: string;
@@ -1540,6 +1562,9 @@ declare const OpenSpecUIConfigSchema: z.ZodObject<{
1540
1562
  theme?: "github" | "material" | "vscode" | "tokyo" | "gruvbox" | "monokai" | "nord" | undefined;
1541
1563
  } | undefined;
1542
1564
  appBaseUrl?: string | undefined;
1565
+ opsx?: {
1566
+ agentInvocationMode?: "command" | "compose" | undefined;
1567
+ } | undefined;
1543
1568
  terminal?: {
1544
1569
  fontSize?: number | undefined;
1545
1570
  fontFamily?: string | undefined;
@@ -1564,6 +1589,7 @@ type OpenSpecUIConfigUpdate = {
1564
1589
  theme?: OpenSpecUIConfig['theme'];
1565
1590
  codeEditor?: Partial<OpenSpecUIConfig['codeEditor']>;
1566
1591
  appBaseUrl?: OpenSpecUIConfig['appBaseUrl'];
1592
+ opsx?: Partial<OpsxConfig>;
1567
1593
  terminal?: Partial<TerminalConfig>;
1568
1594
  dashboard?: Partial<DashboardConfig>;
1569
1595
  git?: Partial<GitConfig>;
@@ -1957,14 +1983,14 @@ declare const ArtifactStatusSchema: z.ZodObject<{
1957
1983
  missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1958
1984
  relativePath: z.ZodOptional<z.ZodString>;
1959
1985
  }, "strip", z.ZodTypeAny, {
1960
- id: string;
1961
1986
  status: "done" | "ready" | "blocked";
1987
+ id: string;
1962
1988
  outputPath: string;
1963
1989
  missingDeps?: string[] | undefined;
1964
1990
  relativePath?: string | undefined;
1965
1991
  }, {
1966
- id: string;
1967
1992
  status: "done" | "ready" | "blocked";
1993
+ id: string;
1968
1994
  outputPath: string;
1969
1995
  missingDeps?: string[] | undefined;
1970
1996
  relativePath?: string | undefined;
@@ -1982,14 +2008,14 @@ declare const ChangeStatusSchema: z.ZodObject<{
1982
2008
  missingDeps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1983
2009
  relativePath: z.ZodOptional<z.ZodString>;
1984
2010
  }, "strip", z.ZodTypeAny, {
1985
- id: string;
1986
2011
  status: "done" | "ready" | "blocked";
2012
+ id: string;
1987
2013
  outputPath: string;
1988
2014
  missingDeps?: string[] | undefined;
1989
2015
  relativePath?: string | undefined;
1990
2016
  }, {
1991
- id: string;
1992
2017
  status: "done" | "ready" | "blocked";
2018
+ id: string;
1993
2019
  outputPath: string;
1994
2020
  missingDeps?: string[] | undefined;
1995
2021
  relativePath?: string | undefined;
@@ -2000,8 +2026,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
2000
2026
  isComplete: boolean;
2001
2027
  applyRequires: string[];
2002
2028
  artifacts: {
2003
- id: string;
2004
2029
  status: "done" | "ready" | "blocked";
2030
+ id: string;
2005
2031
  outputPath: string;
2006
2032
  missingDeps?: string[] | undefined;
2007
2033
  relativePath?: string | undefined;
@@ -2012,8 +2038,8 @@ declare const ChangeStatusSchema: z.ZodObject<{
2012
2038
  isComplete: boolean;
2013
2039
  applyRequires: string[];
2014
2040
  artifacts: {
2015
- id: string;
2016
2041
  status: "done" | "ready" | "blocked";
2042
+ id: string;
2017
2043
  outputPath: string;
2018
2044
  missingDeps?: string[] | undefined;
2019
2045
  relativePath?: string | undefined;
@@ -2026,13 +2052,13 @@ declare const DependencyInfoSchema: z.ZodObject<{
2026
2052
  path: z.ZodString;
2027
2053
  description: z.ZodString;
2028
2054
  }, "strip", z.ZodTypeAny, {
2029
- id: string;
2030
2055
  path: string;
2056
+ id: string;
2031
2057
  description: string;
2032
2058
  done: boolean;
2033
2059
  }, {
2034
- id: string;
2035
2060
  path: string;
2061
+ id: string;
2036
2062
  description: string;
2037
2063
  done: boolean;
2038
2064
  }>;
@@ -2141,13 +2167,13 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2141
2167
  path: z.ZodString;
2142
2168
  description: z.ZodString;
2143
2169
  }, "strip", z.ZodTypeAny, {
2144
- id: string;
2145
2170
  path: string;
2171
+ id: string;
2146
2172
  description: string;
2147
2173
  done: boolean;
2148
2174
  }, {
2149
- id: string;
2150
2175
  path: string;
2176
+ id: string;
2151
2177
  description: string;
2152
2178
  done: boolean;
2153
2179
  }>, "many">;
@@ -2161,8 +2187,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2161
2187
  artifactId: string;
2162
2188
  template: string;
2163
2189
  dependencies: {
2164
- id: string;
2165
2190
  path: string;
2191
+ id: string;
2166
2192
  description: string;
2167
2193
  done: boolean;
2168
2194
  }[];
@@ -2179,8 +2205,8 @@ declare const ArtifactInstructionsSchema: z.ZodObject<{
2179
2205
  artifactId: string;
2180
2206
  template: string;
2181
2207
  dependencies: {
2182
- id: string;
2183
2208
  path: string;
2209
+ id: string;
2184
2210
  description: string;
2185
2211
  done: boolean;
2186
2212
  }[];
@@ -2226,8 +2252,8 @@ declare const SchemaResolutionSchema: z.ZodObject<{
2226
2252
  displayPath?: string | undefined;
2227
2253
  }>, "many">;
2228
2254
  }, "strip", z.ZodTypeAny, {
2229
- name: string;
2230
2255
  path: string;
2256
+ name: string;
2231
2257
  source: "project" | "user" | "package";
2232
2258
  shadows: {
2233
2259
  path: string;
@@ -2236,8 +2262,8 @@ declare const SchemaResolutionSchema: z.ZodObject<{
2236
2262
  }[];
2237
2263
  displayPath?: string | undefined;
2238
2264
  }, {
2239
- name: string;
2240
2265
  path: string;
2266
+ name: string;
2241
2267
  source: "project" | "user" | "package";
2242
2268
  shadows: {
2243
2269
  path: string;
@@ -2666,22 +2692,22 @@ declare const PtySessionInfoSchema: z.ZodObject<{
2666
2692
  closeTip: z.ZodOptional<z.ZodString>;
2667
2693
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2668
2694
  }, "strip", z.ZodTypeAny, {
2669
- id: string;
2670
2695
  command: string;
2671
2696
  args: string[];
2672
2697
  platform: "windows" | "macos" | "common";
2673
2698
  exitCode: number | null;
2674
2699
  title: string;
2700
+ id: string;
2675
2701
  isExited: boolean;
2676
2702
  closeTip?: string | undefined;
2677
2703
  closeCallbackUrl?: string | Record<string, string> | undefined;
2678
2704
  }, {
2679
- id: string;
2680
2705
  command: string;
2681
2706
  args: string[];
2682
2707
  platform: "windows" | "macos" | "common";
2683
2708
  exitCode: number | null;
2684
2709
  title: string;
2710
+ id: string;
2685
2711
  isExited: boolean;
2686
2712
  closeTip?: string | undefined;
2687
2713
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2698,19 +2724,19 @@ declare const PtyCreateMessageSchema: z.ZodObject<{
2698
2724
  }, "strip", z.ZodTypeAny, {
2699
2725
  type: "create";
2700
2726
  requestId: string;
2701
- command?: string | undefined;
2702
- args?: string[] | undefined;
2703
2727
  cols?: number | undefined;
2704
2728
  rows?: number | undefined;
2729
+ command?: string | undefined;
2730
+ args?: string[] | undefined;
2705
2731
  closeTip?: string | undefined;
2706
2732
  closeCallbackUrl?: string | Record<string, string> | undefined;
2707
2733
  }, {
2708
2734
  type: "create";
2709
2735
  requestId: string;
2710
- command?: string | undefined;
2711
- args?: string[] | undefined;
2712
2736
  cols?: number | undefined;
2713
2737
  rows?: number | undefined;
2738
+ command?: string | undefined;
2739
+ args?: string[] | undefined;
2714
2740
  closeTip?: string | undefined;
2715
2741
  closeCallbackUrl?: string | Record<string, string> | undefined;
2716
2742
  }>;
@@ -2788,19 +2814,19 @@ declare const PtyClientMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
2788
2814
  }, "strip", z.ZodTypeAny, {
2789
2815
  type: "create";
2790
2816
  requestId: string;
2791
- command?: string | undefined;
2792
- args?: string[] | undefined;
2793
2817
  cols?: number | undefined;
2794
2818
  rows?: number | undefined;
2819
+ command?: string | undefined;
2820
+ args?: string[] | undefined;
2795
2821
  closeTip?: string | undefined;
2796
2822
  closeCallbackUrl?: string | Record<string, string> | undefined;
2797
2823
  }, {
2798
2824
  type: "create";
2799
2825
  requestId: string;
2800
- command?: string | undefined;
2801
- args?: string[] | undefined;
2802
2826
  cols?: number | undefined;
2803
2827
  rows?: number | undefined;
2828
+ command?: string | undefined;
2829
+ args?: string[] | undefined;
2804
2830
  closeTip?: string | undefined;
2805
2831
  closeCallbackUrl?: string | Record<string, string> | undefined;
2806
2832
  }>, z.ZodObject<{
@@ -2942,22 +2968,22 @@ declare const PtyListResponseSchema: z.ZodObject<{
2942
2968
  closeTip: z.ZodOptional<z.ZodString>;
2943
2969
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
2944
2970
  }, "strip", z.ZodTypeAny, {
2945
- id: string;
2946
2971
  command: string;
2947
2972
  args: string[];
2948
2973
  platform: "windows" | "macos" | "common";
2949
2974
  exitCode: number | null;
2950
2975
  title: string;
2976
+ id: string;
2951
2977
  isExited: boolean;
2952
2978
  closeTip?: string | undefined;
2953
2979
  closeCallbackUrl?: string | Record<string, string> | undefined;
2954
2980
  }, {
2955
- id: string;
2956
2981
  command: string;
2957
2982
  args: string[];
2958
2983
  platform: "windows" | "macos" | "common";
2959
2984
  exitCode: number | null;
2960
2985
  title: string;
2986
+ id: string;
2961
2987
  isExited: boolean;
2962
2988
  closeTip?: string | undefined;
2963
2989
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2965,12 +2991,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2965
2991
  }, "strip", z.ZodTypeAny, {
2966
2992
  type: "list";
2967
2993
  sessions: {
2968
- id: string;
2969
2994
  command: string;
2970
2995
  args: string[];
2971
2996
  platform: "windows" | "macos" | "common";
2972
2997
  exitCode: number | null;
2973
2998
  title: string;
2999
+ id: string;
2974
3000
  isExited: boolean;
2975
3001
  closeTip?: string | undefined;
2976
3002
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2978,12 +3004,12 @@ declare const PtyListResponseSchema: z.ZodObject<{
2978
3004
  }, {
2979
3005
  type: "list";
2980
3006
  sessions: {
2981
- id: string;
2982
3007
  command: string;
2983
3008
  args: string[];
2984
3009
  platform: "windows" | "macos" | "common";
2985
3010
  exitCode: number | null;
2986
3011
  title: string;
3012
+ id: string;
2987
3013
  isExited: boolean;
2988
3014
  closeTip?: string | undefined;
2989
3015
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -2996,14 +3022,14 @@ declare const PtyErrorResponseSchema: z.ZodObject<{
2996
3022
  message: z.ZodString;
2997
3023
  sessionId: z.ZodOptional<z.ZodString>;
2998
3024
  }, "strip", z.ZodTypeAny, {
3025
+ type: "error";
2999
3026
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
3000
3027
  message: string;
3001
- type: "error";
3002
3028
  sessionId?: string | undefined;
3003
3029
  }, {
3030
+ type: "error";
3004
3031
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
3005
3032
  message: string;
3006
- type: "error";
3007
3033
  sessionId?: string | undefined;
3008
3034
  }>;
3009
3035
  declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -3082,22 +3108,22 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3082
3108
  closeTip: z.ZodOptional<z.ZodString>;
3083
3109
  closeCallbackUrl: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>]>>;
3084
3110
  }, "strip", z.ZodTypeAny, {
3085
- id: string;
3086
3111
  command: string;
3087
3112
  args: string[];
3088
3113
  platform: "windows" | "macos" | "common";
3089
3114
  exitCode: number | null;
3090
3115
  title: string;
3116
+ id: string;
3091
3117
  isExited: boolean;
3092
3118
  closeTip?: string | undefined;
3093
3119
  closeCallbackUrl?: string | Record<string, string> | undefined;
3094
3120
  }, {
3095
- id: string;
3096
3121
  command: string;
3097
3122
  args: string[];
3098
3123
  platform: "windows" | "macos" | "common";
3099
3124
  exitCode: number | null;
3100
3125
  title: string;
3126
+ id: string;
3101
3127
  isExited: boolean;
3102
3128
  closeTip?: string | undefined;
3103
3129
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3105,12 +3131,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3105
3131
  }, "strip", z.ZodTypeAny, {
3106
3132
  type: "list";
3107
3133
  sessions: {
3108
- id: string;
3109
3134
  command: string;
3110
3135
  args: string[];
3111
3136
  platform: "windows" | "macos" | "common";
3112
3137
  exitCode: number | null;
3113
3138
  title: string;
3139
+ id: string;
3114
3140
  isExited: boolean;
3115
3141
  closeTip?: string | undefined;
3116
3142
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3118,12 +3144,12 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3118
3144
  }, {
3119
3145
  type: "list";
3120
3146
  sessions: {
3121
- id: string;
3122
3147
  command: string;
3123
3148
  args: string[];
3124
3149
  platform: "windows" | "macos" | "common";
3125
3150
  exitCode: number | null;
3126
3151
  title: string;
3152
+ id: string;
3127
3153
  isExited: boolean;
3128
3154
  closeTip?: string | undefined;
3129
3155
  closeCallbackUrl?: string | Record<string, string> | undefined;
@@ -3134,14 +3160,14 @@ declare const PtyServerMessageSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObje
3134
3160
  message: z.ZodString;
3135
3161
  sessionId: z.ZodOptional<z.ZodString>;
3136
3162
  }, "strip", z.ZodTypeAny, {
3163
+ type: "error";
3137
3164
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
3138
3165
  message: string;
3139
- type: "error";
3140
3166
  sessionId?: string | undefined;
3141
3167
  }, {
3168
+ type: "error";
3142
3169
  code: "INVALID_JSON" | "INVALID_MESSAGE" | "SESSION_NOT_FOUND" | "PTY_CREATE_FAILED";
3143
3170
  message: string;
3144
- type: "error";
3145
3171
  sessionId?: string | undefined;
3146
3172
  }>]>;
3147
3173
  type PtyClientMessage = z.infer<typeof PtyClientMessageSchema>;
@@ -3149,4 +3175,4 @@ type PtyServerMessage = z.infer<typeof PtyServerMessageSchema>;
3149
3175
  type PtySessionInfo = z.infer<typeof PtySessionInfoSchema>;
3150
3176
  type PtyPlatform = z.infer<typeof PtyPlatformSchema>;
3151
3177
  //#endregion
3152
- export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsContextFilesSchema, 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, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, 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, type GitConfig, GitConfigSchema, type GitEntriesPage, type GitEntryCursor, type GitEntryDetail, type GitEntryFileDiff, type GitEntryFilePatch, type GitEntryFileSource, type GitEntryFileSummary, type GitEntryFiles, type GitEntryPatch, type GitEntrySelector, type GitEntryShell, type GitFileChangeType, type GitPatchFile, type GitPatchState, type GitWorktreeHandoff, type GitWorktreeOverview, type GitWorktreeSummary, type HostedAppChannelKind, type HostedAppChannelManifest, type HostedAppCompatibilityEntry, type HostedAppVersionManifest, type HostedBackendHealthResponse, MarkdownParser, OFFICIAL_APP_BASE_URL, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, OpsxKernel, type PathCallback, type ProjectRecoveryStatus, type ProjectResidencyEvictionReason, type ProjectResidencyStatus, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, type ProjectWatcherRuntimeStatusListener, 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, TOOL_WORKFLOW_TO_SKILL_DIR, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, type ToolInitDelivery, type ToolInitState, type ToolInitStatus, type ToolWorkflowId, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
3178
+ export { type AIToolOption, AI_TOOLS, type ApplyInstructions, ApplyInstructionsContextFilesSchema, 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, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, 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, type GitConfig, GitConfigSchema, type GitEntriesPage, type GitEntryCursor, type GitEntryDetail, type GitEntryFileDiff, type GitEntryFilePatch, type GitEntryFileSource, type GitEntryFileSummary, type GitEntryFiles, type GitEntryPatch, type GitEntrySelector, type GitEntryShell, type GitFileChangeType, type GitPatchFile, type GitPatchState, type GitWorktreeHandoff, type GitWorktreeOverview, type GitWorktreeSummary, type HostedAppChannelKind, type HostedAppChannelManifest, type HostedAppCompatibilityEntry, type HostedAppVersionManifest, type HostedBackendHealthResponse, MarkdownParser, OFFICIAL_APP_BASE_URL, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, type OpenSpecUIConfig, OpenSpecUIConfigSchema, type OpenSpecUIConfigUpdate, OpenSpecWatcher, type OpsxAgentInvocationMode, OpsxAgentInvocationModeSchema, type OpsxConfig, OpsxConfigSchema, OpsxKernel, type PathCallback, type ProjectRecoveryStatus, type ProjectResidencyEvictionReason, type ProjectResidencyStatus, ProjectWatcher, type ProjectWatcherReinitializeReason, type ProjectWatcherRuntimeStatus, type ProjectWatcherRuntimeStatusListener, 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, TOOL_WORKFLOW_TO_SKILL_DIR, type Task, TaskSchema, type TemplateContentMap, type TemplatesMap, TemplatesSchema, type TerminalConfig, TerminalConfigSchema, type TerminalRendererEngine, TerminalRendererEngineSchema, type ToolConfig, type ToolInitDelivery, type ToolInitState, type ToolInitStatus, type ToolWorkflowId, VIRTUAL_PROJECT_DIRNAME, type ValidationIssue, type ValidationResult, Validator, type WatchEvent, type WatchEventType, type WatcherRuntimeStatus, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
package/dist/index.mjs CHANGED
@@ -2117,7 +2117,9 @@ const CODE_EDITOR_THEME_VALUES = [
2117
2117
  "nord"
2118
2118
  ];
2119
2119
  const TERMINAL_RENDERER_ENGINE_VALUES = ["xterm", "ghostty"];
2120
+ const OPSX_AGENT_INVOCATION_MODE_VALUES = ["compose", "command"];
2120
2121
  const TerminalRendererEngineSchema = z.enum(TERMINAL_RENDERER_ENGINE_VALUES);
2122
+ const OpsxAgentInvocationModeSchema = z.enum(OPSX_AGENT_INVOCATION_MODE_VALUES);
2121
2123
  const CodeEditorThemeSchema = z.enum(CODE_EDITOR_THEME_VALUES);
2122
2124
  function isTerminalRendererEngine(value) {
2123
2125
  return TERMINAL_RENDERER_ENGINE_VALUES.includes(value);
@@ -2495,6 +2497,7 @@ const DashboardConfigSchema = z.object({ trendPointLimit: z.number().int().min(2
2495
2497
  const DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET = 1e3;
2496
2498
  const GitConfigSchema = z.object({ diffEagerLineBudget: z.number().int().min(0).max(2e5).default(DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET) });
2497
2499
  const CodeEditorConfigSchema = z.object({ theme: CodeEditorThemeSchema.default("github") });
2500
+ const OpsxConfigSchema = z.object({ agentInvocationMode: OpsxAgentInvocationModeSchema.default("compose") });
2498
2501
  /**
2499
2502
  * OpenSpecUI 配置 Schema
2500
2503
  *
@@ -2508,6 +2511,7 @@ const OpenSpecUIConfigSchema = z.object({
2508
2511
  theme: z.enum(THEME_VALUES).default("system"),
2509
2512
  codeEditor: CodeEditorConfigSchema.default(CodeEditorConfigSchema.parse({})),
2510
2513
  appBaseUrl: z.string().default(""),
2514
+ opsx: OpsxConfigSchema.default(OpsxConfigSchema.parse({})),
2511
2515
  terminal: TerminalConfigSchema.default(TerminalConfigSchema.parse({})),
2512
2516
  dashboard: DashboardConfigSchema.default(DashboardConfigSchema.parse({})),
2513
2517
  git: GitConfigSchema.default(GitConfigSchema.parse({}))
@@ -2518,6 +2522,7 @@ const DEFAULT_CONFIG = {
2518
2522
  theme: "system",
2519
2523
  codeEditor: CodeEditorConfigSchema.parse({}),
2520
2524
  appBaseUrl: "",
2525
+ opsx: OpsxConfigSchema.parse({}),
2521
2526
  terminal: TerminalConfigSchema.parse({}),
2522
2527
  dashboard: DashboardConfigSchema.parse({}),
2523
2528
  git: GitConfigSchema.parse({})
@@ -2560,6 +2565,9 @@ function toPersistedConfig(config, options = {}) {
2560
2565
  if (config.codeEditor.theme !== DEFAULT_CONFIG.codeEditor.theme) codeEditor.theme = config.codeEditor.theme;
2561
2566
  if (hasOwnEntries(codeEditor)) persisted.codeEditor = codeEditor;
2562
2567
  if (config.appBaseUrl !== DEFAULT_CONFIG.appBaseUrl) persisted.appBaseUrl = config.appBaseUrl;
2568
+ const opsx = {};
2569
+ if (config.opsx.agentInvocationMode !== DEFAULT_CONFIG.opsx.agentInvocationMode) opsx.agentInvocationMode = config.opsx.agentInvocationMode;
2570
+ if (hasOwnEntries(opsx)) persisted.opsx = opsx;
2563
2571
  const terminal = {};
2564
2572
  if (config.terminal.fontSize !== DEFAULT_CONFIG.terminal.fontSize) terminal.fontSize = config.terminal.fontSize;
2565
2573
  if (config.terminal.fontFamily !== DEFAULT_CONFIG.terminal.fontFamily) terminal.fontFamily = config.terminal.fontFamily;
@@ -2653,6 +2661,10 @@ var ConfigManager = class {
2653
2661
  ...config.codeEditor
2654
2662
  },
2655
2663
  appBaseUrl: config.appBaseUrl ?? current.appBaseUrl,
2664
+ opsx: {
2665
+ ...current.opsx,
2666
+ ...config.opsx
2667
+ },
2656
2668
  terminal: {
2657
2669
  ...current.terminal,
2658
2670
  ...config.terminal
@@ -4575,4 +4587,4 @@ const PtyServerMessageSchema = z.discriminatedUnion("type", [
4575
4587
  ]);
4576
4588
 
4577
4589
  //#endregion
4578
- export { AI_TOOLS, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, GitConfigSchema, MarkdownParser, OFFICIAL_APP_BASE_URL, 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, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
4590
+ export { AI_TOOLS, ApplyInstructionsContextFilesSchema, ApplyInstructionsSchema, ApplyTaskSchema, ArtifactInstructionsSchema, ArtifactStatusSchema, CODE_EDITOR_THEME_VALUES, ChangeFileSchema, ChangeSchema, ChangeStatusSchema, CliExecutor, CodeEditorThemeSchema, ConfigManager, DASHBOARD_METRIC_KEYS, DEFAULT_CONFIG, DEFAULT_GIT_DIFF_EAGER_LINE_BUDGET, DashboardConfigSchema, DeltaOperationType, DeltaSchema, DeltaSpecSchema, DependencyInfoSchema, GitConfigSchema, MarkdownParser, OFFICIAL_APP_BASE_URL, OPSX_AGENT_INVOCATION_MODE_VALUES, OpenSpecAdapter, OpenSpecUIConfigSchema, OpenSpecWatcher, OpsxAgentInvocationModeSchema, OpsxConfigSchema, 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, TOOL_WORKFLOW_TO_SKILL_DIR, TaskSchema, TemplatesSchema, TerminalConfigSchema, TerminalRendererEngineSchema, VIRTUAL_PROJECT_DIRNAME, Validator, acquireWatcher, buildCliRunnerCandidates, buildHostedLaunchUrl, buildHostedVersionManifestUrl, clearCache, closeAllProjectWatchers, closeAllWatchers, contextStorage, createCleanCliEnv, createFileChangeObservable, getActiveWatcherCount, getAllToolIds, getAllTools, getAvailableToolIds, getAvailableTools, getCacheSize, getConfiguredTools, getDefaultCliCommand, getDefaultCliCommandString, getDetectedProjectTools, getProjectWatcher, getToolById, getToolInitStates, getWatchedProjectDir, getWatcherRuntimeStatus, initWatcherPool, isGlobPattern, isHostedAppVersionManifest, isHostedBackendHealthResponse, isTerminalRendererEngine, isToolConfigured, isWatcherPoolInitialized, normalizeHostedAppBaseUrl, parseCliCommand, reactiveExists, reactiveReadDir, reactiveReadFile, reactiveStat, resolveHostedAppBaseUrl, resolveHostedChannelForVersion, sniffGlobalCli, subscribeWatcherRuntimeStatus, toOpsxDisplayPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openspecui/core",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Core OpenSpec adapter and parser",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",