1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//! OpenAPI `/user-data/*` 路径片段。
use serde_json::{Value, json};
pub(super) fn openapi_paths_fragment_user_data() -> Value {
json!({
"/user-data/prefs": {
"get": {
"tags": ["user_data"],
"summary": "读取本机用户偏好",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"responses": {
"200": {
"description": "prefs.json",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/UserPrefs" }
}
}
}
}
},
"put": {
"tags": ["user_data"],
"summary": "写回本机用户偏好",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/UserPrefs" }
}
}
},
"responses": { "204": { "description": "已保存" } }
}
},
"/user-data/llm-overrides": {
"get": {
"tags": ["user_data"],
"summary": "读取 LLM 非机密覆盖",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"responses": {
"200": {
"description": "llm_overrides.json",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/LlmOverridesFile" }
}
}
}
}
},
"put": {
"tags": ["user_data"],
"summary": "写回 LLM 非机密覆盖",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/LlmOverridesFile" }
}
}
},
"responses": { "204": { "description": "已保存" } }
}
},
"/user-data/secrets/status": {
"get": {
"tags": ["user_data"],
"summary": "密钥槽脱敏状态(无明文)",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"responses": {
"200": {
"description": "密钥槽脱敏状态(web_api_bearer 来自系统钥匙串;client_llm/executor_llm 槽已退役,恒为未设置)",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/SecretsStatusResponse" }
}
}
}
}
}
},
"/user-data/workspaces/current/sessions": {
"get": {
"tags": ["user_data"],
"summary": "当前工作区侧栏会话列表",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"responses": {
"200": {
"description": "web_sessions.json",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/WebSessionsFile" }
}
}
}
}
},
"put": {
"tags": ["user_data"],
"summary": "写当前工作区侧栏会话",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/PutWebSessionsBody" }
}
}
},
"responses": { "204": { "description": "已保存" } }
}
},
"/user-data/workspaces": {
"get": {
"tags": ["user_data"],
"summary": "列举已分桶工作区",
"security": [{ "bearerAuth": [] }, { "apiKeyAuth": [] }],
"responses": {
"200": {
"description": "manifest 摘要列表",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": { "$ref": "#/components/schemas/WorkspaceListEntry" }
}
}
}
}
}
}
},
})
}