@fixerorg/schemas 1.0.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/dist/index.d.ts +1376 -0
- package/dist/index.js +435 -0
- package/package.json +37 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1376 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* API 路由定义
|
|
5
|
+
* 前后端统一维护,避免路径不一致
|
|
6
|
+
*/
|
|
7
|
+
declare const API_BASE: "/api";
|
|
8
|
+
/**
|
|
9
|
+
* 后端路由挂载路径常量
|
|
10
|
+
* 用于 app.ts 中的 app.route() 挂载
|
|
11
|
+
*/
|
|
12
|
+
declare const API_ROUTES: {
|
|
13
|
+
readonly settings: "/api/settings";
|
|
14
|
+
readonly projects: "/api/projects";
|
|
15
|
+
readonly tasks: "/api/tasks";
|
|
16
|
+
readonly github: "/api/github";
|
|
17
|
+
readonly worktree: "/api/worktree";
|
|
18
|
+
readonly issueTemplates: "/api/issue-templates";
|
|
19
|
+
readonly health: "/api/health";
|
|
20
|
+
};
|
|
21
|
+
declare const SETTINGS: {
|
|
22
|
+
/** 获取/更新设置 */
|
|
23
|
+
readonly base: "/api/settings";
|
|
24
|
+
/** GitHub Token 验证 */
|
|
25
|
+
readonly verifyGithub: "/api/settings/github/verify";
|
|
26
|
+
};
|
|
27
|
+
declare const PROJECTS: {
|
|
28
|
+
/** 项目列表 */
|
|
29
|
+
readonly list: "/api/projects";
|
|
30
|
+
/** 单个项目 */
|
|
31
|
+
readonly detail: (projectId: string) => string;
|
|
32
|
+
/** 同步项目 */
|
|
33
|
+
readonly sync: (projectId: string) => string;
|
|
34
|
+
};
|
|
35
|
+
declare const ISSUES: {
|
|
36
|
+
/** 项目下的 Issue 列表 */
|
|
37
|
+
readonly listByProject: (projectId: string) => string;
|
|
38
|
+
/** 创建 Issue */
|
|
39
|
+
readonly create: (projectId: string) => string;
|
|
40
|
+
/** 单个 Issue */
|
|
41
|
+
readonly detail: (projectId: string, issueId: string) => string;
|
|
42
|
+
/** 更新 Issue */
|
|
43
|
+
readonly update: (projectId: string, issueId: string) => string;
|
|
44
|
+
/** 删除 Issue */
|
|
45
|
+
readonly delete: (projectId: string, issueId: string) => string;
|
|
46
|
+
/** AI 聊天 */
|
|
47
|
+
readonly aiChat: (projectId: string, issueId: string) => string;
|
|
48
|
+
};
|
|
49
|
+
declare const TASKS: {
|
|
50
|
+
/** Issue 下的 Task 列表 */
|
|
51
|
+
readonly listByIssue: (issueId: string) => string;
|
|
52
|
+
/** 创建 Task */
|
|
53
|
+
readonly create: (issueId: string) => string;
|
|
54
|
+
/** 单个 Task */
|
|
55
|
+
readonly detail: (taskId: string | number) => string;
|
|
56
|
+
/** 更新 Task */
|
|
57
|
+
readonly update: (taskId: string | number) => string;
|
|
58
|
+
/** 取消 Task */
|
|
59
|
+
readonly cancel: (taskId: string | number) => string;
|
|
60
|
+
/** 删除 Task */
|
|
61
|
+
readonly delete: (taskId: string | number) => string;
|
|
62
|
+
};
|
|
63
|
+
declare const GITHUB: {
|
|
64
|
+
/** 获取仓库列表 */
|
|
65
|
+
readonly repos: "/api/github/repos";
|
|
66
|
+
/** 获取仓库分支 */
|
|
67
|
+
readonly branches: (owner: string, repo: string) => string;
|
|
68
|
+
};
|
|
69
|
+
declare const WORKTREE: {
|
|
70
|
+
/** 获取 Worktree 状态 */
|
|
71
|
+
readonly status: (issueId: string) => string;
|
|
72
|
+
/** 创建 Worktree */
|
|
73
|
+
readonly create: (issueId: string) => string;
|
|
74
|
+
/** 删除 Worktree */
|
|
75
|
+
readonly delete: (issueId: string) => string;
|
|
76
|
+
};
|
|
77
|
+
declare const ISSUE_TEMPLATES: {
|
|
78
|
+
/** 模板列表(全局) */
|
|
79
|
+
readonly list: "/api/issue-templates";
|
|
80
|
+
/** 获取项目下的模板列表 */
|
|
81
|
+
readonly byProject: (projectId: string) => string;
|
|
82
|
+
/** 获取单个模板 */
|
|
83
|
+
readonly detail: (projectId: string, name: string) => string;
|
|
84
|
+
};
|
|
85
|
+
declare const AI: {
|
|
86
|
+
/** AI 聊天 (SSE) - 实际端点由 ISSUES.aiChat 提供 */
|
|
87
|
+
readonly chat: (projectId: string, issueId: string) => string;
|
|
88
|
+
};
|
|
89
|
+
declare const HEALTH: "/api/health";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 通用 Schema 定义
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
/** 同步状态 */
|
|
96
|
+
declare const SyncStatusSchema: z.ZodEnum<["syncing", "synced", "error"]>;
|
|
97
|
+
type SyncStatus = z.infer<typeof SyncStatusSchema>;
|
|
98
|
+
/** Issue 状态 */
|
|
99
|
+
declare const IssueStatusSchema: z.ZodEnum<["open", "in_progress", "in_review", "done"]>;
|
|
100
|
+
type IssueStatus = z.infer<typeof IssueStatusSchema>;
|
|
101
|
+
/** Issue 优先级 */
|
|
102
|
+
declare const IssuePrioritySchema: z.ZodEnum<["high", "medium", "low"]>;
|
|
103
|
+
type IssuePriority = z.infer<typeof IssuePrioritySchema>;
|
|
104
|
+
/** Task 状态 */
|
|
105
|
+
declare const TaskStatusSchema: z.ZodEnum<["pending", "active", "completed", "cancelled", "error"]>;
|
|
106
|
+
type TaskStatus = z.infer<typeof TaskStatusSchema>;
|
|
107
|
+
/** Worktree 状态 */
|
|
108
|
+
declare const WorktreeStatusSchema: z.ZodEnum<["pending", "creating", "ready", "error"]>;
|
|
109
|
+
type WorktreeStatus = z.infer<typeof WorktreeStatusSchema>;
|
|
110
|
+
/** 分页响应基础 Schema */
|
|
111
|
+
declare const PaginatedResponseSchema: <T extends z.ZodTypeAny>(itemSchema: T) => z.ZodObject<{
|
|
112
|
+
items: z.ZodArray<T, "many">;
|
|
113
|
+
total: z.ZodNumber;
|
|
114
|
+
page: z.ZodNumber;
|
|
115
|
+
per_page: z.ZodNumber;
|
|
116
|
+
pages: z.ZodNumber;
|
|
117
|
+
}, "strip", z.ZodTypeAny, {
|
|
118
|
+
page: number;
|
|
119
|
+
per_page: number;
|
|
120
|
+
items: T["_output"][];
|
|
121
|
+
total: number;
|
|
122
|
+
pages: number;
|
|
123
|
+
}, {
|
|
124
|
+
page: number;
|
|
125
|
+
per_page: number;
|
|
126
|
+
items: T["_input"][];
|
|
127
|
+
total: number;
|
|
128
|
+
pages: number;
|
|
129
|
+
}>;
|
|
130
|
+
/** 分页查询参数 */
|
|
131
|
+
declare const PaginationQuerySchema: z.ZodObject<{
|
|
132
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
133
|
+
per_page: z.ZodDefault<z.ZodNumber>;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
page: number;
|
|
136
|
+
per_page: number;
|
|
137
|
+
}, {
|
|
138
|
+
page?: number | undefined;
|
|
139
|
+
per_page?: number | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
type PaginationQuery = z.infer<typeof PaginationQuerySchema>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Project Schema 定义
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/** Issue 统计 */
|
|
148
|
+
declare const IssueStatsSchema: z.ZodObject<{
|
|
149
|
+
total: z.ZodNumber;
|
|
150
|
+
done: z.ZodNumber;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
done: number;
|
|
153
|
+
total: number;
|
|
154
|
+
}, {
|
|
155
|
+
done: number;
|
|
156
|
+
total: number;
|
|
157
|
+
}>;
|
|
158
|
+
type IssueStats = z.infer<typeof IssueStatsSchema>;
|
|
159
|
+
/** Project 响应 */
|
|
160
|
+
declare const ProjectResponseSchema: z.ZodObject<{
|
|
161
|
+
id: z.ZodNumber;
|
|
162
|
+
projectId: z.ZodString;
|
|
163
|
+
name: z.ZodString;
|
|
164
|
+
description: z.ZodNullable<z.ZodString>;
|
|
165
|
+
color: z.ZodString;
|
|
166
|
+
githubRepoId: z.ZodNullable<z.ZodNumber>;
|
|
167
|
+
defaultBranch: z.ZodString;
|
|
168
|
+
selectedBranch: z.ZodString;
|
|
169
|
+
cloneUrl: z.ZodNullable<z.ZodString>;
|
|
170
|
+
starsCount: z.ZodNumber;
|
|
171
|
+
forksCount: z.ZodNumber;
|
|
172
|
+
syncStatus: z.ZodEnum<["syncing", "synced", "error"]>;
|
|
173
|
+
localPath: z.ZodNullable<z.ZodString>;
|
|
174
|
+
lastSyncAt: z.ZodNullable<z.ZodDate>;
|
|
175
|
+
lastActivity: z.ZodNullable<z.ZodString>;
|
|
176
|
+
syncError: z.ZodNullable<z.ZodString>;
|
|
177
|
+
createdAt: z.ZodDate;
|
|
178
|
+
updatedAt: z.ZodDate;
|
|
179
|
+
issueStats: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
total: z.ZodNumber;
|
|
181
|
+
done: z.ZodNumber;
|
|
182
|
+
}, "strip", z.ZodTypeAny, {
|
|
183
|
+
done: number;
|
|
184
|
+
total: number;
|
|
185
|
+
}, {
|
|
186
|
+
done: number;
|
|
187
|
+
total: number;
|
|
188
|
+
}>>;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
id: number;
|
|
191
|
+
projectId: string;
|
|
192
|
+
name: string;
|
|
193
|
+
description: string | null;
|
|
194
|
+
color: string;
|
|
195
|
+
githubRepoId: number | null;
|
|
196
|
+
defaultBranch: string;
|
|
197
|
+
selectedBranch: string;
|
|
198
|
+
cloneUrl: string | null;
|
|
199
|
+
starsCount: number;
|
|
200
|
+
forksCount: number;
|
|
201
|
+
syncStatus: "syncing" | "synced" | "error";
|
|
202
|
+
localPath: string | null;
|
|
203
|
+
lastSyncAt: Date | null;
|
|
204
|
+
lastActivity: string | null;
|
|
205
|
+
syncError: string | null;
|
|
206
|
+
createdAt: Date;
|
|
207
|
+
updatedAt: Date;
|
|
208
|
+
issueStats?: {
|
|
209
|
+
done: number;
|
|
210
|
+
total: number;
|
|
211
|
+
} | undefined;
|
|
212
|
+
}, {
|
|
213
|
+
id: number;
|
|
214
|
+
projectId: string;
|
|
215
|
+
name: string;
|
|
216
|
+
description: string | null;
|
|
217
|
+
color: string;
|
|
218
|
+
githubRepoId: number | null;
|
|
219
|
+
defaultBranch: string;
|
|
220
|
+
selectedBranch: string;
|
|
221
|
+
cloneUrl: string | null;
|
|
222
|
+
starsCount: number;
|
|
223
|
+
forksCount: number;
|
|
224
|
+
syncStatus: "syncing" | "synced" | "error";
|
|
225
|
+
localPath: string | null;
|
|
226
|
+
lastSyncAt: Date | null;
|
|
227
|
+
lastActivity: string | null;
|
|
228
|
+
syncError: string | null;
|
|
229
|
+
createdAt: Date;
|
|
230
|
+
updatedAt: Date;
|
|
231
|
+
issueStats?: {
|
|
232
|
+
done: number;
|
|
233
|
+
total: number;
|
|
234
|
+
} | undefined;
|
|
235
|
+
}>;
|
|
236
|
+
type ProjectResponse = z.infer<typeof ProjectResponseSchema>;
|
|
237
|
+
/** 创建 Project */
|
|
238
|
+
declare const ProjectCreateSchema: z.ZodObject<{
|
|
239
|
+
repo: z.ZodString;
|
|
240
|
+
branch: z.ZodDefault<z.ZodString>;
|
|
241
|
+
}, "strip", z.ZodTypeAny, {
|
|
242
|
+
repo: string;
|
|
243
|
+
branch: string;
|
|
244
|
+
}, {
|
|
245
|
+
repo: string;
|
|
246
|
+
branch?: string | undefined;
|
|
247
|
+
}>;
|
|
248
|
+
type ProjectCreate = z.infer<typeof ProjectCreateSchema>;
|
|
249
|
+
/** 更新 Project */
|
|
250
|
+
declare const ProjectUpdateSchema: z.ZodObject<{
|
|
251
|
+
selectedBranch: z.ZodOptional<z.ZodString>;
|
|
252
|
+
color: z.ZodOptional<z.ZodString>;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
254
|
+
color?: string | undefined;
|
|
255
|
+
selectedBranch?: string | undefined;
|
|
256
|
+
}, {
|
|
257
|
+
color?: string | undefined;
|
|
258
|
+
selectedBranch?: string | undefined;
|
|
259
|
+
}>;
|
|
260
|
+
type ProjectUpdate = z.infer<typeof ProjectUpdateSchema>;
|
|
261
|
+
declare const ProjectListResponseSchema: z.ZodObject<{
|
|
262
|
+
items: z.ZodArray<z.ZodObject<{
|
|
263
|
+
id: z.ZodNumber;
|
|
264
|
+
projectId: z.ZodString;
|
|
265
|
+
name: z.ZodString;
|
|
266
|
+
description: z.ZodNullable<z.ZodString>;
|
|
267
|
+
color: z.ZodString;
|
|
268
|
+
githubRepoId: z.ZodNullable<z.ZodNumber>;
|
|
269
|
+
defaultBranch: z.ZodString;
|
|
270
|
+
selectedBranch: z.ZodString;
|
|
271
|
+
cloneUrl: z.ZodNullable<z.ZodString>;
|
|
272
|
+
starsCount: z.ZodNumber;
|
|
273
|
+
forksCount: z.ZodNumber;
|
|
274
|
+
syncStatus: z.ZodEnum<["syncing", "synced", "error"]>;
|
|
275
|
+
localPath: z.ZodNullable<z.ZodString>;
|
|
276
|
+
lastSyncAt: z.ZodNullable<z.ZodDate>;
|
|
277
|
+
lastActivity: z.ZodNullable<z.ZodString>;
|
|
278
|
+
syncError: z.ZodNullable<z.ZodString>;
|
|
279
|
+
createdAt: z.ZodDate;
|
|
280
|
+
updatedAt: z.ZodDate;
|
|
281
|
+
issueStats: z.ZodOptional<z.ZodObject<{
|
|
282
|
+
total: z.ZodNumber;
|
|
283
|
+
done: z.ZodNumber;
|
|
284
|
+
}, "strip", z.ZodTypeAny, {
|
|
285
|
+
done: number;
|
|
286
|
+
total: number;
|
|
287
|
+
}, {
|
|
288
|
+
done: number;
|
|
289
|
+
total: number;
|
|
290
|
+
}>>;
|
|
291
|
+
}, "strip", z.ZodTypeAny, {
|
|
292
|
+
id: number;
|
|
293
|
+
projectId: string;
|
|
294
|
+
name: string;
|
|
295
|
+
description: string | null;
|
|
296
|
+
color: string;
|
|
297
|
+
githubRepoId: number | null;
|
|
298
|
+
defaultBranch: string;
|
|
299
|
+
selectedBranch: string;
|
|
300
|
+
cloneUrl: string | null;
|
|
301
|
+
starsCount: number;
|
|
302
|
+
forksCount: number;
|
|
303
|
+
syncStatus: "syncing" | "synced" | "error";
|
|
304
|
+
localPath: string | null;
|
|
305
|
+
lastSyncAt: Date | null;
|
|
306
|
+
lastActivity: string | null;
|
|
307
|
+
syncError: string | null;
|
|
308
|
+
createdAt: Date;
|
|
309
|
+
updatedAt: Date;
|
|
310
|
+
issueStats?: {
|
|
311
|
+
done: number;
|
|
312
|
+
total: number;
|
|
313
|
+
} | undefined;
|
|
314
|
+
}, {
|
|
315
|
+
id: number;
|
|
316
|
+
projectId: string;
|
|
317
|
+
name: string;
|
|
318
|
+
description: string | null;
|
|
319
|
+
color: string;
|
|
320
|
+
githubRepoId: number | null;
|
|
321
|
+
defaultBranch: string;
|
|
322
|
+
selectedBranch: string;
|
|
323
|
+
cloneUrl: string | null;
|
|
324
|
+
starsCount: number;
|
|
325
|
+
forksCount: number;
|
|
326
|
+
syncStatus: "syncing" | "synced" | "error";
|
|
327
|
+
localPath: string | null;
|
|
328
|
+
lastSyncAt: Date | null;
|
|
329
|
+
lastActivity: string | null;
|
|
330
|
+
syncError: string | null;
|
|
331
|
+
createdAt: Date;
|
|
332
|
+
updatedAt: Date;
|
|
333
|
+
issueStats?: {
|
|
334
|
+
done: number;
|
|
335
|
+
total: number;
|
|
336
|
+
} | undefined;
|
|
337
|
+
}>, "many">;
|
|
338
|
+
total: z.ZodNumber;
|
|
339
|
+
page: z.ZodNumber;
|
|
340
|
+
per_page: z.ZodNumber;
|
|
341
|
+
pages: z.ZodNumber;
|
|
342
|
+
}, "strip", z.ZodTypeAny, {
|
|
343
|
+
page: number;
|
|
344
|
+
per_page: number;
|
|
345
|
+
items: {
|
|
346
|
+
id: number;
|
|
347
|
+
projectId: string;
|
|
348
|
+
name: string;
|
|
349
|
+
description: string | null;
|
|
350
|
+
color: string;
|
|
351
|
+
githubRepoId: number | null;
|
|
352
|
+
defaultBranch: string;
|
|
353
|
+
selectedBranch: string;
|
|
354
|
+
cloneUrl: string | null;
|
|
355
|
+
starsCount: number;
|
|
356
|
+
forksCount: number;
|
|
357
|
+
syncStatus: "syncing" | "synced" | "error";
|
|
358
|
+
localPath: string | null;
|
|
359
|
+
lastSyncAt: Date | null;
|
|
360
|
+
lastActivity: string | null;
|
|
361
|
+
syncError: string | null;
|
|
362
|
+
createdAt: Date;
|
|
363
|
+
updatedAt: Date;
|
|
364
|
+
issueStats?: {
|
|
365
|
+
done: number;
|
|
366
|
+
total: number;
|
|
367
|
+
} | undefined;
|
|
368
|
+
}[];
|
|
369
|
+
total: number;
|
|
370
|
+
pages: number;
|
|
371
|
+
}, {
|
|
372
|
+
page: number;
|
|
373
|
+
per_page: number;
|
|
374
|
+
items: {
|
|
375
|
+
id: number;
|
|
376
|
+
projectId: string;
|
|
377
|
+
name: string;
|
|
378
|
+
description: string | null;
|
|
379
|
+
color: string;
|
|
380
|
+
githubRepoId: number | null;
|
|
381
|
+
defaultBranch: string;
|
|
382
|
+
selectedBranch: string;
|
|
383
|
+
cloneUrl: string | null;
|
|
384
|
+
starsCount: number;
|
|
385
|
+
forksCount: number;
|
|
386
|
+
syncStatus: "syncing" | "synced" | "error";
|
|
387
|
+
localPath: string | null;
|
|
388
|
+
lastSyncAt: Date | null;
|
|
389
|
+
lastActivity: string | null;
|
|
390
|
+
syncError: string | null;
|
|
391
|
+
createdAt: Date;
|
|
392
|
+
updatedAt: Date;
|
|
393
|
+
issueStats?: {
|
|
394
|
+
done: number;
|
|
395
|
+
total: number;
|
|
396
|
+
} | undefined;
|
|
397
|
+
}[];
|
|
398
|
+
total: number;
|
|
399
|
+
pages: number;
|
|
400
|
+
}>;
|
|
401
|
+
type ProjectListResponse = z.infer<typeof ProjectListResponseSchema>;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Task Schema 定义
|
|
405
|
+
*/
|
|
406
|
+
|
|
407
|
+
/** Task 响应 */
|
|
408
|
+
declare const TaskResponseSchema: z.ZodObject<{
|
|
409
|
+
id: z.ZodNumber;
|
|
410
|
+
issueId: z.ZodString;
|
|
411
|
+
name: z.ZodString;
|
|
412
|
+
status: z.ZodEnum<["pending", "active", "completed", "cancelled", "error"]>;
|
|
413
|
+
output: z.ZodNullable<z.ZodUnknown>;
|
|
414
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
415
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
416
|
+
createdAt: z.ZodDate;
|
|
417
|
+
updatedAt: z.ZodDate;
|
|
418
|
+
}, "strip", z.ZodTypeAny, {
|
|
419
|
+
status: "error" | "pending" | "active" | "completed" | "cancelled";
|
|
420
|
+
id: number;
|
|
421
|
+
name: string;
|
|
422
|
+
createdAt: Date;
|
|
423
|
+
updatedAt: Date;
|
|
424
|
+
issueId: string;
|
|
425
|
+
startedAt: Date | null;
|
|
426
|
+
completedAt: Date | null;
|
|
427
|
+
output?: unknown;
|
|
428
|
+
}, {
|
|
429
|
+
status: "error" | "pending" | "active" | "completed" | "cancelled";
|
|
430
|
+
id: number;
|
|
431
|
+
name: string;
|
|
432
|
+
createdAt: Date;
|
|
433
|
+
updatedAt: Date;
|
|
434
|
+
issueId: string;
|
|
435
|
+
startedAt: Date | null;
|
|
436
|
+
completedAt: Date | null;
|
|
437
|
+
output?: unknown;
|
|
438
|
+
}>;
|
|
439
|
+
type TaskResponse = z.infer<typeof TaskResponseSchema>;
|
|
440
|
+
/** 创建 Task */
|
|
441
|
+
declare const TaskCreateSchema: z.ZodObject<{
|
|
442
|
+
name: z.ZodString;
|
|
443
|
+
issueId: z.ZodString;
|
|
444
|
+
}, "strip", z.ZodTypeAny, {
|
|
445
|
+
name: string;
|
|
446
|
+
issueId: string;
|
|
447
|
+
}, {
|
|
448
|
+
name: string;
|
|
449
|
+
issueId: string;
|
|
450
|
+
}>;
|
|
451
|
+
type TaskCreate = z.infer<typeof TaskCreateSchema>;
|
|
452
|
+
/** 更新 Task */
|
|
453
|
+
declare const TaskUpdateSchema: z.ZodObject<{
|
|
454
|
+
status: z.ZodOptional<z.ZodEnum<["pending", "active", "completed", "cancelled", "error"]>>;
|
|
455
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
456
|
+
}, "strip", z.ZodTypeAny, {
|
|
457
|
+
status?: "error" | "pending" | "active" | "completed" | "cancelled" | undefined;
|
|
458
|
+
output?: unknown;
|
|
459
|
+
}, {
|
|
460
|
+
status?: "error" | "pending" | "active" | "completed" | "cancelled" | undefined;
|
|
461
|
+
output?: unknown;
|
|
462
|
+
}>;
|
|
463
|
+
type TaskUpdate = z.infer<typeof TaskUpdateSchema>;
|
|
464
|
+
declare const TaskListResponseSchema: z.ZodObject<{
|
|
465
|
+
items: z.ZodArray<z.ZodObject<{
|
|
466
|
+
id: z.ZodNumber;
|
|
467
|
+
issueId: z.ZodString;
|
|
468
|
+
name: z.ZodString;
|
|
469
|
+
status: z.ZodEnum<["pending", "active", "completed", "cancelled", "error"]>;
|
|
470
|
+
output: z.ZodNullable<z.ZodUnknown>;
|
|
471
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
472
|
+
completedAt: z.ZodNullable<z.ZodDate>;
|
|
473
|
+
createdAt: z.ZodDate;
|
|
474
|
+
updatedAt: z.ZodDate;
|
|
475
|
+
}, "strip", z.ZodTypeAny, {
|
|
476
|
+
status: "error" | "pending" | "active" | "completed" | "cancelled";
|
|
477
|
+
id: number;
|
|
478
|
+
name: string;
|
|
479
|
+
createdAt: Date;
|
|
480
|
+
updatedAt: Date;
|
|
481
|
+
issueId: string;
|
|
482
|
+
startedAt: Date | null;
|
|
483
|
+
completedAt: Date | null;
|
|
484
|
+
output?: unknown;
|
|
485
|
+
}, {
|
|
486
|
+
status: "error" | "pending" | "active" | "completed" | "cancelled";
|
|
487
|
+
id: number;
|
|
488
|
+
name: string;
|
|
489
|
+
createdAt: Date;
|
|
490
|
+
updatedAt: Date;
|
|
491
|
+
issueId: string;
|
|
492
|
+
startedAt: Date | null;
|
|
493
|
+
completedAt: Date | null;
|
|
494
|
+
output?: unknown;
|
|
495
|
+
}>, "many">;
|
|
496
|
+
total: z.ZodNumber;
|
|
497
|
+
page: z.ZodNumber;
|
|
498
|
+
per_page: z.ZodNumber;
|
|
499
|
+
pages: z.ZodNumber;
|
|
500
|
+
}, "strip", z.ZodTypeAny, {
|
|
501
|
+
page: number;
|
|
502
|
+
per_page: number;
|
|
503
|
+
items: {
|
|
504
|
+
status: "error" | "pending" | "active" | "completed" | "cancelled";
|
|
505
|
+
id: number;
|
|
506
|
+
name: string;
|
|
507
|
+
createdAt: Date;
|
|
508
|
+
updatedAt: Date;
|
|
509
|
+
issueId: string;
|
|
510
|
+
startedAt: Date | null;
|
|
511
|
+
completedAt: Date | null;
|
|
512
|
+
output?: unknown;
|
|
513
|
+
}[];
|
|
514
|
+
total: number;
|
|
515
|
+
pages: number;
|
|
516
|
+
}, {
|
|
517
|
+
page: number;
|
|
518
|
+
per_page: number;
|
|
519
|
+
items: {
|
|
520
|
+
status: "error" | "pending" | "active" | "completed" | "cancelled";
|
|
521
|
+
id: number;
|
|
522
|
+
name: string;
|
|
523
|
+
createdAt: Date;
|
|
524
|
+
updatedAt: Date;
|
|
525
|
+
issueId: string;
|
|
526
|
+
startedAt: Date | null;
|
|
527
|
+
completedAt: Date | null;
|
|
528
|
+
output?: unknown;
|
|
529
|
+
}[];
|
|
530
|
+
total: number;
|
|
531
|
+
pages: number;
|
|
532
|
+
}>;
|
|
533
|
+
type TaskListResponse = z.infer<typeof TaskListResponseSchema>;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Issue Schema 定义
|
|
537
|
+
*/
|
|
538
|
+
|
|
539
|
+
/** Issue 响应 */
|
|
540
|
+
declare const IssueResponseSchema: z.ZodObject<{
|
|
541
|
+
id: z.ZodNumber;
|
|
542
|
+
issueId: z.ZodString;
|
|
543
|
+
projectId: z.ZodString;
|
|
544
|
+
title: z.ZodString;
|
|
545
|
+
description: z.ZodNullable<z.ZodString>;
|
|
546
|
+
status: z.ZodEnum<["open", "in_progress", "in_review", "done"]>;
|
|
547
|
+
priority: z.ZodEnum<["high", "medium", "low"]>;
|
|
548
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
549
|
+
branchName: z.ZodNullable<z.ZodString>;
|
|
550
|
+
worktreePath: z.ZodNullable<z.ZodString>;
|
|
551
|
+
worktreeStatus: z.ZodEnum<["pending", "creating", "ready", "error"]>;
|
|
552
|
+
worktreeError: z.ZodNullable<z.ZodString>;
|
|
553
|
+
worktreeCreatedAt: z.ZodNullable<z.ZodDate>;
|
|
554
|
+
createdAt: z.ZodDate;
|
|
555
|
+
updatedAt: z.ZodDate;
|
|
556
|
+
}, "strip", z.ZodTypeAny, {
|
|
557
|
+
status: "open" | "in_progress" | "in_review" | "done";
|
|
558
|
+
id: number;
|
|
559
|
+
projectId: string;
|
|
560
|
+
description: string | null;
|
|
561
|
+
createdAt: Date;
|
|
562
|
+
updatedAt: Date;
|
|
563
|
+
issueId: string;
|
|
564
|
+
title: string;
|
|
565
|
+
priority: "high" | "medium" | "low";
|
|
566
|
+
tags: string[];
|
|
567
|
+
branchName: string | null;
|
|
568
|
+
worktreePath: string | null;
|
|
569
|
+
worktreeStatus: "error" | "pending" | "creating" | "ready";
|
|
570
|
+
worktreeError: string | null;
|
|
571
|
+
worktreeCreatedAt: Date | null;
|
|
572
|
+
}, {
|
|
573
|
+
status: "open" | "in_progress" | "in_review" | "done";
|
|
574
|
+
id: number;
|
|
575
|
+
projectId: string;
|
|
576
|
+
description: string | null;
|
|
577
|
+
createdAt: Date;
|
|
578
|
+
updatedAt: Date;
|
|
579
|
+
issueId: string;
|
|
580
|
+
title: string;
|
|
581
|
+
priority: "high" | "medium" | "low";
|
|
582
|
+
tags: string[];
|
|
583
|
+
branchName: string | null;
|
|
584
|
+
worktreePath: string | null;
|
|
585
|
+
worktreeStatus: "error" | "pending" | "creating" | "ready";
|
|
586
|
+
worktreeError: string | null;
|
|
587
|
+
worktreeCreatedAt: Date | null;
|
|
588
|
+
}>;
|
|
589
|
+
type IssueResponse = z.infer<typeof IssueResponseSchema>;
|
|
590
|
+
/** 创建 Issue */
|
|
591
|
+
declare const IssueCreateSchema: z.ZodObject<{
|
|
592
|
+
title: z.ZodString;
|
|
593
|
+
description: z.ZodOptional<z.ZodString>;
|
|
594
|
+
priority: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
595
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
596
|
+
}, "strip", z.ZodTypeAny, {
|
|
597
|
+
title: string;
|
|
598
|
+
description?: string | undefined;
|
|
599
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
600
|
+
tags?: string[] | undefined;
|
|
601
|
+
}, {
|
|
602
|
+
title: string;
|
|
603
|
+
description?: string | undefined;
|
|
604
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
605
|
+
tags?: string[] | undefined;
|
|
606
|
+
}>;
|
|
607
|
+
type IssueCreate = z.infer<typeof IssueCreateSchema>;
|
|
608
|
+
/** 更新 Issue */
|
|
609
|
+
declare const IssueUpdateSchema: z.ZodObject<{
|
|
610
|
+
title: z.ZodOptional<z.ZodString>;
|
|
611
|
+
description: z.ZodOptional<z.ZodString>;
|
|
612
|
+
status: z.ZodOptional<z.ZodEnum<["open", "in_progress", "in_review", "done"]>>;
|
|
613
|
+
priority: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
|
|
614
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
615
|
+
}, "strip", z.ZodTypeAny, {
|
|
616
|
+
status?: "open" | "in_progress" | "in_review" | "done" | undefined;
|
|
617
|
+
description?: string | undefined;
|
|
618
|
+
title?: string | undefined;
|
|
619
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
620
|
+
tags?: string[] | undefined;
|
|
621
|
+
}, {
|
|
622
|
+
status?: "open" | "in_progress" | "in_review" | "done" | undefined;
|
|
623
|
+
description?: string | undefined;
|
|
624
|
+
title?: string | undefined;
|
|
625
|
+
priority?: "high" | "medium" | "low" | undefined;
|
|
626
|
+
tags?: string[] | undefined;
|
|
627
|
+
}>;
|
|
628
|
+
type IssueUpdate = z.infer<typeof IssueUpdateSchema>;
|
|
629
|
+
declare const IssueListResponseSchema: z.ZodObject<{
|
|
630
|
+
items: z.ZodArray<z.ZodObject<{
|
|
631
|
+
id: z.ZodNumber;
|
|
632
|
+
issueId: z.ZodString;
|
|
633
|
+
projectId: z.ZodString;
|
|
634
|
+
title: z.ZodString;
|
|
635
|
+
description: z.ZodNullable<z.ZodString>;
|
|
636
|
+
status: z.ZodEnum<["open", "in_progress", "in_review", "done"]>;
|
|
637
|
+
priority: z.ZodEnum<["high", "medium", "low"]>;
|
|
638
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
639
|
+
branchName: z.ZodNullable<z.ZodString>;
|
|
640
|
+
worktreePath: z.ZodNullable<z.ZodString>;
|
|
641
|
+
worktreeStatus: z.ZodEnum<["pending", "creating", "ready", "error"]>;
|
|
642
|
+
worktreeError: z.ZodNullable<z.ZodString>;
|
|
643
|
+
worktreeCreatedAt: z.ZodNullable<z.ZodDate>;
|
|
644
|
+
createdAt: z.ZodDate;
|
|
645
|
+
updatedAt: z.ZodDate;
|
|
646
|
+
}, "strip", z.ZodTypeAny, {
|
|
647
|
+
status: "open" | "in_progress" | "in_review" | "done";
|
|
648
|
+
id: number;
|
|
649
|
+
projectId: string;
|
|
650
|
+
description: string | null;
|
|
651
|
+
createdAt: Date;
|
|
652
|
+
updatedAt: Date;
|
|
653
|
+
issueId: string;
|
|
654
|
+
title: string;
|
|
655
|
+
priority: "high" | "medium" | "low";
|
|
656
|
+
tags: string[];
|
|
657
|
+
branchName: string | null;
|
|
658
|
+
worktreePath: string | null;
|
|
659
|
+
worktreeStatus: "error" | "pending" | "creating" | "ready";
|
|
660
|
+
worktreeError: string | null;
|
|
661
|
+
worktreeCreatedAt: Date | null;
|
|
662
|
+
}, {
|
|
663
|
+
status: "open" | "in_progress" | "in_review" | "done";
|
|
664
|
+
id: number;
|
|
665
|
+
projectId: string;
|
|
666
|
+
description: string | null;
|
|
667
|
+
createdAt: Date;
|
|
668
|
+
updatedAt: Date;
|
|
669
|
+
issueId: string;
|
|
670
|
+
title: string;
|
|
671
|
+
priority: "high" | "medium" | "low";
|
|
672
|
+
tags: string[];
|
|
673
|
+
branchName: string | null;
|
|
674
|
+
worktreePath: string | null;
|
|
675
|
+
worktreeStatus: "error" | "pending" | "creating" | "ready";
|
|
676
|
+
worktreeError: string | null;
|
|
677
|
+
worktreeCreatedAt: Date | null;
|
|
678
|
+
}>, "many">;
|
|
679
|
+
total: z.ZodNumber;
|
|
680
|
+
page: z.ZodNumber;
|
|
681
|
+
per_page: z.ZodNumber;
|
|
682
|
+
pages: z.ZodNumber;
|
|
683
|
+
}, "strip", z.ZodTypeAny, {
|
|
684
|
+
page: number;
|
|
685
|
+
per_page: number;
|
|
686
|
+
items: {
|
|
687
|
+
status: "open" | "in_progress" | "in_review" | "done";
|
|
688
|
+
id: number;
|
|
689
|
+
projectId: string;
|
|
690
|
+
description: string | null;
|
|
691
|
+
createdAt: Date;
|
|
692
|
+
updatedAt: Date;
|
|
693
|
+
issueId: string;
|
|
694
|
+
title: string;
|
|
695
|
+
priority: "high" | "medium" | "low";
|
|
696
|
+
tags: string[];
|
|
697
|
+
branchName: string | null;
|
|
698
|
+
worktreePath: string | null;
|
|
699
|
+
worktreeStatus: "error" | "pending" | "creating" | "ready";
|
|
700
|
+
worktreeError: string | null;
|
|
701
|
+
worktreeCreatedAt: Date | null;
|
|
702
|
+
}[];
|
|
703
|
+
total: number;
|
|
704
|
+
pages: number;
|
|
705
|
+
}, {
|
|
706
|
+
page: number;
|
|
707
|
+
per_page: number;
|
|
708
|
+
items: {
|
|
709
|
+
status: "open" | "in_progress" | "in_review" | "done";
|
|
710
|
+
id: number;
|
|
711
|
+
projectId: string;
|
|
712
|
+
description: string | null;
|
|
713
|
+
createdAt: Date;
|
|
714
|
+
updatedAt: Date;
|
|
715
|
+
issueId: string;
|
|
716
|
+
title: string;
|
|
717
|
+
priority: "high" | "medium" | "low";
|
|
718
|
+
tags: string[];
|
|
719
|
+
branchName: string | null;
|
|
720
|
+
worktreePath: string | null;
|
|
721
|
+
worktreeStatus: "error" | "pending" | "creating" | "ready";
|
|
722
|
+
worktreeError: string | null;
|
|
723
|
+
worktreeCreatedAt: Date | null;
|
|
724
|
+
}[];
|
|
725
|
+
total: number;
|
|
726
|
+
pages: number;
|
|
727
|
+
}>;
|
|
728
|
+
type IssueListResponse = z.infer<typeof IssueListResponseSchema>;
|
|
729
|
+
|
|
730
|
+
/**
|
|
731
|
+
* Settings Schema 定义
|
|
732
|
+
*/
|
|
733
|
+
|
|
734
|
+
/** Settings 响应 */
|
|
735
|
+
declare const SettingsResponseSchema: z.ZodObject<{
|
|
736
|
+
githubUsername: z.ZodNullable<z.ZodString>;
|
|
737
|
+
githubToken: z.ZodNullable<z.ZodString>;
|
|
738
|
+
hasGithubToken: z.ZodBoolean;
|
|
739
|
+
baseModel: z.ZodString;
|
|
740
|
+
apiKey: z.ZodNullable<z.ZodString>;
|
|
741
|
+
hasApiKey: z.ZodBoolean;
|
|
742
|
+
apiEndpoint: z.ZodString;
|
|
743
|
+
proxyUrl: z.ZodNullable<z.ZodString>;
|
|
744
|
+
proxyEnabled: z.ZodBoolean;
|
|
745
|
+
reposPath: z.ZodNullable<z.ZodString>;
|
|
746
|
+
}, "strip", z.ZodTypeAny, {
|
|
747
|
+
githubUsername: string | null;
|
|
748
|
+
githubToken: string | null;
|
|
749
|
+
hasGithubToken: boolean;
|
|
750
|
+
baseModel: string;
|
|
751
|
+
apiKey: string | null;
|
|
752
|
+
hasApiKey: boolean;
|
|
753
|
+
apiEndpoint: string;
|
|
754
|
+
proxyUrl: string | null;
|
|
755
|
+
proxyEnabled: boolean;
|
|
756
|
+
reposPath: string | null;
|
|
757
|
+
}, {
|
|
758
|
+
githubUsername: string | null;
|
|
759
|
+
githubToken: string | null;
|
|
760
|
+
hasGithubToken: boolean;
|
|
761
|
+
baseModel: string;
|
|
762
|
+
apiKey: string | null;
|
|
763
|
+
hasApiKey: boolean;
|
|
764
|
+
apiEndpoint: string;
|
|
765
|
+
proxyUrl: string | null;
|
|
766
|
+
proxyEnabled: boolean;
|
|
767
|
+
reposPath: string | null;
|
|
768
|
+
}>;
|
|
769
|
+
type SettingsResponse = z.infer<typeof SettingsResponseSchema>;
|
|
770
|
+
/** 更新 Settings */
|
|
771
|
+
declare const SettingsUpdateSchema: z.ZodObject<{
|
|
772
|
+
githubUsername: z.ZodOptional<z.ZodString>;
|
|
773
|
+
githubToken: z.ZodOptional<z.ZodString>;
|
|
774
|
+
baseModel: z.ZodOptional<z.ZodString>;
|
|
775
|
+
apiKey: z.ZodOptional<z.ZodString>;
|
|
776
|
+
apiEndpoint: z.ZodOptional<z.ZodString>;
|
|
777
|
+
proxyUrl: z.ZodOptional<z.ZodString>;
|
|
778
|
+
proxyEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
779
|
+
reposPath: z.ZodOptional<z.ZodString>;
|
|
780
|
+
}, "strip", z.ZodTypeAny, {
|
|
781
|
+
githubUsername?: string | undefined;
|
|
782
|
+
githubToken?: string | undefined;
|
|
783
|
+
baseModel?: string | undefined;
|
|
784
|
+
apiKey?: string | undefined;
|
|
785
|
+
apiEndpoint?: string | undefined;
|
|
786
|
+
proxyUrl?: string | undefined;
|
|
787
|
+
proxyEnabled?: boolean | undefined;
|
|
788
|
+
reposPath?: string | undefined;
|
|
789
|
+
}, {
|
|
790
|
+
githubUsername?: string | undefined;
|
|
791
|
+
githubToken?: string | undefined;
|
|
792
|
+
baseModel?: string | undefined;
|
|
793
|
+
apiKey?: string | undefined;
|
|
794
|
+
apiEndpoint?: string | undefined;
|
|
795
|
+
proxyUrl?: string | undefined;
|
|
796
|
+
proxyEnabled?: boolean | undefined;
|
|
797
|
+
reposPath?: string | undefined;
|
|
798
|
+
}>;
|
|
799
|
+
type SettingsUpdate = z.infer<typeof SettingsUpdateSchema>;
|
|
800
|
+
/** GitHub Token 验证请求 */
|
|
801
|
+
declare const GitHubVerifyRequestSchema: z.ZodObject<{
|
|
802
|
+
githubToken: z.ZodString;
|
|
803
|
+
githubUsername: z.ZodOptional<z.ZodString>;
|
|
804
|
+
}, "strip", z.ZodTypeAny, {
|
|
805
|
+
githubToken: string;
|
|
806
|
+
githubUsername?: string | undefined;
|
|
807
|
+
}, {
|
|
808
|
+
githubToken: string;
|
|
809
|
+
githubUsername?: string | undefined;
|
|
810
|
+
}>;
|
|
811
|
+
type GitHubVerifyRequest = z.infer<typeof GitHubVerifyRequestSchema>;
|
|
812
|
+
/** GitHub Token 验证响应 */
|
|
813
|
+
declare const GitHubVerifyResponseSchema: z.ZodObject<{
|
|
814
|
+
success: z.ZodBoolean;
|
|
815
|
+
username: z.ZodOptional<z.ZodString>;
|
|
816
|
+
reposCount: z.ZodOptional<z.ZodNumber>;
|
|
817
|
+
error: z.ZodOptional<z.ZodString>;
|
|
818
|
+
}, "strip", z.ZodTypeAny, {
|
|
819
|
+
success: boolean;
|
|
820
|
+
error?: string | undefined;
|
|
821
|
+
username?: string | undefined;
|
|
822
|
+
reposCount?: number | undefined;
|
|
823
|
+
}, {
|
|
824
|
+
success: boolean;
|
|
825
|
+
error?: string | undefined;
|
|
826
|
+
username?: string | undefined;
|
|
827
|
+
reposCount?: number | undefined;
|
|
828
|
+
}>;
|
|
829
|
+
type GitHubVerifyResponse = z.infer<typeof GitHubVerifyResponseSchema>;
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* AI Chat Schema 定义
|
|
833
|
+
*/
|
|
834
|
+
|
|
835
|
+
/** AI Chat 请求 */
|
|
836
|
+
declare const AIChatRequestSchema: z.ZodObject<{
|
|
837
|
+
message: z.ZodString;
|
|
838
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
839
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
840
|
+
}, "strip", z.ZodTypeAny, {
|
|
841
|
+
message: string;
|
|
842
|
+
cwd?: string | undefined;
|
|
843
|
+
session_id?: string | undefined;
|
|
844
|
+
}, {
|
|
845
|
+
message: string;
|
|
846
|
+
cwd?: string | undefined;
|
|
847
|
+
session_id?: string | undefined;
|
|
848
|
+
}>;
|
|
849
|
+
type AIChatRequest = z.infer<typeof AIChatRequestSchema>;
|
|
850
|
+
/** AI 消息 */
|
|
851
|
+
declare const AIMessageSchema: z.ZodObject<{
|
|
852
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
853
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
854
|
+
content: z.ZodString;
|
|
855
|
+
createdAt: z.ZodDate;
|
|
856
|
+
}, "strip", z.ZodTypeAny, {
|
|
857
|
+
id: string | number;
|
|
858
|
+
createdAt: Date;
|
|
859
|
+
role: "user" | "assistant";
|
|
860
|
+
content: string;
|
|
861
|
+
}, {
|
|
862
|
+
id: string | number;
|
|
863
|
+
createdAt: Date;
|
|
864
|
+
role: "user" | "assistant";
|
|
865
|
+
content: string;
|
|
866
|
+
}>;
|
|
867
|
+
type AIMessage = z.infer<typeof AIMessageSchema>;
|
|
868
|
+
/** AI Chat 响应 */
|
|
869
|
+
declare const AIChatResponseSchema: z.ZodObject<{
|
|
870
|
+
sessionId: z.ZodString;
|
|
871
|
+
message: z.ZodObject<{
|
|
872
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
873
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
874
|
+
content: z.ZodString;
|
|
875
|
+
createdAt: z.ZodDate;
|
|
876
|
+
}, "strip", z.ZodTypeAny, {
|
|
877
|
+
id: string | number;
|
|
878
|
+
createdAt: Date;
|
|
879
|
+
role: "user" | "assistant";
|
|
880
|
+
content: string;
|
|
881
|
+
}, {
|
|
882
|
+
id: string | number;
|
|
883
|
+
createdAt: Date;
|
|
884
|
+
role: "user" | "assistant";
|
|
885
|
+
content: string;
|
|
886
|
+
}>;
|
|
887
|
+
}, "strip", z.ZodTypeAny, {
|
|
888
|
+
message: {
|
|
889
|
+
id: string | number;
|
|
890
|
+
createdAt: Date;
|
|
891
|
+
role: "user" | "assistant";
|
|
892
|
+
content: string;
|
|
893
|
+
};
|
|
894
|
+
sessionId: string;
|
|
895
|
+
}, {
|
|
896
|
+
message: {
|
|
897
|
+
id: string | number;
|
|
898
|
+
createdAt: Date;
|
|
899
|
+
role: "user" | "assistant";
|
|
900
|
+
content: string;
|
|
901
|
+
};
|
|
902
|
+
sessionId: string;
|
|
903
|
+
}>;
|
|
904
|
+
type AIChatResponse = z.infer<typeof AIChatResponseSchema>;
|
|
905
|
+
/** AI Session 响应 */
|
|
906
|
+
declare const AISessionResponseSchema: z.ZodObject<{
|
|
907
|
+
sessionId: z.ZodString;
|
|
908
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
909
|
+
id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
910
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
911
|
+
content: z.ZodString;
|
|
912
|
+
createdAt: z.ZodDate;
|
|
913
|
+
}, "strip", z.ZodTypeAny, {
|
|
914
|
+
id: string | number;
|
|
915
|
+
createdAt: Date;
|
|
916
|
+
role: "user" | "assistant";
|
|
917
|
+
content: string;
|
|
918
|
+
}, {
|
|
919
|
+
id: string | number;
|
|
920
|
+
createdAt: Date;
|
|
921
|
+
role: "user" | "assistant";
|
|
922
|
+
content: string;
|
|
923
|
+
}>, "many">;
|
|
924
|
+
}, "strip", z.ZodTypeAny, {
|
|
925
|
+
sessionId: string;
|
|
926
|
+
messages: {
|
|
927
|
+
id: string | number;
|
|
928
|
+
createdAt: Date;
|
|
929
|
+
role: "user" | "assistant";
|
|
930
|
+
content: string;
|
|
931
|
+
}[];
|
|
932
|
+
}, {
|
|
933
|
+
sessionId: string;
|
|
934
|
+
messages: {
|
|
935
|
+
id: string | number;
|
|
936
|
+
createdAt: Date;
|
|
937
|
+
role: "user" | "assistant";
|
|
938
|
+
content: string;
|
|
939
|
+
}[];
|
|
940
|
+
}>;
|
|
941
|
+
type AISessionResponse = z.infer<typeof AISessionResponseSchema>;
|
|
942
|
+
/** 思考开始事件 */
|
|
943
|
+
declare const ThinkingStartEventSchema: z.ZodObject<{
|
|
944
|
+
type: z.ZodLiteral<"thinking_start">;
|
|
945
|
+
}, "strip", z.ZodTypeAny, {
|
|
946
|
+
type: "thinking_start";
|
|
947
|
+
}, {
|
|
948
|
+
type: "thinking_start";
|
|
949
|
+
}>;
|
|
950
|
+
/** 思考增量事件 */
|
|
951
|
+
declare const ThinkingDeltaEventSchema: z.ZodObject<{
|
|
952
|
+
type: z.ZodLiteral<"thinking_delta">;
|
|
953
|
+
thinking: z.ZodString;
|
|
954
|
+
}, "strip", z.ZodTypeAny, {
|
|
955
|
+
type: "thinking_delta";
|
|
956
|
+
thinking: string;
|
|
957
|
+
}, {
|
|
958
|
+
type: "thinking_delta";
|
|
959
|
+
thinking: string;
|
|
960
|
+
}>;
|
|
961
|
+
/** 思考结束事件 */
|
|
962
|
+
declare const ThinkingEndEventSchema: z.ZodObject<{
|
|
963
|
+
type: z.ZodLiteral<"thinking_end">;
|
|
964
|
+
}, "strip", z.ZodTypeAny, {
|
|
965
|
+
type: "thinking_end";
|
|
966
|
+
}, {
|
|
967
|
+
type: "thinking_end";
|
|
968
|
+
}>;
|
|
969
|
+
/** 内容增量事件 */
|
|
970
|
+
declare const ContentDeltaEventSchema: z.ZodObject<{
|
|
971
|
+
type: z.ZodLiteral<"content_delta">;
|
|
972
|
+
content: z.ZodString;
|
|
973
|
+
}, "strip", z.ZodTypeAny, {
|
|
974
|
+
type: "content_delta";
|
|
975
|
+
content: string;
|
|
976
|
+
}, {
|
|
977
|
+
type: "content_delta";
|
|
978
|
+
content: string;
|
|
979
|
+
}>;
|
|
980
|
+
/** 工具开始事件 */
|
|
981
|
+
declare const ToolStartEventSchema: z.ZodObject<{
|
|
982
|
+
type: z.ZodLiteral<"tool_start">;
|
|
983
|
+
tool_use_id: z.ZodString;
|
|
984
|
+
name: z.ZodString;
|
|
985
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
986
|
+
}, "strip", z.ZodTypeAny, {
|
|
987
|
+
type: "tool_start";
|
|
988
|
+
name: string;
|
|
989
|
+
tool_use_id: string;
|
|
990
|
+
input: Record<string, any>;
|
|
991
|
+
}, {
|
|
992
|
+
type: "tool_start";
|
|
993
|
+
name: string;
|
|
994
|
+
tool_use_id: string;
|
|
995
|
+
input: Record<string, any>;
|
|
996
|
+
}>;
|
|
997
|
+
/** 工具结果事件 */
|
|
998
|
+
declare const ToolResultEventSchema: z.ZodObject<{
|
|
999
|
+
type: z.ZodLiteral<"tool_result">;
|
|
1000
|
+
tool_use_id: z.ZodString;
|
|
1001
|
+
content: z.ZodString;
|
|
1002
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
1003
|
+
}, "strip", z.ZodTypeAny, {
|
|
1004
|
+
type: "tool_result";
|
|
1005
|
+
content: string;
|
|
1006
|
+
tool_use_id: string;
|
|
1007
|
+
is_error?: boolean | undefined;
|
|
1008
|
+
}, {
|
|
1009
|
+
type: "tool_result";
|
|
1010
|
+
content: string;
|
|
1011
|
+
tool_use_id: string;
|
|
1012
|
+
is_error?: boolean | undefined;
|
|
1013
|
+
}>;
|
|
1014
|
+
/** 消息完成事件 */
|
|
1015
|
+
declare const MessageDoneEventSchema: z.ZodObject<{
|
|
1016
|
+
type: z.ZodLiteral<"message_done">;
|
|
1017
|
+
}, "strip", z.ZodTypeAny, {
|
|
1018
|
+
type: "message_done";
|
|
1019
|
+
}, {
|
|
1020
|
+
type: "message_done";
|
|
1021
|
+
}>;
|
|
1022
|
+
/** 错误事件 */
|
|
1023
|
+
declare const ErrorEventSchema: z.ZodObject<{
|
|
1024
|
+
type: z.ZodLiteral<"error">;
|
|
1025
|
+
message: z.ZodString;
|
|
1026
|
+
}, "strip", z.ZodTypeAny, {
|
|
1027
|
+
message: string;
|
|
1028
|
+
type: "error";
|
|
1029
|
+
}, {
|
|
1030
|
+
message: string;
|
|
1031
|
+
type: "error";
|
|
1032
|
+
}>;
|
|
1033
|
+
/** SSE 事件 */
|
|
1034
|
+
declare const SSEEventSchema: z.ZodUnion<[z.ZodObject<{
|
|
1035
|
+
type: z.ZodLiteral<"thinking_start">;
|
|
1036
|
+
}, "strip", z.ZodTypeAny, {
|
|
1037
|
+
type: "thinking_start";
|
|
1038
|
+
}, {
|
|
1039
|
+
type: "thinking_start";
|
|
1040
|
+
}>, z.ZodObject<{
|
|
1041
|
+
type: z.ZodLiteral<"thinking_delta">;
|
|
1042
|
+
thinking: z.ZodString;
|
|
1043
|
+
}, "strip", z.ZodTypeAny, {
|
|
1044
|
+
type: "thinking_delta";
|
|
1045
|
+
thinking: string;
|
|
1046
|
+
}, {
|
|
1047
|
+
type: "thinking_delta";
|
|
1048
|
+
thinking: string;
|
|
1049
|
+
}>, z.ZodObject<{
|
|
1050
|
+
type: z.ZodLiteral<"thinking_end">;
|
|
1051
|
+
}, "strip", z.ZodTypeAny, {
|
|
1052
|
+
type: "thinking_end";
|
|
1053
|
+
}, {
|
|
1054
|
+
type: "thinking_end";
|
|
1055
|
+
}>, z.ZodObject<{
|
|
1056
|
+
type: z.ZodLiteral<"content_delta">;
|
|
1057
|
+
content: z.ZodString;
|
|
1058
|
+
}, "strip", z.ZodTypeAny, {
|
|
1059
|
+
type: "content_delta";
|
|
1060
|
+
content: string;
|
|
1061
|
+
}, {
|
|
1062
|
+
type: "content_delta";
|
|
1063
|
+
content: string;
|
|
1064
|
+
}>, z.ZodObject<{
|
|
1065
|
+
type: z.ZodLiteral<"tool_start">;
|
|
1066
|
+
tool_use_id: z.ZodString;
|
|
1067
|
+
name: z.ZodString;
|
|
1068
|
+
input: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1069
|
+
}, "strip", z.ZodTypeAny, {
|
|
1070
|
+
type: "tool_start";
|
|
1071
|
+
name: string;
|
|
1072
|
+
tool_use_id: string;
|
|
1073
|
+
input: Record<string, any>;
|
|
1074
|
+
}, {
|
|
1075
|
+
type: "tool_start";
|
|
1076
|
+
name: string;
|
|
1077
|
+
tool_use_id: string;
|
|
1078
|
+
input: Record<string, any>;
|
|
1079
|
+
}>, z.ZodObject<{
|
|
1080
|
+
type: z.ZodLiteral<"tool_result">;
|
|
1081
|
+
tool_use_id: z.ZodString;
|
|
1082
|
+
content: z.ZodString;
|
|
1083
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
1084
|
+
}, "strip", z.ZodTypeAny, {
|
|
1085
|
+
type: "tool_result";
|
|
1086
|
+
content: string;
|
|
1087
|
+
tool_use_id: string;
|
|
1088
|
+
is_error?: boolean | undefined;
|
|
1089
|
+
}, {
|
|
1090
|
+
type: "tool_result";
|
|
1091
|
+
content: string;
|
|
1092
|
+
tool_use_id: string;
|
|
1093
|
+
is_error?: boolean | undefined;
|
|
1094
|
+
}>, z.ZodObject<{
|
|
1095
|
+
type: z.ZodLiteral<"message_done">;
|
|
1096
|
+
}, "strip", z.ZodTypeAny, {
|
|
1097
|
+
type: "message_done";
|
|
1098
|
+
}, {
|
|
1099
|
+
type: "message_done";
|
|
1100
|
+
}>, z.ZodObject<{
|
|
1101
|
+
type: z.ZodLiteral<"error">;
|
|
1102
|
+
message: z.ZodString;
|
|
1103
|
+
}, "strip", z.ZodTypeAny, {
|
|
1104
|
+
message: string;
|
|
1105
|
+
type: "error";
|
|
1106
|
+
}, {
|
|
1107
|
+
message: string;
|
|
1108
|
+
type: "error";
|
|
1109
|
+
}>]>;
|
|
1110
|
+
type SSEEvent = z.infer<typeof SSEEventSchema>;
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* GitHub 相关 Schema 定义
|
|
1114
|
+
*/
|
|
1115
|
+
|
|
1116
|
+
/** GitHub 仓库 */
|
|
1117
|
+
declare const RepositorySchema: z.ZodObject<{
|
|
1118
|
+
id: z.ZodNumber;
|
|
1119
|
+
name: z.ZodString;
|
|
1120
|
+
full_name: z.ZodString;
|
|
1121
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1122
|
+
clone_url: z.ZodString;
|
|
1123
|
+
default_branch: z.ZodString;
|
|
1124
|
+
stargazers_count: z.ZodNumber;
|
|
1125
|
+
forks_count: z.ZodNumber;
|
|
1126
|
+
private: z.ZodBoolean;
|
|
1127
|
+
}, "strip", z.ZodTypeAny, {
|
|
1128
|
+
id: number;
|
|
1129
|
+
name: string;
|
|
1130
|
+
description: string | null;
|
|
1131
|
+
full_name: string;
|
|
1132
|
+
clone_url: string;
|
|
1133
|
+
default_branch: string;
|
|
1134
|
+
stargazers_count: number;
|
|
1135
|
+
forks_count: number;
|
|
1136
|
+
private: boolean;
|
|
1137
|
+
}, {
|
|
1138
|
+
id: number;
|
|
1139
|
+
name: string;
|
|
1140
|
+
description: string | null;
|
|
1141
|
+
full_name: string;
|
|
1142
|
+
clone_url: string;
|
|
1143
|
+
default_branch: string;
|
|
1144
|
+
stargazers_count: number;
|
|
1145
|
+
forks_count: number;
|
|
1146
|
+
private: boolean;
|
|
1147
|
+
}>;
|
|
1148
|
+
type Repository = z.infer<typeof RepositorySchema>;
|
|
1149
|
+
/** GitHub 分支 */
|
|
1150
|
+
declare const BranchSchema: z.ZodObject<{
|
|
1151
|
+
name: z.ZodString;
|
|
1152
|
+
}, "strip", z.ZodTypeAny, {
|
|
1153
|
+
name: string;
|
|
1154
|
+
}, {
|
|
1155
|
+
name: string;
|
|
1156
|
+
}>;
|
|
1157
|
+
type Branch = z.infer<typeof BranchSchema>;
|
|
1158
|
+
/** 仓库列表项(前端选择器用) */
|
|
1159
|
+
declare const RepoOptionSchema: z.ZodObject<{
|
|
1160
|
+
value: z.ZodString;
|
|
1161
|
+
label: z.ZodString;
|
|
1162
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1163
|
+
}, "strip", z.ZodTypeAny, {
|
|
1164
|
+
value: string;
|
|
1165
|
+
description: string | null;
|
|
1166
|
+
label: string;
|
|
1167
|
+
}, {
|
|
1168
|
+
value: string;
|
|
1169
|
+
description: string | null;
|
|
1170
|
+
label: string;
|
|
1171
|
+
}>;
|
|
1172
|
+
type RepoOption = z.infer<typeof RepoOptionSchema>;
|
|
1173
|
+
/** 分支列表项(前端选择器用) */
|
|
1174
|
+
declare const BranchOptionSchema: z.ZodObject<{
|
|
1175
|
+
value: z.ZodString;
|
|
1176
|
+
label: z.ZodString;
|
|
1177
|
+
}, "strip", z.ZodTypeAny, {
|
|
1178
|
+
value: string;
|
|
1179
|
+
label: string;
|
|
1180
|
+
}, {
|
|
1181
|
+
value: string;
|
|
1182
|
+
label: string;
|
|
1183
|
+
}>;
|
|
1184
|
+
type BranchOption = z.infer<typeof BranchOptionSchema>;
|
|
1185
|
+
/** 仓库列表响应(API 返回格式) */
|
|
1186
|
+
declare const GitHubReposResponseSchema: z.ZodObject<{
|
|
1187
|
+
repos: z.ZodArray<z.ZodObject<{
|
|
1188
|
+
value: z.ZodString;
|
|
1189
|
+
label: z.ZodString;
|
|
1190
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1191
|
+
}, "strip", z.ZodTypeAny, {
|
|
1192
|
+
value: string;
|
|
1193
|
+
description: string | null;
|
|
1194
|
+
label: string;
|
|
1195
|
+
}, {
|
|
1196
|
+
value: string;
|
|
1197
|
+
description: string | null;
|
|
1198
|
+
label: string;
|
|
1199
|
+
}>, "many">;
|
|
1200
|
+
}, "strip", z.ZodTypeAny, {
|
|
1201
|
+
repos: {
|
|
1202
|
+
value: string;
|
|
1203
|
+
description: string | null;
|
|
1204
|
+
label: string;
|
|
1205
|
+
}[];
|
|
1206
|
+
}, {
|
|
1207
|
+
repos: {
|
|
1208
|
+
value: string;
|
|
1209
|
+
description: string | null;
|
|
1210
|
+
label: string;
|
|
1211
|
+
}[];
|
|
1212
|
+
}>;
|
|
1213
|
+
type GitHubReposResponse = z.infer<typeof GitHubReposResponseSchema>;
|
|
1214
|
+
/** 分支列表响应(API 返回格式) */
|
|
1215
|
+
declare const GitHubBranchesResponseSchema: z.ZodObject<{
|
|
1216
|
+
branches: z.ZodArray<z.ZodObject<{
|
|
1217
|
+
value: z.ZodString;
|
|
1218
|
+
label: z.ZodString;
|
|
1219
|
+
}, "strip", z.ZodTypeAny, {
|
|
1220
|
+
value: string;
|
|
1221
|
+
label: string;
|
|
1222
|
+
}, {
|
|
1223
|
+
value: string;
|
|
1224
|
+
label: string;
|
|
1225
|
+
}>, "many">;
|
|
1226
|
+
}, "strip", z.ZodTypeAny, {
|
|
1227
|
+
branches: {
|
|
1228
|
+
value: string;
|
|
1229
|
+
label: string;
|
|
1230
|
+
}[];
|
|
1231
|
+
}, {
|
|
1232
|
+
branches: {
|
|
1233
|
+
value: string;
|
|
1234
|
+
label: string;
|
|
1235
|
+
}[];
|
|
1236
|
+
}>;
|
|
1237
|
+
type GitHubBranchesResponse = z.infer<typeof GitHubBranchesResponseSchema>;
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Issue 模板 Schema 定义
|
|
1241
|
+
*/
|
|
1242
|
+
|
|
1243
|
+
/** Issue 模板(列表项,不含 body) */
|
|
1244
|
+
declare const IssueTemplateListItemSchema: z.ZodObject<{
|
|
1245
|
+
id: z.ZodString;
|
|
1246
|
+
name: z.ZodString;
|
|
1247
|
+
description: z.ZodString;
|
|
1248
|
+
}, "strip", z.ZodTypeAny, {
|
|
1249
|
+
id: string;
|
|
1250
|
+
name: string;
|
|
1251
|
+
description: string;
|
|
1252
|
+
}, {
|
|
1253
|
+
id: string;
|
|
1254
|
+
name: string;
|
|
1255
|
+
description: string;
|
|
1256
|
+
}>;
|
|
1257
|
+
/** Issue 模板(完整版,含 body) */
|
|
1258
|
+
declare const IssueTemplateSchema: z.ZodObject<{
|
|
1259
|
+
id: z.ZodString;
|
|
1260
|
+
name: z.ZodString;
|
|
1261
|
+
description: z.ZodString;
|
|
1262
|
+
body: z.ZodString;
|
|
1263
|
+
}, "strip", z.ZodTypeAny, {
|
|
1264
|
+
id: string;
|
|
1265
|
+
name: string;
|
|
1266
|
+
description: string;
|
|
1267
|
+
body: string;
|
|
1268
|
+
}, {
|
|
1269
|
+
id: string;
|
|
1270
|
+
name: string;
|
|
1271
|
+
description: string;
|
|
1272
|
+
body: string;
|
|
1273
|
+
}>;
|
|
1274
|
+
type IssueTemplate = z.infer<typeof IssueTemplateSchema>;
|
|
1275
|
+
type IssueTemplateListItem = z.infer<typeof IssueTemplateListItemSchema>;
|
|
1276
|
+
/** Issue 模板列表响应 */
|
|
1277
|
+
declare const IssueTemplateListResponseSchema: z.ZodObject<{
|
|
1278
|
+
templates: z.ZodArray<z.ZodObject<{
|
|
1279
|
+
id: z.ZodString;
|
|
1280
|
+
name: z.ZodString;
|
|
1281
|
+
description: z.ZodString;
|
|
1282
|
+
}, "strip", z.ZodTypeAny, {
|
|
1283
|
+
id: string;
|
|
1284
|
+
name: string;
|
|
1285
|
+
description: string;
|
|
1286
|
+
}, {
|
|
1287
|
+
id: string;
|
|
1288
|
+
name: string;
|
|
1289
|
+
description: string;
|
|
1290
|
+
}>, "many">;
|
|
1291
|
+
}, "strip", z.ZodTypeAny, {
|
|
1292
|
+
templates: {
|
|
1293
|
+
id: string;
|
|
1294
|
+
name: string;
|
|
1295
|
+
description: string;
|
|
1296
|
+
}[];
|
|
1297
|
+
}, {
|
|
1298
|
+
templates: {
|
|
1299
|
+
id: string;
|
|
1300
|
+
name: string;
|
|
1301
|
+
description: string;
|
|
1302
|
+
}[];
|
|
1303
|
+
}>;
|
|
1304
|
+
type IssueTemplateListResponse = z.infer<typeof IssueTemplateListResponseSchema>;
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* 通用工具 Schema 定义
|
|
1308
|
+
*/
|
|
1309
|
+
|
|
1310
|
+
/** 重试选项 */
|
|
1311
|
+
declare const RetryOptionsSchema: z.ZodObject<{
|
|
1312
|
+
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
1313
|
+
delayMs: z.ZodDefault<z.ZodNumber>;
|
|
1314
|
+
backoffMultiplier: z.ZodDefault<z.ZodNumber>;
|
|
1315
|
+
onRetry: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodType<Error, z.ZodTypeDef, Error>, z.ZodNumber], null>, z.ZodVoid>>;
|
|
1316
|
+
}, "strip", z.ZodTypeAny, {
|
|
1317
|
+
maxRetries: number;
|
|
1318
|
+
delayMs: number;
|
|
1319
|
+
backoffMultiplier: number;
|
|
1320
|
+
onRetry?: ((args_0: Error, args_1: number) => void) | undefined;
|
|
1321
|
+
}, {
|
|
1322
|
+
maxRetries?: number | undefined;
|
|
1323
|
+
delayMs?: number | undefined;
|
|
1324
|
+
backoffMultiplier?: number | undefined;
|
|
1325
|
+
onRetry?: ((args_0: Error, args_1: number) => void) | undefined;
|
|
1326
|
+
}>;
|
|
1327
|
+
type RetryOptions = z.infer<typeof RetryOptionsSchema>;
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Worktree Schema 定义
|
|
1331
|
+
*/
|
|
1332
|
+
|
|
1333
|
+
/** 创建 Worktree 请求 */
|
|
1334
|
+
declare const WorktreeCreateRequestSchema: z.ZodObject<{
|
|
1335
|
+
branch: z.ZodString;
|
|
1336
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
1337
|
+
}, "strip", z.ZodTypeAny, {
|
|
1338
|
+
branch: string;
|
|
1339
|
+
force?: boolean | undefined;
|
|
1340
|
+
}, {
|
|
1341
|
+
branch: string;
|
|
1342
|
+
force?: boolean | undefined;
|
|
1343
|
+
}>;
|
|
1344
|
+
type WorktreeCreateRequest = z.infer<typeof WorktreeCreateRequestSchema>;
|
|
1345
|
+
/** 删除 Worktree 请求 */
|
|
1346
|
+
declare const WorktreeDeleteRequestSchema: z.ZodObject<{
|
|
1347
|
+
issueId: z.ZodString;
|
|
1348
|
+
}, "strip", z.ZodTypeAny, {
|
|
1349
|
+
issueId: string;
|
|
1350
|
+
}, {
|
|
1351
|
+
issueId: string;
|
|
1352
|
+
}>;
|
|
1353
|
+
type WorktreeDeleteRequest = z.infer<typeof WorktreeDeleteRequestSchema>;
|
|
1354
|
+
/** Worktree 状态响应 */
|
|
1355
|
+
declare const WorktreeStatusResponseSchema: z.ZodObject<{
|
|
1356
|
+
issueId: z.ZodString;
|
|
1357
|
+
status: z.ZodEnum<["pending", "creating", "ready", "error"]>;
|
|
1358
|
+
path: z.ZodNullable<z.ZodString>;
|
|
1359
|
+
branchName: z.ZodNullable<z.ZodString>;
|
|
1360
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1361
|
+
}, "strip", z.ZodTypeAny, {
|
|
1362
|
+
error: string | null;
|
|
1363
|
+
path: string | null;
|
|
1364
|
+
status: "error" | "pending" | "creating" | "ready";
|
|
1365
|
+
issueId: string;
|
|
1366
|
+
branchName: string | null;
|
|
1367
|
+
}, {
|
|
1368
|
+
error: string | null;
|
|
1369
|
+
path: string | null;
|
|
1370
|
+
status: "error" | "pending" | "creating" | "ready";
|
|
1371
|
+
issueId: string;
|
|
1372
|
+
branchName: string | null;
|
|
1373
|
+
}>;
|
|
1374
|
+
type WorktreeStatusResponse = z.infer<typeof WorktreeStatusResponseSchema>;
|
|
1375
|
+
|
|
1376
|
+
export { AI, type AIChatRequest, AIChatRequestSchema, type AIChatResponse, AIChatResponseSchema, type AIMessage, AIMessageSchema, type AISessionResponse, AISessionResponseSchema, API_BASE, API_ROUTES, type Branch, type BranchOption, BranchOptionSchema, BranchSchema, ContentDeltaEventSchema, ErrorEventSchema, GITHUB, type GitHubBranchesResponse, GitHubBranchesResponseSchema, type GitHubReposResponse, GitHubReposResponseSchema, type GitHubVerifyRequest, GitHubVerifyRequestSchema, type GitHubVerifyResponse, GitHubVerifyResponseSchema, HEALTH, ISSUES, ISSUE_TEMPLATES, type IssueCreate, IssueCreateSchema, type IssueListResponse, IssueListResponseSchema, type IssuePriority, IssuePrioritySchema, type IssueResponse, IssueResponseSchema, type IssueStats, IssueStatsSchema, type IssueStatus, IssueStatusSchema, type IssueTemplate, type IssueTemplateListItem, IssueTemplateListItemSchema, type IssueTemplateListResponse, IssueTemplateListResponseSchema, IssueTemplateSchema, type IssueUpdate, IssueUpdateSchema, MessageDoneEventSchema, PROJECTS, PaginatedResponseSchema, type PaginationQuery, PaginationQuerySchema, type ProjectCreate, ProjectCreateSchema, type ProjectListResponse, ProjectListResponseSchema, type ProjectResponse, ProjectResponseSchema, type ProjectUpdate, ProjectUpdateSchema, type RepoOption, RepoOptionSchema, type Repository, RepositorySchema, type RetryOptions, RetryOptionsSchema, SETTINGS, type SSEEvent, SSEEventSchema, type SettingsResponse, SettingsResponseSchema, type SettingsUpdate, SettingsUpdateSchema, type SyncStatus, SyncStatusSchema, TASKS, type TaskCreate, TaskCreateSchema, type TaskListResponse, TaskListResponseSchema, type TaskResponse, TaskResponseSchema, type TaskStatus, TaskStatusSchema, type TaskUpdate, TaskUpdateSchema, ThinkingDeltaEventSchema, ThinkingEndEventSchema, ThinkingStartEventSchema, ToolResultEventSchema, ToolStartEventSchema, WORKTREE, type WorktreeCreateRequest, WorktreeCreateRequestSchema, type WorktreeDeleteRequest, WorktreeDeleteRequestSchema, type WorktreeStatus, type WorktreeStatusResponse, WorktreeStatusResponseSchema, WorktreeStatusSchema };
|