@fa-software/semi2-dsh 0.0.10-preview.20260920042705
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/cordis.patch.yml +5 -0
- package/lib/client.js +351 -0
- package/lib/client.js.map +1 -0
- package/lib/codegraph/cli.js +142 -0
- package/lib/codegraph/config.js +22 -0
- package/lib/codegraph/ensure.js +25 -0
- package/lib/codegraph/guide.js +21 -0
- package/lib/codegraph/index.js +97 -0
- package/lib/codegraph/tools.js +227 -0
- package/lib/codegraph/workspace.js +52 -0
- package/lib/configuration/compile.js +177 -0
- package/lib/configuration/credentials.js +104 -0
- package/lib/configuration/generated/graphql.js +1 -0
- package/lib/configuration/generated/schema.js +95 -0
- package/lib/configuration/graphql.js +193 -0
- package/lib/configuration/index.js +29 -0
- package/lib/configuration/login.js +96 -0
- package/lib/configuration/runtime.js +1100 -0
- package/lib/configuration/skill-resources.js +218 -0
- package/lib/configuration/skills.js +185 -0
- package/lib/configuration/status.js +57 -0
- package/lib/configuration/workspace.js +55 -0
- package/lib/configuration/workspaces.js +169 -0
- package/lib/contract.js +42 -0
- package/lib/index.js +14 -0
- package/lib/types/codegraph/cli.d.ts +20 -0
- package/lib/types/codegraph/config.d.ts +10 -0
- package/lib/types/codegraph/ensure.d.ts +3 -0
- package/lib/types/codegraph/guide.d.ts +4 -0
- package/lib/types/codegraph/index.d.ts +5 -0
- package/lib/types/codegraph/tools.d.ts +17 -0
- package/lib/types/codegraph/workspace.d.ts +8 -0
- package/lib/types/configuration/compile.d.ts +81 -0
- package/lib/types/configuration/credentials.d.ts +35 -0
- package/lib/types/configuration/generated/graphql.d.ts +100 -0
- package/lib/types/configuration/generated/schema.d.ts +1003 -0
- package/lib/types/configuration/graphql.d.ts +46 -0
- package/lib/types/configuration/index.d.ts +9 -0
- package/lib/types/configuration/login.d.ts +22 -0
- package/lib/types/configuration/runtime.d.ts +320 -0
- package/lib/types/configuration/skill-resources.d.ts +14 -0
- package/lib/types/configuration/skills.d.ts +8 -0
- package/lib/types/configuration/status.d.ts +9 -0
- package/lib/types/configuration/workspace.d.ts +7 -0
- package/lib/types/configuration/workspaces.d.ts +96 -0
- package/lib/types/contract.d.ts +32 -0
- package/lib/types/index.d.ts +11 -0
- package/lib/types/web/index.d.ts +2 -0
- package/lib/types/web/login.d.ts +2 -0
- package/lib/types/web/loopback-bridge.d.ts +8 -0
- package/lib/types/web/preview-proxy.d.ts +17 -0
- package/lib/types/web/runtime.d.ts +8 -0
- package/lib/types/web/welcome-ack.d.ts +33 -0
- package/lib/web/index.js +38 -0
- package/lib/web/login.js +79 -0
- package/lib/web/loopback-bridge.js +12 -0
- package/lib/web/preview-proxy.js +201 -0
- package/lib/web/runtime.js +19 -0
- package/lib/web/welcome-ack.js +51 -0
- package/package.json +81 -0
|
@@ -0,0 +1,1003 @@
|
|
|
1
|
+
export type Maybe<T> = T | null;
|
|
2
|
+
export type InputMaybe<T> = Maybe<T>;
|
|
3
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
4
|
+
export type Scalars = {
|
|
5
|
+
ID: {
|
|
6
|
+
input: string;
|
|
7
|
+
output: string;
|
|
8
|
+
};
|
|
9
|
+
String: {
|
|
10
|
+
input: string;
|
|
11
|
+
output: string;
|
|
12
|
+
};
|
|
13
|
+
Boolean: {
|
|
14
|
+
input: boolean;
|
|
15
|
+
output: boolean;
|
|
16
|
+
};
|
|
17
|
+
Int: {
|
|
18
|
+
input: number;
|
|
19
|
+
output: number;
|
|
20
|
+
};
|
|
21
|
+
Float: {
|
|
22
|
+
input: number;
|
|
23
|
+
output: number;
|
|
24
|
+
};
|
|
25
|
+
DateTime: {
|
|
26
|
+
input: string;
|
|
27
|
+
output: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type Activation = {
|
|
31
|
+
__typename?: 'Activation';
|
|
32
|
+
expiresAt: Scalars['DateTime']['output'];
|
|
33
|
+
url: Scalars['String']['output'];
|
|
34
|
+
};
|
|
35
|
+
export type AddCnbUsersInput = {
|
|
36
|
+
/** 要预建账户的上游成员 CNB 用户 ID;本轮上游没返回的会被跳过。 */
|
|
37
|
+
externalUserIds: Array<Scalars['String']['input']>;
|
|
38
|
+
};
|
|
39
|
+
/** CNB 接入密钥(Hub 生成、经 secret import 注入 CNB 环境;服务端只存摘要)。 */
|
|
40
|
+
export type CnbAccessKey = {
|
|
41
|
+
__typename?: 'CnbAccessKey';
|
|
42
|
+
createdAt: Scalars['DateTime']['output'];
|
|
43
|
+
/** 明文前缀提示;完整明文只在创建 / 刷新时返回一次。 */
|
|
44
|
+
hint: Scalars['String']['output'];
|
|
45
|
+
id: Scalars['ID']['output'];
|
|
46
|
+
lastUsedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
47
|
+
name: Scalars['String']['output'];
|
|
48
|
+
rotatedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
49
|
+
};
|
|
50
|
+
/** 创建 / 刷新接入密钥的结果:明文只此一次返回。 */
|
|
51
|
+
export type CnbAccessKeyCreated = {
|
|
52
|
+
__typename?: 'CnbAccessKeyCreated';
|
|
53
|
+
/** 注入 CNB 环境 SEMI2_ACCESS_TOKEN 的明文密钥;关闭后无法再次查看。 */
|
|
54
|
+
key: Scalars['String']['output'];
|
|
55
|
+
record: CnbAccessKey;
|
|
56
|
+
};
|
|
57
|
+
/** 账户自己的 CNB 身份;个人令牌密文永不出库,未绑定令牌时两个校验时间为空。 */
|
|
58
|
+
export type CnbAccount = {
|
|
59
|
+
__typename?: 'CnbAccount';
|
|
60
|
+
avatar?: Maybe<Scalars['String']['output']>;
|
|
61
|
+
externalUserId: Scalars['String']['output'];
|
|
62
|
+
membershipVerifiedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
63
|
+
nickname?: Maybe<Scalars['String']['output']>;
|
|
64
|
+
organizationPath: Scalars['String']['output'];
|
|
65
|
+
state: CnbConnectionState;
|
|
66
|
+
username: Scalars['String']['output'];
|
|
67
|
+
verifiedAt?: Maybe<Scalars['DateTime']['output']>;
|
|
68
|
+
};
|
|
69
|
+
/** 账户的 CNB 连接态。AWAITING_BINDING = 账户由上游目录预建,还没绑定本人令牌。 */
|
|
70
|
+
export declare enum CnbConnectionState {
|
|
71
|
+
AwaitingBinding = "AWAITING_BINDING",
|
|
72
|
+
Connected = "CONNECTED",
|
|
73
|
+
ReconnectRequired = "RECONNECT_REQUIRED"
|
|
74
|
+
}
|
|
75
|
+
/** 同步动作的真实统计;total 是本次上游看到的条目数。 */
|
|
76
|
+
export type CnbSyncResult = {
|
|
77
|
+
__typename?: 'CnbSyncResult';
|
|
78
|
+
added: Scalars['Int']['output'];
|
|
79
|
+
removed: Scalars['Int']['output'];
|
|
80
|
+
total: Scalars['Int']['output'];
|
|
81
|
+
updated: Scalars['Int']['output'];
|
|
82
|
+
};
|
|
83
|
+
/** 按勾选预建账户的结果;skipped = 勾选里已注册或本次上游没返回的。 */
|
|
84
|
+
export type CnbUserAddResult = {
|
|
85
|
+
__typename?: 'CnbUserAddResult';
|
|
86
|
+
added: Scalars['Int']['output'];
|
|
87
|
+
skipped: Scalars['Int']['output'];
|
|
88
|
+
total: Scalars['Int']['output'];
|
|
89
|
+
};
|
|
90
|
+
/** 一次运行面配置读取的记账行:读取者就是记账者本人,没有代表关系。 */
|
|
91
|
+
export type ConfigurationRead = {
|
|
92
|
+
__typename?: 'ConfigurationRead';
|
|
93
|
+
actorDisplayName?: Maybe<Scalars['String']['output']>;
|
|
94
|
+
actorId?: Maybe<Scalars['ID']['output']>;
|
|
95
|
+
actorUsername?: Maybe<Scalars['String']['output']>;
|
|
96
|
+
/** 记账码,'READ' 表示读取成功。 */
|
|
97
|
+
code: Scalars['String']['output'];
|
|
98
|
+
id: Scalars['ID']['output'];
|
|
99
|
+
readAt: Scalars['DateTime']['output'];
|
|
100
|
+
};
|
|
101
|
+
/** 条件:userId 匹配读取者;from/to 为闭区间。 */
|
|
102
|
+
export type ConfigurationReadFilter = {
|
|
103
|
+
code?: InputMaybe<Scalars['String']['input']>;
|
|
104
|
+
from?: InputMaybe<Scalars['DateTime']['input']>;
|
|
105
|
+
to?: InputMaybe<Scalars['DateTime']['input']>;
|
|
106
|
+
userId?: InputMaybe<Scalars['ID']['input']>;
|
|
107
|
+
};
|
|
108
|
+
export type ConfigurationReadPage = {
|
|
109
|
+
__typename?: 'ConfigurationReadPage';
|
|
110
|
+
items: Array<ConfigurationRead>;
|
|
111
|
+
nextCursor?: Maybe<Scalars['String']['output']>;
|
|
112
|
+
};
|
|
113
|
+
export type CreateCnbAccessKeyInput = {
|
|
114
|
+
/** 省略 = 默认名「CNB 接入密钥」。 */
|
|
115
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
116
|
+
};
|
|
117
|
+
export type CreateProjectInput = {
|
|
118
|
+
name: Scalars['String']['input'];
|
|
119
|
+
slug: Scalars['String']['input'];
|
|
120
|
+
};
|
|
121
|
+
export type CreateSkillInput = {
|
|
122
|
+
/** 完整 SKILL.md;frontmatter 未知键与超限一律 SKILL_INVALID。 */
|
|
123
|
+
content: Scalars['String']['input'];
|
|
124
|
+
/** 可选:一次带附件建库(避免「新建即 v2」)。 */
|
|
125
|
+
files?: InputMaybe<Array<SkillFileInput>>;
|
|
126
|
+
/** 省略或显式 null = 全局技能。 */
|
|
127
|
+
projectId?: InputMaybe<Scalars['ID']['input']>;
|
|
128
|
+
};
|
|
129
|
+
export type CreateUserInput = {
|
|
130
|
+
cnbToken: Scalars['String']['input'];
|
|
131
|
+
/** 从组织目录创建时传入,防止粘贴了另一人的 token。 */
|
|
132
|
+
expectedExternalUserId?: InputMaybe<Scalars['String']['input']>;
|
|
133
|
+
roles?: InputMaybe<Array<Role>>;
|
|
134
|
+
};
|
|
135
|
+
export declare enum DiscoveryErrorCode {
|
|
136
|
+
CredentialsNotConfigured = "CREDENTIALS_NOT_CONFIGURED",
|
|
137
|
+
DiscoveryUnsupported = "DISCOVERY_UNSUPPORTED",
|
|
138
|
+
InvalidModelCatalog = "INVALID_MODEL_CATALOG",
|
|
139
|
+
InvalidModelUrl = "INVALID_MODEL_URL",
|
|
140
|
+
ModelCatalogTooLarge = "MODEL_CATALOG_TOO_LARGE",
|
|
141
|
+
ModelUrlForbidden = "MODEL_URL_FORBIDDEN",
|
|
142
|
+
UpstreamCredentialsRejected = "UPSTREAM_CREDENTIALS_REJECTED",
|
|
143
|
+
UpstreamPaginationError = "UPSTREAM_PAGINATION_ERROR",
|
|
144
|
+
UpstreamRedirectForbidden = "UPSTREAM_REDIRECT_FORBIDDEN",
|
|
145
|
+
UpstreamResponseTooLarge = "UPSTREAM_RESPONSE_TOO_LARGE",
|
|
146
|
+
UpstreamTimeout = "UPSTREAM_TIMEOUT",
|
|
147
|
+
UpstreamUnavailable = "UPSTREAM_UNAVAILABLE"
|
|
148
|
+
}
|
|
149
|
+
export declare enum DiscoveryStatus {
|
|
150
|
+
Failed = "FAILED",
|
|
151
|
+
Never = "NEVER",
|
|
152
|
+
Stale = "STALE",
|
|
153
|
+
Success = "SUCCESS"
|
|
154
|
+
}
|
|
155
|
+
/** global_configuration 一行的领域读模型。 */
|
|
156
|
+
export type GlobalConfiguration = {
|
|
157
|
+
__typename?: 'GlobalConfiguration';
|
|
158
|
+
preferences: Preferences;
|
|
159
|
+
revision: Scalars['Int']['output'];
|
|
160
|
+
};
|
|
161
|
+
export type ImportBuiltinModelsInput = {
|
|
162
|
+
connectionId: Scalars['ID']['input'];
|
|
163
|
+
expectedRevision: Scalars['Int']['input'];
|
|
164
|
+
/** 要接入的内置目录模型 ID;未勾选的不新增,已在目录中的行只刷新目录元数据。 */
|
|
165
|
+
upstreamIds: Array<Scalars['String']['input']>;
|
|
166
|
+
};
|
|
167
|
+
export declare enum InputModality {
|
|
168
|
+
Image = "IMAGE",
|
|
169
|
+
Text = "TEXT"
|
|
170
|
+
}
|
|
171
|
+
export type IssueActivationInput = {
|
|
172
|
+
userId: Scalars['ID']['input'];
|
|
173
|
+
};
|
|
174
|
+
export type MetadataEntry = {
|
|
175
|
+
__typename?: 'MetadataEntry';
|
|
176
|
+
field: MetadataField;
|
|
177
|
+
source: MetadataSource;
|
|
178
|
+
};
|
|
179
|
+
export declare enum MetadataField {
|
|
180
|
+
ContextWindow = "CONTEXT_WINDOW",
|
|
181
|
+
Input = "INPUT",
|
|
182
|
+
MaxTokens = "MAX_TOKENS",
|
|
183
|
+
ReasoningLevels = "REASONING_LEVELS"
|
|
184
|
+
}
|
|
185
|
+
/** 显式 null = 清除该项;省略 = 不改动。 */
|
|
186
|
+
export type MetadataInput = {
|
|
187
|
+
contextWindow?: InputMaybe<Scalars['Int']['input']>;
|
|
188
|
+
input?: InputMaybe<Array<InputModality>>;
|
|
189
|
+
maxTokens?: InputMaybe<Scalars['Int']['input']>;
|
|
190
|
+
reasoningLevels?: InputMaybe<Array<ReasoningLevel>>;
|
|
191
|
+
};
|
|
192
|
+
/** 模型元数据来源的优先级:手工 > 目录(内置或上游发现)> dsh 默认。 */
|
|
193
|
+
export declare enum MetadataSource {
|
|
194
|
+
Builtin = "BUILTIN",
|
|
195
|
+
Discovered = "DISCOVERED",
|
|
196
|
+
DshDefault = "DSH_DEFAULT",
|
|
197
|
+
Manual = "MANUAL"
|
|
198
|
+
}
|
|
199
|
+
/** 一条模型的完整事实:原始两层元数据 + 合并后的生效元数据。 */
|
|
200
|
+
export type Model = {
|
|
201
|
+
__typename?: 'Model';
|
|
202
|
+
/** 行来自预设的内置目录;上游确认过就清掉它(存在性以 present 为准)。 */
|
|
203
|
+
builtin: Scalars['Boolean']['output'];
|
|
204
|
+
connection: ModelConnection;
|
|
205
|
+
discoveredMetadata: ModelMetadata;
|
|
206
|
+
displayName?: Maybe<Scalars['String']['output']>;
|
|
207
|
+
enabled: Scalars['Boolean']['output'];
|
|
208
|
+
id: Scalars['ID']['output'];
|
|
209
|
+
manual: Scalars['Boolean']['output'];
|
|
210
|
+
/** 按「手工 > 目录(内置或上游发现)> dsh 默认」合并后的生效元数据。 */
|
|
211
|
+
metadata: ModelMetadata;
|
|
212
|
+
metadataSources: Array<MetadataEntry>;
|
|
213
|
+
overrides: ModelMetadata;
|
|
214
|
+
present: Scalars['Boolean']['output'];
|
|
215
|
+
revision: Scalars['Int']['output'];
|
|
216
|
+
upstreamId: Scalars['String']['output'];
|
|
217
|
+
};
|
|
218
|
+
export type ModelConnection = {
|
|
219
|
+
__typename?: 'ModelConnection';
|
|
220
|
+
baseUrl: Scalars['String']['output'];
|
|
221
|
+
credentialRevision: Scalars['Int']['output'];
|
|
222
|
+
discoveryStatus: DiscoveryStatus;
|
|
223
|
+
displayName: Scalars['String']['output'];
|
|
224
|
+
enabled: Scalars['Boolean']['output'];
|
|
225
|
+
id: Scalars['ID']['output'];
|
|
226
|
+
/** 密钥是否已配置;密文永不出库。 */
|
|
227
|
+
keyConfigured: Scalars['Boolean']['output'];
|
|
228
|
+
lastDiscoveryAt?: Maybe<Scalars['DateTime']['output']>;
|
|
229
|
+
lastDiscoveryError?: Maybe<DiscoveryErrorCode>;
|
|
230
|
+
protocol: ModelProtocol;
|
|
231
|
+
/**
|
|
232
|
+
* 预设 id(= dsh 的提供方路由 id);null = 自定义连接。
|
|
233
|
+
* 预设限定协议与默认地址,且模型只能来自内置目录或上游同步(保证运行面必然认得每个模型 id)。
|
|
234
|
+
*/
|
|
235
|
+
provider?: Maybe<Scalars['String']['output']>;
|
|
236
|
+
revision: Scalars['Int']['output'];
|
|
237
|
+
};
|
|
238
|
+
export type ModelConnectionPage = {
|
|
239
|
+
__typename?: 'ModelConnectionPage';
|
|
240
|
+
items: Array<ModelConnection>;
|
|
241
|
+
nextCursor?: Maybe<Scalars['String']['output']>;
|
|
242
|
+
};
|
|
243
|
+
export type ModelCredentialInput = {
|
|
244
|
+
apiKey?: InputMaybe<SecretInput>;
|
|
245
|
+
connectionId: Scalars['ID']['input'];
|
|
246
|
+
};
|
|
247
|
+
/** user_model_credentials 一行的引用;不含密钥值。 */
|
|
248
|
+
export type ModelCredentialRef = {
|
|
249
|
+
__typename?: 'ModelCredentialRef';
|
|
250
|
+
connectionId: Scalars['ID']['output'];
|
|
251
|
+
revision: Scalars['Int']['output'];
|
|
252
|
+
};
|
|
253
|
+
/** 条件:connectionId 限定某连接的目录;protocol 按所属连接的协议过滤。 */
|
|
254
|
+
export type ModelFilter = {
|
|
255
|
+
connectionId?: InputMaybe<Scalars['ID']['input']>;
|
|
256
|
+
discoveryStatus?: InputMaybe<DiscoveryStatus>;
|
|
257
|
+
enabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
258
|
+
protocol?: InputMaybe<ModelProtocol>;
|
|
259
|
+
};
|
|
260
|
+
export type ModelMetadata = {
|
|
261
|
+
__typename?: 'ModelMetadata';
|
|
262
|
+
contextWindow?: Maybe<Scalars['Int']['output']>;
|
|
263
|
+
input?: Maybe<Array<InputModality>>;
|
|
264
|
+
maxTokens?: Maybe<Scalars['Int']['output']>;
|
|
265
|
+
reasoningLevels?: Maybe<Array<ReasoningLevel>>;
|
|
266
|
+
};
|
|
267
|
+
export type ModelPage = {
|
|
268
|
+
__typename?: 'ModelPage';
|
|
269
|
+
items: Array<Model>;
|
|
270
|
+
nextCursor?: Maybe<Scalars['String']['output']>;
|
|
271
|
+
};
|
|
272
|
+
export declare enum ModelProtocol {
|
|
273
|
+
Anthropic = "ANTHROPIC",
|
|
274
|
+
Deepseek = "DEEPSEEK",
|
|
275
|
+
OpenaiChat = "OPENAI_CHAT",
|
|
276
|
+
OpenaiResponses = "OPENAI_RESPONSES"
|
|
277
|
+
}
|
|
278
|
+
/** 一条可选用的提供方预设(对齐 dsh 的模型设置清单)。模型清单走 builtinModelCatalog。 */
|
|
279
|
+
export type ModelProviderPreset = {
|
|
280
|
+
__typename?: 'ModelProviderPreset';
|
|
281
|
+
baseUrl: Scalars['String']['output'];
|
|
282
|
+
displayName: Scalars['String']['output'];
|
|
283
|
+
id: Scalars['ID']['output'];
|
|
284
|
+
/** 该预设在内置目录里可接入的模型条数(目录本身按需查询)。 */
|
|
285
|
+
modelCount: Scalars['Int']['output'];
|
|
286
|
+
protocol: ModelProtocol;
|
|
287
|
+
};
|
|
288
|
+
export type Mutation = {
|
|
289
|
+
__typename?: 'Mutation';
|
|
290
|
+
/** 按勾选把上游组织成员预建为待激活账户;账户仍需成员本人令牌激活后才有连接。 */
|
|
291
|
+
addCnbUsers: CnbUserAddResult;
|
|
292
|
+
/** 生成一枚 CNB 环境接入密钥;明文只此一次返回。 */
|
|
293
|
+
createCnbAccessKey: CnbAccessKeyCreated;
|
|
294
|
+
createProject: Project;
|
|
295
|
+
/** 新建技能(版本 1 = head);作用域内重名即 SKILL_NAME_CONFLICT。 */
|
|
296
|
+
createSkill: Skill;
|
|
297
|
+
createUser: User;
|
|
298
|
+
/** 按勾选把内置目录的模型写进本地目录(导入即启用);不读上游、不需要密钥。 */
|
|
299
|
+
importBuiltinModels: ModelConnection;
|
|
300
|
+
issueActivation: Activation;
|
|
301
|
+
/** 刷新(轮换)接入密钥;旧密钥立即失效,新明文只此一次返回。 */
|
|
302
|
+
refreshCnbAccessKey: CnbAccessKeyCreated;
|
|
303
|
+
/** 用已存 token 重新校验组织资格并刷新 CNB 资料。 */
|
|
304
|
+
refreshCnbAccount: CnbAccount;
|
|
305
|
+
/** 删附件(追加版本);只删该版本清单里存在的 path。 */
|
|
306
|
+
removeSkillFiles: Skill;
|
|
307
|
+
/** 吊销接入密钥。 */
|
|
308
|
+
revokeCnbAccessKey: Scalars['ID']['output'];
|
|
309
|
+
saveGlobalConfiguration: GlobalConfiguration;
|
|
310
|
+
saveModel: Model;
|
|
311
|
+
saveModelConnection: ModelConnection;
|
|
312
|
+
saveProjectDetails: Project;
|
|
313
|
+
saveProjectHeadlessModels: Project;
|
|
314
|
+
/** 整份内容提交;同内容幂等不涨版本,expectedVersion 过期即 SKILL_VERSION_CONFLICT。 */
|
|
315
|
+
saveSkill: Skill;
|
|
316
|
+
saveUserConfiguration: UserConfiguration;
|
|
317
|
+
setModelEnabled: Model;
|
|
318
|
+
setProjectAccess: Project;
|
|
319
|
+
/** 归档 / 恢复:追加版本行;归档释放作用域内名称,恢复可能撞名。 */
|
|
320
|
+
setSkillArchived: Skill;
|
|
321
|
+
setUserRoles: User;
|
|
322
|
+
setUserStatus: User;
|
|
323
|
+
/** 按勾选拉当前管理员 token 可见仓库写本地;既有可见项目照常刷新,不可见项目保持原状。 */
|
|
324
|
+
syncCnbProjects: CnbSyncResult;
|
|
325
|
+
/** 读上游目录并按勾选写本地目录;返回刷新后的连接,发现结果读它的 discoveryStatus / lastDiscoveryError。 */
|
|
326
|
+
syncModelCatalog: ModelConnection;
|
|
327
|
+
/** 替换本人或指定用户的 CNB token;指定他人要求 ADMIN,且不得换绑 CNB 身份。 */
|
|
328
|
+
updateCnbToken: CnbAccount;
|
|
329
|
+
/** 本人写自己的用户层配置(个人模型密钥覆盖)。 */
|
|
330
|
+
updateMyConfiguration: UserConfiguration;
|
|
331
|
+
/** 增 / 改附件(追加版本);单文件 / 单次 / 整技能超限即拒绝。 */
|
|
332
|
+
writeSkillFiles: Skill;
|
|
333
|
+
};
|
|
334
|
+
export type MutationAddCnbUsersArgs = {
|
|
335
|
+
input: AddCnbUsersInput;
|
|
336
|
+
};
|
|
337
|
+
export type MutationCreateCnbAccessKeyArgs = {
|
|
338
|
+
input: CreateCnbAccessKeyInput;
|
|
339
|
+
};
|
|
340
|
+
export type MutationCreateProjectArgs = {
|
|
341
|
+
input: CreateProjectInput;
|
|
342
|
+
};
|
|
343
|
+
export type MutationCreateSkillArgs = {
|
|
344
|
+
input: CreateSkillInput;
|
|
345
|
+
};
|
|
346
|
+
export type MutationCreateUserArgs = {
|
|
347
|
+
input: CreateUserInput;
|
|
348
|
+
};
|
|
349
|
+
export type MutationImportBuiltinModelsArgs = {
|
|
350
|
+
input: ImportBuiltinModelsInput;
|
|
351
|
+
};
|
|
352
|
+
export type MutationIssueActivationArgs = {
|
|
353
|
+
input: IssueActivationInput;
|
|
354
|
+
};
|
|
355
|
+
export type MutationRefreshCnbAccessKeyArgs = {
|
|
356
|
+
id: Scalars['ID']['input'];
|
|
357
|
+
};
|
|
358
|
+
export type MutationRefreshCnbAccountArgs = {
|
|
359
|
+
input: RefreshCnbAccountInput;
|
|
360
|
+
};
|
|
361
|
+
export type MutationRemoveSkillFilesArgs = {
|
|
362
|
+
input: RemoveSkillFilesInput;
|
|
363
|
+
};
|
|
364
|
+
export type MutationRevokeCnbAccessKeyArgs = {
|
|
365
|
+
id: Scalars['ID']['input'];
|
|
366
|
+
};
|
|
367
|
+
export type MutationSaveGlobalConfigurationArgs = {
|
|
368
|
+
input: SaveGlobalInput;
|
|
369
|
+
};
|
|
370
|
+
export type MutationSaveModelArgs = {
|
|
371
|
+
input: SaveModelInput;
|
|
372
|
+
};
|
|
373
|
+
export type MutationSaveModelConnectionArgs = {
|
|
374
|
+
input: SaveModelConnectionInput;
|
|
375
|
+
};
|
|
376
|
+
export type MutationSaveProjectDetailsArgs = {
|
|
377
|
+
input: SaveProjectDetailsInput;
|
|
378
|
+
};
|
|
379
|
+
export type MutationSaveProjectHeadlessModelsArgs = {
|
|
380
|
+
input: SaveProjectHeadlessModelsInput;
|
|
381
|
+
};
|
|
382
|
+
export type MutationSaveSkillArgs = {
|
|
383
|
+
input: SaveSkillInput;
|
|
384
|
+
};
|
|
385
|
+
export type MutationSaveUserConfigurationArgs = {
|
|
386
|
+
input: SaveUserInput;
|
|
387
|
+
};
|
|
388
|
+
export type MutationSetModelEnabledArgs = {
|
|
389
|
+
input: SetModelEnabledInput;
|
|
390
|
+
};
|
|
391
|
+
export type MutationSetProjectAccessArgs = {
|
|
392
|
+
input: SetProjectAccessInput;
|
|
393
|
+
};
|
|
394
|
+
export type MutationSetSkillArchivedArgs = {
|
|
395
|
+
input: SetSkillArchivedInput;
|
|
396
|
+
};
|
|
397
|
+
export type MutationSetUserRolesArgs = {
|
|
398
|
+
input: SetUserRolesInput;
|
|
399
|
+
};
|
|
400
|
+
export type MutationSetUserStatusArgs = {
|
|
401
|
+
input: SetUserStatusInput;
|
|
402
|
+
};
|
|
403
|
+
export type MutationSyncCnbProjectsArgs = {
|
|
404
|
+
input: SyncCnbProjectsInput;
|
|
405
|
+
};
|
|
406
|
+
export type MutationSyncModelCatalogArgs = {
|
|
407
|
+
input: SyncModelCatalogInput;
|
|
408
|
+
};
|
|
409
|
+
export type MutationUpdateCnbTokenArgs = {
|
|
410
|
+
input: UpdateCnbTokenInput;
|
|
411
|
+
};
|
|
412
|
+
export type MutationUpdateMyConfigurationArgs = {
|
|
413
|
+
input: UpdateMyConfigurationInput;
|
|
414
|
+
};
|
|
415
|
+
export type MutationWriteSkillFilesArgs = {
|
|
416
|
+
input: WriteSkillFilesInput;
|
|
417
|
+
};
|
|
418
|
+
export type Preferences = {
|
|
419
|
+
__typename?: 'Preferences';
|
|
420
|
+
defaultModelId?: Maybe<Scalars['ID']['output']>;
|
|
421
|
+
};
|
|
422
|
+
export type PreferencesInput = {
|
|
423
|
+
/** 省略 = 不改;null = 清除。 */
|
|
424
|
+
defaultModelId?: InputMaybe<Scalars['ID']['input']>;
|
|
425
|
+
};
|
|
426
|
+
/**
|
|
427
|
+
* 项目本体 + 它的 CNB 配置表事实。模型引用为**存储值**,可能失效——
|
|
428
|
+
* 管理面展示「配了什么」,可用性判定在 client(拿 models 比对)。
|
|
429
|
+
*/
|
|
430
|
+
export type Project = {
|
|
431
|
+
__typename?: 'Project';
|
|
432
|
+
createdAt: Scalars['DateTime']['output'];
|
|
433
|
+
enabled: Scalars['Boolean']['output'];
|
|
434
|
+
executeModelId?: Maybe<Scalars['ID']['output']>;
|
|
435
|
+
/** project_cnb_configuration 行的 revision;无行时为 0,saveProjectHeadlessModels 的 CAS 取它。 */
|
|
436
|
+
headlessModelsRevision: Scalars['Int']['output'];
|
|
437
|
+
id: Scalars['ID']['output'];
|
|
438
|
+
kind: ProjectKind;
|
|
439
|
+
/** 仅管理员查询有值;client 与 users 连接得到成员详情。 */
|
|
440
|
+
members?: Maybe<Array<ProjectMember>>;
|
|
441
|
+
name: Scalars['String']['output'];
|
|
442
|
+
/** project_cnb_configuration:headless 计划 / 执行模型引用(存储值)。 */
|
|
443
|
+
planModelId?: Maybe<Scalars['ID']['output']>;
|
|
444
|
+
/** projects 行的 revision;saveProjectDetails / setProjectAccess 的 CAS 取它。 */
|
|
445
|
+
revision: Scalars['Int']['output'];
|
|
446
|
+
/** 服务端聚合:已撤销访问的账户数;仅管理员查询有值。 */
|
|
447
|
+
revokedCount?: Maybe<Scalars['Int']['output']>;
|
|
448
|
+
slug: Scalars['String']['output'];
|
|
449
|
+
upstreamStatus: UpstreamStatus;
|
|
450
|
+
webUrl?: Maybe<Scalars['String']['output']>;
|
|
451
|
+
};
|
|
452
|
+
/** 条件:search 匹配 slug / name;accessibleBy 限定某用户没被撤销访问的项目。 */
|
|
453
|
+
export type ProjectFilter = {
|
|
454
|
+
accessibleBy?: InputMaybe<Scalars['ID']['input']>;
|
|
455
|
+
enabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
456
|
+
kind?: InputMaybe<ProjectKind>;
|
|
457
|
+
search?: InputMaybe<Scalars['String']['input']>;
|
|
458
|
+
upstreamStatus?: InputMaybe<UpstreamStatus>;
|
|
459
|
+
};
|
|
460
|
+
export declare enum ProjectKind {
|
|
461
|
+
Cnb = "CNB",
|
|
462
|
+
Local = "LOCAL"
|
|
463
|
+
}
|
|
464
|
+
export type ProjectMember = {
|
|
465
|
+
__typename?: 'ProjectMember';
|
|
466
|
+
/** false = 该账户的访问被撤销;true = 表里留存的显式放开行(等价于默认权限)。 */
|
|
467
|
+
present: Scalars['Boolean']['output'];
|
|
468
|
+
userId: Scalars['ID']['output'];
|
|
469
|
+
};
|
|
470
|
+
export type ProjectPage = {
|
|
471
|
+
__typename?: 'ProjectPage';
|
|
472
|
+
items: Array<Project>;
|
|
473
|
+
nextCursor?: Maybe<Scalars['String']['output']>;
|
|
474
|
+
};
|
|
475
|
+
export type Query = {
|
|
476
|
+
__typename?: 'Query';
|
|
477
|
+
/** 该用户可用模型(连接启用 + 模型启用 + 存在性 + 密钥齐备)。 */
|
|
478
|
+
availableModels: Array<Model>;
|
|
479
|
+
/** 该连接的内置目录模型清单;不需要密钥,上游读不到时的出路。 */
|
|
480
|
+
builtinModelCatalog: Array<UpstreamModel>;
|
|
481
|
+
/** 全部 CNB 环境接入密钥(明文不回读)。密钥不绑用户,属部署级环境凭据。 */
|
|
482
|
+
cnbAccessKeys: Array<CnbAccessKey>;
|
|
483
|
+
/** 当前登录账户自己的 CNB 连接。 */
|
|
484
|
+
cnbConnection: CnbAccount;
|
|
485
|
+
configurationReads: ConfigurationReadPage;
|
|
486
|
+
/** 该用户生效默认模型 id;未配置或不在可用目录内为 null。 */
|
|
487
|
+
effectiveDefaultModelId?: Maybe<Scalars['ID']['output']>;
|
|
488
|
+
globalConfiguration: GlobalConfiguration;
|
|
489
|
+
modelConnection: ModelConnection;
|
|
490
|
+
modelConnections: ModelConnectionPage;
|
|
491
|
+
models: ModelPage;
|
|
492
|
+
/** 登录者本人可访问的项目。 */
|
|
493
|
+
myProjects: ProjectPage;
|
|
494
|
+
/** 单项目详情;无访问权即 ACCESS_DENIED。 */
|
|
495
|
+
project: Project;
|
|
496
|
+
/** 全部项目;成员视角用 myProjects。 */
|
|
497
|
+
projects: ProjectPage;
|
|
498
|
+
/** 可选用的提供方预设(清单内置,随 dsh 升级重新生成)。 */
|
|
499
|
+
providerPresets: Array<ModelProviderPreset>;
|
|
500
|
+
roles: Array<RoleDefinition>;
|
|
501
|
+
/** 此刻生效的默认模型 id;未配置、失效或本次读取失败为 null。 */
|
|
502
|
+
runtimeDefaultModelId?: Maybe<Scalars['ID']['output']>;
|
|
503
|
+
/** 连接级密钥;connectionIds 省略即返回可用目录涉及的全部连接;失败为 null。 */
|
|
504
|
+
runtimeModelCredentials?: Maybe<Array<RuntimeModelCredential>>;
|
|
505
|
+
/** 此刻生效的可用模型目录;本次读取失败为 null。 */
|
|
506
|
+
runtimeModels?: Maybe<Array<RuntimeModel>>;
|
|
507
|
+
/**
|
|
508
|
+
* 本次可读项目及其生效绑定;失败为 null。slugs 省略 = 全部可读项目;给定 = 只返回
|
|
509
|
+
* 其中 slug 命中者(大小写不敏感),空数组 = 明确不要任何项目 —— 运行面按自己已登记的
|
|
510
|
+
* 工作区逐个项目要,不必把整个项目表拉回本地。
|
|
511
|
+
*/
|
|
512
|
+
runtimeProjects?: Maybe<Array<RuntimeProject>>;
|
|
513
|
+
/**
|
|
514
|
+
* 某技能 head 版本的附件内容(运行面物化用);读取者对该技能不可见时返回空数组。
|
|
515
|
+
* 字节不回填进 boot 文档,只在真正加载技能时按需取。
|
|
516
|
+
*/
|
|
517
|
+
runtimeSkillFiles?: Maybe<Array<RuntimeSkillFileContent>>;
|
|
518
|
+
/**
|
|
519
|
+
* 此刻对读取者生效的技能目录(全局 + 可访问项目的未归档 head);失败为 null。
|
|
520
|
+
* 「哪些目录算已登记工作区」是 client 侧事实,服务端只表达可访问性,不下发生效范围。
|
|
521
|
+
*/
|
|
522
|
+
runtimeSkills?: Maybe<Array<RuntimeSkill>>;
|
|
523
|
+
/** 本次读取者(服务器里当前用户);失败为 null。 */
|
|
524
|
+
runtimeViewer?: Maybe<RuntimeViewer>;
|
|
525
|
+
/** 单个技能详情(含已归档;没给 version 就是 head,给了就取该历史版本);不存在即 SKILL_NOT_FOUND。 */
|
|
526
|
+
skill: Skill;
|
|
527
|
+
/** 某版本(缺省 head)的全部附件内容;导出 / 编辑回填 / 下载按需取。 */
|
|
528
|
+
skillFiles: Array<SkillFileContent>;
|
|
529
|
+
/** 该技能的全部历史快照(新在前,有界不 paginate,同 cnbAccessKeys 口径)。 */
|
|
530
|
+
skillVersions: Array<SkillVersion>;
|
|
531
|
+
/** 技能头版本列表;filter 决定作用域与状态。 */
|
|
532
|
+
skills: SkillPage;
|
|
533
|
+
/** 读令牌可见的 CNB 组织成员但不写库:返回列表供同步勾选;失败按 DomainError 码回。 */
|
|
534
|
+
upstreamCnbMembers: Array<UpstreamCnbMember>;
|
|
535
|
+
/** 读令牌可见的 CNB 仓库但不写库:返回列表供同步勾选;失败按 DomainError 码回。 */
|
|
536
|
+
upstreamCnbRepositories: Array<UpstreamCnbRepository>;
|
|
537
|
+
/** 读上游目录但不写本地目录:返回列表供同步勾选;失败按 DomainError 码回。 */
|
|
538
|
+
upstreamModelCatalog: Array<UpstreamModel>;
|
|
539
|
+
user: User;
|
|
540
|
+
/** 用户层配置:本人或管理员。 */
|
|
541
|
+
userConfiguration: UserConfiguration;
|
|
542
|
+
/** 本人或管理员;个人按连接覆盖的密钥引用(不含密钥值)。 */
|
|
543
|
+
userModelCredentials: Array<ModelCredentialRef>;
|
|
544
|
+
/** 全部账户;role 过滤匹配拥有该角色的账户。 */
|
|
545
|
+
users: UserPage;
|
|
546
|
+
viewer: User;
|
|
547
|
+
};
|
|
548
|
+
export type QueryAvailableModelsArgs = {
|
|
549
|
+
userId?: InputMaybe<Scalars['ID']['input']>;
|
|
550
|
+
};
|
|
551
|
+
export type QueryBuiltinModelCatalogArgs = {
|
|
552
|
+
connectionId: Scalars['ID']['input'];
|
|
553
|
+
};
|
|
554
|
+
export type QueryConfigurationReadsArgs = {
|
|
555
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
556
|
+
filter?: InputMaybe<ConfigurationReadFilter>;
|
|
557
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
558
|
+
};
|
|
559
|
+
export type QueryEffectiveDefaultModelIdArgs = {
|
|
560
|
+
userId?: InputMaybe<Scalars['ID']['input']>;
|
|
561
|
+
};
|
|
562
|
+
export type QueryModelConnectionArgs = {
|
|
563
|
+
id: Scalars['ID']['input'];
|
|
564
|
+
};
|
|
565
|
+
export type QueryModelConnectionsArgs = {
|
|
566
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
567
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
568
|
+
};
|
|
569
|
+
export type QueryModelsArgs = {
|
|
570
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
571
|
+
filter?: InputMaybe<ModelFilter>;
|
|
572
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
573
|
+
};
|
|
574
|
+
export type QueryMyProjectsArgs = {
|
|
575
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
576
|
+
filter?: InputMaybe<ProjectFilter>;
|
|
577
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
578
|
+
};
|
|
579
|
+
export type QueryProjectArgs = {
|
|
580
|
+
id: Scalars['ID']['input'];
|
|
581
|
+
};
|
|
582
|
+
export type QueryProjectsArgs = {
|
|
583
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
584
|
+
filter?: InputMaybe<ProjectFilter>;
|
|
585
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
586
|
+
};
|
|
587
|
+
export type QueryRuntimeModelCredentialsArgs = {
|
|
588
|
+
connectionIds?: InputMaybe<Array<Scalars['ID']['input']>>;
|
|
589
|
+
};
|
|
590
|
+
export type QueryRuntimeProjectsArgs = {
|
|
591
|
+
slugs?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
592
|
+
};
|
|
593
|
+
export type QueryRuntimeSkillFilesArgs = {
|
|
594
|
+
skillId: Scalars['ID']['input'];
|
|
595
|
+
};
|
|
596
|
+
export type QuerySkillArgs = {
|
|
597
|
+
id: Scalars['ID']['input'];
|
|
598
|
+
version?: InputMaybe<Scalars['Int']['input']>;
|
|
599
|
+
};
|
|
600
|
+
export type QuerySkillFilesArgs = {
|
|
601
|
+
id: Scalars['ID']['input'];
|
|
602
|
+
version?: InputMaybe<Scalars['Int']['input']>;
|
|
603
|
+
};
|
|
604
|
+
export type QuerySkillVersionsArgs = {
|
|
605
|
+
skillId: Scalars['ID']['input'];
|
|
606
|
+
};
|
|
607
|
+
export type QuerySkillsArgs = {
|
|
608
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
609
|
+
filter?: InputMaybe<SkillFilter>;
|
|
610
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
611
|
+
};
|
|
612
|
+
export type QueryUpstreamModelCatalogArgs = {
|
|
613
|
+
connectionId: Scalars['ID']['input'];
|
|
614
|
+
};
|
|
615
|
+
export type QueryUserArgs = {
|
|
616
|
+
id: Scalars['ID']['input'];
|
|
617
|
+
};
|
|
618
|
+
export type QueryUserConfigurationArgs = {
|
|
619
|
+
userId: Scalars['ID']['input'];
|
|
620
|
+
};
|
|
621
|
+
export type QueryUserModelCredentialsArgs = {
|
|
622
|
+
userId: Scalars['ID']['input'];
|
|
623
|
+
};
|
|
624
|
+
export type QueryUsersArgs = {
|
|
625
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
|
626
|
+
filter?: InputMaybe<UserFilter>;
|
|
627
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
|
628
|
+
};
|
|
629
|
+
export declare enum ReasoningLevel {
|
|
630
|
+
High = "HIGH",
|
|
631
|
+
Low = "LOW",
|
|
632
|
+
Max = "MAX",
|
|
633
|
+
Medium = "MEDIUM",
|
|
634
|
+
Minimal = "MINIMAL",
|
|
635
|
+
Off = "OFF",
|
|
636
|
+
Xhigh = "XHIGH"
|
|
637
|
+
}
|
|
638
|
+
export type RefreshCnbAccountInput = {
|
|
639
|
+
/** 省略 = 刷新自己;给出 = ADMIN 代刷新。 */
|
|
640
|
+
userId?: InputMaybe<Scalars['ID']['input']>;
|
|
641
|
+
};
|
|
642
|
+
/** 删附件:同样追加版本;不存在的 path 会被忽略(全被忽略即幂等)。 */
|
|
643
|
+
export type RemoveSkillFilesInput = {
|
|
644
|
+
expectedVersion: Scalars['Int']['input'];
|
|
645
|
+
id: Scalars['ID']['input'];
|
|
646
|
+
paths: Array<Scalars['String']['input']>;
|
|
647
|
+
};
|
|
648
|
+
export declare enum Role {
|
|
649
|
+
Admin = "ADMIN",
|
|
650
|
+
User = "USER"
|
|
651
|
+
}
|
|
652
|
+
export type RoleDefinition = {
|
|
653
|
+
__typename?: 'RoleDefinition';
|
|
654
|
+
code: Role;
|
|
655
|
+
name: Scalars['String']['output'];
|
|
656
|
+
};
|
|
657
|
+
/** 运行面看到的模型连接事实;路由名与 apiKeyEnv 由 client 自铸。 */
|
|
658
|
+
export type RuntimeConnection = {
|
|
659
|
+
__typename?: 'RuntimeConnection';
|
|
660
|
+
baseUrl: Scalars['String']['output'];
|
|
661
|
+
id: Scalars['ID']['output'];
|
|
662
|
+
protocol: ModelProtocol;
|
|
663
|
+
/**
|
|
664
|
+
* 预设 id(= dsh 的提供方路由 id),自定义连接为 null。
|
|
665
|
+
* 是「这条连接代表哪个提供方」的领域事实,client 据此决定路由命名与是否复用目录提供方。
|
|
666
|
+
*/
|
|
667
|
+
provider?: Maybe<Scalars['String']['output']>;
|
|
668
|
+
};
|
|
669
|
+
/** 生效可用目录的一条:已通过连接启用、模型启用、存在性、密钥可用四道判定。 */
|
|
670
|
+
export type RuntimeModel = {
|
|
671
|
+
__typename?: 'RuntimeModel';
|
|
672
|
+
connection: RuntimeConnection;
|
|
673
|
+
displayName?: Maybe<Scalars['String']['output']>;
|
|
674
|
+
id: Scalars['ID']['output'];
|
|
675
|
+
metadata: ModelMetadata;
|
|
676
|
+
upstreamId: Scalars['String']['output'];
|
|
677
|
+
};
|
|
678
|
+
/** 连接级密钥(用户覆盖优先后的最终值);env 变量名由 client 自铸。 */
|
|
679
|
+
export type RuntimeModelCredential = {
|
|
680
|
+
__typename?: 'RuntimeModelCredential';
|
|
681
|
+
connectionId: Scalars['ID']['output'];
|
|
682
|
+
value: Scalars['String']['output'];
|
|
683
|
+
};
|
|
684
|
+
/** 本次可读项目 + 其生效绑定。模型引用已按可用目录校验,失效即 null。 */
|
|
685
|
+
export type RuntimeProject = {
|
|
686
|
+
__typename?: 'RuntimeProject';
|
|
687
|
+
enabled: Scalars['Boolean']['output'];
|
|
688
|
+
executeModelId?: Maybe<Scalars['ID']['output']>;
|
|
689
|
+
id: Scalars['ID']['output'];
|
|
690
|
+
name: Scalars['String']['output'];
|
|
691
|
+
/** 已校验:不在可用目录内则为 null(client 据此回落默认模型)。 */
|
|
692
|
+
planModelId?: Maybe<Scalars['ID']['output']>;
|
|
693
|
+
slug: Scalars['String']['output'];
|
|
694
|
+
};
|
|
695
|
+
/** 运行面技能目录条目:此刻对读取者生效的未归档 head。 */
|
|
696
|
+
export type RuntimeSkill = {
|
|
697
|
+
__typename?: 'RuntimeSkill';
|
|
698
|
+
/** 正文(frontmatter 已剥):dsh 的 SkillDefinition.content 就是这个形态。 */
|
|
699
|
+
content: Scalars['String']['output'];
|
|
700
|
+
description: Scalars['String']['output'];
|
|
701
|
+
fileCount: Scalars['Int']['output'];
|
|
702
|
+
/** 附件清单(字节走 runtimeSkillFiles 按需取,避免 boot 文档膨胀)。 */
|
|
703
|
+
files: Array<RuntimeSkillFile>;
|
|
704
|
+
filesBytes: Scalars['Int']['output'];
|
|
705
|
+
/** 逻辑技能 id(provider 的 locator,跨版本稳定)。 */
|
|
706
|
+
id: Scalars['ID']['output'];
|
|
707
|
+
name: Scalars['String']['output'];
|
|
708
|
+
/** null = 全局技能;是否对本 cwd 生效由 client 按已登记工作区裁定。 */
|
|
709
|
+
projectId?: Maybe<Scalars['ID']['output']>;
|
|
710
|
+
version: Scalars['Int']['output'];
|
|
711
|
+
whenToUse?: Maybe<Scalars['String']['output']>;
|
|
712
|
+
};
|
|
713
|
+
/** 运行面看到的附件清单条目(不含字节)。 */
|
|
714
|
+
export type RuntimeSkillFile = {
|
|
715
|
+
__typename?: 'RuntimeSkillFile';
|
|
716
|
+
isExecutable: Scalars['Boolean']['output'];
|
|
717
|
+
mimeType: Scalars['String']['output'];
|
|
718
|
+
path: Scalars['String']['output'];
|
|
719
|
+
sizeBytes: Scalars['Int']['output'];
|
|
720
|
+
};
|
|
721
|
+
/** 运行面按需读取的附件内容:文本 utf-8、其余 base64。 */
|
|
722
|
+
export type RuntimeSkillFileContent = {
|
|
723
|
+
__typename?: 'RuntimeSkillFileContent';
|
|
724
|
+
content: Scalars['String']['output'];
|
|
725
|
+
encoding: SkillFileEncoding;
|
|
726
|
+
isExecutable: Scalars['Boolean']['output'];
|
|
727
|
+
mimeType: Scalars['String']['output'];
|
|
728
|
+
path: Scalars['String']['output'];
|
|
729
|
+
sizeBytes: Scalars['Int']['output'];
|
|
730
|
+
};
|
|
731
|
+
/** 运行面当前读取者:任何环境(密码登录 / CNB 接入)都返回 hub 里当前用户。 */
|
|
732
|
+
export type RuntimeViewer = {
|
|
733
|
+
__typename?: 'RuntimeViewer';
|
|
734
|
+
displayName: Scalars['String']['output'];
|
|
735
|
+
id: Scalars['ID']['output'];
|
|
736
|
+
username: Scalars['String']['output'];
|
|
737
|
+
};
|
|
738
|
+
export type SaveGlobalInput = {
|
|
739
|
+
expectedRevision: Scalars['Int']['input'];
|
|
740
|
+
preferences?: InputMaybe<PreferencesInput>;
|
|
741
|
+
};
|
|
742
|
+
export type SaveModelConnectionInput = {
|
|
743
|
+
apiKey?: InputMaybe<SecretInput>;
|
|
744
|
+
baseUrl?: InputMaybe<Scalars['String']['input']>;
|
|
745
|
+
displayName: Scalars['String']['input'];
|
|
746
|
+
enabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
747
|
+
expectedRevision: Scalars['Int']['input'];
|
|
748
|
+
/** 省略 = 新建。 */
|
|
749
|
+
id?: InputMaybe<Scalars['ID']['input']>;
|
|
750
|
+
protocol: ModelProtocol;
|
|
751
|
+
/** 预设 id;显式 null = 改成自定义连接。预设锁定 protocol。 */
|
|
752
|
+
provider?: InputMaybe<Scalars['String']['input']>;
|
|
753
|
+
};
|
|
754
|
+
export type SaveModelInput = {
|
|
755
|
+
connectionId: Scalars['ID']['input'];
|
|
756
|
+
/** 显式 null = 清除显示名。 */
|
|
757
|
+
displayName?: InputMaybe<Scalars['String']['input']>;
|
|
758
|
+
enabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
759
|
+
expectedRevision: Scalars['Int']['input'];
|
|
760
|
+
/** 省略 = 新建。 */
|
|
761
|
+
id?: InputMaybe<Scalars['ID']['input']>;
|
|
762
|
+
overrides?: InputMaybe<MetadataInput>;
|
|
763
|
+
retainMissing?: InputMaybe<Scalars['Boolean']['input']>;
|
|
764
|
+
upstreamId?: InputMaybe<Scalars['String']['input']>;
|
|
765
|
+
};
|
|
766
|
+
export type SaveProjectDetailsInput = {
|
|
767
|
+
enabled?: InputMaybe<Scalars['Boolean']['input']>;
|
|
768
|
+
expectedRevision: Scalars['Int']['input'];
|
|
769
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
770
|
+
projectId: Scalars['ID']['input'];
|
|
771
|
+
};
|
|
772
|
+
export type SaveProjectHeadlessModelsInput = {
|
|
773
|
+
executeModelId?: InputMaybe<Scalars['ID']['input']>;
|
|
774
|
+
expectedRevision: Scalars['Int']['input'];
|
|
775
|
+
planModelId?: InputMaybe<Scalars['ID']['input']>;
|
|
776
|
+
projectId: Scalars['ID']['input'];
|
|
777
|
+
};
|
|
778
|
+
export type SaveSkillInput = {
|
|
779
|
+
content: Scalars['String']['input'];
|
|
780
|
+
/** 当前头版本号;过期即 SKILL_VERSION_CONFLICT(同内容重复提交不消耗它)。 */
|
|
781
|
+
expectedVersion: Scalars['Int']['input'];
|
|
782
|
+
id: Scalars['ID']['input'];
|
|
783
|
+
};
|
|
784
|
+
export type SaveUserInput = {
|
|
785
|
+
expectedRevision: Scalars['Int']['input'];
|
|
786
|
+
modelCredentials?: InputMaybe<Array<ModelCredentialInput>>;
|
|
787
|
+
userId: Scalars['ID']['input'];
|
|
788
|
+
};
|
|
789
|
+
/** value / clear / reuse 严格三选一。reuse 仅连接密钥场景有意义。 */
|
|
790
|
+
export type SecretInput = {
|
|
791
|
+
clear?: InputMaybe<Scalars['Boolean']['input']>;
|
|
792
|
+
reuse?: InputMaybe<Scalars['Boolean']['input']>;
|
|
793
|
+
value?: InputMaybe<Scalars['String']['input']>;
|
|
794
|
+
};
|
|
795
|
+
export type SetModelEnabledInput = {
|
|
796
|
+
enabled: Scalars['Boolean']['input'];
|
|
797
|
+
expectedRevision: Scalars['Int']['input'];
|
|
798
|
+
id: Scalars['ID']['input'];
|
|
799
|
+
retainMissing?: InputMaybe<Scalars['Boolean']['input']>;
|
|
800
|
+
};
|
|
801
|
+
/** 项目访问是例外名单:present=false 撤销该账户的访问,present=true 恢复(删不掉行只为留痕)。 */
|
|
802
|
+
export type SetProjectAccessInput = {
|
|
803
|
+
expectedRevision: Scalars['Int']['input'];
|
|
804
|
+
present: Scalars['Boolean']['input'];
|
|
805
|
+
projectId: Scalars['ID']['input'];
|
|
806
|
+
userId: Scalars['ID']['input'];
|
|
807
|
+
};
|
|
808
|
+
export type SetSkillArchivedInput = {
|
|
809
|
+
archived: Scalars['Boolean']['input'];
|
|
810
|
+
expectedVersion: Scalars['Int']['input'];
|
|
811
|
+
id: Scalars['ID']['input'];
|
|
812
|
+
};
|
|
813
|
+
export type SetUserRolesInput = {
|
|
814
|
+
expectedRevision: Scalars['Int']['input'];
|
|
815
|
+
roles: Array<Role>;
|
|
816
|
+
userId: Scalars['ID']['input'];
|
|
817
|
+
};
|
|
818
|
+
export type SetUserStatusInput = {
|
|
819
|
+
expectedRevision: Scalars['Int']['input'];
|
|
820
|
+
status: UserStatus;
|
|
821
|
+
userId: Scalars['ID']['input'];
|
|
822
|
+
};
|
|
823
|
+
/** 一条技能的头版本事实。content 为完整 SKILL.md(frontmatter + 正文),供编辑器 round-trip。 */
|
|
824
|
+
export type Skill = {
|
|
825
|
+
__typename?: 'Skill';
|
|
826
|
+
archived: Scalars['Boolean']['output'];
|
|
827
|
+
content: Scalars['String']['output'];
|
|
828
|
+
description: Scalars['String']['output'];
|
|
829
|
+
fileCount: Scalars['Int']['output'];
|
|
830
|
+
/** 该版本的附件清单(随版本快照,由 skill_files 聚合)。 */
|
|
831
|
+
files: Array<SkillFile>;
|
|
832
|
+
filesBytes: Scalars['Int']['output'];
|
|
833
|
+
/** 逻辑 id(跨版本稳定,即 skills.skill_id)。 */
|
|
834
|
+
id: Scalars['ID']['output'];
|
|
835
|
+
name: Scalars['String']['output'];
|
|
836
|
+
/** null = 全局技能;文本工具与运行面按它分作用域。 */
|
|
837
|
+
projectId?: Maybe<Scalars['ID']['output']>;
|
|
838
|
+
/** head 行的 createdAt。 */
|
|
839
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
840
|
+
/** 当前头版本号;保存时用 expectedVersion 做 CAS。 */
|
|
841
|
+
version: Scalars['Int']['output'];
|
|
842
|
+
whenToUse?: Maybe<Scalars['String']['output']>;
|
|
843
|
+
};
|
|
844
|
+
/** 技能附件清单条目(不含字节)。 */
|
|
845
|
+
export type SkillFile = {
|
|
846
|
+
__typename?: 'SkillFile';
|
|
847
|
+
isExecutable: Scalars['Boolean']['output'];
|
|
848
|
+
mimeType: Scalars['String']['output'];
|
|
849
|
+
/** 相对 files/ 的 UNIX 风格路径,例 scripts/run.sh。 */
|
|
850
|
+
path: Scalars['String']['output'];
|
|
851
|
+
sizeBytes: Scalars['Int']['output'];
|
|
852
|
+
};
|
|
853
|
+
/** 按需读取的附件内容:文本 utf-8、其余 base64(编码见 encoding)。 */
|
|
854
|
+
export type SkillFileContent = {
|
|
855
|
+
__typename?: 'SkillFileContent';
|
|
856
|
+
content: Scalars['String']['output'];
|
|
857
|
+
encoding: SkillFileEncoding;
|
|
858
|
+
isExecutable: Scalars['Boolean']['output'];
|
|
859
|
+
mimeType: Scalars['String']['output'];
|
|
860
|
+
path: Scalars['String']['output'];
|
|
861
|
+
sizeBytes: Scalars['Int']['output'];
|
|
862
|
+
};
|
|
863
|
+
/** 技能附件内容的编码:文本类用 UTF8,其余(图片 / 二进制)用 BASE64。 */
|
|
864
|
+
export declare enum SkillFileEncoding {
|
|
865
|
+
Base64 = "BASE64",
|
|
866
|
+
Utf8 = "UTF8"
|
|
867
|
+
}
|
|
868
|
+
/** 写入一个附件:content 按 encoding 解释(缺省 utf-8);单文件、单次与整技能都有上限。 */
|
|
869
|
+
export type SkillFileInput = {
|
|
870
|
+
content: Scalars['String']['input'];
|
|
871
|
+
/** 省略 = UTF8。 */
|
|
872
|
+
encoding?: InputMaybe<SkillFileEncoding>;
|
|
873
|
+
/** 落盘后可执行位(仅运行面物化时使用)。 */
|
|
874
|
+
isExecutable?: InputMaybe<Scalars['Boolean']['input']>;
|
|
875
|
+
path: Scalars['String']['input'];
|
|
876
|
+
};
|
|
877
|
+
/** 条件:projectId 省略 = 不过滤;显式 null = 仅全局;给定 id = 该项目。search 匹配 name/description(不区分大小写子串);archived 省略 = 全部。 */
|
|
878
|
+
export type SkillFilter = {
|
|
879
|
+
archived?: InputMaybe<Scalars['Boolean']['input']>;
|
|
880
|
+
projectId?: InputMaybe<Scalars['ID']['input']>;
|
|
881
|
+
search?: InputMaybe<Scalars['String']['input']>;
|
|
882
|
+
};
|
|
883
|
+
export type SkillPage = {
|
|
884
|
+
__typename?: 'SkillPage';
|
|
885
|
+
items: Array<Skill>;
|
|
886
|
+
nextCursor?: Maybe<Scalars['String']['output']>;
|
|
887
|
+
};
|
|
888
|
+
/** 一个不可变历史快照。作者用扁平字段(同 ConfigurationRead 口径),不构造完整 User。 */
|
|
889
|
+
export type SkillVersion = {
|
|
890
|
+
__typename?: 'SkillVersion';
|
|
891
|
+
archived: Scalars['Boolean']['output'];
|
|
892
|
+
content: Scalars['String']['output'];
|
|
893
|
+
createdAt: Scalars['DateTime']['output'];
|
|
894
|
+
createdBy: Scalars['ID']['output'];
|
|
895
|
+
createdByDisplayName?: Maybe<Scalars['String']['output']>;
|
|
896
|
+
createdByUsername?: Maybe<Scalars['String']['output']>;
|
|
897
|
+
version: Scalars['Int']['output'];
|
|
898
|
+
};
|
|
899
|
+
export type SyncCnbProjectsInput = {
|
|
900
|
+
/** 要接入的上游仓库 ID;未勾选的不新增(既有项目行不因此改变)。 */
|
|
901
|
+
repositoryIds: Array<Scalars['String']['input']>;
|
|
902
|
+
};
|
|
903
|
+
export type SyncModelCatalogInput = {
|
|
904
|
+
connectionId: Scalars['ID']['input'];
|
|
905
|
+
expectedRevision: Scalars['Int']['input'];
|
|
906
|
+
/** 要接入目录的上游模型 ID;未勾选的不新增(已在目录中的行不因此改变)。 */
|
|
907
|
+
upstreamIds: Array<Scalars['String']['input']>;
|
|
908
|
+
};
|
|
909
|
+
export type UpdateCnbTokenInput = {
|
|
910
|
+
token: Scalars['String']['input'];
|
|
911
|
+
/** 省略 = 改自己;给出 = ADMIN 代改。 */
|
|
912
|
+
userId?: InputMaybe<Scalars['ID']['input']>;
|
|
913
|
+
};
|
|
914
|
+
export type UpdateMyConfigurationInput = {
|
|
915
|
+
expectedRevision: Scalars['Int']['input'];
|
|
916
|
+
modelCredentials?: InputMaybe<Array<ModelCredentialInput>>;
|
|
917
|
+
};
|
|
918
|
+
/** 令牌可见组织树里的一个成员:只读快照,不落库,供同步弹层勾选要添加的用户。 */
|
|
919
|
+
export type UpstreamCnbMember = {
|
|
920
|
+
__typename?: 'UpstreamCnbMember';
|
|
921
|
+
avatar?: Maybe<Scalars['String']['output']>;
|
|
922
|
+
externalUserId: Scalars['String']['output'];
|
|
923
|
+
nickname?: Maybe<Scalars['String']['output']>;
|
|
924
|
+
/** 命中该成员的第一个组织路径(含子组织,按组织路径升序读取)。 */
|
|
925
|
+
organizationPath: Scalars['String']['output'];
|
|
926
|
+
/** 该 CNB 身份是否已有 Hub 账户(已连接或待绑定令牌)。 */
|
|
927
|
+
registered: Scalars['Boolean']['output'];
|
|
928
|
+
username: Scalars['String']['output'];
|
|
929
|
+
};
|
|
930
|
+
/** 令牌可见的一个 CNB 仓库:只读快照,不落库,供同步弹层勾选要接入的项目。 */
|
|
931
|
+
export type UpstreamCnbRepository = {
|
|
932
|
+
__typename?: 'UpstreamCnbRepository';
|
|
933
|
+
externalRepoId: Scalars['String']['output'];
|
|
934
|
+
frozen: Scalars['Boolean']['output'];
|
|
935
|
+
/** 已存在同 externalRepoId 的项目行;同步时勾选与否不改变它。 */
|
|
936
|
+
imported: Scalars['Boolean']['output'];
|
|
937
|
+
name: Scalars['String']['output'];
|
|
938
|
+
path: Scalars['String']['output'];
|
|
939
|
+
/** 上游仓库状态原始值(active / archived / forking);不进 UpstreamStatus 闭集,避免上游新增值炸序列化。 */
|
|
940
|
+
status: Scalars['String']['output'];
|
|
941
|
+
visibility?: Maybe<Scalars['String']['output']>;
|
|
942
|
+
webUrl?: Maybe<Scalars['String']['output']>;
|
|
943
|
+
};
|
|
944
|
+
/** 上游目录里的一条模型:只读快照,不落库,供同步时挑选要接入的模型。 */
|
|
945
|
+
export type UpstreamModel = {
|
|
946
|
+
__typename?: 'UpstreamModel';
|
|
947
|
+
displayName?: Maybe<Scalars['String']['output']>;
|
|
948
|
+
metadata: ModelMetadata;
|
|
949
|
+
upstreamId: Scalars['String']['output'];
|
|
950
|
+
};
|
|
951
|
+
export declare enum UpstreamStatus {
|
|
952
|
+
Active = "ACTIVE",
|
|
953
|
+
Archived = "ARCHIVED",
|
|
954
|
+
Forking = "FORKING",
|
|
955
|
+
Unavailable = "UNAVAILABLE"
|
|
956
|
+
}
|
|
957
|
+
export type User = {
|
|
958
|
+
__typename?: 'User';
|
|
959
|
+
/** 该账户自己的、已验证的 CNB 身份与连接状态。 */
|
|
960
|
+
cnbAccount: CnbAccount;
|
|
961
|
+
createdAt: Scalars['DateTime']['output'];
|
|
962
|
+
displayName: Scalars['String']['output'];
|
|
963
|
+
id: Scalars['ID']['output'];
|
|
964
|
+
lastReadAt?: Maybe<Scalars['DateTime']['output']>;
|
|
965
|
+
/** users 行 revision;状态与角色集合修改都用它做 CAS。 */
|
|
966
|
+
revision: Scalars['Int']['output'];
|
|
967
|
+
/** 服务端聚合(计数 / 最近时间);仅管理员查询有值。 */
|
|
968
|
+
revokedProjectCount?: Maybe<Scalars['Int']['output']>;
|
|
969
|
+
/** 账户拥有的角色。USER 是基础角色,ADMIN 是可叠加的管理权限。 */
|
|
970
|
+
roles: Array<Role>;
|
|
971
|
+
status: UserStatus;
|
|
972
|
+
/** 稳定的本地登录名;创建时从 CNB username 派生,CNB 改名不自动改它。 */
|
|
973
|
+
username: Scalars['String']['output'];
|
|
974
|
+
};
|
|
975
|
+
/** user_configuration 一行的领域读模型。 */
|
|
976
|
+
export type UserConfiguration = {
|
|
977
|
+
__typename?: 'UserConfiguration';
|
|
978
|
+
revision: Scalars['Int']['output'];
|
|
979
|
+
userId: Scalars['ID']['output'];
|
|
980
|
+
};
|
|
981
|
+
/** 条件:search 匹配本地用户名 / 显示名 / CNB 用户名(不区分大小写子串);cnbState 精确匹配连接态。 */
|
|
982
|
+
export type UserFilter = {
|
|
983
|
+
cnbState?: InputMaybe<CnbConnectionState>;
|
|
984
|
+
role?: InputMaybe<Role>;
|
|
985
|
+
search?: InputMaybe<Scalars['String']['input']>;
|
|
986
|
+
status?: InputMaybe<UserStatus>;
|
|
987
|
+
};
|
|
988
|
+
export type UserPage = {
|
|
989
|
+
__typename?: 'UserPage';
|
|
990
|
+
items: Array<User>;
|
|
991
|
+
nextCursor?: Maybe<Scalars['String']['output']>;
|
|
992
|
+
};
|
|
993
|
+
export declare enum UserStatus {
|
|
994
|
+
Active = "ACTIVE",
|
|
995
|
+
Disabled = "DISABLED",
|
|
996
|
+
Pending = "PENDING"
|
|
997
|
+
}
|
|
998
|
+
/** 增 / 改附件:不动 SKILL.md,但同样追加版本(附件随版本快照)。 */
|
|
999
|
+
export type WriteSkillFilesInput = {
|
|
1000
|
+
expectedVersion: Scalars['Int']['input'];
|
|
1001
|
+
files: Array<SkillFileInput>;
|
|
1002
|
+
id: Scalars['ID']['input'];
|
|
1003
|
+
};
|