@x-otto/setting 0.0.1-alpha.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.
- package/README.md +98 -0
- package/dist/index.d.ts +2047 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2047 @@
|
|
|
1
|
+
import { PERMISSION_MODES, PermissionMode, PermissionPolicySetting, PermissionRuleConfig } from "@x-otto/hook-contracts";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { TypedEventEmitter } from "@x-otto/shared";
|
|
4
|
+
import { AgentProfile } from "@x-otto/prompt";
|
|
5
|
+
|
|
6
|
+
//#region src/store.d.ts
|
|
7
|
+
type StorageType = 'memory' | 'file';
|
|
8
|
+
interface SettingStore {
|
|
9
|
+
readonly type: StorageType;
|
|
10
|
+
read(path: string): Promise<string | undefined>;
|
|
11
|
+
write(path: string, config: Partial<Setting>): Promise<void>;
|
|
12
|
+
exists(path: string): Promise<boolean>;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/constants.d.ts
|
|
16
|
+
declare const TOOL_PRESETS: readonly ["minimal", "standard", "full"];
|
|
17
|
+
type ToolPreset = (typeof TOOL_PRESETS)[number];
|
|
18
|
+
declare const LOG_LEVELS: readonly ["trace", "debug", "info", "warn", "error", "fatal"];
|
|
19
|
+
type LogLevel = (typeof LOG_LEVELS)[number];
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/schema.d.ts
|
|
22
|
+
declare const agentOptionsSchema: z.ZodObject<{
|
|
23
|
+
model: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
24
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
25
|
+
system_prompt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
26
|
+
tools: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
27
|
+
capabilities: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
28
|
+
categories: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
29
|
+
default_workflow_slot: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
normal: "normal";
|
|
31
|
+
thinking: "thinking";
|
|
32
|
+
compact: "compact";
|
|
33
|
+
critique: "critique";
|
|
34
|
+
vision: "vision";
|
|
35
|
+
}>>>;
|
|
36
|
+
max_tool_turns: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
37
|
+
max_tool_turn_extensions: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
38
|
+
prompt_output_token_budget: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
39
|
+
prompt_wall_clock_budget_ms: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
40
|
+
session_cost_budget_usd: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
41
|
+
stall_detection: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
42
|
+
window_turns: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
43
|
+
repeat_threshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
+
}, z.core.$strip>]>>>;
|
|
45
|
+
temperature: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
46
|
+
max_tokens: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
47
|
+
disabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
declare const categoryConfigSchema: z.ZodObject<{
|
|
50
|
+
preferred_models: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
51
|
+
default_model: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
/** 会话结束后自动抽取跨会话经验(operational-learning)。默认关,灰度后再放开。 */
|
|
54
|
+
declare const notificationConfigSchema: z.ZodObject<{
|
|
55
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
56
|
+
sound: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
57
|
+
on_completion: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
58
|
+
on_error: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
59
|
+
on_idle: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
60
|
+
channel: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
61
|
+
disabled: "disabled";
|
|
62
|
+
auto: "auto";
|
|
63
|
+
terminal_bell: "terminal_bell";
|
|
64
|
+
iterm2: "iterm2";
|
|
65
|
+
iterm2_with_bell: "iterm2_with_bell";
|
|
66
|
+
kitty: "kitty";
|
|
67
|
+
ghostty: "ghostty";
|
|
68
|
+
}>>>;
|
|
69
|
+
condition: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
unfocused: "unfocused";
|
|
71
|
+
always: "always";
|
|
72
|
+
}>>>;
|
|
73
|
+
idle_threshold_ms: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
74
|
+
command: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
/**
|
|
77
|
+
* RFC-208 §2.5:满意度脉冲调查触发/开关配置。`sink` 当前仅 `'local'` 合法(预留后续
|
|
78
|
+
* 扩展点,非法值 fallback 到 'local' 并 warn;RFC-209 M2 迁移后见
|
|
79
|
+
* extensions/plugin-feedback/src/pulse-survey-sink.ts 的 resolvePulseSurveySink)。
|
|
80
|
+
*/
|
|
81
|
+
declare const externalHistoryConfigSchema: z.ZodObject<{
|
|
82
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
83
|
+
maxEntries: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
84
|
+
sources: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
85
|
+
id: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
86
|
+
path: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
87
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
88
|
+
}, z.core.$strip>>>>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
declare const historyConfigSchema: z.ZodObject<{
|
|
91
|
+
external: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
92
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
93
|
+
maxEntries: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
94
|
+
sources: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
95
|
+
id: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
96
|
+
path: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
97
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
98
|
+
}, z.core.$strip>>>>;
|
|
99
|
+
}, z.core.$strip>>>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
declare const sandboxConfigSchema: z.ZodObject<{
|
|
102
|
+
enabled: z.ZodBoolean;
|
|
103
|
+
network: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
104
|
+
allow: "allow";
|
|
105
|
+
deny: "deny";
|
|
106
|
+
}>>>;
|
|
107
|
+
writablePaths: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
108
|
+
protectCredentials: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
109
|
+
autoAllowBashIfSandboxed: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
declare const proxyConfigSchema: z.ZodObject<{
|
|
112
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
113
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
declare const mcpServerSettingSchema: z.ZodObject<{
|
|
116
|
+
command: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
117
|
+
args: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
118
|
+
env: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
119
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
120
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
121
|
+
stdio: "stdio";
|
|
122
|
+
sse: "sse";
|
|
123
|
+
http: "http";
|
|
124
|
+
}>>>;
|
|
125
|
+
headers: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
126
|
+
requestTimeoutMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
127
|
+
autoReconnect: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
128
|
+
disabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
/**
|
|
131
|
+
* RFC-036 @ 面板「最近使用」条目快照(MRU,最多 5 条)——`/model` `recent_models` 同款
|
|
132
|
+
* 持久化模式的推广:不止模型,@ 面板选中的任意 sigil 条目(文件/agent/skill/mcp/…)
|
|
133
|
+
* 都计入。只持久化渲染所需的最小字段(label/value/kind/description),不持久化
|
|
134
|
+
* `preview`(@file 首屏预览,体积大且易过期,SigilPane 消费 recent 条目时按需重新拉取)。
|
|
135
|
+
*/
|
|
136
|
+
/**
|
|
137
|
+
* 已安装插件的权威清单条目(RFC-219 D1)。**逻辑记录**,与文件系统 symlink(物化形态)
|
|
138
|
+
* 分离——安装/卸载时写入/移除,不与磁盘状态做自动双向纠正(不一致时告警引导用户修复,
|
|
139
|
+
* 见 discoverPlugins 消费方)。
|
|
140
|
+
*/
|
|
141
|
+
declare const installedPluginEntrySchema: z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
source: z.ZodEnum<{
|
|
144
|
+
url: "url";
|
|
145
|
+
npm: "npm";
|
|
146
|
+
dir: "dir";
|
|
147
|
+
git: "git";
|
|
148
|
+
}>;
|
|
149
|
+
sourceSpec: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
150
|
+
installedAt: z.ZodNumber;
|
|
151
|
+
version: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
152
|
+
scope: z.ZodEnum<{
|
|
153
|
+
global: "global";
|
|
154
|
+
project: "project";
|
|
155
|
+
repository: "repository";
|
|
156
|
+
}>;
|
|
157
|
+
capabilities: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
declare const recentMentionEntrySchema: z.ZodObject<{
|
|
160
|
+
label: z.ZodString;
|
|
161
|
+
value: z.ZodString;
|
|
162
|
+
kind: z.ZodEnum<{
|
|
163
|
+
model: "model";
|
|
164
|
+
file: "file";
|
|
165
|
+
hashtag: "hashtag";
|
|
166
|
+
person: "person";
|
|
167
|
+
agent: "agent";
|
|
168
|
+
skill: "skill";
|
|
169
|
+
mcp: "mcp";
|
|
170
|
+
plugin: "plugin";
|
|
171
|
+
resource: "resource";
|
|
172
|
+
shortcut: "shortcut";
|
|
173
|
+
}>;
|
|
174
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
declare const themeColorRoleSchema: z.ZodEnum<{
|
|
177
|
+
success: "success";
|
|
178
|
+
error: "error";
|
|
179
|
+
text: "text";
|
|
180
|
+
brand: "brand";
|
|
181
|
+
brandShimmer: "brandShimmer";
|
|
182
|
+
accent: "accent";
|
|
183
|
+
accentDim: "accentDim";
|
|
184
|
+
accentBright: "accentBright";
|
|
185
|
+
inactive: "inactive";
|
|
186
|
+
secondary: "secondary";
|
|
187
|
+
subtle: "subtle";
|
|
188
|
+
replyPrefix: "replyPrefix";
|
|
189
|
+
warning: "warning";
|
|
190
|
+
special: "special";
|
|
191
|
+
suggestion: "suggestion";
|
|
192
|
+
permission: "permission";
|
|
193
|
+
codeText: "codeText";
|
|
194
|
+
diffAdd: "diffAdd";
|
|
195
|
+
diffRemove: "diffRemove";
|
|
196
|
+
diffAddBg: "diffAddBg";
|
|
197
|
+
diffRemoveBg: "diffRemoveBg";
|
|
198
|
+
panelBorder: "panelBorder";
|
|
199
|
+
overlayBg: "overlayBg";
|
|
200
|
+
tagBg: "tagBg";
|
|
201
|
+
toolText: "toolText";
|
|
202
|
+
focusBorder: "focusBorder";
|
|
203
|
+
selection: "selection";
|
|
204
|
+
}>;
|
|
205
|
+
/**
|
|
206
|
+
* RFC-277 D3:`MarkdownThemeOverrides` 的 settings 镜像——严格 schema,字段集合与
|
|
207
|
+
* `packages/tui/src/theme/theme-registry.ts` 的 `MarkdownThemeOverrides` 接口手动同步
|
|
208
|
+
* (镜像漂移由跨包类型测试钉死,见 schema.test.ts)。`listMarkers` 需四个非空字符串
|
|
209
|
+
* (单宽校验在渲染层 `resolveMarkdownTypographyTheme` 做,这里只保证类型形状)。
|
|
210
|
+
*/
|
|
211
|
+
declare const markdownThemeOverridesSchema: z.ZodObject<{
|
|
212
|
+
heading1: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
success: "success";
|
|
214
|
+
error: "error";
|
|
215
|
+
text: "text";
|
|
216
|
+
brand: "brand";
|
|
217
|
+
brandShimmer: "brandShimmer";
|
|
218
|
+
accent: "accent";
|
|
219
|
+
accentDim: "accentDim";
|
|
220
|
+
accentBright: "accentBright";
|
|
221
|
+
inactive: "inactive";
|
|
222
|
+
secondary: "secondary";
|
|
223
|
+
subtle: "subtle";
|
|
224
|
+
replyPrefix: "replyPrefix";
|
|
225
|
+
warning: "warning";
|
|
226
|
+
special: "special";
|
|
227
|
+
suggestion: "suggestion";
|
|
228
|
+
permission: "permission";
|
|
229
|
+
codeText: "codeText";
|
|
230
|
+
diffAdd: "diffAdd";
|
|
231
|
+
diffRemove: "diffRemove";
|
|
232
|
+
diffAddBg: "diffAddBg";
|
|
233
|
+
diffRemoveBg: "diffRemoveBg";
|
|
234
|
+
panelBorder: "panelBorder";
|
|
235
|
+
overlayBg: "overlayBg";
|
|
236
|
+
tagBg: "tagBg";
|
|
237
|
+
toolText: "toolText";
|
|
238
|
+
focusBorder: "focusBorder";
|
|
239
|
+
selection: "selection";
|
|
240
|
+
}>>>;
|
|
241
|
+
heading2: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
242
|
+
success: "success";
|
|
243
|
+
error: "error";
|
|
244
|
+
text: "text";
|
|
245
|
+
brand: "brand";
|
|
246
|
+
brandShimmer: "brandShimmer";
|
|
247
|
+
accent: "accent";
|
|
248
|
+
accentDim: "accentDim";
|
|
249
|
+
accentBright: "accentBright";
|
|
250
|
+
inactive: "inactive";
|
|
251
|
+
secondary: "secondary";
|
|
252
|
+
subtle: "subtle";
|
|
253
|
+
replyPrefix: "replyPrefix";
|
|
254
|
+
warning: "warning";
|
|
255
|
+
special: "special";
|
|
256
|
+
suggestion: "suggestion";
|
|
257
|
+
permission: "permission";
|
|
258
|
+
codeText: "codeText";
|
|
259
|
+
diffAdd: "diffAdd";
|
|
260
|
+
diffRemove: "diffRemove";
|
|
261
|
+
diffAddBg: "diffAddBg";
|
|
262
|
+
diffRemoveBg: "diffRemoveBg";
|
|
263
|
+
panelBorder: "panelBorder";
|
|
264
|
+
overlayBg: "overlayBg";
|
|
265
|
+
tagBg: "tagBg";
|
|
266
|
+
toolText: "toolText";
|
|
267
|
+
focusBorder: "focusBorder";
|
|
268
|
+
selection: "selection";
|
|
269
|
+
}>>>;
|
|
270
|
+
headingWeak: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
271
|
+
success: "success";
|
|
272
|
+
error: "error";
|
|
273
|
+
text: "text";
|
|
274
|
+
brand: "brand";
|
|
275
|
+
brandShimmer: "brandShimmer";
|
|
276
|
+
accent: "accent";
|
|
277
|
+
accentDim: "accentDim";
|
|
278
|
+
accentBright: "accentBright";
|
|
279
|
+
inactive: "inactive";
|
|
280
|
+
secondary: "secondary";
|
|
281
|
+
subtle: "subtle";
|
|
282
|
+
replyPrefix: "replyPrefix";
|
|
283
|
+
warning: "warning";
|
|
284
|
+
special: "special";
|
|
285
|
+
suggestion: "suggestion";
|
|
286
|
+
permission: "permission";
|
|
287
|
+
codeText: "codeText";
|
|
288
|
+
diffAdd: "diffAdd";
|
|
289
|
+
diffRemove: "diffRemove";
|
|
290
|
+
diffAddBg: "diffAddBg";
|
|
291
|
+
diffRemoveBg: "diffRemoveBg";
|
|
292
|
+
panelBorder: "panelBorder";
|
|
293
|
+
overlayBg: "overlayBg";
|
|
294
|
+
tagBg: "tagBg";
|
|
295
|
+
toolText: "toolText";
|
|
296
|
+
focusBorder: "focusBorder";
|
|
297
|
+
selection: "selection";
|
|
298
|
+
}>>>;
|
|
299
|
+
listMarker: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
300
|
+
success: "success";
|
|
301
|
+
error: "error";
|
|
302
|
+
text: "text";
|
|
303
|
+
brand: "brand";
|
|
304
|
+
brandShimmer: "brandShimmer";
|
|
305
|
+
accent: "accent";
|
|
306
|
+
accentDim: "accentDim";
|
|
307
|
+
accentBright: "accentBright";
|
|
308
|
+
inactive: "inactive";
|
|
309
|
+
secondary: "secondary";
|
|
310
|
+
subtle: "subtle";
|
|
311
|
+
replyPrefix: "replyPrefix";
|
|
312
|
+
warning: "warning";
|
|
313
|
+
special: "special";
|
|
314
|
+
suggestion: "suggestion";
|
|
315
|
+
permission: "permission";
|
|
316
|
+
codeText: "codeText";
|
|
317
|
+
diffAdd: "diffAdd";
|
|
318
|
+
diffRemove: "diffRemove";
|
|
319
|
+
diffAddBg: "diffAddBg";
|
|
320
|
+
diffRemoveBg: "diffRemoveBg";
|
|
321
|
+
panelBorder: "panelBorder";
|
|
322
|
+
overlayBg: "overlayBg";
|
|
323
|
+
tagBg: "tagBg";
|
|
324
|
+
toolText: "toolText";
|
|
325
|
+
focusBorder: "focusBorder";
|
|
326
|
+
selection: "selection";
|
|
327
|
+
}>>>;
|
|
328
|
+
listMarkerMuted: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
329
|
+
success: "success";
|
|
330
|
+
error: "error";
|
|
331
|
+
text: "text";
|
|
332
|
+
brand: "brand";
|
|
333
|
+
brandShimmer: "brandShimmer";
|
|
334
|
+
accent: "accent";
|
|
335
|
+
accentDim: "accentDim";
|
|
336
|
+
accentBright: "accentBright";
|
|
337
|
+
inactive: "inactive";
|
|
338
|
+
secondary: "secondary";
|
|
339
|
+
subtle: "subtle";
|
|
340
|
+
replyPrefix: "replyPrefix";
|
|
341
|
+
warning: "warning";
|
|
342
|
+
special: "special";
|
|
343
|
+
suggestion: "suggestion";
|
|
344
|
+
permission: "permission";
|
|
345
|
+
codeText: "codeText";
|
|
346
|
+
diffAdd: "diffAdd";
|
|
347
|
+
diffRemove: "diffRemove";
|
|
348
|
+
diffAddBg: "diffAddBg";
|
|
349
|
+
diffRemoveBg: "diffRemoveBg";
|
|
350
|
+
panelBorder: "panelBorder";
|
|
351
|
+
overlayBg: "overlayBg";
|
|
352
|
+
tagBg: "tagBg";
|
|
353
|
+
toolText: "toolText";
|
|
354
|
+
focusBorder: "focusBorder";
|
|
355
|
+
selection: "selection";
|
|
356
|
+
}>>>;
|
|
357
|
+
quoteBar: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
358
|
+
success: "success";
|
|
359
|
+
error: "error";
|
|
360
|
+
text: "text";
|
|
361
|
+
brand: "brand";
|
|
362
|
+
brandShimmer: "brandShimmer";
|
|
363
|
+
accent: "accent";
|
|
364
|
+
accentDim: "accentDim";
|
|
365
|
+
accentBright: "accentBright";
|
|
366
|
+
inactive: "inactive";
|
|
367
|
+
secondary: "secondary";
|
|
368
|
+
subtle: "subtle";
|
|
369
|
+
replyPrefix: "replyPrefix";
|
|
370
|
+
warning: "warning";
|
|
371
|
+
special: "special";
|
|
372
|
+
suggestion: "suggestion";
|
|
373
|
+
permission: "permission";
|
|
374
|
+
codeText: "codeText";
|
|
375
|
+
diffAdd: "diffAdd";
|
|
376
|
+
diffRemove: "diffRemove";
|
|
377
|
+
diffAddBg: "diffAddBg";
|
|
378
|
+
diffRemoveBg: "diffRemoveBg";
|
|
379
|
+
panelBorder: "panelBorder";
|
|
380
|
+
overlayBg: "overlayBg";
|
|
381
|
+
tagBg: "tagBg";
|
|
382
|
+
toolText: "toolText";
|
|
383
|
+
focusBorder: "focusBorder";
|
|
384
|
+
selection: "selection";
|
|
385
|
+
}>>>;
|
|
386
|
+
quoteText: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
387
|
+
success: "success";
|
|
388
|
+
error: "error";
|
|
389
|
+
text: "text";
|
|
390
|
+
brand: "brand";
|
|
391
|
+
brandShimmer: "brandShimmer";
|
|
392
|
+
accent: "accent";
|
|
393
|
+
accentDim: "accentDim";
|
|
394
|
+
accentBright: "accentBright";
|
|
395
|
+
inactive: "inactive";
|
|
396
|
+
secondary: "secondary";
|
|
397
|
+
subtle: "subtle";
|
|
398
|
+
replyPrefix: "replyPrefix";
|
|
399
|
+
warning: "warning";
|
|
400
|
+
special: "special";
|
|
401
|
+
suggestion: "suggestion";
|
|
402
|
+
permission: "permission";
|
|
403
|
+
codeText: "codeText";
|
|
404
|
+
diffAdd: "diffAdd";
|
|
405
|
+
diffRemove: "diffRemove";
|
|
406
|
+
diffAddBg: "diffAddBg";
|
|
407
|
+
diffRemoveBg: "diffRemoveBg";
|
|
408
|
+
panelBorder: "panelBorder";
|
|
409
|
+
overlayBg: "overlayBg";
|
|
410
|
+
tagBg: "tagBg";
|
|
411
|
+
toolText: "toolText";
|
|
412
|
+
focusBorder: "focusBorder";
|
|
413
|
+
selection: "selection";
|
|
414
|
+
}>>>;
|
|
415
|
+
link: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
416
|
+
success: "success";
|
|
417
|
+
error: "error";
|
|
418
|
+
text: "text";
|
|
419
|
+
brand: "brand";
|
|
420
|
+
brandShimmer: "brandShimmer";
|
|
421
|
+
accent: "accent";
|
|
422
|
+
accentDim: "accentDim";
|
|
423
|
+
accentBright: "accentBright";
|
|
424
|
+
inactive: "inactive";
|
|
425
|
+
secondary: "secondary";
|
|
426
|
+
subtle: "subtle";
|
|
427
|
+
replyPrefix: "replyPrefix";
|
|
428
|
+
warning: "warning";
|
|
429
|
+
special: "special";
|
|
430
|
+
suggestion: "suggestion";
|
|
431
|
+
permission: "permission";
|
|
432
|
+
codeText: "codeText";
|
|
433
|
+
diffAdd: "diffAdd";
|
|
434
|
+
diffRemove: "diffRemove";
|
|
435
|
+
diffAddBg: "diffAddBg";
|
|
436
|
+
diffRemoveBg: "diffRemoveBg";
|
|
437
|
+
panelBorder: "panelBorder";
|
|
438
|
+
overlayBg: "overlayBg";
|
|
439
|
+
tagBg: "tagBg";
|
|
440
|
+
toolText: "toolText";
|
|
441
|
+
focusBorder: "focusBorder";
|
|
442
|
+
selection: "selection";
|
|
443
|
+
}>>>;
|
|
444
|
+
inlineCode: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
445
|
+
success: "success";
|
|
446
|
+
error: "error";
|
|
447
|
+
text: "text";
|
|
448
|
+
brand: "brand";
|
|
449
|
+
brandShimmer: "brandShimmer";
|
|
450
|
+
accent: "accent";
|
|
451
|
+
accentDim: "accentDim";
|
|
452
|
+
accentBright: "accentBright";
|
|
453
|
+
inactive: "inactive";
|
|
454
|
+
secondary: "secondary";
|
|
455
|
+
subtle: "subtle";
|
|
456
|
+
replyPrefix: "replyPrefix";
|
|
457
|
+
warning: "warning";
|
|
458
|
+
special: "special";
|
|
459
|
+
suggestion: "suggestion";
|
|
460
|
+
permission: "permission";
|
|
461
|
+
codeText: "codeText";
|
|
462
|
+
diffAdd: "diffAdd";
|
|
463
|
+
diffRemove: "diffRemove";
|
|
464
|
+
diffAddBg: "diffAddBg";
|
|
465
|
+
diffRemoveBg: "diffRemoveBg";
|
|
466
|
+
panelBorder: "panelBorder";
|
|
467
|
+
overlayBg: "overlayBg";
|
|
468
|
+
tagBg: "tagBg";
|
|
469
|
+
toolText: "toolText";
|
|
470
|
+
focusBorder: "focusBorder";
|
|
471
|
+
selection: "selection";
|
|
472
|
+
}>>>;
|
|
473
|
+
codeFence: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
474
|
+
success: "success";
|
|
475
|
+
error: "error";
|
|
476
|
+
text: "text";
|
|
477
|
+
brand: "brand";
|
|
478
|
+
brandShimmer: "brandShimmer";
|
|
479
|
+
accent: "accent";
|
|
480
|
+
accentDim: "accentDim";
|
|
481
|
+
accentBright: "accentBright";
|
|
482
|
+
inactive: "inactive";
|
|
483
|
+
secondary: "secondary";
|
|
484
|
+
subtle: "subtle";
|
|
485
|
+
replyPrefix: "replyPrefix";
|
|
486
|
+
warning: "warning";
|
|
487
|
+
special: "special";
|
|
488
|
+
suggestion: "suggestion";
|
|
489
|
+
permission: "permission";
|
|
490
|
+
codeText: "codeText";
|
|
491
|
+
diffAdd: "diffAdd";
|
|
492
|
+
diffRemove: "diffRemove";
|
|
493
|
+
diffAddBg: "diffAddBg";
|
|
494
|
+
diffRemoveBg: "diffRemoveBg";
|
|
495
|
+
panelBorder: "panelBorder";
|
|
496
|
+
overlayBg: "overlayBg";
|
|
497
|
+
tagBg: "tagBg";
|
|
498
|
+
toolText: "toolText";
|
|
499
|
+
focusBorder: "focusBorder";
|
|
500
|
+
selection: "selection";
|
|
501
|
+
}>>>;
|
|
502
|
+
tableHeader: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
503
|
+
success: "success";
|
|
504
|
+
error: "error";
|
|
505
|
+
text: "text";
|
|
506
|
+
brand: "brand";
|
|
507
|
+
brandShimmer: "brandShimmer";
|
|
508
|
+
accent: "accent";
|
|
509
|
+
accentDim: "accentDim";
|
|
510
|
+
accentBright: "accentBright";
|
|
511
|
+
inactive: "inactive";
|
|
512
|
+
secondary: "secondary";
|
|
513
|
+
subtle: "subtle";
|
|
514
|
+
replyPrefix: "replyPrefix";
|
|
515
|
+
warning: "warning";
|
|
516
|
+
special: "special";
|
|
517
|
+
suggestion: "suggestion";
|
|
518
|
+
permission: "permission";
|
|
519
|
+
codeText: "codeText";
|
|
520
|
+
diffAdd: "diffAdd";
|
|
521
|
+
diffRemove: "diffRemove";
|
|
522
|
+
diffAddBg: "diffAddBg";
|
|
523
|
+
diffRemoveBg: "diffRemoveBg";
|
|
524
|
+
panelBorder: "panelBorder";
|
|
525
|
+
overlayBg: "overlayBg";
|
|
526
|
+
tagBg: "tagBg";
|
|
527
|
+
toolText: "toolText";
|
|
528
|
+
focusBorder: "focusBorder";
|
|
529
|
+
selection: "selection";
|
|
530
|
+
}>>>;
|
|
531
|
+
tableDivider: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
532
|
+
success: "success";
|
|
533
|
+
error: "error";
|
|
534
|
+
text: "text";
|
|
535
|
+
brand: "brand";
|
|
536
|
+
brandShimmer: "brandShimmer";
|
|
537
|
+
accent: "accent";
|
|
538
|
+
accentDim: "accentDim";
|
|
539
|
+
accentBright: "accentBright";
|
|
540
|
+
inactive: "inactive";
|
|
541
|
+
secondary: "secondary";
|
|
542
|
+
subtle: "subtle";
|
|
543
|
+
replyPrefix: "replyPrefix";
|
|
544
|
+
warning: "warning";
|
|
545
|
+
special: "special";
|
|
546
|
+
suggestion: "suggestion";
|
|
547
|
+
permission: "permission";
|
|
548
|
+
codeText: "codeText";
|
|
549
|
+
diffAdd: "diffAdd";
|
|
550
|
+
diffRemove: "diffRemove";
|
|
551
|
+
diffAddBg: "diffAddBg";
|
|
552
|
+
diffRemoveBg: "diffRemoveBg";
|
|
553
|
+
panelBorder: "panelBorder";
|
|
554
|
+
overlayBg: "overlayBg";
|
|
555
|
+
tagBg: "tagBg";
|
|
556
|
+
toolText: "toolText";
|
|
557
|
+
focusBorder: "focusBorder";
|
|
558
|
+
selection: "selection";
|
|
559
|
+
}>>>;
|
|
560
|
+
listIndent: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>]>>>;
|
|
561
|
+
listMarkers: z.ZodCatch<z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString, z.ZodString], null>>>;
|
|
562
|
+
codeBlockDivider: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
563
|
+
hr: "hr";
|
|
564
|
+
none: "none";
|
|
565
|
+
}>>>;
|
|
566
|
+
}, z.core.$strict>;
|
|
567
|
+
/**
|
|
568
|
+
* RFC-277 D3/D4:顶层主题 override 容器——`.strict()` 只放行 `markdown` 一个字段。
|
|
569
|
+
* 未来若要支持其他排版角色(table/quote 之外的组件),必须显式加字段,不允许开放
|
|
570
|
+
* 任意 key(保持"受限覆盖面"约束,防止悄悄扩大成任意配置面)。
|
|
571
|
+
*/
|
|
572
|
+
declare const themeOverridesSchema: z.ZodObject<{
|
|
573
|
+
markdown: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
574
|
+
heading1: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
575
|
+
success: "success";
|
|
576
|
+
error: "error";
|
|
577
|
+
text: "text";
|
|
578
|
+
brand: "brand";
|
|
579
|
+
brandShimmer: "brandShimmer";
|
|
580
|
+
accent: "accent";
|
|
581
|
+
accentDim: "accentDim";
|
|
582
|
+
accentBright: "accentBright";
|
|
583
|
+
inactive: "inactive";
|
|
584
|
+
secondary: "secondary";
|
|
585
|
+
subtle: "subtle";
|
|
586
|
+
replyPrefix: "replyPrefix";
|
|
587
|
+
warning: "warning";
|
|
588
|
+
special: "special";
|
|
589
|
+
suggestion: "suggestion";
|
|
590
|
+
permission: "permission";
|
|
591
|
+
codeText: "codeText";
|
|
592
|
+
diffAdd: "diffAdd";
|
|
593
|
+
diffRemove: "diffRemove";
|
|
594
|
+
diffAddBg: "diffAddBg";
|
|
595
|
+
diffRemoveBg: "diffRemoveBg";
|
|
596
|
+
panelBorder: "panelBorder";
|
|
597
|
+
overlayBg: "overlayBg";
|
|
598
|
+
tagBg: "tagBg";
|
|
599
|
+
toolText: "toolText";
|
|
600
|
+
focusBorder: "focusBorder";
|
|
601
|
+
selection: "selection";
|
|
602
|
+
}>>>;
|
|
603
|
+
heading2: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
604
|
+
success: "success";
|
|
605
|
+
error: "error";
|
|
606
|
+
text: "text";
|
|
607
|
+
brand: "brand";
|
|
608
|
+
brandShimmer: "brandShimmer";
|
|
609
|
+
accent: "accent";
|
|
610
|
+
accentDim: "accentDim";
|
|
611
|
+
accentBright: "accentBright";
|
|
612
|
+
inactive: "inactive";
|
|
613
|
+
secondary: "secondary";
|
|
614
|
+
subtle: "subtle";
|
|
615
|
+
replyPrefix: "replyPrefix";
|
|
616
|
+
warning: "warning";
|
|
617
|
+
special: "special";
|
|
618
|
+
suggestion: "suggestion";
|
|
619
|
+
permission: "permission";
|
|
620
|
+
codeText: "codeText";
|
|
621
|
+
diffAdd: "diffAdd";
|
|
622
|
+
diffRemove: "diffRemove";
|
|
623
|
+
diffAddBg: "diffAddBg";
|
|
624
|
+
diffRemoveBg: "diffRemoveBg";
|
|
625
|
+
panelBorder: "panelBorder";
|
|
626
|
+
overlayBg: "overlayBg";
|
|
627
|
+
tagBg: "tagBg";
|
|
628
|
+
toolText: "toolText";
|
|
629
|
+
focusBorder: "focusBorder";
|
|
630
|
+
selection: "selection";
|
|
631
|
+
}>>>;
|
|
632
|
+
headingWeak: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
633
|
+
success: "success";
|
|
634
|
+
error: "error";
|
|
635
|
+
text: "text";
|
|
636
|
+
brand: "brand";
|
|
637
|
+
brandShimmer: "brandShimmer";
|
|
638
|
+
accent: "accent";
|
|
639
|
+
accentDim: "accentDim";
|
|
640
|
+
accentBright: "accentBright";
|
|
641
|
+
inactive: "inactive";
|
|
642
|
+
secondary: "secondary";
|
|
643
|
+
subtle: "subtle";
|
|
644
|
+
replyPrefix: "replyPrefix";
|
|
645
|
+
warning: "warning";
|
|
646
|
+
special: "special";
|
|
647
|
+
suggestion: "suggestion";
|
|
648
|
+
permission: "permission";
|
|
649
|
+
codeText: "codeText";
|
|
650
|
+
diffAdd: "diffAdd";
|
|
651
|
+
diffRemove: "diffRemove";
|
|
652
|
+
diffAddBg: "diffAddBg";
|
|
653
|
+
diffRemoveBg: "diffRemoveBg";
|
|
654
|
+
panelBorder: "panelBorder";
|
|
655
|
+
overlayBg: "overlayBg";
|
|
656
|
+
tagBg: "tagBg";
|
|
657
|
+
toolText: "toolText";
|
|
658
|
+
focusBorder: "focusBorder";
|
|
659
|
+
selection: "selection";
|
|
660
|
+
}>>>;
|
|
661
|
+
listMarker: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
662
|
+
success: "success";
|
|
663
|
+
error: "error";
|
|
664
|
+
text: "text";
|
|
665
|
+
brand: "brand";
|
|
666
|
+
brandShimmer: "brandShimmer";
|
|
667
|
+
accent: "accent";
|
|
668
|
+
accentDim: "accentDim";
|
|
669
|
+
accentBright: "accentBright";
|
|
670
|
+
inactive: "inactive";
|
|
671
|
+
secondary: "secondary";
|
|
672
|
+
subtle: "subtle";
|
|
673
|
+
replyPrefix: "replyPrefix";
|
|
674
|
+
warning: "warning";
|
|
675
|
+
special: "special";
|
|
676
|
+
suggestion: "suggestion";
|
|
677
|
+
permission: "permission";
|
|
678
|
+
codeText: "codeText";
|
|
679
|
+
diffAdd: "diffAdd";
|
|
680
|
+
diffRemove: "diffRemove";
|
|
681
|
+
diffAddBg: "diffAddBg";
|
|
682
|
+
diffRemoveBg: "diffRemoveBg";
|
|
683
|
+
panelBorder: "panelBorder";
|
|
684
|
+
overlayBg: "overlayBg";
|
|
685
|
+
tagBg: "tagBg";
|
|
686
|
+
toolText: "toolText";
|
|
687
|
+
focusBorder: "focusBorder";
|
|
688
|
+
selection: "selection";
|
|
689
|
+
}>>>;
|
|
690
|
+
listMarkerMuted: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
691
|
+
success: "success";
|
|
692
|
+
error: "error";
|
|
693
|
+
text: "text";
|
|
694
|
+
brand: "brand";
|
|
695
|
+
brandShimmer: "brandShimmer";
|
|
696
|
+
accent: "accent";
|
|
697
|
+
accentDim: "accentDim";
|
|
698
|
+
accentBright: "accentBright";
|
|
699
|
+
inactive: "inactive";
|
|
700
|
+
secondary: "secondary";
|
|
701
|
+
subtle: "subtle";
|
|
702
|
+
replyPrefix: "replyPrefix";
|
|
703
|
+
warning: "warning";
|
|
704
|
+
special: "special";
|
|
705
|
+
suggestion: "suggestion";
|
|
706
|
+
permission: "permission";
|
|
707
|
+
codeText: "codeText";
|
|
708
|
+
diffAdd: "diffAdd";
|
|
709
|
+
diffRemove: "diffRemove";
|
|
710
|
+
diffAddBg: "diffAddBg";
|
|
711
|
+
diffRemoveBg: "diffRemoveBg";
|
|
712
|
+
panelBorder: "panelBorder";
|
|
713
|
+
overlayBg: "overlayBg";
|
|
714
|
+
tagBg: "tagBg";
|
|
715
|
+
toolText: "toolText";
|
|
716
|
+
focusBorder: "focusBorder";
|
|
717
|
+
selection: "selection";
|
|
718
|
+
}>>>;
|
|
719
|
+
quoteBar: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
720
|
+
success: "success";
|
|
721
|
+
error: "error";
|
|
722
|
+
text: "text";
|
|
723
|
+
brand: "brand";
|
|
724
|
+
brandShimmer: "brandShimmer";
|
|
725
|
+
accent: "accent";
|
|
726
|
+
accentDim: "accentDim";
|
|
727
|
+
accentBright: "accentBright";
|
|
728
|
+
inactive: "inactive";
|
|
729
|
+
secondary: "secondary";
|
|
730
|
+
subtle: "subtle";
|
|
731
|
+
replyPrefix: "replyPrefix";
|
|
732
|
+
warning: "warning";
|
|
733
|
+
special: "special";
|
|
734
|
+
suggestion: "suggestion";
|
|
735
|
+
permission: "permission";
|
|
736
|
+
codeText: "codeText";
|
|
737
|
+
diffAdd: "diffAdd";
|
|
738
|
+
diffRemove: "diffRemove";
|
|
739
|
+
diffAddBg: "diffAddBg";
|
|
740
|
+
diffRemoveBg: "diffRemoveBg";
|
|
741
|
+
panelBorder: "panelBorder";
|
|
742
|
+
overlayBg: "overlayBg";
|
|
743
|
+
tagBg: "tagBg";
|
|
744
|
+
toolText: "toolText";
|
|
745
|
+
focusBorder: "focusBorder";
|
|
746
|
+
selection: "selection";
|
|
747
|
+
}>>>;
|
|
748
|
+
quoteText: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
749
|
+
success: "success";
|
|
750
|
+
error: "error";
|
|
751
|
+
text: "text";
|
|
752
|
+
brand: "brand";
|
|
753
|
+
brandShimmer: "brandShimmer";
|
|
754
|
+
accent: "accent";
|
|
755
|
+
accentDim: "accentDim";
|
|
756
|
+
accentBright: "accentBright";
|
|
757
|
+
inactive: "inactive";
|
|
758
|
+
secondary: "secondary";
|
|
759
|
+
subtle: "subtle";
|
|
760
|
+
replyPrefix: "replyPrefix";
|
|
761
|
+
warning: "warning";
|
|
762
|
+
special: "special";
|
|
763
|
+
suggestion: "suggestion";
|
|
764
|
+
permission: "permission";
|
|
765
|
+
codeText: "codeText";
|
|
766
|
+
diffAdd: "diffAdd";
|
|
767
|
+
diffRemove: "diffRemove";
|
|
768
|
+
diffAddBg: "diffAddBg";
|
|
769
|
+
diffRemoveBg: "diffRemoveBg";
|
|
770
|
+
panelBorder: "panelBorder";
|
|
771
|
+
overlayBg: "overlayBg";
|
|
772
|
+
tagBg: "tagBg";
|
|
773
|
+
toolText: "toolText";
|
|
774
|
+
focusBorder: "focusBorder";
|
|
775
|
+
selection: "selection";
|
|
776
|
+
}>>>;
|
|
777
|
+
link: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
778
|
+
success: "success";
|
|
779
|
+
error: "error";
|
|
780
|
+
text: "text";
|
|
781
|
+
brand: "brand";
|
|
782
|
+
brandShimmer: "brandShimmer";
|
|
783
|
+
accent: "accent";
|
|
784
|
+
accentDim: "accentDim";
|
|
785
|
+
accentBright: "accentBright";
|
|
786
|
+
inactive: "inactive";
|
|
787
|
+
secondary: "secondary";
|
|
788
|
+
subtle: "subtle";
|
|
789
|
+
replyPrefix: "replyPrefix";
|
|
790
|
+
warning: "warning";
|
|
791
|
+
special: "special";
|
|
792
|
+
suggestion: "suggestion";
|
|
793
|
+
permission: "permission";
|
|
794
|
+
codeText: "codeText";
|
|
795
|
+
diffAdd: "diffAdd";
|
|
796
|
+
diffRemove: "diffRemove";
|
|
797
|
+
diffAddBg: "diffAddBg";
|
|
798
|
+
diffRemoveBg: "diffRemoveBg";
|
|
799
|
+
panelBorder: "panelBorder";
|
|
800
|
+
overlayBg: "overlayBg";
|
|
801
|
+
tagBg: "tagBg";
|
|
802
|
+
toolText: "toolText";
|
|
803
|
+
focusBorder: "focusBorder";
|
|
804
|
+
selection: "selection";
|
|
805
|
+
}>>>;
|
|
806
|
+
inlineCode: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
807
|
+
success: "success";
|
|
808
|
+
error: "error";
|
|
809
|
+
text: "text";
|
|
810
|
+
brand: "brand";
|
|
811
|
+
brandShimmer: "brandShimmer";
|
|
812
|
+
accent: "accent";
|
|
813
|
+
accentDim: "accentDim";
|
|
814
|
+
accentBright: "accentBright";
|
|
815
|
+
inactive: "inactive";
|
|
816
|
+
secondary: "secondary";
|
|
817
|
+
subtle: "subtle";
|
|
818
|
+
replyPrefix: "replyPrefix";
|
|
819
|
+
warning: "warning";
|
|
820
|
+
special: "special";
|
|
821
|
+
suggestion: "suggestion";
|
|
822
|
+
permission: "permission";
|
|
823
|
+
codeText: "codeText";
|
|
824
|
+
diffAdd: "diffAdd";
|
|
825
|
+
diffRemove: "diffRemove";
|
|
826
|
+
diffAddBg: "diffAddBg";
|
|
827
|
+
diffRemoveBg: "diffRemoveBg";
|
|
828
|
+
panelBorder: "panelBorder";
|
|
829
|
+
overlayBg: "overlayBg";
|
|
830
|
+
tagBg: "tagBg";
|
|
831
|
+
toolText: "toolText";
|
|
832
|
+
focusBorder: "focusBorder";
|
|
833
|
+
selection: "selection";
|
|
834
|
+
}>>>;
|
|
835
|
+
codeFence: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
836
|
+
success: "success";
|
|
837
|
+
error: "error";
|
|
838
|
+
text: "text";
|
|
839
|
+
brand: "brand";
|
|
840
|
+
brandShimmer: "brandShimmer";
|
|
841
|
+
accent: "accent";
|
|
842
|
+
accentDim: "accentDim";
|
|
843
|
+
accentBright: "accentBright";
|
|
844
|
+
inactive: "inactive";
|
|
845
|
+
secondary: "secondary";
|
|
846
|
+
subtle: "subtle";
|
|
847
|
+
replyPrefix: "replyPrefix";
|
|
848
|
+
warning: "warning";
|
|
849
|
+
special: "special";
|
|
850
|
+
suggestion: "suggestion";
|
|
851
|
+
permission: "permission";
|
|
852
|
+
codeText: "codeText";
|
|
853
|
+
diffAdd: "diffAdd";
|
|
854
|
+
diffRemove: "diffRemove";
|
|
855
|
+
diffAddBg: "diffAddBg";
|
|
856
|
+
diffRemoveBg: "diffRemoveBg";
|
|
857
|
+
panelBorder: "panelBorder";
|
|
858
|
+
overlayBg: "overlayBg";
|
|
859
|
+
tagBg: "tagBg";
|
|
860
|
+
toolText: "toolText";
|
|
861
|
+
focusBorder: "focusBorder";
|
|
862
|
+
selection: "selection";
|
|
863
|
+
}>>>;
|
|
864
|
+
tableHeader: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
865
|
+
success: "success";
|
|
866
|
+
error: "error";
|
|
867
|
+
text: "text";
|
|
868
|
+
brand: "brand";
|
|
869
|
+
brandShimmer: "brandShimmer";
|
|
870
|
+
accent: "accent";
|
|
871
|
+
accentDim: "accentDim";
|
|
872
|
+
accentBright: "accentBright";
|
|
873
|
+
inactive: "inactive";
|
|
874
|
+
secondary: "secondary";
|
|
875
|
+
subtle: "subtle";
|
|
876
|
+
replyPrefix: "replyPrefix";
|
|
877
|
+
warning: "warning";
|
|
878
|
+
special: "special";
|
|
879
|
+
suggestion: "suggestion";
|
|
880
|
+
permission: "permission";
|
|
881
|
+
codeText: "codeText";
|
|
882
|
+
diffAdd: "diffAdd";
|
|
883
|
+
diffRemove: "diffRemove";
|
|
884
|
+
diffAddBg: "diffAddBg";
|
|
885
|
+
diffRemoveBg: "diffRemoveBg";
|
|
886
|
+
panelBorder: "panelBorder";
|
|
887
|
+
overlayBg: "overlayBg";
|
|
888
|
+
tagBg: "tagBg";
|
|
889
|
+
toolText: "toolText";
|
|
890
|
+
focusBorder: "focusBorder";
|
|
891
|
+
selection: "selection";
|
|
892
|
+
}>>>;
|
|
893
|
+
tableDivider: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
894
|
+
success: "success";
|
|
895
|
+
error: "error";
|
|
896
|
+
text: "text";
|
|
897
|
+
brand: "brand";
|
|
898
|
+
brandShimmer: "brandShimmer";
|
|
899
|
+
accent: "accent";
|
|
900
|
+
accentDim: "accentDim";
|
|
901
|
+
accentBright: "accentBright";
|
|
902
|
+
inactive: "inactive";
|
|
903
|
+
secondary: "secondary";
|
|
904
|
+
subtle: "subtle";
|
|
905
|
+
replyPrefix: "replyPrefix";
|
|
906
|
+
warning: "warning";
|
|
907
|
+
special: "special";
|
|
908
|
+
suggestion: "suggestion";
|
|
909
|
+
permission: "permission";
|
|
910
|
+
codeText: "codeText";
|
|
911
|
+
diffAdd: "diffAdd";
|
|
912
|
+
diffRemove: "diffRemove";
|
|
913
|
+
diffAddBg: "diffAddBg";
|
|
914
|
+
diffRemoveBg: "diffRemoveBg";
|
|
915
|
+
panelBorder: "panelBorder";
|
|
916
|
+
overlayBg: "overlayBg";
|
|
917
|
+
tagBg: "tagBg";
|
|
918
|
+
toolText: "toolText";
|
|
919
|
+
focusBorder: "focusBorder";
|
|
920
|
+
selection: "selection";
|
|
921
|
+
}>>>;
|
|
922
|
+
listIndent: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>]>>>;
|
|
923
|
+
listMarkers: z.ZodCatch<z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString, z.ZodString], null>>>;
|
|
924
|
+
codeBlockDivider: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
925
|
+
hr: "hr";
|
|
926
|
+
none: "none";
|
|
927
|
+
}>>>;
|
|
928
|
+
}, z.core.$strict>>>;
|
|
929
|
+
}, z.core.$strict>;
|
|
930
|
+
/** RFC-277 D2/M6:preset selection 双槽 schema——见 SettingSchema.theme_preset 字段注释。 */
|
|
931
|
+
declare const themePresetSelectionSchema: z.ZodObject<{
|
|
932
|
+
dark: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
933
|
+
light: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
934
|
+
}, z.core.$strict>;
|
|
935
|
+
declare const SettingSchema: z.ZodObject<{
|
|
936
|
+
config_version: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
937
|
+
version: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
938
|
+
log_level: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
939
|
+
error: "error";
|
|
940
|
+
trace: "trace";
|
|
941
|
+
debug: "debug";
|
|
942
|
+
info: "info";
|
|
943
|
+
warn: "warn";
|
|
944
|
+
fatal: "fatal";
|
|
945
|
+
}>>>;
|
|
946
|
+
model: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
947
|
+
model_fallback: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
948
|
+
recent_models: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
949
|
+
recent_mentions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
950
|
+
label: z.ZodString;
|
|
951
|
+
value: z.ZodString;
|
|
952
|
+
kind: z.ZodEnum<{
|
|
953
|
+
model: "model";
|
|
954
|
+
file: "file";
|
|
955
|
+
hashtag: "hashtag";
|
|
956
|
+
person: "person";
|
|
957
|
+
agent: "agent";
|
|
958
|
+
skill: "skill";
|
|
959
|
+
mcp: "mcp";
|
|
960
|
+
plugin: "plugin";
|
|
961
|
+
resource: "resource";
|
|
962
|
+
shortcut: "shortcut";
|
|
963
|
+
}>;
|
|
964
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
965
|
+
}, z.core.$strip>>>>;
|
|
966
|
+
shortcuts: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
967
|
+
name: z.ZodString;
|
|
968
|
+
text: z.ZodString;
|
|
969
|
+
}, z.core.$strip>>>>;
|
|
970
|
+
feedback_repo: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
971
|
+
keybinding_overrides: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
972
|
+
ctrl: z.ZodOptional<z.ZodBoolean>;
|
|
973
|
+
shift: z.ZodOptional<z.ZodBoolean>;
|
|
974
|
+
meta: z.ZodOptional<z.ZodBoolean>;
|
|
975
|
+
input: z.ZodOptional<z.ZodString>;
|
|
976
|
+
key: z.ZodOptional<z.ZodEnum<{
|
|
977
|
+
tab: "tab";
|
|
978
|
+
escape: "escape";
|
|
979
|
+
return: "return";
|
|
980
|
+
}>>;
|
|
981
|
+
}, z.core.$strip>>>>;
|
|
982
|
+
language: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
983
|
+
theme: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
984
|
+
dark: "dark";
|
|
985
|
+
light: "light";
|
|
986
|
+
system: "system";
|
|
987
|
+
}>>>;
|
|
988
|
+
theme_overrides: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
989
|
+
markdown: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
990
|
+
heading1: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
991
|
+
success: "success";
|
|
992
|
+
error: "error";
|
|
993
|
+
text: "text";
|
|
994
|
+
brand: "brand";
|
|
995
|
+
brandShimmer: "brandShimmer";
|
|
996
|
+
accent: "accent";
|
|
997
|
+
accentDim: "accentDim";
|
|
998
|
+
accentBright: "accentBright";
|
|
999
|
+
inactive: "inactive";
|
|
1000
|
+
secondary: "secondary";
|
|
1001
|
+
subtle: "subtle";
|
|
1002
|
+
replyPrefix: "replyPrefix";
|
|
1003
|
+
warning: "warning";
|
|
1004
|
+
special: "special";
|
|
1005
|
+
suggestion: "suggestion";
|
|
1006
|
+
permission: "permission";
|
|
1007
|
+
codeText: "codeText";
|
|
1008
|
+
diffAdd: "diffAdd";
|
|
1009
|
+
diffRemove: "diffRemove";
|
|
1010
|
+
diffAddBg: "diffAddBg";
|
|
1011
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1012
|
+
panelBorder: "panelBorder";
|
|
1013
|
+
overlayBg: "overlayBg";
|
|
1014
|
+
tagBg: "tagBg";
|
|
1015
|
+
toolText: "toolText";
|
|
1016
|
+
focusBorder: "focusBorder";
|
|
1017
|
+
selection: "selection";
|
|
1018
|
+
}>>>;
|
|
1019
|
+
heading2: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1020
|
+
success: "success";
|
|
1021
|
+
error: "error";
|
|
1022
|
+
text: "text";
|
|
1023
|
+
brand: "brand";
|
|
1024
|
+
brandShimmer: "brandShimmer";
|
|
1025
|
+
accent: "accent";
|
|
1026
|
+
accentDim: "accentDim";
|
|
1027
|
+
accentBright: "accentBright";
|
|
1028
|
+
inactive: "inactive";
|
|
1029
|
+
secondary: "secondary";
|
|
1030
|
+
subtle: "subtle";
|
|
1031
|
+
replyPrefix: "replyPrefix";
|
|
1032
|
+
warning: "warning";
|
|
1033
|
+
special: "special";
|
|
1034
|
+
suggestion: "suggestion";
|
|
1035
|
+
permission: "permission";
|
|
1036
|
+
codeText: "codeText";
|
|
1037
|
+
diffAdd: "diffAdd";
|
|
1038
|
+
diffRemove: "diffRemove";
|
|
1039
|
+
diffAddBg: "diffAddBg";
|
|
1040
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1041
|
+
panelBorder: "panelBorder";
|
|
1042
|
+
overlayBg: "overlayBg";
|
|
1043
|
+
tagBg: "tagBg";
|
|
1044
|
+
toolText: "toolText";
|
|
1045
|
+
focusBorder: "focusBorder";
|
|
1046
|
+
selection: "selection";
|
|
1047
|
+
}>>>;
|
|
1048
|
+
headingWeak: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1049
|
+
success: "success";
|
|
1050
|
+
error: "error";
|
|
1051
|
+
text: "text";
|
|
1052
|
+
brand: "brand";
|
|
1053
|
+
brandShimmer: "brandShimmer";
|
|
1054
|
+
accent: "accent";
|
|
1055
|
+
accentDim: "accentDim";
|
|
1056
|
+
accentBright: "accentBright";
|
|
1057
|
+
inactive: "inactive";
|
|
1058
|
+
secondary: "secondary";
|
|
1059
|
+
subtle: "subtle";
|
|
1060
|
+
replyPrefix: "replyPrefix";
|
|
1061
|
+
warning: "warning";
|
|
1062
|
+
special: "special";
|
|
1063
|
+
suggestion: "suggestion";
|
|
1064
|
+
permission: "permission";
|
|
1065
|
+
codeText: "codeText";
|
|
1066
|
+
diffAdd: "diffAdd";
|
|
1067
|
+
diffRemove: "diffRemove";
|
|
1068
|
+
diffAddBg: "diffAddBg";
|
|
1069
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1070
|
+
panelBorder: "panelBorder";
|
|
1071
|
+
overlayBg: "overlayBg";
|
|
1072
|
+
tagBg: "tagBg";
|
|
1073
|
+
toolText: "toolText";
|
|
1074
|
+
focusBorder: "focusBorder";
|
|
1075
|
+
selection: "selection";
|
|
1076
|
+
}>>>;
|
|
1077
|
+
listMarker: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1078
|
+
success: "success";
|
|
1079
|
+
error: "error";
|
|
1080
|
+
text: "text";
|
|
1081
|
+
brand: "brand";
|
|
1082
|
+
brandShimmer: "brandShimmer";
|
|
1083
|
+
accent: "accent";
|
|
1084
|
+
accentDim: "accentDim";
|
|
1085
|
+
accentBright: "accentBright";
|
|
1086
|
+
inactive: "inactive";
|
|
1087
|
+
secondary: "secondary";
|
|
1088
|
+
subtle: "subtle";
|
|
1089
|
+
replyPrefix: "replyPrefix";
|
|
1090
|
+
warning: "warning";
|
|
1091
|
+
special: "special";
|
|
1092
|
+
suggestion: "suggestion";
|
|
1093
|
+
permission: "permission";
|
|
1094
|
+
codeText: "codeText";
|
|
1095
|
+
diffAdd: "diffAdd";
|
|
1096
|
+
diffRemove: "diffRemove";
|
|
1097
|
+
diffAddBg: "diffAddBg";
|
|
1098
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1099
|
+
panelBorder: "panelBorder";
|
|
1100
|
+
overlayBg: "overlayBg";
|
|
1101
|
+
tagBg: "tagBg";
|
|
1102
|
+
toolText: "toolText";
|
|
1103
|
+
focusBorder: "focusBorder";
|
|
1104
|
+
selection: "selection";
|
|
1105
|
+
}>>>;
|
|
1106
|
+
listMarkerMuted: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1107
|
+
success: "success";
|
|
1108
|
+
error: "error";
|
|
1109
|
+
text: "text";
|
|
1110
|
+
brand: "brand";
|
|
1111
|
+
brandShimmer: "brandShimmer";
|
|
1112
|
+
accent: "accent";
|
|
1113
|
+
accentDim: "accentDim";
|
|
1114
|
+
accentBright: "accentBright";
|
|
1115
|
+
inactive: "inactive";
|
|
1116
|
+
secondary: "secondary";
|
|
1117
|
+
subtle: "subtle";
|
|
1118
|
+
replyPrefix: "replyPrefix";
|
|
1119
|
+
warning: "warning";
|
|
1120
|
+
special: "special";
|
|
1121
|
+
suggestion: "suggestion";
|
|
1122
|
+
permission: "permission";
|
|
1123
|
+
codeText: "codeText";
|
|
1124
|
+
diffAdd: "diffAdd";
|
|
1125
|
+
diffRemove: "diffRemove";
|
|
1126
|
+
diffAddBg: "diffAddBg";
|
|
1127
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1128
|
+
panelBorder: "panelBorder";
|
|
1129
|
+
overlayBg: "overlayBg";
|
|
1130
|
+
tagBg: "tagBg";
|
|
1131
|
+
toolText: "toolText";
|
|
1132
|
+
focusBorder: "focusBorder";
|
|
1133
|
+
selection: "selection";
|
|
1134
|
+
}>>>;
|
|
1135
|
+
quoteBar: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1136
|
+
success: "success";
|
|
1137
|
+
error: "error";
|
|
1138
|
+
text: "text";
|
|
1139
|
+
brand: "brand";
|
|
1140
|
+
brandShimmer: "brandShimmer";
|
|
1141
|
+
accent: "accent";
|
|
1142
|
+
accentDim: "accentDim";
|
|
1143
|
+
accentBright: "accentBright";
|
|
1144
|
+
inactive: "inactive";
|
|
1145
|
+
secondary: "secondary";
|
|
1146
|
+
subtle: "subtle";
|
|
1147
|
+
replyPrefix: "replyPrefix";
|
|
1148
|
+
warning: "warning";
|
|
1149
|
+
special: "special";
|
|
1150
|
+
suggestion: "suggestion";
|
|
1151
|
+
permission: "permission";
|
|
1152
|
+
codeText: "codeText";
|
|
1153
|
+
diffAdd: "diffAdd";
|
|
1154
|
+
diffRemove: "diffRemove";
|
|
1155
|
+
diffAddBg: "diffAddBg";
|
|
1156
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1157
|
+
panelBorder: "panelBorder";
|
|
1158
|
+
overlayBg: "overlayBg";
|
|
1159
|
+
tagBg: "tagBg";
|
|
1160
|
+
toolText: "toolText";
|
|
1161
|
+
focusBorder: "focusBorder";
|
|
1162
|
+
selection: "selection";
|
|
1163
|
+
}>>>;
|
|
1164
|
+
quoteText: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1165
|
+
success: "success";
|
|
1166
|
+
error: "error";
|
|
1167
|
+
text: "text";
|
|
1168
|
+
brand: "brand";
|
|
1169
|
+
brandShimmer: "brandShimmer";
|
|
1170
|
+
accent: "accent";
|
|
1171
|
+
accentDim: "accentDim";
|
|
1172
|
+
accentBright: "accentBright";
|
|
1173
|
+
inactive: "inactive";
|
|
1174
|
+
secondary: "secondary";
|
|
1175
|
+
subtle: "subtle";
|
|
1176
|
+
replyPrefix: "replyPrefix";
|
|
1177
|
+
warning: "warning";
|
|
1178
|
+
special: "special";
|
|
1179
|
+
suggestion: "suggestion";
|
|
1180
|
+
permission: "permission";
|
|
1181
|
+
codeText: "codeText";
|
|
1182
|
+
diffAdd: "diffAdd";
|
|
1183
|
+
diffRemove: "diffRemove";
|
|
1184
|
+
diffAddBg: "diffAddBg";
|
|
1185
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1186
|
+
panelBorder: "panelBorder";
|
|
1187
|
+
overlayBg: "overlayBg";
|
|
1188
|
+
tagBg: "tagBg";
|
|
1189
|
+
toolText: "toolText";
|
|
1190
|
+
focusBorder: "focusBorder";
|
|
1191
|
+
selection: "selection";
|
|
1192
|
+
}>>>;
|
|
1193
|
+
link: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1194
|
+
success: "success";
|
|
1195
|
+
error: "error";
|
|
1196
|
+
text: "text";
|
|
1197
|
+
brand: "brand";
|
|
1198
|
+
brandShimmer: "brandShimmer";
|
|
1199
|
+
accent: "accent";
|
|
1200
|
+
accentDim: "accentDim";
|
|
1201
|
+
accentBright: "accentBright";
|
|
1202
|
+
inactive: "inactive";
|
|
1203
|
+
secondary: "secondary";
|
|
1204
|
+
subtle: "subtle";
|
|
1205
|
+
replyPrefix: "replyPrefix";
|
|
1206
|
+
warning: "warning";
|
|
1207
|
+
special: "special";
|
|
1208
|
+
suggestion: "suggestion";
|
|
1209
|
+
permission: "permission";
|
|
1210
|
+
codeText: "codeText";
|
|
1211
|
+
diffAdd: "diffAdd";
|
|
1212
|
+
diffRemove: "diffRemove";
|
|
1213
|
+
diffAddBg: "diffAddBg";
|
|
1214
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1215
|
+
panelBorder: "panelBorder";
|
|
1216
|
+
overlayBg: "overlayBg";
|
|
1217
|
+
tagBg: "tagBg";
|
|
1218
|
+
toolText: "toolText";
|
|
1219
|
+
focusBorder: "focusBorder";
|
|
1220
|
+
selection: "selection";
|
|
1221
|
+
}>>>;
|
|
1222
|
+
inlineCode: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1223
|
+
success: "success";
|
|
1224
|
+
error: "error";
|
|
1225
|
+
text: "text";
|
|
1226
|
+
brand: "brand";
|
|
1227
|
+
brandShimmer: "brandShimmer";
|
|
1228
|
+
accent: "accent";
|
|
1229
|
+
accentDim: "accentDim";
|
|
1230
|
+
accentBright: "accentBright";
|
|
1231
|
+
inactive: "inactive";
|
|
1232
|
+
secondary: "secondary";
|
|
1233
|
+
subtle: "subtle";
|
|
1234
|
+
replyPrefix: "replyPrefix";
|
|
1235
|
+
warning: "warning";
|
|
1236
|
+
special: "special";
|
|
1237
|
+
suggestion: "suggestion";
|
|
1238
|
+
permission: "permission";
|
|
1239
|
+
codeText: "codeText";
|
|
1240
|
+
diffAdd: "diffAdd";
|
|
1241
|
+
diffRemove: "diffRemove";
|
|
1242
|
+
diffAddBg: "diffAddBg";
|
|
1243
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1244
|
+
panelBorder: "panelBorder";
|
|
1245
|
+
overlayBg: "overlayBg";
|
|
1246
|
+
tagBg: "tagBg";
|
|
1247
|
+
toolText: "toolText";
|
|
1248
|
+
focusBorder: "focusBorder";
|
|
1249
|
+
selection: "selection";
|
|
1250
|
+
}>>>;
|
|
1251
|
+
codeFence: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1252
|
+
success: "success";
|
|
1253
|
+
error: "error";
|
|
1254
|
+
text: "text";
|
|
1255
|
+
brand: "brand";
|
|
1256
|
+
brandShimmer: "brandShimmer";
|
|
1257
|
+
accent: "accent";
|
|
1258
|
+
accentDim: "accentDim";
|
|
1259
|
+
accentBright: "accentBright";
|
|
1260
|
+
inactive: "inactive";
|
|
1261
|
+
secondary: "secondary";
|
|
1262
|
+
subtle: "subtle";
|
|
1263
|
+
replyPrefix: "replyPrefix";
|
|
1264
|
+
warning: "warning";
|
|
1265
|
+
special: "special";
|
|
1266
|
+
suggestion: "suggestion";
|
|
1267
|
+
permission: "permission";
|
|
1268
|
+
codeText: "codeText";
|
|
1269
|
+
diffAdd: "diffAdd";
|
|
1270
|
+
diffRemove: "diffRemove";
|
|
1271
|
+
diffAddBg: "diffAddBg";
|
|
1272
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1273
|
+
panelBorder: "panelBorder";
|
|
1274
|
+
overlayBg: "overlayBg";
|
|
1275
|
+
tagBg: "tagBg";
|
|
1276
|
+
toolText: "toolText";
|
|
1277
|
+
focusBorder: "focusBorder";
|
|
1278
|
+
selection: "selection";
|
|
1279
|
+
}>>>;
|
|
1280
|
+
tableHeader: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1281
|
+
success: "success";
|
|
1282
|
+
error: "error";
|
|
1283
|
+
text: "text";
|
|
1284
|
+
brand: "brand";
|
|
1285
|
+
brandShimmer: "brandShimmer";
|
|
1286
|
+
accent: "accent";
|
|
1287
|
+
accentDim: "accentDim";
|
|
1288
|
+
accentBright: "accentBright";
|
|
1289
|
+
inactive: "inactive";
|
|
1290
|
+
secondary: "secondary";
|
|
1291
|
+
subtle: "subtle";
|
|
1292
|
+
replyPrefix: "replyPrefix";
|
|
1293
|
+
warning: "warning";
|
|
1294
|
+
special: "special";
|
|
1295
|
+
suggestion: "suggestion";
|
|
1296
|
+
permission: "permission";
|
|
1297
|
+
codeText: "codeText";
|
|
1298
|
+
diffAdd: "diffAdd";
|
|
1299
|
+
diffRemove: "diffRemove";
|
|
1300
|
+
diffAddBg: "diffAddBg";
|
|
1301
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1302
|
+
panelBorder: "panelBorder";
|
|
1303
|
+
overlayBg: "overlayBg";
|
|
1304
|
+
tagBg: "tagBg";
|
|
1305
|
+
toolText: "toolText";
|
|
1306
|
+
focusBorder: "focusBorder";
|
|
1307
|
+
selection: "selection";
|
|
1308
|
+
}>>>;
|
|
1309
|
+
tableDivider: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1310
|
+
success: "success";
|
|
1311
|
+
error: "error";
|
|
1312
|
+
text: "text";
|
|
1313
|
+
brand: "brand";
|
|
1314
|
+
brandShimmer: "brandShimmer";
|
|
1315
|
+
accent: "accent";
|
|
1316
|
+
accentDim: "accentDim";
|
|
1317
|
+
accentBright: "accentBright";
|
|
1318
|
+
inactive: "inactive";
|
|
1319
|
+
secondary: "secondary";
|
|
1320
|
+
subtle: "subtle";
|
|
1321
|
+
replyPrefix: "replyPrefix";
|
|
1322
|
+
warning: "warning";
|
|
1323
|
+
special: "special";
|
|
1324
|
+
suggestion: "suggestion";
|
|
1325
|
+
permission: "permission";
|
|
1326
|
+
codeText: "codeText";
|
|
1327
|
+
diffAdd: "diffAdd";
|
|
1328
|
+
diffRemove: "diffRemove";
|
|
1329
|
+
diffAddBg: "diffAddBg";
|
|
1330
|
+
diffRemoveBg: "diffRemoveBg";
|
|
1331
|
+
panelBorder: "panelBorder";
|
|
1332
|
+
overlayBg: "overlayBg";
|
|
1333
|
+
tagBg: "tagBg";
|
|
1334
|
+
toolText: "toolText";
|
|
1335
|
+
focusBorder: "focusBorder";
|
|
1336
|
+
selection: "selection";
|
|
1337
|
+
}>>>;
|
|
1338
|
+
listIndent: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<3>]>>>;
|
|
1339
|
+
listMarkers: z.ZodCatch<z.ZodOptional<z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString, z.ZodString], null>>>;
|
|
1340
|
+
codeBlockDivider: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1341
|
+
hr: "hr";
|
|
1342
|
+
none: "none";
|
|
1343
|
+
}>>>;
|
|
1344
|
+
}, z.core.$strict>>>;
|
|
1345
|
+
}, z.core.$strict>>>;
|
|
1346
|
+
theme_preset: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1347
|
+
dark: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1348
|
+
light: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1349
|
+
}, z.core.$strict>>>;
|
|
1350
|
+
nickname: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1351
|
+
has_completed_onboarding: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1352
|
+
has_completed_wizard: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1353
|
+
wizard_dont_show_again: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1354
|
+
thinking_level: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1355
|
+
agents: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1356
|
+
model: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1357
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1358
|
+
system_prompt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1359
|
+
tools: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1360
|
+
capabilities: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1361
|
+
categories: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1362
|
+
default_workflow_slot: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1363
|
+
normal: "normal";
|
|
1364
|
+
thinking: "thinking";
|
|
1365
|
+
compact: "compact";
|
|
1366
|
+
critique: "critique";
|
|
1367
|
+
vision: "vision";
|
|
1368
|
+
}>>>;
|
|
1369
|
+
max_tool_turns: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1370
|
+
max_tool_turn_extensions: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1371
|
+
prompt_output_token_budget: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1372
|
+
prompt_wall_clock_budget_ms: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1373
|
+
session_cost_budget_usd: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1374
|
+
stall_detection: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
1375
|
+
window_turns: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1376
|
+
repeat_threshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1377
|
+
}, z.core.$strip>]>>>;
|
|
1378
|
+
temperature: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1379
|
+
max_tokens: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1380
|
+
disabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1381
|
+
}, z.core.$strip>>>>;
|
|
1382
|
+
categories: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1383
|
+
preferred_models: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1384
|
+
default_model: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1385
|
+
}, z.core.$strip>>>>;
|
|
1386
|
+
tool_preset: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1387
|
+
minimal: "minimal";
|
|
1388
|
+
standard: "standard";
|
|
1389
|
+
full: "full";
|
|
1390
|
+
}>>>;
|
|
1391
|
+
memory_auto_extract: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1392
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1393
|
+
every_n_turns: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1394
|
+
max_lessons: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1395
|
+
similarity_threshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1396
|
+
}, z.core.$strip>>>;
|
|
1397
|
+
skill_loop: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1398
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1399
|
+
min_messages: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1400
|
+
dismiss_cooldown_days: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1401
|
+
}, z.core.$strip>>>;
|
|
1402
|
+
notification: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1403
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1404
|
+
sound: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1405
|
+
on_completion: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1406
|
+
on_error: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1407
|
+
on_idle: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1408
|
+
channel: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1409
|
+
disabled: "disabled";
|
|
1410
|
+
auto: "auto";
|
|
1411
|
+
terminal_bell: "terminal_bell";
|
|
1412
|
+
iterm2: "iterm2";
|
|
1413
|
+
iterm2_with_bell: "iterm2_with_bell";
|
|
1414
|
+
kitty: "kitty";
|
|
1415
|
+
ghostty: "ghostty";
|
|
1416
|
+
}>>>;
|
|
1417
|
+
condition: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1418
|
+
unfocused: "unfocused";
|
|
1419
|
+
always: "always";
|
|
1420
|
+
}>>>;
|
|
1421
|
+
idle_threshold_ms: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1422
|
+
command: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1423
|
+
}, z.core.$strip>>>;
|
|
1424
|
+
pulse_survey: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1425
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1426
|
+
probability: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1427
|
+
min_turn_gap: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1428
|
+
sink: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1429
|
+
}, z.core.$strip>>>;
|
|
1430
|
+
history: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1431
|
+
external: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1432
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1433
|
+
maxEntries: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1434
|
+
sources: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1435
|
+
id: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1436
|
+
path: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1437
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1438
|
+
}, z.core.$strip>>>>;
|
|
1439
|
+
}, z.core.$strip>>>;
|
|
1440
|
+
}, z.core.$strip>>>;
|
|
1441
|
+
workflow: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1442
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1443
|
+
review: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1444
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1445
|
+
}, z.core.$strip>>>;
|
|
1446
|
+
retry: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1447
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1448
|
+
maxAttempts: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1449
|
+
}, z.core.$strip>>>;
|
|
1450
|
+
circuitBreaker: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1451
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1452
|
+
failureThreshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1453
|
+
timeoutMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1454
|
+
}, z.core.$strip>>>;
|
|
1455
|
+
routing: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1456
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1457
|
+
}, z.core.$strip>>>;
|
|
1458
|
+
}, z.core.$strip>>>;
|
|
1459
|
+
model_slots: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1460
|
+
slots: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
1461
|
+
normal: "normal";
|
|
1462
|
+
thinking: "thinking";
|
|
1463
|
+
compact: "compact";
|
|
1464
|
+
critique: "critique";
|
|
1465
|
+
vision: "vision";
|
|
1466
|
+
}> & z.core.$partial, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>>;
|
|
1467
|
+
default: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1468
|
+
subagent_default_slot: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1469
|
+
normal: "normal";
|
|
1470
|
+
thinking: "thinking";
|
|
1471
|
+
compact: "compact";
|
|
1472
|
+
critique: "critique";
|
|
1473
|
+
vision: "vision";
|
|
1474
|
+
}>>>;
|
|
1475
|
+
}, z.core.$strip>>>;
|
|
1476
|
+
mcp_servers: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1477
|
+
command: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1478
|
+
args: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1479
|
+
env: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1480
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1481
|
+
type: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1482
|
+
stdio: "stdio";
|
|
1483
|
+
sse: "sse";
|
|
1484
|
+
http: "http";
|
|
1485
|
+
}>>>;
|
|
1486
|
+
headers: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1487
|
+
requestTimeoutMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1488
|
+
autoReconnect: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1489
|
+
disabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1490
|
+
}, z.core.$strip>>>>;
|
|
1491
|
+
resilience: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1492
|
+
stream: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1493
|
+
maxRetries: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1494
|
+
initialDelayMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1495
|
+
backoffFactor: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1496
|
+
maxDelayMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1497
|
+
}, z.core.$strip>>>;
|
|
1498
|
+
networkDisconnect: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1499
|
+
maxRetries: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1500
|
+
intervalMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1501
|
+
}, z.core.$strip>>>;
|
|
1502
|
+
mcp: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1503
|
+
maxReconnectAttempts: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1504
|
+
reconnectDelayMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1505
|
+
requestTimeoutMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1506
|
+
}, z.core.$strip>>>;
|
|
1507
|
+
schedule: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1508
|
+
retryBackoffMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1509
|
+
}, z.core.$strip>>>;
|
|
1510
|
+
errorRetry: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1511
|
+
maxAttempts: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1512
|
+
intervalMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1513
|
+
}, z.core.$strip>>>;
|
|
1514
|
+
oauth: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1515
|
+
refreshLockTimeoutMs: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1516
|
+
}, z.core.$strip>>>;
|
|
1517
|
+
}, z.core.$strip>>>;
|
|
1518
|
+
sandbox: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1519
|
+
enabled: z.ZodBoolean;
|
|
1520
|
+
network: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1521
|
+
allow: "allow";
|
|
1522
|
+
deny: "deny";
|
|
1523
|
+
}>>>;
|
|
1524
|
+
writablePaths: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1525
|
+
protectCredentials: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1526
|
+
autoAllowBashIfSandboxed: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1527
|
+
}, z.core.$strip>>>;
|
|
1528
|
+
residency: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1529
|
+
total_bytes: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1530
|
+
min_per_session_bytes: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1531
|
+
max_per_session_bytes: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1532
|
+
max_history_messages: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1533
|
+
resume_window_messages: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1534
|
+
max_content_bytes: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1535
|
+
warn_threshold_pct: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1536
|
+
hard_threshold_pct: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1537
|
+
compaction_timeout_ms: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1538
|
+
coverage_warn_threshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1539
|
+
coverage_error_threshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1540
|
+
coverage_floor_threshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1541
|
+
}, z.core.$strip>>>;
|
|
1542
|
+
disabled_agents: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1543
|
+
disabled_hooks: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1544
|
+
disabled_tools: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1545
|
+
disabled_skills: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1546
|
+
disabled_plugins: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1547
|
+
installed_plugins: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1548
|
+
id: z.ZodString;
|
|
1549
|
+
source: z.ZodEnum<{
|
|
1550
|
+
url: "url";
|
|
1551
|
+
npm: "npm";
|
|
1552
|
+
dir: "dir";
|
|
1553
|
+
git: "git";
|
|
1554
|
+
}>;
|
|
1555
|
+
sourceSpec: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1556
|
+
installedAt: z.ZodNumber;
|
|
1557
|
+
version: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1558
|
+
scope: z.ZodEnum<{
|
|
1559
|
+
global: "global";
|
|
1560
|
+
project: "project";
|
|
1561
|
+
repository: "repository";
|
|
1562
|
+
}>;
|
|
1563
|
+
capabilities: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1564
|
+
}, z.core.$strip>>>>;
|
|
1565
|
+
auto_update_check: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1566
|
+
last_update_check: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1567
|
+
prompt_output_token_budget: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1568
|
+
prompt_wall_clock_budget_ms: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1569
|
+
session_cost_budget_usd: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1570
|
+
stall_detection: z.ZodCatch<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
1571
|
+
window_turns: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1572
|
+
repeat_threshold: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1573
|
+
}, z.core.$strip>]>>>;
|
|
1574
|
+
todo_continue_max: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1575
|
+
permission_mode: z.ZodCatch<z.ZodOptional<z.ZodEnum<{
|
|
1576
|
+
readonly: "readonly";
|
|
1577
|
+
auto: "auto";
|
|
1578
|
+
bypass: "bypass";
|
|
1579
|
+
confirm: "confirm";
|
|
1580
|
+
strict: "strict";
|
|
1581
|
+
}>>>;
|
|
1582
|
+
permissions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1583
|
+
name: z.ZodString;
|
|
1584
|
+
priority: z.ZodCatch<z.ZodOptional<z.ZodNumber>>;
|
|
1585
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1586
|
+
scope: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1587
|
+
agents: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1588
|
+
sessions: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1589
|
+
}, z.core.$strip>>>;
|
|
1590
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
1591
|
+
name: z.ZodString;
|
|
1592
|
+
effect: z.ZodEnum<{
|
|
1593
|
+
allow: "allow";
|
|
1594
|
+
deny: "deny";
|
|
1595
|
+
ask: "ask";
|
|
1596
|
+
}>;
|
|
1597
|
+
tools: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1598
|
+
paths: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1599
|
+
deny_reason: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1600
|
+
ask_prompt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1601
|
+
}, z.core.$strip>>;
|
|
1602
|
+
}, z.core.$strip>>>>;
|
|
1603
|
+
permission_always_allow: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1604
|
+
plugin_lifecycle: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1605
|
+
setupDone: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1606
|
+
id: z.ZodString;
|
|
1607
|
+
version: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1608
|
+
}, z.core.$strip>>>>;
|
|
1609
|
+
}, z.core.$strip>>>;
|
|
1610
|
+
proxy: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
1611
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
1612
|
+
enabled: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
1613
|
+
}, z.core.$strip>>>;
|
|
1614
|
+
web_fetch_allowed_hosts: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1615
|
+
_migrations: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
1616
|
+
}, z.core.$strip>;
|
|
1617
|
+
type Setting = z.infer<typeof SettingSchema>;
|
|
1618
|
+
type SettingFromSchema = Setting;
|
|
1619
|
+
type ThemeColorRole = z.infer<typeof themeColorRoleSchema>;
|
|
1620
|
+
type MarkdownThemeOverridesSetting = z.infer<typeof markdownThemeOverridesSchema>;
|
|
1621
|
+
type ThemeOverridesSetting = z.infer<typeof themeOverridesSchema>;
|
|
1622
|
+
type ThemePresetSelectionSetting = z.infer<typeof themePresetSelectionSchema>;
|
|
1623
|
+
/** 镜像清单单一真源,供 schema.test.ts 与消费方核对不漂移。 */
|
|
1624
|
+
declare const THEME_COLOR_ROLES: readonly ["brand", "brandShimmer", "accent", "accentDim", "accentBright", "text", "inactive", "secondary", "subtle", "replyPrefix", "success", "error", "warning", "special", "suggestion", "permission", "codeText", "diffAdd", "diffRemove", "diffAddBg", "diffRemoveBg", "panelBorder", "overlayBg", "tagBg", "toolText", "focusBorder", "selection"];
|
|
1625
|
+
type RecentMentionEntry = z.infer<typeof recentMentionEntrySchema>;
|
|
1626
|
+
type InstalledPluginEntry = z.infer<typeof installedPluginEntrySchema>;
|
|
1627
|
+
type AgentOptions = z.infer<typeof agentOptionsSchema>;
|
|
1628
|
+
type CategoryConfig = z.infer<typeof categoryConfigSchema>;
|
|
1629
|
+
type NotificationConfig = z.infer<typeof notificationConfigSchema>;
|
|
1630
|
+
type ExternalHistoryConfig = z.infer<typeof externalHistoryConfigSchema>;
|
|
1631
|
+
type HistoryConfig = z.infer<typeof historyConfigSchema>;
|
|
1632
|
+
type SandboxConfig = z.infer<typeof sandboxConfigSchema>;
|
|
1633
|
+
type ProxyConfig = z.infer<typeof proxyConfigSchema>;
|
|
1634
|
+
type McpServerSetting = z.infer<typeof mcpServerSettingSchema>;
|
|
1635
|
+
type McpServersConfig = z.infer<typeof SettingSchema>['mcp_servers'];
|
|
1636
|
+
declare const SETTING_KEYS: ("model" | "categories" | "prompt_output_token_budget" | "prompt_wall_clock_budget_ms" | "session_cost_budget_usd" | "stall_detection" | "config_version" | "version" | "log_level" | "model_fallback" | "recent_models" | "recent_mentions" | "shortcuts" | "feedback_repo" | "keybinding_overrides" | "language" | "theme" | "theme_overrides" | "theme_preset" | "nickname" | "has_completed_onboarding" | "has_completed_wizard" | "wizard_dont_show_again" | "thinking_level" | "agents" | "tool_preset" | "memory_auto_extract" | "skill_loop" | "notification" | "pulse_survey" | "history" | "workflow" | "model_slots" | "mcp_servers" | "resilience" | "sandbox" | "residency" | "disabled_agents" | "disabled_hooks" | "disabled_tools" | "disabled_skills" | "disabled_plugins" | "installed_plugins" | "auto_update_check" | "last_update_check" | "todo_continue_max" | "permission_mode" | "permissions" | "permission_always_allow" | "plugin_lifecycle" | "proxy" | "web_fetch_allowed_hosts" | "_migrations")[];
|
|
1637
|
+
type SettingKey = keyof Setting;
|
|
1638
|
+
//#endregion
|
|
1639
|
+
//#region src/types.d.ts
|
|
1640
|
+
declare const BUILTIN_REVIEWER_AGENTS: Record<string, AgentOptions>;
|
|
1641
|
+
interface SettingWarning {
|
|
1642
|
+
key: string;
|
|
1643
|
+
message: string;
|
|
1644
|
+
line?: number;
|
|
1645
|
+
column?: number;
|
|
1646
|
+
}
|
|
1647
|
+
interface LoadSettingOptions {
|
|
1648
|
+
store?: SettingStore;
|
|
1649
|
+
paths?: string[];
|
|
1650
|
+
/** RFC-032 D4:最低优先级附加层(如翻译后的 `.claude/settings.json`),merge 在文件层之前。 */
|
|
1651
|
+
extraLayers?: Partial<Setting>[];
|
|
1652
|
+
/**
|
|
1653
|
+
* 未受信任的项目配置文件绝对路径(须与 `paths` 中某项**逐字相等**)。命中即对该层
|
|
1654
|
+
* 剔除高危键(permission_mode/mcp_servers/… 见 project-trust.ts)。缺省 = 全信任,不门控。
|
|
1655
|
+
*/
|
|
1656
|
+
untrustedProjectPath?: string;
|
|
1657
|
+
}
|
|
1658
|
+
declare const DEFAULT_CONFIG: Setting;
|
|
1659
|
+
//#endregion
|
|
1660
|
+
//#region src/migrator.d.ts
|
|
1661
|
+
interface Migration {
|
|
1662
|
+
version: string;
|
|
1663
|
+
description: string;
|
|
1664
|
+
migrate(config: Record<string, unknown>): Record<string, unknown>;
|
|
1665
|
+
}
|
|
1666
|
+
declare function migrate(config: Record<string, unknown>, migrations?: Migration[]): {
|
|
1667
|
+
config: Record<string, unknown>;
|
|
1668
|
+
applied: string[];
|
|
1669
|
+
};
|
|
1670
|
+
//#endregion
|
|
1671
|
+
//#region src/setting.d.ts
|
|
1672
|
+
declare class SettingLoader {
|
|
1673
|
+
private store?;
|
|
1674
|
+
constructor(store?: SettingStore);
|
|
1675
|
+
load(options?: LoadSettingOptions): Promise<Setting>;
|
|
1676
|
+
}
|
|
1677
|
+
declare function loadSetting(options?: LoadSettingOptions): Promise<Setting>;
|
|
1678
|
+
//#endregion
|
|
1679
|
+
//#region src/raw-file-store.d.ts
|
|
1680
|
+
/**
|
|
1681
|
+
* 原文件 SettingStore(M14-06):按**字面路径**读写用户手写配置(.otto/config.json)。
|
|
1682
|
+
*
|
|
1683
|
+
* 修复点:此前 SettingsManager 无缺省 store(`this.store` 从未赋值)→ 项目配置文件在
|
|
1684
|
+
* 生产上从未被读取;而 persistence-backed 的 file store 是 snapshot 信封式
|
|
1685
|
+
* (id → baseDir/<encoded>.json),无法读取用户在固定路径手写的 jsonc 原文——
|
|
1686
|
+
* 两者叠加 = 配置文件整条链路死亡。本 store 面向"用户手写配置文件"语义:
|
|
1687
|
+
* 原文读取(jsonc 解析在 loader 层)、缺失返回 undefined、写入为格式化 JSON。
|
|
1688
|
+
*
|
|
1689
|
+
* RFC-303 D7(M2 T303-04):`write` 此前用裸 `writeFile`(truncate+写),非原子——
|
|
1690
|
+
* 跨进程两个 otto 并发 `persist()` 会交错 truncate/write,读者可能读到半写文件(下次
|
|
1691
|
+
* `loadSetting` 时 parseJsonc 失败、配置整体丢失或回退)。改用 `@x-otto/persistence` 的
|
|
1692
|
+
* `atomicWriteFile`(temp+fsync+rename+dir-fsync)——跨进程读者永不看到半写文件。
|
|
1693
|
+
* 不加跨进程 read-modify-write 锁(当前无实证丢写事故,先原子化消除损坏面;锁待有
|
|
1694
|
+
* 实证再加——反过度设计,同 RFC-303 D7 决策记录)。
|
|
1695
|
+
*/
|
|
1696
|
+
declare class RawFileSettingStore implements SettingStore {
|
|
1697
|
+
readonly type: "file";
|
|
1698
|
+
read(path: string): Promise<string | undefined>;
|
|
1699
|
+
write(path: string, config: Partial<Setting>): Promise<void>;
|
|
1700
|
+
exists(path: string): Promise<boolean>;
|
|
1701
|
+
}
|
|
1702
|
+
//#endregion
|
|
1703
|
+
//#region src/remote-setting-store.d.ts
|
|
1704
|
+
/**
|
|
1705
|
+
* 远端 user 级配置同步的 HTTP SettingStore(RFC-052 M71d)。
|
|
1706
|
+
*
|
|
1707
|
+
* 读:HTTP GET `/config/user` → 还原 syncable 字段子集
|
|
1708
|
+
* 写:filterSyncable() 过滤 → HTTP PUT `/config/user` push
|
|
1709
|
+
*
|
|
1710
|
+
* R5 降级:远端不可达时 read 返回 undefined、write 静默忽略,不阻塞启动。
|
|
1711
|
+
* R2:syncable 白名单由 remote-sync-keys.ts 维护。
|
|
1712
|
+
*/
|
|
1713
|
+
declare class RemoteSettingStore implements SettingStore {
|
|
1714
|
+
readonly type: "file";
|
|
1715
|
+
private readonly baseUrl;
|
|
1716
|
+
private readonly userId;
|
|
1717
|
+
private readonly getAuth;
|
|
1718
|
+
private readonly fetchImpl;
|
|
1719
|
+
private readonly timeoutMs;
|
|
1720
|
+
constructor(options: {
|
|
1721
|
+
/** 远端服务器 base URL(不尾斜线)。 */baseUrl: string; /** 获取 Bearer token 的工厂。 */
|
|
1722
|
+
getAuth: () => Promise<{
|
|
1723
|
+
token: string;
|
|
1724
|
+
}>; /** fetch 实现(测试注入点)。 */
|
|
1725
|
+
fetch: typeof globalThis.fetch; /** 请求超时 (ms)。 */
|
|
1726
|
+
timeoutMs: number; /** 当前用户 identity id。 */
|
|
1727
|
+
userId: string;
|
|
1728
|
+
});
|
|
1729
|
+
/** HTTP GET `/config/user` → JSON 同步字段子集。R5: 失败返回 undefined。 */
|
|
1730
|
+
read(_path: string): Promise<string | undefined>;
|
|
1731
|
+
/**
|
|
1732
|
+
* HTTP PUT `/config/user` 推送过滤后的 syncable 字段。
|
|
1733
|
+
* R5: 远端不可达时静默忽略;R2: write 前按 SYNCABLE_KEYS 裁剪。
|
|
1734
|
+
*/
|
|
1735
|
+
write(_path: string, config: Partial<Setting>): Promise<void>;
|
|
1736
|
+
exists(_path: string): Promise<boolean>;
|
|
1737
|
+
}
|
|
1738
|
+
//#endregion
|
|
1739
|
+
//#region src/remote-sync-keys.d.ts
|
|
1740
|
+
/**
|
|
1741
|
+
* RFC-052 D2:可跨机器同步的用户偏好字段(syncable keys 白名单)。
|
|
1742
|
+
*
|
|
1743
|
+
* 与 SettingSchema 同包维护,字段增删时编译期提醒同步检查(R2)。
|
|
1744
|
+
*/
|
|
1745
|
+
declare const SYNCABLE_KEYS: Set<"model" | "categories" | "prompt_output_token_budget" | "prompt_wall_clock_budget_ms" | "session_cost_budget_usd" | "stall_detection" | "config_version" | "version" | "log_level" | "model_fallback" | "recent_models" | "recent_mentions" | "shortcuts" | "feedback_repo" | "keybinding_overrides" | "language" | "theme" | "theme_overrides" | "theme_preset" | "nickname" | "has_completed_onboarding" | "has_completed_wizard" | "wizard_dont_show_again" | "thinking_level" | "agents" | "tool_preset" | "memory_auto_extract" | "skill_loop" | "notification" | "pulse_survey" | "history" | "workflow" | "model_slots" | "mcp_servers" | "resilience" | "sandbox" | "residency" | "disabled_agents" | "disabled_hooks" | "disabled_tools" | "disabled_skills" | "disabled_plugins" | "installed_plugins" | "auto_update_check" | "last_update_check" | "todo_continue_max" | "permission_mode" | "permissions" | "permission_always_allow" | "plugin_lifecycle" | "proxy" | "web_fetch_allowed_hosts" | "_migrations">;
|
|
1746
|
+
/**
|
|
1747
|
+
* RFC-052 D2:绝不可远程同步的字段(安全面/本地路径/凭据)。
|
|
1748
|
+
*
|
|
1749
|
+
* 此列表保持与 SYNCABLE_KEYS 互斥;不在任一集合的字段为"当前不支持同步,未来可能加入"。
|
|
1750
|
+
*/
|
|
1751
|
+
declare const NEVER_SYNCED_KEYS: ReadonlySet<string>;
|
|
1752
|
+
/**
|
|
1753
|
+
* 从 Partial<Setting> 中过滤出仅 syncable 字段(R2)。
|
|
1754
|
+
* NEVER_SYNCED 字段即使传入也被移除。
|
|
1755
|
+
*/
|
|
1756
|
+
declare function filterSyncable(partial: Partial<Setting>): Partial<Setting>;
|
|
1757
|
+
//#endregion
|
|
1758
|
+
//#region src/settings-manager.d.ts
|
|
1759
|
+
interface SettingsOptions {
|
|
1760
|
+
workspaceDir?: string;
|
|
1761
|
+
projectConfigPath?: string;
|
|
1762
|
+
overrides?: Partial<Setting>;
|
|
1763
|
+
/** 配置读取后端(M14-06)。缺省原文件 store(.otto/config.json 字面路径读取)。 */
|
|
1764
|
+
store?: SettingStore;
|
|
1765
|
+
/**
|
|
1766
|
+
* RFC-052 M71d:远端 user config store。
|
|
1767
|
+
* 有 identity 时拉取用户偏好基线(如 model/theme/language)。
|
|
1768
|
+
* 优先级:project config > remote config > claude compat layer。
|
|
1769
|
+
*/
|
|
1770
|
+
remoteStore?: SettingStore;
|
|
1771
|
+
/**
|
|
1772
|
+
* 项目配置是否受信任。缺省 `true`(保持既有行为,零破坏)。
|
|
1773
|
+
* 传 `false`(或返回 false 的 thunk)时对项目层(最高优先级文件层)剔除高危键
|
|
1774
|
+
* (permission_mode/mcp_servers/…,见 project-trust.ts)——用于克隆来的未信任仓库。
|
|
1775
|
+
* **thunk 形态每次 reload 重新求值**:`/compat trust` 写入白名单后 `settings.load()` 即时生效。
|
|
1776
|
+
* 信任判定/持久化在 coding 层(claude-trust)。
|
|
1777
|
+
*/
|
|
1778
|
+
projectConfigTrusted?: boolean | (() => boolean);
|
|
1779
|
+
}
|
|
1780
|
+
interface SettingsEvents {
|
|
1781
|
+
change: (config: Setting) => void;
|
|
1782
|
+
}
|
|
1783
|
+
declare class SettingsManager extends TypedEventEmitter<SettingsEvents> {
|
|
1784
|
+
private readonly paths;
|
|
1785
|
+
private readonly workspaceDir?;
|
|
1786
|
+
/**
|
|
1787
|
+
* 项目信任判定:boolean 或 thunk。thunk 每次 reload 重新求值——故 `/compat trust`
|
|
1788
|
+
* 写入信任白名单后调 `settings.load()` 即可即时解除剔除,无需重启。缺省 true=全信任。
|
|
1789
|
+
*/
|
|
1790
|
+
private readonly projectConfigTrusted;
|
|
1791
|
+
private overrides;
|
|
1792
|
+
private store;
|
|
1793
|
+
private remoteStore;
|
|
1794
|
+
private setting;
|
|
1795
|
+
/**
|
|
1796
|
+
* persist 串行化链。`persist` 的读-改-写非原子(read→merge→write 之间有 await),
|
|
1797
|
+
* 并发调用会交错丢写无关键(如插件 setup 回调 fire-and-forget 撞用户 /model 改动)。
|
|
1798
|
+
* 所有 persist 临界区排队经此链顺序执行;单次失败不毒化后续(catch 吞错续链)。
|
|
1799
|
+
*/
|
|
1800
|
+
private writeChain;
|
|
1801
|
+
constructor(options?: SettingsOptions);
|
|
1802
|
+
get<K extends keyof Setting>(key: K): Setting[K];
|
|
1803
|
+
/**
|
|
1804
|
+
* 整对象只读快照——供需要**整个 Setting 序列化/差异比对**的场景(配置导出、迁移 diff
|
|
1805
|
+
* 计算,见 config-migration.ts/migrate.ts)。单字段读取一律走 `get(key)`(类型安全 +
|
|
1806
|
+
* 全仓统一入口),不要新增 `.config.xxx` 调用点。
|
|
1807
|
+
*/
|
|
1808
|
+
get config(): Readonly<Setting>;
|
|
1809
|
+
get model(): Setting['model'];
|
|
1810
|
+
load(): Promise<Setting>;
|
|
1811
|
+
reload(overrides?: Partial<Setting>): Promise<Setting>;
|
|
1812
|
+
update(overrides: Partial<Setting>): Promise<Setting>;
|
|
1813
|
+
/**
|
|
1814
|
+
* 持久化到磁盘配置文件(读-改-写默认落项目层 path),再 reload 生效。
|
|
1815
|
+
* 全局做底为只读 underlay(见 buildSettingPaths),默认写回落在最后一个 path(项目级),
|
|
1816
|
+
* 不会污染全局 `${OTTO_HOME}/config.json`。
|
|
1817
|
+
* `target`(可选):'global' 显式落 `paths[0]`(全局层),'project' 显式落项目层
|
|
1818
|
+
* (与缺省行为一致)。缺省 undefined 保持原有"恒落项目层"语义,向后兼容旧调用点。
|
|
1819
|
+
* 无对应层 path 时(如 target='global' 但会话无项目上下文导致 paths 为空)静默退化为
|
|
1820
|
+
* 内存 update,不抛错。
|
|
1821
|
+
* 读取磁盘原文 → 顶层合并 partial(保留 mcp_servers 等其余键)→ 写回 →
|
|
1822
|
+
* reload 触发 'change'(下游 permissionSync 等据此重同步)。无 store/path 时退化为内存 update。
|
|
1823
|
+
* 注:写回为格式化 JSON,会丢失原文件注释。
|
|
1824
|
+
*/
|
|
1825
|
+
persist(partial: Partial<Setting>, target?: 'global' | 'project'): Promise<Setting>;
|
|
1826
|
+
/**
|
|
1827
|
+
* 把一个写临界区追加到 `writeChain` 末尾顺序执行。前一个无论成败都接着跑
|
|
1828
|
+
* (`then(fn, fn)`),且把链尾的错误吞掉,避免一次失败毒化整条队列。
|
|
1829
|
+
*/
|
|
1830
|
+
private enqueueWrite;
|
|
1831
|
+
/**
|
|
1832
|
+
* 项目层(paths 末项)未受信任时的路径——loader 据此剔除高危键;undefined = 全信任。
|
|
1833
|
+
* 每次 reload 调用:thunk 形态的信任判定即时反映 `/compat trust` 写入。
|
|
1834
|
+
* 全局做底层(paths[0]) 用户自有,始终信任、永不进此剔除。
|
|
1835
|
+
*/
|
|
1836
|
+
private resolveUntrustedProjectPath;
|
|
1837
|
+
dispose(): void;
|
|
1838
|
+
}
|
|
1839
|
+
//#endregion
|
|
1840
|
+
//#region src/claude-settings-adapter.d.ts
|
|
1841
|
+
/** 解析 `Tool(specifier)` / 裸 `Tool`。 */
|
|
1842
|
+
declare function parseToolSpecifier(spec: string): {
|
|
1843
|
+
tool: string;
|
|
1844
|
+
specifier?: string;
|
|
1845
|
+
};
|
|
1846
|
+
/** glob → 锚定正则字符串(`**`→`.*`,`*`→`[^/]*`,`?`→`.`,`~` 展开 home)。 */
|
|
1847
|
+
declare function globToRegexSource(glob: string): string;
|
|
1848
|
+
/** 纯翻译:Claude settings 对象 → otto Partial<Setting>。 */
|
|
1849
|
+
declare function translateClaudeSettings(raw: unknown): {
|
|
1850
|
+
setting: Partial<Setting>;
|
|
1851
|
+
warnings: string[];
|
|
1852
|
+
};
|
|
1853
|
+
/**
|
|
1854
|
+
* 加载并翻译 `.claude` settings 层(最低优先级,供 SettingsManager 合并)。
|
|
1855
|
+
* 顺序(低→高合并):`~/.claude/settings.json` < 项目 `.claude/settings.json` < `.claude/settings.local.json`。
|
|
1856
|
+
* 默认关;启用时打印导入清单(条目数 + 降级 warning)供核对。返回 {} 当关闭/无文件。
|
|
1857
|
+
*/
|
|
1858
|
+
declare function loadClaudeSettingsLayer(workspaceDir?: string): Partial<Setting>;
|
|
1859
|
+
//#endregion
|
|
1860
|
+
//#region src/project-trust.d.ts
|
|
1861
|
+
/**
|
|
1862
|
+
* project-trust.ts —— 项目级 `.otto/config.json` 高危键信任门(纯函数,无 IO).
|
|
1863
|
+
*
|
|
1864
|
+
* 威胁:克隆任意仓库时,项目 `.otto/config.json` 是攻击者可控输入。其中若干键能在
|
|
1865
|
+
* **加载即生效**地提权或执行任意代码——例如 `permission_mode: "bypass"` 自动批准所有工具、
|
|
1866
|
+
* `mcp_servers` 启动即 spawn 任意二进制、`permissions`/`permission_always_allow` 预授权
|
|
1867
|
+
* Bash 等。otto 既有信任门只覆盖 `.claude/` 与 `.mcp.json`(见 coding `claude-trust.ts`),
|
|
1868
|
+
* 而 otto 原生 `.otto/config.json` 的这些键此前**无条件全信任**加载——本模块补齐该缺口。
|
|
1869
|
+
*
|
|
1870
|
+
* 对照业界 CLI 实现 `sanitize_project_config`(project 层 strip 掉 credential/provider/command 类键)
|
|
1871
|
+
* 与业界终端 Agent 实现(`.mcp.json` 默认 pending、trust-敏感开关排除 projectSettings)。otto 取"未信任则
|
|
1872
|
+
* strip 高危键 + 告警,配置其余部分照常加载"——安全降级而非拒绝启动。
|
|
1873
|
+
*
|
|
1874
|
+
* 纯层:只定义"哪些键高危"与"如何剔除",不做信任判定/持久化/IO(那是 coding 层职责)。
|
|
1875
|
+
*/
|
|
1876
|
+
/**
|
|
1877
|
+
* 项目层未受信任时须剔除的高危键。每个都能"加载即提权/执行":
|
|
1878
|
+
* - `permission_mode` —— 'bypass'/'auto' 自动批准工具 → 克隆即 RCE。
|
|
1879
|
+
* - `permissions` —— 预声明 allow 规则(如 Bash(*))→ 预授权执行。
|
|
1880
|
+
* - `permission_always_allow` —— 预填会话级永久放行 → 同上。
|
|
1881
|
+
* - `mcp_servers` —— stdio server 启动即 spawn `command`+`args` 任意二进制。
|
|
1882
|
+
* - `disabled_hooks` —— 可关掉 permission-guard / sandbox-guard 等安全 hook。
|
|
1883
|
+
* - `sandbox` —— 可弱化/关闭沙箱(逃逸)。
|
|
1884
|
+
*
|
|
1885
|
+
* 刻意不含的键:`model`/`model_slots`(otto provider 在代码注册、非 config 定义 base_url,
|
|
1886
|
+
* 重定向风险低于业界 CLI 实现的 `model_providers`)、`disabled_tools`(减能力非提权)、`agents`
|
|
1887
|
+
* (prompt+工具限制、加载不执行,与业界终端 Agent 实现视 agent 为非可执行面一致)。这些如需收紧另议。
|
|
1888
|
+
*/
|
|
1889
|
+
declare const HIGH_RISK_PROJECT_KEYS: readonly ["permission_mode", "permissions", "permission_always_allow", "mcp_servers", "disabled_hooks", "sandbox"];
|
|
1890
|
+
interface SanitizeResult {
|
|
1891
|
+
/** 剔除高危键后的层(浅拷贝,不改入参)。 */
|
|
1892
|
+
value: Partial<Setting>;
|
|
1893
|
+
/** 实际被剔除的键名(用于告警;空数组 = 无高危键,可视为未门控)。 */
|
|
1894
|
+
stripped: string[];
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* 从未受信任的项目层剔除高危键。纯函数:返回新对象,不改入参。
|
|
1898
|
+
* 仅作用于显式存在的键(`in` 命中),不会注入默认值。
|
|
1899
|
+
*/
|
|
1900
|
+
declare function sanitizeUntrustedProjectLayer(layer: Partial<Setting>): SanitizeResult;
|
|
1901
|
+
//#endregion
|
|
1902
|
+
//#region src/presets.d.ts
|
|
1903
|
+
/**
|
|
1904
|
+
* 预制 agent persona 已移除(2026-06-13,agent-profiles-removal 方案)。
|
|
1905
|
+
*
|
|
1906
|
+
* 子代理改为 fork/inherit + 自由任务规约(对齐 Codex spawn / Claude Code fork):
|
|
1907
|
+
* 命名未命中声明式 .md 时继承父级工具/模型 + 共享 lead-guidance,不再挑固定 persona。
|
|
1908
|
+
* 用户定制走声明式 .md(.otto/agents/*.md)——唯一显式定制路径。
|
|
1909
|
+
*/
|
|
1910
|
+
declare const BUILTIN_AGENT_PROFILES: AgentProfile[];
|
|
1911
|
+
//#endregion
|
|
1912
|
+
//#region src/config-merge-strategy.d.ts
|
|
1913
|
+
/** 合并策略类别(RFC-219 milestone M2 §设计闸门要点订正后的接口)。 */
|
|
1914
|
+
type MergeCategory = 'scalar-override' | 'array-merge' | 'record-merge';
|
|
1915
|
+
/** 单个字段的静态分类(与具体 diff 值无关)。 */
|
|
1916
|
+
interface FieldClassification {
|
|
1917
|
+
category: MergeCategory;
|
|
1918
|
+
/**
|
|
1919
|
+
* 恒定路由 user 级配置存储,不受目标 scope 参数影响(RFC-219 重要事项规则 5)。
|
|
1920
|
+
* 仅供 M3/M4 的导入落盘目标判定使用,本模块自身不做任何写入。
|
|
1921
|
+
*/
|
|
1922
|
+
deviceBound: boolean;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* 排除字段——不导出、不导入,`diffConfig` 返回结果中永不出现(RFC-219 字段策略表)。
|
|
1926
|
+
* `config_version`/`version` 是元数据字段(导入侧沿用当前 otto 版本自身值,不采用导入
|
|
1927
|
+
* 文件里的值);`last_update_check`/`_migrations` 是内部记账字段。
|
|
1928
|
+
*/
|
|
1929
|
+
declare const EXCLUDED_KEYS: ReadonlySet<SettingKey>;
|
|
1930
|
+
/**
|
|
1931
|
+
* 字段静态分类表(RFC-219 §设计·字段策略表,M2 实现期订正版:合并策略与设备绑定分离为
|
|
1932
|
+
* 两个独立字段)。`EXCLUDED_KEYS` 里的字段不在此表出现(完整性校验单独处理,见
|
|
1933
|
+
* `assertFieldClassificationCoversAllKeys`)。
|
|
1934
|
+
*/
|
|
1935
|
+
declare const FIELD_CLASSIFICATION: ReadonlyMap<SettingKey, FieldClassification>;
|
|
1936
|
+
/**
|
|
1937
|
+
* 断言字段分类表覆盖全部 `SETTING_KEYS`(含 excluded 字段)。新增 schema 字段忘记归类
|
|
1938
|
+
* 时抛错——供单测调用,防止静默漏判(RFC-219 §风险与验证策略)。
|
|
1939
|
+
*/
|
|
1940
|
+
declare function assertFieldClassificationCoversAllKeys(): void;
|
|
1941
|
+
/** 单字段差异。`risk` 是按本次具体 from/to 值计算的实例级结果,非字段静态属性。 */
|
|
1942
|
+
interface FieldDiff {
|
|
1943
|
+
key: SettingKey;
|
|
1944
|
+
from: unknown;
|
|
1945
|
+
to: unknown;
|
|
1946
|
+
category: MergeCategory;
|
|
1947
|
+
deviceBound: boolean;
|
|
1948
|
+
risk: 'safe' | 'sensitive';
|
|
1949
|
+
}
|
|
1950
|
+
/**
|
|
1951
|
+
* 计算当前配置与导入配置之间的差异(RFC-219 M2 核心函数)。
|
|
1952
|
+
*
|
|
1953
|
+
* 排除字段(`EXCLUDED_KEYS`)与值未变化的字段均不出现在返回数组中——只输出真实差异。
|
|
1954
|
+
* `installed_plugins` 字段不在此函数处理(插件差异走独立的 `classifyPluginChanges`,
|
|
1955
|
+
* 因为它需要"新增/本地独有/版本不一致"三分类而非简单的 from/to 覆盖,见下)。
|
|
1956
|
+
*/
|
|
1957
|
+
declare function diffConfig(current: Setting, incoming: Partial<Setting>): FieldDiff[];
|
|
1958
|
+
/** 插件清单差异分类(RFC-219 §设计·字段策略表 `installed_plugins` 行)。 */
|
|
1959
|
+
interface PluginDiff {
|
|
1960
|
+
/** 导入清单中有、本地未安装——需自动安装。 */
|
|
1961
|
+
toInstall: InstalledPluginEntry[];
|
|
1962
|
+
/** 本地已安装、导入清单中无——不受影响,不卸载。 */
|
|
1963
|
+
localOnly: InstalledPluginEntry[];
|
|
1964
|
+
/** 两边都有但版本不同。 */
|
|
1965
|
+
versionMismatch: Array<{
|
|
1966
|
+
id: string;
|
|
1967
|
+
local: string;
|
|
1968
|
+
incoming: string;
|
|
1969
|
+
}>;
|
|
1970
|
+
}
|
|
1971
|
+
/**
|
|
1972
|
+
* 比对本地与导入的 `installed_plugins` 清单,产出三分类差异。
|
|
1973
|
+
*
|
|
1974
|
+
* 不做任何写入/安装动作——纯计算,供 M3/M4 的执行层驱动实际安装。
|
|
1975
|
+
*/
|
|
1976
|
+
declare function classifyPluginChanges(current: readonly InstalledPluginEntry[], incoming: readonly InstalledPluginEntry[]): PluginDiff;
|
|
1977
|
+
/**
|
|
1978
|
+
* 判定本次导入是否包含安全敏感变更(RFC-219 D4 安全门触发条件)。
|
|
1979
|
+
*
|
|
1980
|
+
* 触发条件(任一即触发):
|
|
1981
|
+
* - `diffs` 中存在 `risk === 'sensitive'` 的字段差异。
|
|
1982
|
+
* - `pluginDiff.toInstall` 中存在声明 `HIGH_RISK_CAPABILITIES` 的新装插件。
|
|
1983
|
+
*
|
|
1984
|
+
* `capabilities` 快照字段(RFC-219 D1c)由安装路径调用 `readHighRiskCapabilities()`
|
|
1985
|
+
* 计算写入——该函数内部已按 `HIGH_RISK_CAPABILITIES` 过滤,理论上快照字段是其真子集。
|
|
1986
|
+
* 但本函数**不依赖这条隐式前提**(对抗审核 F1:不应仅凭"上游已过滤"就当作不变量)——
|
|
1987
|
+
* 显式 `import { HIGH_RISK_CAPABILITIES } from '@x-otto/plugin'` 权威常量重新交叉核对,
|
|
1988
|
+
* 即使未来 `capabilities` 快照字段的写入路径变化(如导出文件被手工篡改塞入非高危
|
|
1989
|
+
* 能力字符串),本函数依然只对真正命中 `HIGH_RISK_CAPABILITIES` 的能力判定为敏感。
|
|
1990
|
+
*/
|
|
1991
|
+
declare function hasSecuritySensitiveChanges(diffs: readonly FieldDiff[], pluginDiff: PluginDiff): boolean;
|
|
1992
|
+
/**
|
|
1993
|
+
* 按接受策略把差异应用为可写入配置的 partial 对象。
|
|
1994
|
+
*
|
|
1995
|
+
* `'all'`:全部差异按各自 category 合并策略应用。
|
|
1996
|
+
* `'safe-only'`:跳过 `risk === 'sensitive'` 的字段(用户在安全门选择"跳过安全项"时使用)。
|
|
1997
|
+
*
|
|
1998
|
+
* 合并语义(`diff.from`/`diff.to` 已由 `diffConfig` 计算好,无需重新传入 current 配置):
|
|
1999
|
+
* - `scalar-override`:直接取 `to` 值整体替换。
|
|
2000
|
+
* - `array-merge`:`from` 与 `to` 数组按 JSON 序列化去重并集。
|
|
2001
|
+
* - `record-merge`:`from` 与 `to` 对象按 key 浅合并(同 key 以 `to` 值覆盖)。
|
|
2002
|
+
*
|
|
2003
|
+
* 实现期简化(milestone 设计稿原签名含 `current: Setting` 参数):`diff.from` 已是
|
|
2004
|
+
* `current[diff.key]`(由 `diffConfig` 计算),重复传入 `current` 是冗余参数,故本函数
|
|
2005
|
+
* 签名去掉该参数,只需 `diffs` + `accept` 两个入参即可完整还原合并结果。
|
|
2006
|
+
*/
|
|
2007
|
+
declare function applyMergeStrategy(diffs: readonly FieldDiff[], accept: 'all' | 'safe-only'): Partial<Setting>;
|
|
2008
|
+
//#endregion
|
|
2009
|
+
//#region src/config-export-format.d.ts
|
|
2010
|
+
/** 导出文件格式版本。结构变化时递增,`parseExportFile` 按此版本做兼容性判断。 */
|
|
2011
|
+
declare const CURRENT_EXPORT_VERSION = 1;
|
|
2012
|
+
interface ConfigExportFile {
|
|
2013
|
+
otto_config_version: number;
|
|
2014
|
+
exported_at: string;
|
|
2015
|
+
/** 导出机器标识(`os.hostname()`),仅供人工审阅来源,不参与任何逻辑判断。 */
|
|
2016
|
+
exported_from: string;
|
|
2017
|
+
/** 导出侧的配置 scope('global' = 用户级 `~/.otto/config.json`,'project' = 项目级)。 */
|
|
2018
|
+
scope: 'global' | 'project';
|
|
2019
|
+
fields: Partial<Setting>;
|
|
2020
|
+
}
|
|
2021
|
+
/**
|
|
2022
|
+
* 从当前配置构建导出产物(RFC-219 重要事项规则 9)。
|
|
2023
|
+
*
|
|
2024
|
+
* 应用规则:
|
|
2025
|
+
* - `EXCLUDED_KEYS`(`config_version`/`version`/`last_update_check`/`_migrations`)不导出。
|
|
2026
|
+
* - `installed_plugins[].sourceSpec` 若为绝对路径,标准化为空字符串(导入侧走 npm/
|
|
2027
|
+
* workspace glob 解析重新定位,见 `resolvePackageDir` 既有机制)——防止把导出机器的
|
|
2028
|
+
* 本地路径写入可分享产物。
|
|
2029
|
+
* - `undefined` 值的字段不写入(保持导出产物精简,不必要地标注"这个字段不存在")。
|
|
2030
|
+
*/
|
|
2031
|
+
declare function buildExportPayload(config: Setting, scope: 'global' | 'project', hostname: string, now?: () => string): ConfigExportFile;
|
|
2032
|
+
declare class ExportFileVersionError extends Error {
|
|
2033
|
+
readonly fileVersion: number;
|
|
2034
|
+
readonly supportedVersion: number;
|
|
2035
|
+
constructor(fileVersion: number, supportedVersion: number);
|
|
2036
|
+
}
|
|
2037
|
+
declare class ExportFileParseError extends Error {
|
|
2038
|
+
constructor(reason: string);
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* 解析并校验导入文件结构。版本不兼容或结构非法时抛出对应错误类型(调用方据此渲染
|
|
2042
|
+
* 不同的提示文案,见 RFC-219 §重要事项规则 3 附近的错误处理设计)。
|
|
2043
|
+
*/
|
|
2044
|
+
declare function parseExportFile(raw: string): ConfigExportFile;
|
|
2045
|
+
//#endregion
|
|
2046
|
+
export { type AgentOptions, BUILTIN_AGENT_PROFILES, BUILTIN_REVIEWER_AGENTS, CURRENT_EXPORT_VERSION, type CategoryConfig, type ConfigExportFile, DEFAULT_CONFIG, EXCLUDED_KEYS, ExportFileParseError, ExportFileVersionError, type ExternalHistoryConfig, FIELD_CLASSIFICATION, type FieldClassification, type FieldDiff, HIGH_RISK_PROJECT_KEYS, type HistoryConfig, type InstalledPluginEntry, LOG_LEVELS, type LoadSettingOptions, type LogLevel, type MarkdownThemeOverridesSetting, type McpServerSetting, type McpServersConfig, type MergeCategory, type Migration, NEVER_SYNCED_KEYS, type NotificationConfig, PERMISSION_MODES, type PermissionMode, type PermissionPolicySetting, type PermissionRuleConfig, type PluginDiff, type ProxyConfig, RawFileSettingStore, type RecentMentionEntry, RemoteSettingStore, SETTING_KEYS, SYNCABLE_KEYS, type SandboxConfig, type SanitizeResult, type Setting, type SettingFromSchema, type SettingKey, SettingLoader, type SettingStore, type SettingWarning, SettingsManager, type SettingsOptions, type StorageType, THEME_COLOR_ROLES, TOOL_PRESETS, type ThemeColorRole, type ThemeOverridesSetting, type ThemePresetSelectionSetting, type ToolPreset, applyMergeStrategy, assertFieldClassificationCoversAllKeys, buildExportPayload, classifyPluginChanges, diffConfig, filterSyncable, globToRegexSource, hasSecuritySensitiveChanges, loadClaudeSettingsLayer, loadSetting, migrate, parseExportFile, parseToolSpecifier, sanitizeUntrustedProjectLayer, translateClaudeSettings };
|
|
2047
|
+
//# sourceMappingURL=index.d.ts.map
|