@agentrix/shared 2.2.4 → 2.2.6
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/errors-BdwSwKpv.d.cts +2602 -0
- package/dist/errors-myQvpVrM.cjs +95 -0
- package/dist/index.cjs +264 -570
- package/dist/index.d.cts +1360 -3945
- package/dist/node.cjs +254 -0
- package/dist/node.d.cts +52 -0
- package/package.json +7 -1
|
@@ -0,0 +1,2602 @@
|
|
|
1
|
+
import { SDKUserMessage, SDKAssistantMessage, SDKMessage, HookCallback } from '@anthropic-ai/claude-agent-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Task HTTP request/response schemas
|
|
6
|
+
* Task management endpoints (start, resume, cancel, stop, permission-response, list)
|
|
7
|
+
* Extended with multi-agent collaboration support and custom task titles
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
declare const TaskTodoSchema: z.ZodObject<{
|
|
11
|
+
agentId: z.ZodString;
|
|
12
|
+
title: z.ZodString;
|
|
13
|
+
instructions: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type TaskTodo = z.infer<typeof TaskTodoSchema>;
|
|
16
|
+
/**
|
|
17
|
+
* POST /v1/tasks/start - Request schema
|
|
18
|
+
*/
|
|
19
|
+
declare const StartTaskRequestSchema: z.ZodObject<{
|
|
20
|
+
chatId: z.ZodString;
|
|
21
|
+
customTitle: z.ZodOptional<z.ZodString>;
|
|
22
|
+
message: z.ZodOptional<z.ZodCustom<SDKUserMessage, SDKUserMessage>>;
|
|
23
|
+
encryptedMessage: z.ZodOptional<z.ZodString>;
|
|
24
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
25
|
+
forceUserCwd: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
cloudId: z.ZodOptional<z.ZodString>;
|
|
28
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
30
|
+
repositorySourceType: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
temporary: "temporary";
|
|
32
|
+
directory: "directory";
|
|
33
|
+
"git-server": "git-server";
|
|
34
|
+
}>>;
|
|
35
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
36
|
+
ownerEncryptedDataKey: z.ZodOptional<z.ZodString>;
|
|
37
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
38
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
39
|
+
todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
40
|
+
agentId: z.ZodString;
|
|
41
|
+
title: z.ZodString;
|
|
42
|
+
instructions: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
type StartTaskRequest = z.infer<typeof StartTaskRequestSchema>;
|
|
46
|
+
declare const startTaskSchema: z.ZodObject<{
|
|
47
|
+
chatId: z.ZodString;
|
|
48
|
+
customTitle: z.ZodOptional<z.ZodString>;
|
|
49
|
+
message: z.ZodOptional<z.ZodCustom<SDKUserMessage, SDKUserMessage>>;
|
|
50
|
+
encryptedMessage: z.ZodOptional<z.ZodString>;
|
|
51
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
52
|
+
forceUserCwd: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
cloudId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
56
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
57
|
+
repositorySourceType: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
temporary: "temporary";
|
|
59
|
+
directory: "directory";
|
|
60
|
+
"git-server": "git-server";
|
|
61
|
+
}>>;
|
|
62
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
63
|
+
ownerEncryptedDataKey: z.ZodOptional<z.ZodString>;
|
|
64
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
65
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
66
|
+
todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
agentId: z.ZodString;
|
|
68
|
+
title: z.ZodString;
|
|
69
|
+
instructions: z.ZodString;
|
|
70
|
+
}, z.core.$strip>>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
/**
|
|
73
|
+
* POST /v1/tasks/start - Response schema (201 Created)
|
|
74
|
+
*/
|
|
75
|
+
declare const StartTaskResponseSchema: z.ZodObject<{
|
|
76
|
+
taskId: z.ZodString;
|
|
77
|
+
chatId: z.ZodString;
|
|
78
|
+
agentId: z.ZodString;
|
|
79
|
+
taskAgentIds: z.ZodArray<z.ZodString>;
|
|
80
|
+
userId: z.ZodString;
|
|
81
|
+
state: z.ZodString;
|
|
82
|
+
machineId: z.ZodNullable<z.ZodString>;
|
|
83
|
+
cloudId: z.ZodNullable<z.ZodString>;
|
|
84
|
+
repositoryId: z.ZodNullable<z.ZodString>;
|
|
85
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
86
|
+
title: z.ZodNullable<z.ZodString>;
|
|
87
|
+
customTitle: z.ZodNullable<z.ZodString>;
|
|
88
|
+
userCwd: z.ZodNullable<z.ZodString>;
|
|
89
|
+
forceUserCwd: z.ZodNullable<z.ZodBoolean>;
|
|
90
|
+
createdAt: z.ZodString;
|
|
91
|
+
updatedAt: z.ZodString;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
type StartTaskResponse = z.infer<typeof StartTaskResponseSchema>;
|
|
94
|
+
/**
|
|
95
|
+
* Task item schema (used in list response)
|
|
96
|
+
*/
|
|
97
|
+
declare const TaskItemSchema: z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
100
|
+
chat: "chat";
|
|
101
|
+
work: "work";
|
|
102
|
+
shadow: "shadow";
|
|
103
|
+
}>>;
|
|
104
|
+
chatId: z.ZodString;
|
|
105
|
+
userId: z.ZodString;
|
|
106
|
+
state: z.ZodString;
|
|
107
|
+
workerStatus: z.ZodNullable<z.ZodEnum<{
|
|
108
|
+
initializing: "initializing";
|
|
109
|
+
ready: "ready";
|
|
110
|
+
running: "running";
|
|
111
|
+
}>>;
|
|
112
|
+
agentId: z.ZodString;
|
|
113
|
+
machineId: z.ZodNullable<z.ZodString>;
|
|
114
|
+
cloudId: z.ZodNullable<z.ZodString>;
|
|
115
|
+
repositoryId: z.ZodNullable<z.ZodString>;
|
|
116
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
117
|
+
title: z.ZodNullable<z.ZodString>;
|
|
118
|
+
customTitle: z.ZodNullable<z.ZodString>;
|
|
119
|
+
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
120
|
+
dataEncryptionKey: z.ZodNullable<z.ZodString>;
|
|
121
|
+
ownerEncryptedDataKey: z.ZodNullable<z.ZodString>;
|
|
122
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
123
|
+
userCwd: z.ZodNullable<z.ZodString>;
|
|
124
|
+
forceUserCwd: z.ZodNullable<z.ZodBoolean>;
|
|
125
|
+
repositorySourceType: z.ZodNullable<z.ZodEnum<{
|
|
126
|
+
temporary: "temporary";
|
|
127
|
+
directory: "directory";
|
|
128
|
+
"git-server": "git-server";
|
|
129
|
+
}>>;
|
|
130
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
131
|
+
pullRequestUrl: z.ZodNullable<z.ZodString>;
|
|
132
|
+
pullRequestState: z.ZodNullable<z.ZodEnum<{
|
|
133
|
+
open: "open";
|
|
134
|
+
closed: "closed";
|
|
135
|
+
merged: "merged";
|
|
136
|
+
}>>;
|
|
137
|
+
pullRequestStateChangedAt: z.ZodNullable<z.ZodString>;
|
|
138
|
+
gitStats: z.ZodNullable<z.ZodObject<{
|
|
139
|
+
totalInsertions: z.ZodNumber;
|
|
140
|
+
totalDeletions: z.ZodNumber;
|
|
141
|
+
files: z.ZodArray<z.ZodObject<{
|
|
142
|
+
path: z.ZodString;
|
|
143
|
+
insertions: z.ZodNumber;
|
|
144
|
+
deletions: z.ZodNumber;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
148
|
+
rootTaskId: z.ZodNullable<z.ZodString>;
|
|
149
|
+
parentTaskId: z.ZodNullable<z.ZodString>;
|
|
150
|
+
taskAgentIds: z.ZodArray<z.ZodString>;
|
|
151
|
+
createdAt: z.ZodString;
|
|
152
|
+
updatedAt: z.ZodString;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
type TaskItem = z.infer<typeof TaskItemSchema>;
|
|
155
|
+
/**
|
|
156
|
+
* GET /v1/tasks - Query parameters schema
|
|
157
|
+
*/
|
|
158
|
+
declare const ListTasksRequestSchema: z.ZodObject<{
|
|
159
|
+
chatId: z.ZodString;
|
|
160
|
+
archived: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
161
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
162
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
type ListTasksRequest = z.infer<typeof ListTasksRequestSchema>;
|
|
165
|
+
/**
|
|
166
|
+
* GET /v1/tasks - Response schema
|
|
167
|
+
*/
|
|
168
|
+
declare const ListTasksResponseSchema: z.ZodObject<{
|
|
169
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
172
|
+
chat: "chat";
|
|
173
|
+
work: "work";
|
|
174
|
+
shadow: "shadow";
|
|
175
|
+
}>>;
|
|
176
|
+
chatId: z.ZodString;
|
|
177
|
+
userId: z.ZodString;
|
|
178
|
+
state: z.ZodString;
|
|
179
|
+
workerStatus: z.ZodNullable<z.ZodEnum<{
|
|
180
|
+
initializing: "initializing";
|
|
181
|
+
ready: "ready";
|
|
182
|
+
running: "running";
|
|
183
|
+
}>>;
|
|
184
|
+
agentId: z.ZodString;
|
|
185
|
+
machineId: z.ZodNullable<z.ZodString>;
|
|
186
|
+
cloudId: z.ZodNullable<z.ZodString>;
|
|
187
|
+
repositoryId: z.ZodNullable<z.ZodString>;
|
|
188
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
189
|
+
title: z.ZodNullable<z.ZodString>;
|
|
190
|
+
customTitle: z.ZodNullable<z.ZodString>;
|
|
191
|
+
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
192
|
+
dataEncryptionKey: z.ZodNullable<z.ZodString>;
|
|
193
|
+
ownerEncryptedDataKey: z.ZodNullable<z.ZodString>;
|
|
194
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
195
|
+
userCwd: z.ZodNullable<z.ZodString>;
|
|
196
|
+
forceUserCwd: z.ZodNullable<z.ZodBoolean>;
|
|
197
|
+
repositorySourceType: z.ZodNullable<z.ZodEnum<{
|
|
198
|
+
temporary: "temporary";
|
|
199
|
+
directory: "directory";
|
|
200
|
+
"git-server": "git-server";
|
|
201
|
+
}>>;
|
|
202
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
203
|
+
pullRequestUrl: z.ZodNullable<z.ZodString>;
|
|
204
|
+
pullRequestState: z.ZodNullable<z.ZodEnum<{
|
|
205
|
+
open: "open";
|
|
206
|
+
closed: "closed";
|
|
207
|
+
merged: "merged";
|
|
208
|
+
}>>;
|
|
209
|
+
pullRequestStateChangedAt: z.ZodNullable<z.ZodString>;
|
|
210
|
+
gitStats: z.ZodNullable<z.ZodObject<{
|
|
211
|
+
totalInsertions: z.ZodNumber;
|
|
212
|
+
totalDeletions: z.ZodNumber;
|
|
213
|
+
files: z.ZodArray<z.ZodObject<{
|
|
214
|
+
path: z.ZodString;
|
|
215
|
+
insertions: z.ZodNumber;
|
|
216
|
+
deletions: z.ZodNumber;
|
|
217
|
+
}, z.core.$strip>>;
|
|
218
|
+
}, z.core.$strip>>;
|
|
219
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
220
|
+
rootTaskId: z.ZodNullable<z.ZodString>;
|
|
221
|
+
parentTaskId: z.ZodNullable<z.ZodString>;
|
|
222
|
+
taskAgentIds: z.ZodArray<z.ZodString>;
|
|
223
|
+
createdAt: z.ZodString;
|
|
224
|
+
updatedAt: z.ZodString;
|
|
225
|
+
}, z.core.$strip>>;
|
|
226
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
227
|
+
hasMore: z.ZodBoolean;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
type ListTasksResponse = z.infer<typeof ListTasksResponseSchema>;
|
|
230
|
+
/**
|
|
231
|
+
* POST /v1/tasks/:taskId/resume - Request schema
|
|
232
|
+
*/
|
|
233
|
+
declare const ResumeTaskRequestSchema: z.ZodObject<{
|
|
234
|
+
taskId: z.ZodString;
|
|
235
|
+
message: z.ZodOptional<z.ZodCustom<SDKUserMessage, SDKUserMessage>>;
|
|
236
|
+
encryptedMessage: z.ZodOptional<z.ZodString>;
|
|
237
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
type ResumeTaskRequest = z.infer<typeof ResumeTaskRequestSchema>;
|
|
240
|
+
declare const resumeTaskRequestSchema: z.ZodObject<{
|
|
241
|
+
taskId: z.ZodString;
|
|
242
|
+
message: z.ZodOptional<z.ZodCustom<SDKUserMessage, SDKUserMessage>>;
|
|
243
|
+
encryptedMessage: z.ZodOptional<z.ZodString>;
|
|
244
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$strip>;
|
|
246
|
+
/**
|
|
247
|
+
* POST /v1/tasks/:taskId/resume - Response schema (202 Accepted)
|
|
248
|
+
*/
|
|
249
|
+
declare const ResumeTaskResponseSchema: z.ZodObject<{
|
|
250
|
+
message: z.ZodString;
|
|
251
|
+
taskId: z.ZodString;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
type ResumeTaskResponse = z.infer<typeof ResumeTaskResponseSchema>;
|
|
254
|
+
/**
|
|
255
|
+
* POST /v1/tasks/:taskId/cancel - Request schema
|
|
256
|
+
*/
|
|
257
|
+
declare const CancelTaskRequestSchema: z.ZodObject<{
|
|
258
|
+
taskId: z.ZodString;
|
|
259
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
type CancelTaskRequest = z.infer<typeof CancelTaskRequestSchema>;
|
|
262
|
+
declare const cancelTaskRequestSchema: z.ZodObject<{
|
|
263
|
+
taskId: z.ZodString;
|
|
264
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
/**
|
|
267
|
+
* POST /v1/tasks/:taskId/cancel - Response schema
|
|
268
|
+
*/
|
|
269
|
+
declare const CancelTaskResponseSchema: z.ZodObject<{
|
|
270
|
+
message: z.ZodString;
|
|
271
|
+
taskId: z.ZodString;
|
|
272
|
+
}, z.core.$strip>;
|
|
273
|
+
type CancelTaskResponse = z.infer<typeof CancelTaskResponseSchema>;
|
|
274
|
+
/**
|
|
275
|
+
* POST /v1/tasks/:taskId/stop - Request schema
|
|
276
|
+
*/
|
|
277
|
+
declare const StopTaskRequestSchema: z.ZodObject<{
|
|
278
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
type StopTaskRequest = z.infer<typeof StopTaskRequestSchema>;
|
|
281
|
+
declare const stopTaskRequestSchema: z.ZodObject<{
|
|
282
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
/**
|
|
285
|
+
* POST /v1/tasks/:taskId/stop - Response schema
|
|
286
|
+
*/
|
|
287
|
+
declare const StopTaskResponseSchema: z.ZodObject<{
|
|
288
|
+
message: z.ZodString;
|
|
289
|
+
taskId: z.ZodString;
|
|
290
|
+
}, z.core.$strip>;
|
|
291
|
+
type StopTaskResponse = z.infer<typeof StopTaskResponseSchema>;
|
|
292
|
+
/**
|
|
293
|
+
* POST /v1/tasks/:taskId/permission-response - Request schema
|
|
294
|
+
*/
|
|
295
|
+
declare const PermissionResponseRequestSchema: z.ZodObject<{
|
|
296
|
+
approved: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
type PermissionResponseRequest = z.infer<typeof PermissionResponseRequestSchema>;
|
|
300
|
+
declare const permissionResponseRequestSchema: z.ZodObject<{
|
|
301
|
+
approved: z.ZodOptional<z.ZodBoolean>;
|
|
302
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
/**
|
|
305
|
+
* POST /v1/tasks/:taskId/permission-response - Response schema
|
|
306
|
+
*/
|
|
307
|
+
declare const PermissionResponseResponseSchema: z.ZodObject<{
|
|
308
|
+
message: z.ZodString;
|
|
309
|
+
taskId: z.ZodString;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
type PermissionResponseResponse = z.infer<typeof PermissionResponseResponseSchema>;
|
|
312
|
+
/**
|
|
313
|
+
* File system entry (file or directory)
|
|
314
|
+
*/
|
|
315
|
+
declare const ProjectEntrySchema: z.ZodObject<{
|
|
316
|
+
name: z.ZodString;
|
|
317
|
+
type: z.ZodEnum<{
|
|
318
|
+
file: "file";
|
|
319
|
+
directory: "directory";
|
|
320
|
+
}>;
|
|
321
|
+
size: z.ZodNumber;
|
|
322
|
+
modifiedAt: z.ZodString;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
type ProjectEntry = z.infer<typeof ProjectEntrySchema>;
|
|
325
|
+
/**
|
|
326
|
+
* GET /v1/tasks/:taskId/project/* - Response schema for directory listing
|
|
327
|
+
*/
|
|
328
|
+
declare const ProjectDirectoryResponseSchema: z.ZodObject<{
|
|
329
|
+
type: z.ZodLiteral<"directory">;
|
|
330
|
+
path: z.ZodString;
|
|
331
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
332
|
+
name: z.ZodString;
|
|
333
|
+
type: z.ZodEnum<{
|
|
334
|
+
file: "file";
|
|
335
|
+
directory: "directory";
|
|
336
|
+
}>;
|
|
337
|
+
size: z.ZodNumber;
|
|
338
|
+
modifiedAt: z.ZodString;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
modifiedAt: z.ZodString;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
type ProjectDirectoryResponse = z.infer<typeof ProjectDirectoryResponseSchema>;
|
|
343
|
+
/**
|
|
344
|
+
* GET /v1/tasks/:taskId/events - Query parameters schema
|
|
345
|
+
*/
|
|
346
|
+
declare const QueryEventsRequestSchema: z.ZodObject<{
|
|
347
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
348
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
349
|
+
before: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
350
|
+
after: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
351
|
+
}, z.core.$strip>;
|
|
352
|
+
type QueryEventsRequest = z.infer<typeof QueryEventsRequestSchema>;
|
|
353
|
+
/**
|
|
354
|
+
* Task event item
|
|
355
|
+
*/
|
|
356
|
+
interface TaskEvent {
|
|
357
|
+
id: string;
|
|
358
|
+
taskId: string;
|
|
359
|
+
chatId: string;
|
|
360
|
+
eventId: string;
|
|
361
|
+
sequence: number;
|
|
362
|
+
eventType: string;
|
|
363
|
+
eventData: any;
|
|
364
|
+
createdAt: string;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* GET /v1/tasks/:taskId/events - Response schema
|
|
368
|
+
*/
|
|
369
|
+
interface QueryEventsResponse {
|
|
370
|
+
events: TaskEvent[];
|
|
371
|
+
total: number;
|
|
372
|
+
hasMore: boolean;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* POST /v1/tasks/:taskId/events/fill - Request schema
|
|
376
|
+
*/
|
|
377
|
+
declare const FillEventsRequestSchema: z.ZodObject<{
|
|
378
|
+
sequences: z.ZodArray<z.ZodCoercedNumber<unknown>>;
|
|
379
|
+
}, z.core.$strip>;
|
|
380
|
+
type FillEventsRequest = z.infer<typeof FillEventsRequestSchema>;
|
|
381
|
+
/**
|
|
382
|
+
* POST /v1/tasks/:taskId/events/fill - Response schema
|
|
383
|
+
*/
|
|
384
|
+
interface FillEventsResponse {
|
|
385
|
+
events: TaskEvent[];
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* POST /v1/tasks/:taskId/merge-request - Request schema
|
|
389
|
+
*
|
|
390
|
+
* Workflow:
|
|
391
|
+
* 1. API server receives this request
|
|
392
|
+
* 2. API server sends '![merge-request]' via task-message
|
|
393
|
+
* 3. Worker pushes code and returns 'event-ack'
|
|
394
|
+
* 4. API server creates PR via GitHub App API
|
|
395
|
+
*/
|
|
396
|
+
declare const CreateMergeRequestSchema: z.ZodObject<{
|
|
397
|
+
taskId: z.ZodString;
|
|
398
|
+
title: z.ZodOptional<z.ZodString>;
|
|
399
|
+
description: z.ZodOptional<z.ZodString>;
|
|
400
|
+
draft: z.ZodOptional<z.ZodBoolean>;
|
|
401
|
+
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
type CreateMergeRequestRequest = z.infer<typeof CreateMergeRequestSchema>;
|
|
404
|
+
declare const createMergeRequestSchema: z.ZodObject<{
|
|
405
|
+
taskId: z.ZodString;
|
|
406
|
+
title: z.ZodOptional<z.ZodString>;
|
|
407
|
+
description: z.ZodOptional<z.ZodString>;
|
|
408
|
+
draft: z.ZodOptional<z.ZodBoolean>;
|
|
409
|
+
autoMerge: z.ZodOptional<z.ZodBoolean>;
|
|
410
|
+
}, z.core.$strip>;
|
|
411
|
+
/**
|
|
412
|
+
* POST /v1/tasks/:taskId/merge-request - Response schema (201 Created)
|
|
413
|
+
*/
|
|
414
|
+
declare const CreateMergeRequestResponseSchema: z.ZodObject<{
|
|
415
|
+
taskId: z.ZodString;
|
|
416
|
+
pullRequestNumber: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
pullRequestUrl: z.ZodOptional<z.ZodString>;
|
|
418
|
+
status: z.ZodEnum<{
|
|
419
|
+
success: "success";
|
|
420
|
+
failed: "failed";
|
|
421
|
+
}>;
|
|
422
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
423
|
+
}, z.core.$strip>;
|
|
424
|
+
type CreateMergeRequestResponse = z.infer<typeof CreateMergeRequestResponseSchema>;
|
|
425
|
+
/**
|
|
426
|
+
* POST /v1/tasks/:taskId/approve-pr - Request schema
|
|
427
|
+
*/
|
|
428
|
+
declare const ApprovePrRequestSchema: z.ZodObject<{}, z.core.$strip>;
|
|
429
|
+
type ApprovePrRequest = z.infer<typeof ApprovePrRequestSchema>;
|
|
430
|
+
/**
|
|
431
|
+
* POST /v1/tasks/:taskId/approve-pr - Response schema
|
|
432
|
+
*/
|
|
433
|
+
declare const ApprovePrResponseSchema: z.ZodObject<{
|
|
434
|
+
success: z.ZodBoolean;
|
|
435
|
+
taskId: z.ZodString;
|
|
436
|
+
pullRequestNumber: z.ZodNumber;
|
|
437
|
+
}, z.core.$strip>;
|
|
438
|
+
type ApprovePrResponse = z.infer<typeof ApprovePrResponseSchema>;
|
|
439
|
+
/**
|
|
440
|
+
* POST /v1/tasks/:taskId/share - Request schema
|
|
441
|
+
*/
|
|
442
|
+
declare const CreateTaskShareSchema: z.ZodObject<{
|
|
443
|
+
permissions: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
444
|
+
canSendMessage: z.ZodBoolean;
|
|
445
|
+
canCreatePr: z.ZodBoolean;
|
|
446
|
+
canApprovePr: z.ZodBoolean;
|
|
447
|
+
canViewPr: z.ZodBoolean;
|
|
448
|
+
canMergePr: z.ZodBoolean;
|
|
449
|
+
}, z.core.$strip>>>;
|
|
450
|
+
}, z.core.$strip>;
|
|
451
|
+
type CreateTaskShareRequest = z.infer<typeof CreateTaskShareSchema>;
|
|
452
|
+
/**
|
|
453
|
+
* POST /v1/tasks/:taskId/share - Response schema
|
|
454
|
+
*/
|
|
455
|
+
declare const CreateTaskShareResponseSchema: z.ZodObject<{
|
|
456
|
+
shareCode: z.ZodString;
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
type CreateTaskShareResponse = z.infer<typeof CreateTaskShareResponseSchema>;
|
|
459
|
+
/**
|
|
460
|
+
* POST /v1/tasks/:taskId/archive - Request schema (empty body)
|
|
461
|
+
*/
|
|
462
|
+
declare const ArchiveTaskRequestSchema: z.ZodObject<{}, z.core.$strip>;
|
|
463
|
+
type ArchiveTaskRequest = z.infer<typeof ArchiveTaskRequestSchema>;
|
|
464
|
+
/**
|
|
465
|
+
* POST /v1/tasks/:taskId/archive - Response schema
|
|
466
|
+
*/
|
|
467
|
+
declare const ArchiveTaskResponseSchema: z.ZodObject<{
|
|
468
|
+
success: z.ZodBoolean;
|
|
469
|
+
task: z.ZodObject<{
|
|
470
|
+
id: z.ZodString;
|
|
471
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
472
|
+
chat: "chat";
|
|
473
|
+
work: "work";
|
|
474
|
+
shadow: "shadow";
|
|
475
|
+
}>>;
|
|
476
|
+
chatId: z.ZodString;
|
|
477
|
+
userId: z.ZodString;
|
|
478
|
+
state: z.ZodString;
|
|
479
|
+
workerStatus: z.ZodNullable<z.ZodEnum<{
|
|
480
|
+
initializing: "initializing";
|
|
481
|
+
ready: "ready";
|
|
482
|
+
running: "running";
|
|
483
|
+
}>>;
|
|
484
|
+
agentId: z.ZodString;
|
|
485
|
+
machineId: z.ZodNullable<z.ZodString>;
|
|
486
|
+
cloudId: z.ZodNullable<z.ZodString>;
|
|
487
|
+
repositoryId: z.ZodNullable<z.ZodString>;
|
|
488
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
489
|
+
title: z.ZodNullable<z.ZodString>;
|
|
490
|
+
customTitle: z.ZodNullable<z.ZodString>;
|
|
491
|
+
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
492
|
+
dataEncryptionKey: z.ZodNullable<z.ZodString>;
|
|
493
|
+
ownerEncryptedDataKey: z.ZodNullable<z.ZodString>;
|
|
494
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
495
|
+
userCwd: z.ZodNullable<z.ZodString>;
|
|
496
|
+
forceUserCwd: z.ZodNullable<z.ZodBoolean>;
|
|
497
|
+
repositorySourceType: z.ZodNullable<z.ZodEnum<{
|
|
498
|
+
temporary: "temporary";
|
|
499
|
+
directory: "directory";
|
|
500
|
+
"git-server": "git-server";
|
|
501
|
+
}>>;
|
|
502
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
503
|
+
pullRequestUrl: z.ZodNullable<z.ZodString>;
|
|
504
|
+
pullRequestState: z.ZodNullable<z.ZodEnum<{
|
|
505
|
+
open: "open";
|
|
506
|
+
closed: "closed";
|
|
507
|
+
merged: "merged";
|
|
508
|
+
}>>;
|
|
509
|
+
pullRequestStateChangedAt: z.ZodNullable<z.ZodString>;
|
|
510
|
+
gitStats: z.ZodNullable<z.ZodObject<{
|
|
511
|
+
totalInsertions: z.ZodNumber;
|
|
512
|
+
totalDeletions: z.ZodNumber;
|
|
513
|
+
files: z.ZodArray<z.ZodObject<{
|
|
514
|
+
path: z.ZodString;
|
|
515
|
+
insertions: z.ZodNumber;
|
|
516
|
+
deletions: z.ZodNumber;
|
|
517
|
+
}, z.core.$strip>>;
|
|
518
|
+
}, z.core.$strip>>;
|
|
519
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
520
|
+
rootTaskId: z.ZodNullable<z.ZodString>;
|
|
521
|
+
parentTaskId: z.ZodNullable<z.ZodString>;
|
|
522
|
+
taskAgentIds: z.ZodArray<z.ZodString>;
|
|
523
|
+
createdAt: z.ZodString;
|
|
524
|
+
updatedAt: z.ZodString;
|
|
525
|
+
}, z.core.$strip>;
|
|
526
|
+
}, z.core.$strip>;
|
|
527
|
+
type ArchiveTaskResponse = z.infer<typeof ArchiveTaskResponseSchema>;
|
|
528
|
+
/**
|
|
529
|
+
* POST /v1/tasks/:taskId/unarchive - Request schema (empty body)
|
|
530
|
+
*/
|
|
531
|
+
declare const UnarchiveTaskRequestSchema: z.ZodObject<{}, z.core.$strip>;
|
|
532
|
+
type UnarchiveTaskRequest = z.infer<typeof UnarchiveTaskRequestSchema>;
|
|
533
|
+
/**
|
|
534
|
+
* POST /v1/tasks/:taskId/unarchive - Response schema
|
|
535
|
+
*/
|
|
536
|
+
declare const UnarchiveTaskResponseSchema: z.ZodObject<{
|
|
537
|
+
success: z.ZodBoolean;
|
|
538
|
+
task: z.ZodObject<{
|
|
539
|
+
id: z.ZodString;
|
|
540
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
541
|
+
chat: "chat";
|
|
542
|
+
work: "work";
|
|
543
|
+
shadow: "shadow";
|
|
544
|
+
}>>;
|
|
545
|
+
chatId: z.ZodString;
|
|
546
|
+
userId: z.ZodString;
|
|
547
|
+
state: z.ZodString;
|
|
548
|
+
workerStatus: z.ZodNullable<z.ZodEnum<{
|
|
549
|
+
initializing: "initializing";
|
|
550
|
+
ready: "ready";
|
|
551
|
+
running: "running";
|
|
552
|
+
}>>;
|
|
553
|
+
agentId: z.ZodString;
|
|
554
|
+
machineId: z.ZodNullable<z.ZodString>;
|
|
555
|
+
cloudId: z.ZodNullable<z.ZodString>;
|
|
556
|
+
repositoryId: z.ZodNullable<z.ZodString>;
|
|
557
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
558
|
+
title: z.ZodNullable<z.ZodString>;
|
|
559
|
+
customTitle: z.ZodNullable<z.ZodString>;
|
|
560
|
+
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
561
|
+
dataEncryptionKey: z.ZodNullable<z.ZodString>;
|
|
562
|
+
ownerEncryptedDataKey: z.ZodNullable<z.ZodString>;
|
|
563
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
564
|
+
userCwd: z.ZodNullable<z.ZodString>;
|
|
565
|
+
forceUserCwd: z.ZodNullable<z.ZodBoolean>;
|
|
566
|
+
repositorySourceType: z.ZodNullable<z.ZodEnum<{
|
|
567
|
+
temporary: "temporary";
|
|
568
|
+
directory: "directory";
|
|
569
|
+
"git-server": "git-server";
|
|
570
|
+
}>>;
|
|
571
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
572
|
+
pullRequestUrl: z.ZodNullable<z.ZodString>;
|
|
573
|
+
pullRequestState: z.ZodNullable<z.ZodEnum<{
|
|
574
|
+
open: "open";
|
|
575
|
+
closed: "closed";
|
|
576
|
+
merged: "merged";
|
|
577
|
+
}>>;
|
|
578
|
+
pullRequestStateChangedAt: z.ZodNullable<z.ZodString>;
|
|
579
|
+
gitStats: z.ZodNullable<z.ZodObject<{
|
|
580
|
+
totalInsertions: z.ZodNumber;
|
|
581
|
+
totalDeletions: z.ZodNumber;
|
|
582
|
+
files: z.ZodArray<z.ZodObject<{
|
|
583
|
+
path: z.ZodString;
|
|
584
|
+
insertions: z.ZodNumber;
|
|
585
|
+
deletions: z.ZodNumber;
|
|
586
|
+
}, z.core.$strip>>;
|
|
587
|
+
}, z.core.$strip>>;
|
|
588
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
589
|
+
rootTaskId: z.ZodNullable<z.ZodString>;
|
|
590
|
+
parentTaskId: z.ZodNullable<z.ZodString>;
|
|
591
|
+
taskAgentIds: z.ZodArray<z.ZodString>;
|
|
592
|
+
createdAt: z.ZodString;
|
|
593
|
+
updatedAt: z.ZodString;
|
|
594
|
+
}, z.core.$strip>;
|
|
595
|
+
}, z.core.$strip>;
|
|
596
|
+
type UnarchiveTaskResponse = z.infer<typeof UnarchiveTaskResponseSchema>;
|
|
597
|
+
/**
|
|
598
|
+
* PUT /v1/tasks/:taskId/title - Request schema
|
|
599
|
+
*/
|
|
600
|
+
declare const UpdateTaskTitleRequestSchema: z.ZodObject<{
|
|
601
|
+
customTitle: z.ZodString;
|
|
602
|
+
}, z.core.$strip>;
|
|
603
|
+
type UpdateTaskTitleRequest = z.infer<typeof UpdateTaskTitleRequestSchema>;
|
|
604
|
+
/**
|
|
605
|
+
* PUT /v1/tasks/:taskId/title - Response schema
|
|
606
|
+
*/
|
|
607
|
+
declare const UpdateTaskTitleResponseSchema: z.ZodObject<{
|
|
608
|
+
success: z.ZodBoolean;
|
|
609
|
+
task: z.ZodObject<{
|
|
610
|
+
id: z.ZodString;
|
|
611
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
612
|
+
chat: "chat";
|
|
613
|
+
work: "work";
|
|
614
|
+
shadow: "shadow";
|
|
615
|
+
}>>;
|
|
616
|
+
chatId: z.ZodString;
|
|
617
|
+
userId: z.ZodString;
|
|
618
|
+
state: z.ZodString;
|
|
619
|
+
workerStatus: z.ZodNullable<z.ZodEnum<{
|
|
620
|
+
initializing: "initializing";
|
|
621
|
+
ready: "ready";
|
|
622
|
+
running: "running";
|
|
623
|
+
}>>;
|
|
624
|
+
agentId: z.ZodString;
|
|
625
|
+
machineId: z.ZodNullable<z.ZodString>;
|
|
626
|
+
cloudId: z.ZodNullable<z.ZodString>;
|
|
627
|
+
repositoryId: z.ZodNullable<z.ZodString>;
|
|
628
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
629
|
+
title: z.ZodNullable<z.ZodString>;
|
|
630
|
+
customTitle: z.ZodNullable<z.ZodString>;
|
|
631
|
+
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
632
|
+
dataEncryptionKey: z.ZodNullable<z.ZodString>;
|
|
633
|
+
ownerEncryptedDataKey: z.ZodNullable<z.ZodString>;
|
|
634
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
635
|
+
userCwd: z.ZodNullable<z.ZodString>;
|
|
636
|
+
forceUserCwd: z.ZodNullable<z.ZodBoolean>;
|
|
637
|
+
repositorySourceType: z.ZodNullable<z.ZodEnum<{
|
|
638
|
+
temporary: "temporary";
|
|
639
|
+
directory: "directory";
|
|
640
|
+
"git-server": "git-server";
|
|
641
|
+
}>>;
|
|
642
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
643
|
+
pullRequestUrl: z.ZodNullable<z.ZodString>;
|
|
644
|
+
pullRequestState: z.ZodNullable<z.ZodEnum<{
|
|
645
|
+
open: "open";
|
|
646
|
+
closed: "closed";
|
|
647
|
+
merged: "merged";
|
|
648
|
+
}>>;
|
|
649
|
+
pullRequestStateChangedAt: z.ZodNullable<z.ZodString>;
|
|
650
|
+
gitStats: z.ZodNullable<z.ZodObject<{
|
|
651
|
+
totalInsertions: z.ZodNumber;
|
|
652
|
+
totalDeletions: z.ZodNumber;
|
|
653
|
+
files: z.ZodArray<z.ZodObject<{
|
|
654
|
+
path: z.ZodString;
|
|
655
|
+
insertions: z.ZodNumber;
|
|
656
|
+
deletions: z.ZodNumber;
|
|
657
|
+
}, z.core.$strip>>;
|
|
658
|
+
}, z.core.$strip>>;
|
|
659
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
660
|
+
rootTaskId: z.ZodNullable<z.ZodString>;
|
|
661
|
+
parentTaskId: z.ZodNullable<z.ZodString>;
|
|
662
|
+
taskAgentIds: z.ZodArray<z.ZodString>;
|
|
663
|
+
createdAt: z.ZodString;
|
|
664
|
+
updatedAt: z.ZodString;
|
|
665
|
+
}, z.core.$strip>;
|
|
666
|
+
}, z.core.$strip>;
|
|
667
|
+
type UpdateTaskTitleResponse = z.infer<typeof UpdateTaskTitleResponseSchema>;
|
|
668
|
+
/**
|
|
669
|
+
* Message target type
|
|
670
|
+
* - 'agent': Send to task's agent worker (injects as user message)
|
|
671
|
+
* - 'user': Send to users viewing the task (shows in chat UI)
|
|
672
|
+
*/
|
|
673
|
+
type SendMessageTarget = 'agent' | 'user';
|
|
674
|
+
/**
|
|
675
|
+
* POST /v1/tasks/:taskId/send-message - Request schema
|
|
676
|
+
* Sends a message to a task's worker or to users viewing the task
|
|
677
|
+
*
|
|
678
|
+
* Target behavior:
|
|
679
|
+
* - 'agent': Routes SDKUserMessage to task's agent worker
|
|
680
|
+
* - 'user': Broadcasts SDKAssistantMessage to users viewing the task
|
|
681
|
+
*/
|
|
682
|
+
declare const SendTaskMessageRequestSchema: z.ZodObject<{
|
|
683
|
+
message: z.ZodCustom<SDKAssistantMessage | SDKUserMessage, SDKAssistantMessage | SDKUserMessage>;
|
|
684
|
+
target: z.ZodEnum<{
|
|
685
|
+
user: "user";
|
|
686
|
+
agent: "agent";
|
|
687
|
+
}>;
|
|
688
|
+
fromTaskId: z.ZodOptional<z.ZodString>;
|
|
689
|
+
senderType: z.ZodEnum<{
|
|
690
|
+
system: "system";
|
|
691
|
+
human: "human";
|
|
692
|
+
agent: "agent";
|
|
693
|
+
}>;
|
|
694
|
+
senderId: z.ZodString;
|
|
695
|
+
senderName: z.ZodString;
|
|
696
|
+
}, z.core.$strip>;
|
|
697
|
+
type SendTaskMessageRequest = z.infer<typeof SendTaskMessageRequestSchema>;
|
|
698
|
+
/**
|
|
699
|
+
* POST /v1/tasks/:taskId/send-message - Response schema
|
|
700
|
+
*/
|
|
701
|
+
declare const SendTaskMessageResponseSchema: z.ZodObject<{
|
|
702
|
+
success: z.ZodBoolean;
|
|
703
|
+
}, z.core.$strip>;
|
|
704
|
+
type SendTaskMessageResponse = z.infer<typeof SendTaskMessageResponseSchema>;
|
|
705
|
+
/**
|
|
706
|
+
* POST /v1/tasks/:taskId/show-modal - Request schema
|
|
707
|
+
* Shows a modal dialog to users viewing the task
|
|
708
|
+
*/
|
|
709
|
+
declare const ShowModalRequestSchema: z.ZodObject<{
|
|
710
|
+
modalName: z.ZodString;
|
|
711
|
+
modalData: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
712
|
+
}, z.core.$strip>;
|
|
713
|
+
type ShowModalRequest = z.infer<typeof ShowModalRequestSchema>;
|
|
714
|
+
/**
|
|
715
|
+
* POST /v1/tasks/:taskId/show-modal - Response schema
|
|
716
|
+
*/
|
|
717
|
+
declare const ShowModalResponseSchema: z.ZodObject<{
|
|
718
|
+
success: z.ZodBoolean;
|
|
719
|
+
}, z.core.$strip>;
|
|
720
|
+
type ShowModalResponse = z.infer<typeof ShowModalResponseSchema>;
|
|
721
|
+
/**
|
|
722
|
+
* GET /v1/tasks/:taskId/session - Response schema
|
|
723
|
+
* Returns the session file path and current state
|
|
724
|
+
*/
|
|
725
|
+
declare const GetTaskSessionResponseSchema: z.ZodObject<{
|
|
726
|
+
sessionPath: z.ZodString;
|
|
727
|
+
state: z.ZodString;
|
|
728
|
+
}, z.core.$strip>;
|
|
729
|
+
type GetTaskSessionResponse = z.infer<typeof GetTaskSessionResponseSchema>;
|
|
730
|
+
/**
|
|
731
|
+
* GET /v1/tasks/sub-tasks - Query parameters schema
|
|
732
|
+
* Lists direct child tasks by parentTaskId
|
|
733
|
+
*/
|
|
734
|
+
declare const ListSubTasksRequestSchema: z.ZodObject<{
|
|
735
|
+
parentTaskId: z.ZodString;
|
|
736
|
+
}, z.core.$strip>;
|
|
737
|
+
type ListSubTasksRequest = z.infer<typeof ListSubTasksRequestSchema>;
|
|
738
|
+
/**
|
|
739
|
+
* Sub-task summary schema
|
|
740
|
+
*/
|
|
741
|
+
declare const SubTaskSummarySchema: z.ZodObject<{
|
|
742
|
+
taskId: z.ZodString;
|
|
743
|
+
title: z.ZodNullable<z.ZodString>;
|
|
744
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
745
|
+
}, z.core.$strip>;
|
|
746
|
+
type SubTaskSummary = z.infer<typeof SubTaskSummarySchema>;
|
|
747
|
+
/**
|
|
748
|
+
* GET /v1/tasks/sub-tasks - Response schema
|
|
749
|
+
*/
|
|
750
|
+
declare const ListSubTasksResponseSchema: z.ZodObject<{
|
|
751
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
752
|
+
taskId: z.ZodString;
|
|
753
|
+
title: z.ZodNullable<z.ZodString>;
|
|
754
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
755
|
+
}, z.core.$strip>>;
|
|
756
|
+
}, z.core.$strip>;
|
|
757
|
+
type ListSubTasksResponse = z.infer<typeof ListSubTasksResponseSchema>;
|
|
758
|
+
/**
|
|
759
|
+
* GET /v1/tasks/recent - Query parameters schema
|
|
760
|
+
* Lists recent tasks in a chat for agent consumption (lightweight summary)
|
|
761
|
+
*/
|
|
762
|
+
declare const ListRecentTasksRequestSchema: z.ZodObject<{
|
|
763
|
+
chatId: z.ZodString;
|
|
764
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
765
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
766
|
+
all: "all";
|
|
767
|
+
active: "active";
|
|
768
|
+
completed: "completed";
|
|
769
|
+
}>>>;
|
|
770
|
+
}, z.core.$strip>;
|
|
771
|
+
type ListRecentTasksRequest = z.infer<typeof ListRecentTasksRequestSchema>;
|
|
772
|
+
/**
|
|
773
|
+
* Recent task summary schema (lightweight, for agent review)
|
|
774
|
+
*/
|
|
775
|
+
declare const RecentTaskSummarySchema: z.ZodObject<{
|
|
776
|
+
taskId: z.ZodString;
|
|
777
|
+
type: z.ZodEnum<{
|
|
778
|
+
chat: "chat";
|
|
779
|
+
work: "work";
|
|
780
|
+
shadow: "shadow";
|
|
781
|
+
}>;
|
|
782
|
+
state: z.ZodString;
|
|
783
|
+
agentId: z.ZodString;
|
|
784
|
+
title: z.ZodNullable<z.ZodString>;
|
|
785
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
786
|
+
createdAt: z.ZodString;
|
|
787
|
+
updatedAt: z.ZodString;
|
|
788
|
+
}, z.core.$strip>;
|
|
789
|
+
type RecentTaskSummary = z.infer<typeof RecentTaskSummarySchema>;
|
|
790
|
+
/**
|
|
791
|
+
* GET /v1/tasks/recent - Response schema
|
|
792
|
+
*/
|
|
793
|
+
declare const ListRecentTasksResponseSchema: z.ZodObject<{
|
|
794
|
+
tasks: z.ZodArray<z.ZodObject<{
|
|
795
|
+
taskId: z.ZodString;
|
|
796
|
+
type: z.ZodEnum<{
|
|
797
|
+
chat: "chat";
|
|
798
|
+
work: "work";
|
|
799
|
+
shadow: "shadow";
|
|
800
|
+
}>;
|
|
801
|
+
state: z.ZodString;
|
|
802
|
+
agentId: z.ZodString;
|
|
803
|
+
title: z.ZodNullable<z.ZodString>;
|
|
804
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
805
|
+
createdAt: z.ZodString;
|
|
806
|
+
updatedAt: z.ZodString;
|
|
807
|
+
}, z.core.$strip>>;
|
|
808
|
+
hasMore: z.ZodBoolean;
|
|
809
|
+
}, z.core.$strip>;
|
|
810
|
+
type ListRecentTasksResponse = z.infer<typeof ListRecentTasksResponseSchema>;
|
|
811
|
+
/**
|
|
812
|
+
* GET /v1/tasks/find-by-agent - Query parameters schema
|
|
813
|
+
* Finds a task by parentTaskId and agentId
|
|
814
|
+
*/
|
|
815
|
+
declare const FindTaskByAgentRequestSchema: z.ZodObject<{
|
|
816
|
+
parentTaskId: z.ZodString;
|
|
817
|
+
agentId: z.ZodString;
|
|
818
|
+
}, z.core.$strip>;
|
|
819
|
+
type FindTaskByAgentRequest = z.infer<typeof FindTaskByAgentRequestSchema>;
|
|
820
|
+
/**
|
|
821
|
+
* GET /v1/tasks/find-by-agent - Response schema
|
|
822
|
+
*/
|
|
823
|
+
declare const FindTaskByAgentResponseSchema: z.ZodObject<{
|
|
824
|
+
taskId: z.ZodNullable<z.ZodString>;
|
|
825
|
+
}, z.core.$strip>;
|
|
826
|
+
type FindTaskByAgentResponse = z.infer<typeof FindTaskByAgentResponseSchema>;
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* RPC (Remote Procedure Call) types and schemas for AgentrixContext
|
|
830
|
+
*
|
|
831
|
+
* RPC calls map to HTTP API paths, reusing existing HTTP schemas from shared/http.
|
|
832
|
+
* The API server simulates internal HTTP requests for RPC calls after permission checks.
|
|
833
|
+
*/
|
|
834
|
+
|
|
835
|
+
declare const RpcCallEventSchema: z.ZodObject<{
|
|
836
|
+
eventId: z.ZodString;
|
|
837
|
+
taskId: z.ZodString;
|
|
838
|
+
method: z.ZodEnum<{
|
|
839
|
+
GET: "GET";
|
|
840
|
+
POST: "POST";
|
|
841
|
+
PATCH: "PATCH";
|
|
842
|
+
DELETE: "DELETE";
|
|
843
|
+
}>;
|
|
844
|
+
path: z.ZodString;
|
|
845
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
846
|
+
body: z.ZodOptional<z.ZodAny>;
|
|
847
|
+
}, z.core.$strip>;
|
|
848
|
+
type RpcCallEventData = z.infer<typeof RpcCallEventSchema>;
|
|
849
|
+
declare const RpcResponseSchema: z.ZodObject<{
|
|
850
|
+
success: z.ZodBoolean;
|
|
851
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
852
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
853
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
854
|
+
code: z.ZodString;
|
|
855
|
+
message: z.ZodString;
|
|
856
|
+
}, z.core.$strip>>;
|
|
857
|
+
}, z.core.$strip>;
|
|
858
|
+
type RpcResponseData = z.infer<typeof RpcResponseSchema>;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* WebSocket event schemas and mappings.
|
|
862
|
+
* Updated to carry custom task titles in task lifecycle events.
|
|
863
|
+
*/
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Option schema for ask-user questions
|
|
867
|
+
*/
|
|
868
|
+
declare const AskUserOptionSchema: z.ZodObject<{
|
|
869
|
+
label: z.ZodString;
|
|
870
|
+
description: z.ZodString;
|
|
871
|
+
}, z.core.$strip>;
|
|
872
|
+
type AskUserOption = z.infer<typeof AskUserOptionSchema>;
|
|
873
|
+
/**
|
|
874
|
+
* Question schema for ask-user
|
|
875
|
+
*/
|
|
876
|
+
declare const AskUserQuestionSchema: z.ZodObject<{
|
|
877
|
+
question: z.ZodString;
|
|
878
|
+
header: z.ZodString;
|
|
879
|
+
multiSelect: z.ZodBoolean;
|
|
880
|
+
options: z.ZodArray<z.ZodObject<{
|
|
881
|
+
label: z.ZodString;
|
|
882
|
+
description: z.ZodString;
|
|
883
|
+
}, z.core.$strip>>;
|
|
884
|
+
}, z.core.$strip>;
|
|
885
|
+
type AskUserQuestion = z.infer<typeof AskUserQuestionSchema>;
|
|
886
|
+
/**
|
|
887
|
+
* Ask user message payload (Worker → App)
|
|
888
|
+
*/
|
|
889
|
+
declare const AskUserMessageSchema: z.ZodObject<{
|
|
890
|
+
type: z.ZodLiteral<"ask_user">;
|
|
891
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
892
|
+
question: z.ZodString;
|
|
893
|
+
header: z.ZodString;
|
|
894
|
+
multiSelect: z.ZodBoolean;
|
|
895
|
+
options: z.ZodArray<z.ZodObject<{
|
|
896
|
+
label: z.ZodString;
|
|
897
|
+
description: z.ZodString;
|
|
898
|
+
}, z.core.$strip>>;
|
|
899
|
+
}, z.core.$strip>>;
|
|
900
|
+
}, z.core.$strip>;
|
|
901
|
+
type AskUserMessage = z.infer<typeof AskUserMessageSchema>;
|
|
902
|
+
declare const AskUserResponseStatusSchema: z.ZodEnum<{
|
|
903
|
+
answered: "answered";
|
|
904
|
+
cancelled: "cancelled";
|
|
905
|
+
timeout: "timeout";
|
|
906
|
+
}>;
|
|
907
|
+
declare const AskUserResponseReasonSchema: z.ZodEnum<{
|
|
908
|
+
timeout: "timeout";
|
|
909
|
+
user: "user";
|
|
910
|
+
system: "system";
|
|
911
|
+
}>;
|
|
912
|
+
type AskUserResponseStatus = z.infer<typeof AskUserResponseStatusSchema>;
|
|
913
|
+
type AskUserResponseReason = z.infer<typeof AskUserResponseReasonSchema>;
|
|
914
|
+
/**
|
|
915
|
+
* Ask user response payload (App → Worker)
|
|
916
|
+
* Each answer is:
|
|
917
|
+
* - Selected option label(s), comma-separated for multiSelect
|
|
918
|
+
* - "other:<custom text>" when "Other" option is selected with custom input
|
|
919
|
+
*/
|
|
920
|
+
declare const AskUserResponseMessageSchema: z.ZodObject<{
|
|
921
|
+
type: z.ZodLiteral<"ask_user_response">;
|
|
922
|
+
answers: z.ZodArray<z.ZodString>;
|
|
923
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
924
|
+
answered: "answered";
|
|
925
|
+
cancelled: "cancelled";
|
|
926
|
+
timeout: "timeout";
|
|
927
|
+
}>>;
|
|
928
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
929
|
+
timeout: "timeout";
|
|
930
|
+
user: "user";
|
|
931
|
+
system: "system";
|
|
932
|
+
}>>;
|
|
933
|
+
}, z.core.$strip>;
|
|
934
|
+
type AskUserResponseMessage = z.infer<typeof AskUserResponseMessageSchema>;
|
|
935
|
+
/**
|
|
936
|
+
* Companion heartbeat message payload (System → Worker)
|
|
937
|
+
* Sent by the platform scheduler to wake up companion for autonomous work
|
|
938
|
+
*/
|
|
939
|
+
interface CompanionHeartbeatMessage {
|
|
940
|
+
type: 'companion_heartbeat';
|
|
941
|
+
timestamp: string;
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Companion reminder message payload (Shadow → Main)
|
|
945
|
+
* Sent by the heartbeat task (shadow) to remind the main companion worker.
|
|
946
|
+
* Invisible to the user — only wakes up the main worker to act.
|
|
947
|
+
* Keep content concise; use filePath for detailed analysis.
|
|
948
|
+
*/
|
|
949
|
+
interface CompanionReminderMessage {
|
|
950
|
+
type: 'companion_reminder';
|
|
951
|
+
content: string;
|
|
952
|
+
filePath?: string;
|
|
953
|
+
timestamp: string;
|
|
954
|
+
}
|
|
955
|
+
/**
|
|
956
|
+
* Sub task ask user card message payload (API → Parent Task Viewers)
|
|
957
|
+
* Sent when a subtask uses ask_user tool to request user input
|
|
958
|
+
* Displayed as a card in parent task history with navigation to subtask
|
|
959
|
+
*/
|
|
960
|
+
interface SubTaskAskUserMessage {
|
|
961
|
+
type: 'sub_task_ask_user';
|
|
962
|
+
subTaskId: string;
|
|
963
|
+
agentId: string;
|
|
964
|
+
agentName: string;
|
|
965
|
+
taskName: string;
|
|
966
|
+
askUserEventId: string;
|
|
967
|
+
questions: AskUserQuestion[];
|
|
968
|
+
status: 'pending' | 'answered' | 'timeout';
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Union type for task message payload
|
|
972
|
+
* - SDKMessage: Normal agent messages
|
|
973
|
+
* - AskUserMessage: Worker asking user questions
|
|
974
|
+
* - AskUserResponseMessage: User responding to questions
|
|
975
|
+
* - CompanionHeartbeatMessage: Scheduled heartbeat to wake up companion
|
|
976
|
+
* - CompanionReminderMessage: Shadow companion reminding main companion
|
|
977
|
+
* - SubTaskAskUserMessage: Sub task ask user card message
|
|
978
|
+
*/
|
|
979
|
+
type TaskMessagePayload = SDKMessage | AskUserMessage | AskUserResponseMessage | CompanionHeartbeatMessage | CompanionReminderMessage | SubTaskAskUserMessage;
|
|
980
|
+
|
|
981
|
+
declare const TaskAgentInfoSchema: z.ZodObject<{
|
|
982
|
+
id: z.ZodString;
|
|
983
|
+
name: z.ZodString;
|
|
984
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
985
|
+
claude: "claude";
|
|
986
|
+
codex: "codex";
|
|
987
|
+
companion: "companion";
|
|
988
|
+
}>>>;
|
|
989
|
+
description: z.ZodOptional<z.ZodString>;
|
|
990
|
+
}, z.core.$strip>;
|
|
991
|
+
type TaskAgentInfo = z.infer<typeof TaskAgentInfoSchema>;
|
|
992
|
+
/**
|
|
993
|
+
* Type guard to check if message is AskUserMessage
|
|
994
|
+
*/
|
|
995
|
+
declare function isAskUserMessage(message: TaskMessagePayload): message is AskUserMessage;
|
|
996
|
+
/**
|
|
997
|
+
* Type guard to check if message is AskUserResponseMessage
|
|
998
|
+
*/
|
|
999
|
+
declare function isAskUserResponseMessage(message: TaskMessagePayload): message is AskUserResponseMessage;
|
|
1000
|
+
/**
|
|
1001
|
+
* Type guard to check if message is CompanionHeartbeatMessage
|
|
1002
|
+
*/
|
|
1003
|
+
declare function isCompanionHeartbeatMessage(message: TaskMessagePayload): message is CompanionHeartbeatMessage;
|
|
1004
|
+
/**
|
|
1005
|
+
* Type guard to check if message is CompanionReminderMessage
|
|
1006
|
+
*/
|
|
1007
|
+
declare function isCompanionReminderMessage(message: TaskMessagePayload): message is CompanionReminderMessage;
|
|
1008
|
+
/**
|
|
1009
|
+
* Type guard to check if message is SubTaskAskUserMessage
|
|
1010
|
+
*/
|
|
1011
|
+
declare function isSubTaskAskUserMessage(message: TaskMessagePayload): message is SubTaskAskUserMessage;
|
|
1012
|
+
/**
|
|
1013
|
+
* Type guard to check if message is SDKMessage (not ask_user related, not companion_heartbeat, not companion_reminder, not sub_task_ask_user)
|
|
1014
|
+
*/
|
|
1015
|
+
declare function isSDKMessage(message: TaskMessagePayload): message is SDKMessage;
|
|
1016
|
+
/**
|
|
1017
|
+
* Type guard to check if message is SDKUserMessage
|
|
1018
|
+
*/
|
|
1019
|
+
declare function isSDKUserMessage(message: TaskMessagePayload): message is SDKUserMessage;
|
|
1020
|
+
/**
|
|
1021
|
+
* Generate a unique event ID using cryptographically secure random bytes
|
|
1022
|
+
* Compatible across all platforms (Node.js, Browser, React Native/iOS)
|
|
1023
|
+
*
|
|
1024
|
+
* Uses tweetnacl's randomBytes which automatically handles platform differences:
|
|
1025
|
+
* - Node.js: crypto.randomBytes()
|
|
1026
|
+
* - Browser/Web: crypto.getRandomValues()
|
|
1027
|
+
* - React Native: crypto.getRandomValues() via polyfill
|
|
1028
|
+
*
|
|
1029
|
+
* @returns Event ID in format: event-xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx (UUID v4)
|
|
1030
|
+
*/
|
|
1031
|
+
declare const createEventId: () => string;
|
|
1032
|
+
declare const EventAckSchema: z.ZodObject<{
|
|
1033
|
+
eventId: z.ZodString;
|
|
1034
|
+
status: z.ZodEnum<{
|
|
1035
|
+
success: "success";
|
|
1036
|
+
failed: "failed";
|
|
1037
|
+
}>;
|
|
1038
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
opCode: z.ZodOptional<z.ZodString>;
|
|
1040
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
1041
|
+
}, z.core.$strip>;
|
|
1042
|
+
type EventAckData = z.infer<typeof EventAckSchema>;
|
|
1043
|
+
declare const AppAliveEventSchema: z.ZodObject<{
|
|
1044
|
+
eventId: z.ZodString;
|
|
1045
|
+
timestamp: z.ZodString;
|
|
1046
|
+
}, z.core.$strip>;
|
|
1047
|
+
type AppAliveEventData = z.infer<typeof AppAliveEventSchema>;
|
|
1048
|
+
declare const ApiServerAliveEventSchema: z.ZodObject<{
|
|
1049
|
+
eventId: z.ZodString;
|
|
1050
|
+
timestamp: z.ZodString;
|
|
1051
|
+
}, z.core.$strip>;
|
|
1052
|
+
type ApiServerAliveEventData = z.infer<typeof ApiServerAliveEventSchema>;
|
|
1053
|
+
declare const MachineAliveEventSchema: z.ZodObject<{
|
|
1054
|
+
eventId: z.ZodString;
|
|
1055
|
+
machineId: z.ZodString;
|
|
1056
|
+
timestamp: z.ZodString;
|
|
1057
|
+
controlPort: z.ZodOptional<z.ZodNumber>;
|
|
1058
|
+
}, z.core.$strip>;
|
|
1059
|
+
type MachineAliveEventData = z.infer<typeof MachineAliveEventSchema>;
|
|
1060
|
+
declare const ShutdownMachineSchema: z.ZodObject<{
|
|
1061
|
+
eventId: z.ZodString;
|
|
1062
|
+
machineId: z.ZodString;
|
|
1063
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1064
|
+
}, z.core.$strip>;
|
|
1065
|
+
type ShutdownMachineData = z.infer<typeof ShutdownMachineSchema>;
|
|
1066
|
+
declare const WorkerInitializingSchema: z.ZodObject<{
|
|
1067
|
+
eventId: z.ZodString;
|
|
1068
|
+
taskId: z.ZodString;
|
|
1069
|
+
machineId: z.ZodString;
|
|
1070
|
+
timestamp: z.ZodString;
|
|
1071
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1072
|
+
}, z.core.$strip>;
|
|
1073
|
+
type WorkerInitializingEventData = z.infer<typeof WorkerInitializingSchema>;
|
|
1074
|
+
declare const WorkerInitializedSchema: z.ZodObject<{
|
|
1075
|
+
eventId: z.ZodString;
|
|
1076
|
+
taskId: z.ZodString;
|
|
1077
|
+
machineId: z.ZodString;
|
|
1078
|
+
timestamp: z.ZodString;
|
|
1079
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1080
|
+
}, z.core.$strip>;
|
|
1081
|
+
type WorkerInitializedEventData = z.infer<typeof WorkerInitializedSchema>;
|
|
1082
|
+
declare const WorkerReadySchema: z.ZodObject<{
|
|
1083
|
+
eventId: z.ZodString;
|
|
1084
|
+
taskId: z.ZodString;
|
|
1085
|
+
machineId: z.ZodString;
|
|
1086
|
+
timestamp: z.ZodString;
|
|
1087
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
1088
|
+
}, z.core.$strip>;
|
|
1089
|
+
type WorkerReadyEventData = z.infer<typeof WorkerReadySchema>;
|
|
1090
|
+
/**
|
|
1091
|
+
* Active agent info for typing indicator
|
|
1092
|
+
*/
|
|
1093
|
+
declare const ActiveAgentSchema: z.ZodObject<{
|
|
1094
|
+
agentId: z.ZodString;
|
|
1095
|
+
agentName: z.ZodString;
|
|
1096
|
+
}, z.core.$strip>;
|
|
1097
|
+
type ActiveAgent = z.infer<typeof ActiveAgentSchema>;
|
|
1098
|
+
declare const WorkerAliveEventSchema: z.ZodObject<{
|
|
1099
|
+
eventId: z.ZodString;
|
|
1100
|
+
taskId: z.ZodString;
|
|
1101
|
+
machineId: z.ZodString;
|
|
1102
|
+
status: z.ZodString;
|
|
1103
|
+
timestamp: z.ZodString;
|
|
1104
|
+
activeAgents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1105
|
+
agentId: z.ZodString;
|
|
1106
|
+
agentName: z.ZodString;
|
|
1107
|
+
}, z.core.$strip>>>;
|
|
1108
|
+
}, z.core.$strip>;
|
|
1109
|
+
type WorkerAliveEventData = z.infer<typeof WorkerAliveEventSchema>;
|
|
1110
|
+
declare const WorkerExitSchema: z.ZodObject<{
|
|
1111
|
+
eventId: z.ZodString;
|
|
1112
|
+
taskId: z.ZodString;
|
|
1113
|
+
machineId: z.ZodString;
|
|
1114
|
+
timestamp: z.ZodString;
|
|
1115
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
}, z.core.$strip>;
|
|
1117
|
+
type WorkerExitEventData = z.infer<typeof WorkerExitSchema>;
|
|
1118
|
+
declare const WorkerRunningSchema: z.ZodObject<{
|
|
1119
|
+
eventId: z.ZodString;
|
|
1120
|
+
taskId: z.ZodString;
|
|
1121
|
+
machineId: z.ZodString;
|
|
1122
|
+
timestamp: z.ZodString;
|
|
1123
|
+
activeAgents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1124
|
+
agentId: z.ZodString;
|
|
1125
|
+
agentName: z.ZodString;
|
|
1126
|
+
}, z.core.$strip>>>;
|
|
1127
|
+
}, z.core.$strip>;
|
|
1128
|
+
type WorkerRunningEventData = z.infer<typeof WorkerRunningSchema>;
|
|
1129
|
+
declare const WorkerStatusRequestSchema: z.ZodObject<{
|
|
1130
|
+
eventId: z.ZodString;
|
|
1131
|
+
taskId: z.ZodString;
|
|
1132
|
+
timestamp: z.ZodString;
|
|
1133
|
+
}, z.core.$strip>;
|
|
1134
|
+
type WorkerStatusRequestEventData = z.infer<typeof WorkerStatusRequestSchema>;
|
|
1135
|
+
declare const WorkerStatusValueSchema: z.ZodEnum<{
|
|
1136
|
+
"worker-initializing": "worker-initializing";
|
|
1137
|
+
"worker-ready": "worker-ready";
|
|
1138
|
+
"worker-running": "worker-running";
|
|
1139
|
+
}>;
|
|
1140
|
+
type WorkerStatusValue = z.infer<typeof WorkerStatusValueSchema>;
|
|
1141
|
+
declare const ChatWorkersStatusRequestSchema: z.ZodObject<{
|
|
1142
|
+
eventId: z.ZodString;
|
|
1143
|
+
chatId: z.ZodString;
|
|
1144
|
+
}, z.core.$strip>;
|
|
1145
|
+
type ChatWorkersStatusRequestEventData = z.infer<typeof ChatWorkersStatusRequestSchema>;
|
|
1146
|
+
declare const ChatWorkersStatusResponseSchema: z.ZodObject<{
|
|
1147
|
+
eventId: z.ZodString;
|
|
1148
|
+
chatId: z.ZodString;
|
|
1149
|
+
workers: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
1150
|
+
"worker-initializing": "worker-initializing";
|
|
1151
|
+
"worker-ready": "worker-ready";
|
|
1152
|
+
"worker-running": "worker-running";
|
|
1153
|
+
}>>;
|
|
1154
|
+
}, z.core.$strip>;
|
|
1155
|
+
type ChatWorkersStatusResponseEventData = z.infer<typeof ChatWorkersStatusResponseSchema>;
|
|
1156
|
+
declare const baseTaskSchema: z.ZodObject<{
|
|
1157
|
+
eventId: z.ZodString;
|
|
1158
|
+
taskId: z.ZodString;
|
|
1159
|
+
userId: z.ZodString;
|
|
1160
|
+
chatId: z.ZodString;
|
|
1161
|
+
agentId: z.ZodString;
|
|
1162
|
+
agentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1163
|
+
agentDir: z.ZodOptional<z.ZodString>;
|
|
1164
|
+
gitUrl: z.ZodOptional<z.ZodString>;
|
|
1165
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
1166
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1167
|
+
userCwd: z.ZodOptional<z.ZodString>;
|
|
1168
|
+
forceUserCwd: z.ZodOptional<z.ZodBoolean>;
|
|
1169
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
1170
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
fallbackModel: z.ZodOptional<z.ZodString>;
|
|
1172
|
+
api_base_url: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
api_key: z.ZodOptional<z.ZodString>;
|
|
1174
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
1175
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
1176
|
+
repositorySourceType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1177
|
+
temporary: "temporary";
|
|
1178
|
+
directory: "directory";
|
|
1179
|
+
"git-server": "git-server";
|
|
1180
|
+
}>>>;
|
|
1181
|
+
gitServerId: z.ZodOptional<z.ZodString>;
|
|
1182
|
+
environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1183
|
+
rootTaskId: z.ZodOptional<z.ZodString>;
|
|
1184
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
1185
|
+
taskAgents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1186
|
+
id: z.ZodString;
|
|
1187
|
+
name: z.ZodString;
|
|
1188
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1189
|
+
claude: "claude";
|
|
1190
|
+
codex: "codex";
|
|
1191
|
+
companion: "companion";
|
|
1192
|
+
}>>>;
|
|
1193
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1194
|
+
}, z.core.$strip>>>;
|
|
1195
|
+
todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1196
|
+
agentId: z.ZodString;
|
|
1197
|
+
title: z.ZodString;
|
|
1198
|
+
instructions: z.ZodString;
|
|
1199
|
+
}, z.core.$strip>>>;
|
|
1200
|
+
taskType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1201
|
+
chat: "chat";
|
|
1202
|
+
work: "work";
|
|
1203
|
+
shadow: "shadow";
|
|
1204
|
+
}>>>;
|
|
1205
|
+
customTitle: z.ZodOptional<z.ZodString>;
|
|
1206
|
+
}, z.core.$strip>;
|
|
1207
|
+
declare const createTaskSchema: z.ZodObject<{
|
|
1208
|
+
eventId: z.ZodString;
|
|
1209
|
+
taskId: z.ZodString;
|
|
1210
|
+
userId: z.ZodString;
|
|
1211
|
+
chatId: z.ZodString;
|
|
1212
|
+
agentId: z.ZodString;
|
|
1213
|
+
agentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1214
|
+
agentDir: z.ZodOptional<z.ZodString>;
|
|
1215
|
+
gitUrl: z.ZodOptional<z.ZodString>;
|
|
1216
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1218
|
+
userCwd: z.ZodOptional<z.ZodString>;
|
|
1219
|
+
forceUserCwd: z.ZodOptional<z.ZodBoolean>;
|
|
1220
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
1221
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1222
|
+
fallbackModel: z.ZodOptional<z.ZodString>;
|
|
1223
|
+
api_base_url: z.ZodOptional<z.ZodString>;
|
|
1224
|
+
api_key: z.ZodOptional<z.ZodString>;
|
|
1225
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
1226
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
1227
|
+
repositorySourceType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1228
|
+
temporary: "temporary";
|
|
1229
|
+
directory: "directory";
|
|
1230
|
+
"git-server": "git-server";
|
|
1231
|
+
}>>>;
|
|
1232
|
+
gitServerId: z.ZodOptional<z.ZodString>;
|
|
1233
|
+
environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1234
|
+
rootTaskId: z.ZodOptional<z.ZodString>;
|
|
1235
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
1236
|
+
taskAgents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1237
|
+
id: z.ZodString;
|
|
1238
|
+
name: z.ZodString;
|
|
1239
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1240
|
+
claude: "claude";
|
|
1241
|
+
codex: "codex";
|
|
1242
|
+
companion: "companion";
|
|
1243
|
+
}>>>;
|
|
1244
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1245
|
+
}, z.core.$strip>>>;
|
|
1246
|
+
todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1247
|
+
agentId: z.ZodString;
|
|
1248
|
+
title: z.ZodString;
|
|
1249
|
+
instructions: z.ZodString;
|
|
1250
|
+
}, z.core.$strip>>>;
|
|
1251
|
+
taskType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1252
|
+
chat: "chat";
|
|
1253
|
+
work: "work";
|
|
1254
|
+
shadow: "shadow";
|
|
1255
|
+
}>>>;
|
|
1256
|
+
customTitle: z.ZodOptional<z.ZodString>;
|
|
1257
|
+
event: z.ZodString;
|
|
1258
|
+
eventData: z.ZodAny;
|
|
1259
|
+
}, z.core.$strip>;
|
|
1260
|
+
type CreateTaskEventData = z.infer<typeof createTaskSchema>;
|
|
1261
|
+
declare const resumeTaskSchema: z.ZodObject<{
|
|
1262
|
+
eventId: z.ZodString;
|
|
1263
|
+
taskId: z.ZodString;
|
|
1264
|
+
userId: z.ZodString;
|
|
1265
|
+
chatId: z.ZodString;
|
|
1266
|
+
agentId: z.ZodString;
|
|
1267
|
+
agentType: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
1268
|
+
agentDir: z.ZodOptional<z.ZodString>;
|
|
1269
|
+
gitUrl: z.ZodOptional<z.ZodString>;
|
|
1270
|
+
baseBranch: z.ZodOptional<z.ZodString>;
|
|
1271
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1272
|
+
userCwd: z.ZodOptional<z.ZodString>;
|
|
1273
|
+
forceUserCwd: z.ZodOptional<z.ZodBoolean>;
|
|
1274
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
1275
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
fallbackModel: z.ZodOptional<z.ZodString>;
|
|
1277
|
+
api_base_url: z.ZodOptional<z.ZodString>;
|
|
1278
|
+
api_key: z.ZodOptional<z.ZodString>;
|
|
1279
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
1280
|
+
repositoryId: z.ZodOptional<z.ZodString>;
|
|
1281
|
+
repositorySourceType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1282
|
+
temporary: "temporary";
|
|
1283
|
+
directory: "directory";
|
|
1284
|
+
"git-server": "git-server";
|
|
1285
|
+
}>>>;
|
|
1286
|
+
gitServerId: z.ZodOptional<z.ZodString>;
|
|
1287
|
+
environmentVariables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1288
|
+
rootTaskId: z.ZodOptional<z.ZodString>;
|
|
1289
|
+
parentTaskId: z.ZodOptional<z.ZodString>;
|
|
1290
|
+
taskAgents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1291
|
+
id: z.ZodString;
|
|
1292
|
+
name: z.ZodString;
|
|
1293
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1294
|
+
claude: "claude";
|
|
1295
|
+
codex: "codex";
|
|
1296
|
+
companion: "companion";
|
|
1297
|
+
}>>>;
|
|
1298
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1299
|
+
}, z.core.$strip>>>;
|
|
1300
|
+
todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1301
|
+
agentId: z.ZodString;
|
|
1302
|
+
title: z.ZodString;
|
|
1303
|
+
instructions: z.ZodString;
|
|
1304
|
+
}, z.core.$strip>>>;
|
|
1305
|
+
taskType: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1306
|
+
chat: "chat";
|
|
1307
|
+
work: "work";
|
|
1308
|
+
shadow: "shadow";
|
|
1309
|
+
}>>>;
|
|
1310
|
+
customTitle: z.ZodOptional<z.ZodString>;
|
|
1311
|
+
agentSessionId: z.ZodString;
|
|
1312
|
+
event: z.ZodString;
|
|
1313
|
+
eventData: z.ZodAny;
|
|
1314
|
+
}, z.core.$strip>;
|
|
1315
|
+
type ResumeTaskEventData = z.infer<typeof resumeTaskSchema>;
|
|
1316
|
+
declare const cancelTaskSchema: z.ZodObject<{
|
|
1317
|
+
eventId: z.ZodString;
|
|
1318
|
+
taskId: z.ZodString;
|
|
1319
|
+
userId: z.ZodString;
|
|
1320
|
+
chatId: z.ZodString;
|
|
1321
|
+
agentId: z.ZodString;
|
|
1322
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1323
|
+
}, z.core.$strip>;
|
|
1324
|
+
type CancelTaskEventData = z.infer<typeof cancelTaskSchema>;
|
|
1325
|
+
declare const StopTaskSchema: z.ZodObject<{
|
|
1326
|
+
eventId: z.ZodString;
|
|
1327
|
+
taskId: z.ZodString;
|
|
1328
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1329
|
+
}, z.core.$strip>;
|
|
1330
|
+
type StopTaskEventData = z.infer<typeof StopTaskSchema>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Git stats schema for task artifacts summary
|
|
1333
|
+
*/
|
|
1334
|
+
declare const TaskArtifactsStatsSchema: z.ZodObject<{
|
|
1335
|
+
totalInsertions: z.ZodNumber;
|
|
1336
|
+
totalDeletions: z.ZodNumber;
|
|
1337
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1338
|
+
path: z.ZodString;
|
|
1339
|
+
insertions: z.ZodNumber;
|
|
1340
|
+
deletions: z.ZodNumber;
|
|
1341
|
+
}, z.core.$strip>>;
|
|
1342
|
+
}, z.core.$strip>;
|
|
1343
|
+
type TaskArtifactsStats = z.infer<typeof TaskArtifactsStatsSchema>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Project type for preview rendering
|
|
1346
|
+
*/
|
|
1347
|
+
declare const PreviewProjectTypeSchema: z.ZodEnum<{
|
|
1348
|
+
unknown: "unknown";
|
|
1349
|
+
html: "html";
|
|
1350
|
+
react: "react";
|
|
1351
|
+
vue: "vue";
|
|
1352
|
+
vite: "vite";
|
|
1353
|
+
nextjs: "nextjs";
|
|
1354
|
+
}>;
|
|
1355
|
+
type PreviewProjectType = z.infer<typeof PreviewProjectTypeSchema>;
|
|
1356
|
+
/**
|
|
1357
|
+
* Preview rendering method
|
|
1358
|
+
*/
|
|
1359
|
+
declare const PreviewMethodSchema: z.ZodEnum<{
|
|
1360
|
+
simple: "simple";
|
|
1361
|
+
bundled: "bundled";
|
|
1362
|
+
gallery: "gallery";
|
|
1363
|
+
none: "none";
|
|
1364
|
+
}>;
|
|
1365
|
+
type PreviewMethod = z.infer<typeof PreviewMethodSchema>;
|
|
1366
|
+
/**
|
|
1367
|
+
* Preview metadata computed by CLI
|
|
1368
|
+
* Contains all information needed for App to render preview without re-detection
|
|
1369
|
+
*/
|
|
1370
|
+
declare const PreviewMetadataSchema: z.ZodObject<{
|
|
1371
|
+
projectType: z.ZodEnum<{
|
|
1372
|
+
unknown: "unknown";
|
|
1373
|
+
html: "html";
|
|
1374
|
+
react: "react";
|
|
1375
|
+
vue: "vue";
|
|
1376
|
+
vite: "vite";
|
|
1377
|
+
nextjs: "nextjs";
|
|
1378
|
+
}>;
|
|
1379
|
+
previewMethod: z.ZodEnum<{
|
|
1380
|
+
simple: "simple";
|
|
1381
|
+
bundled: "bundled";
|
|
1382
|
+
gallery: "gallery";
|
|
1383
|
+
none: "none";
|
|
1384
|
+
}>;
|
|
1385
|
+
entryFile: z.ZodNullable<z.ZodString>;
|
|
1386
|
+
projectPath: z.ZodString;
|
|
1387
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1388
|
+
tailwindVersion: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodNull]>>;
|
|
1389
|
+
isStaticFileCollection: z.ZodOptional<z.ZodBoolean>;
|
|
1390
|
+
}, z.core.$strip>;
|
|
1391
|
+
type PreviewMetadata = z.infer<typeof PreviewMetadataSchema>;
|
|
1392
|
+
/**
|
|
1393
|
+
* Artifacts summary schema for task results
|
|
1394
|
+
* Used in both TaskMessageSchema (CLI sends with result) and SubTaskResultUpdatedEventSchema
|
|
1395
|
+
*/
|
|
1396
|
+
declare const TaskArtifactsSummarySchema: z.ZodObject<{
|
|
1397
|
+
commitHash: z.ZodString;
|
|
1398
|
+
stats: z.ZodObject<{
|
|
1399
|
+
totalInsertions: z.ZodNumber;
|
|
1400
|
+
totalDeletions: z.ZodNumber;
|
|
1401
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1402
|
+
path: z.ZodString;
|
|
1403
|
+
insertions: z.ZodNumber;
|
|
1404
|
+
deletions: z.ZodNumber;
|
|
1405
|
+
}, z.core.$strip>>;
|
|
1406
|
+
}, z.core.$strip>;
|
|
1407
|
+
preview: z.ZodNullable<z.ZodObject<{
|
|
1408
|
+
projectType: z.ZodEnum<{
|
|
1409
|
+
unknown: "unknown";
|
|
1410
|
+
html: "html";
|
|
1411
|
+
react: "react";
|
|
1412
|
+
vue: "vue";
|
|
1413
|
+
vite: "vite";
|
|
1414
|
+
nextjs: "nextjs";
|
|
1415
|
+
}>;
|
|
1416
|
+
previewMethod: z.ZodEnum<{
|
|
1417
|
+
simple: "simple";
|
|
1418
|
+
bundled: "bundled";
|
|
1419
|
+
gallery: "gallery";
|
|
1420
|
+
none: "none";
|
|
1421
|
+
}>;
|
|
1422
|
+
entryFile: z.ZodNullable<z.ZodString>;
|
|
1423
|
+
projectPath: z.ZodString;
|
|
1424
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1425
|
+
tailwindVersion: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodNull]>>;
|
|
1426
|
+
isStaticFileCollection: z.ZodOptional<z.ZodBoolean>;
|
|
1427
|
+
}, z.core.$strip>>;
|
|
1428
|
+
}, z.core.$strip>;
|
|
1429
|
+
type TaskArtifactsSummary = z.infer<typeof TaskArtifactsSummarySchema>;
|
|
1430
|
+
declare const TaskMessageSchema: z.ZodObject<{
|
|
1431
|
+
eventId: z.ZodString;
|
|
1432
|
+
taskId: z.ZodString;
|
|
1433
|
+
chatId: z.ZodOptional<z.ZodString>;
|
|
1434
|
+
from: z.ZodEnum<{
|
|
1435
|
+
app: "app";
|
|
1436
|
+
"api-server": "api-server";
|
|
1437
|
+
machine: "machine";
|
|
1438
|
+
worker: "worker";
|
|
1439
|
+
}>;
|
|
1440
|
+
opCode: z.ZodOptional<z.ZodString>;
|
|
1441
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
1442
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
1443
|
+
message: z.ZodOptional<z.ZodCustom<TaskMessagePayload, TaskMessagePayload>>;
|
|
1444
|
+
messageType: z.ZodOptional<z.ZodString>;
|
|
1445
|
+
encryptedMessage: z.ZodOptional<z.ZodString>;
|
|
1446
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
1447
|
+
senderType: z.ZodEnum<{
|
|
1448
|
+
system: "system";
|
|
1449
|
+
human: "human";
|
|
1450
|
+
agent: "agent";
|
|
1451
|
+
}>;
|
|
1452
|
+
senderId: z.ZodString;
|
|
1453
|
+
senderName: z.ZodString;
|
|
1454
|
+
rootTaskId: z.ZodOptional<z.ZodString>;
|
|
1455
|
+
artifacts: z.ZodOptional<z.ZodObject<{
|
|
1456
|
+
commitHash: z.ZodString;
|
|
1457
|
+
stats: z.ZodObject<{
|
|
1458
|
+
totalInsertions: z.ZodNumber;
|
|
1459
|
+
totalDeletions: z.ZodNumber;
|
|
1460
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1461
|
+
path: z.ZodString;
|
|
1462
|
+
insertions: z.ZodNumber;
|
|
1463
|
+
deletions: z.ZodNumber;
|
|
1464
|
+
}, z.core.$strip>>;
|
|
1465
|
+
}, z.core.$strip>;
|
|
1466
|
+
preview: z.ZodNullable<z.ZodObject<{
|
|
1467
|
+
projectType: z.ZodEnum<{
|
|
1468
|
+
unknown: "unknown";
|
|
1469
|
+
html: "html";
|
|
1470
|
+
react: "react";
|
|
1471
|
+
vue: "vue";
|
|
1472
|
+
vite: "vite";
|
|
1473
|
+
nextjs: "nextjs";
|
|
1474
|
+
}>;
|
|
1475
|
+
previewMethod: z.ZodEnum<{
|
|
1476
|
+
simple: "simple";
|
|
1477
|
+
bundled: "bundled";
|
|
1478
|
+
gallery: "gallery";
|
|
1479
|
+
none: "none";
|
|
1480
|
+
}>;
|
|
1481
|
+
entryFile: z.ZodNullable<z.ZodString>;
|
|
1482
|
+
projectPath: z.ZodString;
|
|
1483
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1484
|
+
tailwindVersion: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodNull]>>;
|
|
1485
|
+
isStaticFileCollection: z.ZodOptional<z.ZodBoolean>;
|
|
1486
|
+
}, z.core.$strip>>;
|
|
1487
|
+
}, z.core.$strip>>;
|
|
1488
|
+
}, z.core.$strip>;
|
|
1489
|
+
type TaskMessageEventData = z.infer<typeof TaskMessageSchema>;
|
|
1490
|
+
/**
|
|
1491
|
+
* Task state type
|
|
1492
|
+
*/
|
|
1493
|
+
type TaskState = "new" | "initializing" | "active" | "stopped" | "completed" | "cancelled" | "error";
|
|
1494
|
+
declare const ShowModalEventDataSchema: z.ZodObject<{
|
|
1495
|
+
eventId: z.ZodString;
|
|
1496
|
+
taskId: z.ZodString;
|
|
1497
|
+
chatId: z.ZodOptional<z.ZodString>;
|
|
1498
|
+
sequence: z.ZodOptional<z.ZodNumber>;
|
|
1499
|
+
timestamp: z.ZodString;
|
|
1500
|
+
modalName: z.ZodString;
|
|
1501
|
+
modalData: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
1502
|
+
}, z.core.$strip>;
|
|
1503
|
+
type ShowModalEventData = z.infer<typeof ShowModalEventDataSchema>;
|
|
1504
|
+
declare const ChangeTaskTitleEventSchema: z.ZodObject<{
|
|
1505
|
+
eventId: z.ZodString;
|
|
1506
|
+
taskId: z.ZodString;
|
|
1507
|
+
title: z.ZodString;
|
|
1508
|
+
}, z.core.$strip>;
|
|
1509
|
+
type ChangeTaskTitleEventData = z.infer<typeof ChangeTaskTitleEventSchema>;
|
|
1510
|
+
declare const TaskStateChangeEventSchema: z.ZodObject<{
|
|
1511
|
+
eventId: z.ZodString;
|
|
1512
|
+
taskId: z.ZodString;
|
|
1513
|
+
chatId: z.ZodString;
|
|
1514
|
+
state: z.ZodString;
|
|
1515
|
+
updatedAt: z.ZodString;
|
|
1516
|
+
}, z.core.$strip>;
|
|
1517
|
+
type TaskStateChangeEventData = z.infer<typeof TaskStateChangeEventSchema>;
|
|
1518
|
+
declare const CreditExhaustedEventSchema: z.ZodObject<{
|
|
1519
|
+
eventId: z.ZodString;
|
|
1520
|
+
}, z.core.$strip>;
|
|
1521
|
+
type CreditExhaustedEventData = z.infer<typeof CreditExhaustedEventSchema>;
|
|
1522
|
+
declare const RtcIceServerSchema: z.ZodObject<{
|
|
1523
|
+
urls: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
1524
|
+
username: z.ZodOptional<z.ZodString>;
|
|
1525
|
+
credential: z.ZodOptional<z.ZodString>;
|
|
1526
|
+
}, z.core.$strip>;
|
|
1527
|
+
type RtcIceServer = z.infer<typeof RtcIceServerSchema>;
|
|
1528
|
+
declare const RtcIceServersRequestSchema: z.ZodObject<{
|
|
1529
|
+
eventId: z.ZodString;
|
|
1530
|
+
}, z.core.$strip>;
|
|
1531
|
+
type RtcIceServersRequestEventData = z.infer<typeof RtcIceServersRequestSchema>;
|
|
1532
|
+
declare const RtcIceServersResponseSchema: z.ZodObject<{
|
|
1533
|
+
eventId: z.ZodString;
|
|
1534
|
+
iceServers: z.ZodArray<z.ZodObject<{
|
|
1535
|
+
urls: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
1536
|
+
username: z.ZodOptional<z.ZodString>;
|
|
1537
|
+
credential: z.ZodOptional<z.ZodString>;
|
|
1538
|
+
}, z.core.$strip>>;
|
|
1539
|
+
}, z.core.$strip>;
|
|
1540
|
+
type RtcIceServersResponseEventData = z.infer<typeof RtcIceServersResponseSchema>;
|
|
1541
|
+
declare const MachineRtcRequestSchema: z.ZodObject<{
|
|
1542
|
+
eventId: z.ZodString;
|
|
1543
|
+
machineId: z.ZodString;
|
|
1544
|
+
sessionId: z.ZodString;
|
|
1545
|
+
role: z.ZodLiteral<"app">;
|
|
1546
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
1547
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1548
|
+
workspaceUserId: z.ZodOptional<z.ZodString>;
|
|
1549
|
+
}, z.core.$strip>;
|
|
1550
|
+
type MachineRtcRequestEventData = z.infer<typeof MachineRtcRequestSchema>;
|
|
1551
|
+
declare const MachineRtcResponseSchema: z.ZodObject<{
|
|
1552
|
+
eventId: z.ZodString;
|
|
1553
|
+
machineId: z.ZodString;
|
|
1554
|
+
sessionId: z.ZodString;
|
|
1555
|
+
accepted: z.ZodBoolean;
|
|
1556
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1557
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1558
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
1559
|
+
dataChannel: z.ZodOptional<z.ZodBoolean>;
|
|
1560
|
+
maxMessageSize: z.ZodOptional<z.ZodNumber>;
|
|
1561
|
+
}, z.core.$strip>>;
|
|
1562
|
+
}, z.core.$strip>;
|
|
1563
|
+
type MachineRtcResponseEventData = z.infer<typeof MachineRtcResponseSchema>;
|
|
1564
|
+
declare const RtcSignalSchema: z.ZodObject<{
|
|
1565
|
+
eventId: z.ZodString;
|
|
1566
|
+
machineId: z.ZodString;
|
|
1567
|
+
sessionId: z.ZodString;
|
|
1568
|
+
from: z.ZodEnum<{
|
|
1569
|
+
app: "app";
|
|
1570
|
+
machine: "machine";
|
|
1571
|
+
}>;
|
|
1572
|
+
signal: z.ZodAny;
|
|
1573
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1574
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
1575
|
+
workspaceUserId: z.ZodOptional<z.ZodString>;
|
|
1576
|
+
}, z.core.$strip>;
|
|
1577
|
+
type RtcSignalEventData = z.infer<typeof RtcSignalSchema>;
|
|
1578
|
+
declare const WorkspaceFileRequestSchema: z.ZodObject<{
|
|
1579
|
+
eventId: z.ZodString;
|
|
1580
|
+
taskId: z.ZodString;
|
|
1581
|
+
userId: z.ZodString;
|
|
1582
|
+
relativePath: z.ZodString;
|
|
1583
|
+
requestId: z.ZodString;
|
|
1584
|
+
maxFileSizeMB: z.ZodOptional<z.ZodNumber>;
|
|
1585
|
+
ifModifiedSince: z.ZodOptional<z.ZodString>;
|
|
1586
|
+
dataEncryptionKey: z.ZodOptional<z.ZodString>;
|
|
1587
|
+
}, z.core.$strip>;
|
|
1588
|
+
type WorkspaceFileRequestEventData = z.infer<typeof WorkspaceFileRequestSchema>;
|
|
1589
|
+
declare const WorkspaceFileResponseSchema: z.ZodObject<{
|
|
1590
|
+
eventId: z.ZodString;
|
|
1591
|
+
requestId: z.ZodString;
|
|
1592
|
+
taskId: z.ZodString;
|
|
1593
|
+
success: z.ZodBoolean;
|
|
1594
|
+
notModified: z.ZodOptional<z.ZodBoolean>;
|
|
1595
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
1596
|
+
type: z.ZodEnum<{
|
|
1597
|
+
file: "file";
|
|
1598
|
+
directory: "directory";
|
|
1599
|
+
}>;
|
|
1600
|
+
content: z.ZodOptional<z.ZodString>;
|
|
1601
|
+
encryptedContent: z.ZodOptional<z.ZodString>;
|
|
1602
|
+
entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1603
|
+
name: z.ZodString;
|
|
1604
|
+
type: z.ZodEnum<{
|
|
1605
|
+
file: "file";
|
|
1606
|
+
directory: "directory";
|
|
1607
|
+
}>;
|
|
1608
|
+
size: z.ZodNumber;
|
|
1609
|
+
modifiedAt: z.ZodString;
|
|
1610
|
+
accessDenied: z.ZodOptional<z.ZodBoolean>;
|
|
1611
|
+
}, z.core.$strip>>>;
|
|
1612
|
+
metadata: z.ZodObject<{
|
|
1613
|
+
size: z.ZodNumber;
|
|
1614
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
1615
|
+
modifiedAt: z.ZodString;
|
|
1616
|
+
accessDenied: z.ZodOptional<z.ZodBoolean>;
|
|
1617
|
+
}, z.core.$strip>;
|
|
1618
|
+
}, z.core.$strip>>;
|
|
1619
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
1620
|
+
code: z.ZodString;
|
|
1621
|
+
message: z.ZodString;
|
|
1622
|
+
}, z.core.$strip>>;
|
|
1623
|
+
}, z.core.$strip>;
|
|
1624
|
+
type WorkspaceFileResponseEventData = z.infer<typeof WorkspaceFileResponseSchema>;
|
|
1625
|
+
declare const UpdateTaskAgentSessionIdEventSchema: z.ZodObject<{
|
|
1626
|
+
eventId: z.ZodString;
|
|
1627
|
+
taskId: z.ZodString;
|
|
1628
|
+
agentSessionId: z.ZodString;
|
|
1629
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
}, z.core.$strip>;
|
|
1631
|
+
type UpdateTaskAgentSessionIdEventData = z.infer<typeof UpdateTaskAgentSessionIdEventSchema>;
|
|
1632
|
+
declare const TaskInfoUpdateEventDataSchema: z.ZodObject<{
|
|
1633
|
+
eventId: z.ZodString;
|
|
1634
|
+
taskId: z.ZodString;
|
|
1635
|
+
chatId: z.ZodString;
|
|
1636
|
+
updates: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1637
|
+
updatedAt: z.ZodString;
|
|
1638
|
+
}, z.core.$strip>;
|
|
1639
|
+
type TaskInfoUpdateEventData = z.infer<typeof TaskInfoUpdateEventDataSchema>;
|
|
1640
|
+
declare const MergeRequestEventSchema: z.ZodObject<{
|
|
1641
|
+
eventId: z.ZodString;
|
|
1642
|
+
taskId: z.ZodString;
|
|
1643
|
+
summary: z.ZodString;
|
|
1644
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1645
|
+
}, z.core.$strip>;
|
|
1646
|
+
type MergeRequestEventData = z.infer<typeof MergeRequestEventSchema>;
|
|
1647
|
+
/**
|
|
1648
|
+
* Task stopped event (Worker -> API)
|
|
1649
|
+
* Sent by CLI hook when a task stops, API decides callbacks based on task config
|
|
1650
|
+
*/
|
|
1651
|
+
declare const TaskStoppedEventSchema: z.ZodObject<{
|
|
1652
|
+
eventId: z.ZodString;
|
|
1653
|
+
taskId: z.ZodString;
|
|
1654
|
+
}, z.core.$strip>;
|
|
1655
|
+
type TaskStoppedEventData = z.infer<typeof TaskStoppedEventSchema>;
|
|
1656
|
+
/**
|
|
1657
|
+
* Sub task result updated event (API -> parentTask's Worker + App)
|
|
1658
|
+
* Sent when a sub task sends a result message
|
|
1659
|
+
* Carries the complete result message for parent task to process
|
|
1660
|
+
*/
|
|
1661
|
+
declare const SubTaskResultUpdatedEventSchema: z.ZodObject<{
|
|
1662
|
+
eventId: z.ZodString;
|
|
1663
|
+
taskId: z.ZodString;
|
|
1664
|
+
parentTaskId: z.ZodString;
|
|
1665
|
+
rootTaskId: z.ZodString;
|
|
1666
|
+
agentId: z.ZodString;
|
|
1667
|
+
agentName: z.ZodString;
|
|
1668
|
+
taskName: z.ZodOptional<z.ZodString>;
|
|
1669
|
+
resultMessage: z.ZodObject<{
|
|
1670
|
+
type: z.ZodLiteral<"result">;
|
|
1671
|
+
result: z.ZodString;
|
|
1672
|
+
is_error: z.ZodOptional<z.ZodBoolean>;
|
|
1673
|
+
}, z.core.$strip>;
|
|
1674
|
+
encryptedResultMessage: z.ZodOptional<z.ZodString>;
|
|
1675
|
+
artifacts: z.ZodOptional<z.ZodObject<{
|
|
1676
|
+
commitHash: z.ZodString;
|
|
1677
|
+
stats: z.ZodObject<{
|
|
1678
|
+
totalInsertions: z.ZodNumber;
|
|
1679
|
+
totalDeletions: z.ZodNumber;
|
|
1680
|
+
files: z.ZodArray<z.ZodObject<{
|
|
1681
|
+
path: z.ZodString;
|
|
1682
|
+
insertions: z.ZodNumber;
|
|
1683
|
+
deletions: z.ZodNumber;
|
|
1684
|
+
}, z.core.$strip>>;
|
|
1685
|
+
}, z.core.$strip>;
|
|
1686
|
+
preview: z.ZodNullable<z.ZodObject<{
|
|
1687
|
+
projectType: z.ZodEnum<{
|
|
1688
|
+
unknown: "unknown";
|
|
1689
|
+
html: "html";
|
|
1690
|
+
react: "react";
|
|
1691
|
+
vue: "vue";
|
|
1692
|
+
vite: "vite";
|
|
1693
|
+
nextjs: "nextjs";
|
|
1694
|
+
}>;
|
|
1695
|
+
previewMethod: z.ZodEnum<{
|
|
1696
|
+
simple: "simple";
|
|
1697
|
+
bundled: "bundled";
|
|
1698
|
+
gallery: "gallery";
|
|
1699
|
+
none: "none";
|
|
1700
|
+
}>;
|
|
1701
|
+
entryFile: z.ZodNullable<z.ZodString>;
|
|
1702
|
+
projectPath: z.ZodString;
|
|
1703
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1704
|
+
tailwindVersion: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodNull]>>;
|
|
1705
|
+
isStaticFileCollection: z.ZodOptional<z.ZodBoolean>;
|
|
1706
|
+
}, z.core.$strip>>;
|
|
1707
|
+
}, z.core.$strip>>;
|
|
1708
|
+
}, z.core.$strip>;
|
|
1709
|
+
type SubTaskResultUpdatedEventData = z.infer<typeof SubTaskResultUpdatedEventSchema>;
|
|
1710
|
+
declare const MergePullRequestEventSchema: z.ZodObject<{
|
|
1711
|
+
eventId: z.ZodString;
|
|
1712
|
+
taskId: z.ZodString;
|
|
1713
|
+
mergeMethod: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
1714
|
+
merge: "merge";
|
|
1715
|
+
squash: "squash";
|
|
1716
|
+
rebase: "rebase";
|
|
1717
|
+
}>>>;
|
|
1718
|
+
}, z.core.$strip>;
|
|
1719
|
+
type MergePullRequestEventData = z.infer<typeof MergePullRequestEventSchema>;
|
|
1720
|
+
interface MergePullRequestAck {
|
|
1721
|
+
success: boolean;
|
|
1722
|
+
data?: {
|
|
1723
|
+
merged: boolean;
|
|
1724
|
+
sha: string;
|
|
1725
|
+
};
|
|
1726
|
+
error?: string;
|
|
1727
|
+
errorType?: 'github_conflict' | 'pr_not_open' | 'permission_denied' | 'merge_failed' | 'unknown';
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Deploy agent event (API → CLI)
|
|
1731
|
+
* Triggers agent deployment from draft to production
|
|
1732
|
+
*/
|
|
1733
|
+
declare const DeployAgentEventSchema: z.ZodObject<{
|
|
1734
|
+
eventId: z.ZodString;
|
|
1735
|
+
taskId: z.ZodString;
|
|
1736
|
+
draftAgentId: z.ZodString;
|
|
1737
|
+
userId: z.ZodString;
|
|
1738
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1739
|
+
cloudId: z.ZodOptional<z.ZodString>;
|
|
1740
|
+
sourcePath: z.ZodString;
|
|
1741
|
+
targetAgentId: z.ZodString;
|
|
1742
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1743
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1744
|
+
isSystemAgent: z.ZodOptional<z.ZodBoolean>;
|
|
1745
|
+
supportLocal: z.ZodOptional<z.ZodBoolean>;
|
|
1746
|
+
}, z.core.$strip>;
|
|
1747
|
+
type DeployAgentEventData = z.infer<typeof DeployAgentEventSchema>;
|
|
1748
|
+
/**
|
|
1749
|
+
* Deploy agent complete event (CLI → API)
|
|
1750
|
+
* Sent when agent deployment completes (success or failure)
|
|
1751
|
+
*/
|
|
1752
|
+
declare const DeployAgentCompleteEventSchema: z.ZodObject<{
|
|
1753
|
+
eventId: z.ZodString;
|
|
1754
|
+
taskId: z.ZodString;
|
|
1755
|
+
targetAgentId: z.ZodString;
|
|
1756
|
+
success: z.ZodBoolean;
|
|
1757
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1758
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1759
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1760
|
+
isSystemAgent: z.ZodOptional<z.ZodBoolean>;
|
|
1761
|
+
supportLocal: z.ZodOptional<z.ZodBoolean>;
|
|
1762
|
+
}, z.core.$strip>;
|
|
1763
|
+
type DeployAgentCompleteEventData = z.infer<typeof DeployAgentCompleteEventSchema>;
|
|
1764
|
+
declare const AssociateRepoEventDataSchema: z.ZodObject<{
|
|
1765
|
+
eventId: z.ZodString;
|
|
1766
|
+
taskId: z.ZodString;
|
|
1767
|
+
gitServerHost: z.ZodString;
|
|
1768
|
+
owner: z.ZodString;
|
|
1769
|
+
repo: z.ZodString;
|
|
1770
|
+
remoteUrl: z.ZodString;
|
|
1771
|
+
}, z.core.$strip>;
|
|
1772
|
+
declare const UpdateAgentInfoEventSchema: z.ZodObject<{
|
|
1773
|
+
eventId: z.ZodString;
|
|
1774
|
+
taskId: z.ZodString;
|
|
1775
|
+
agentId: z.ZodString;
|
|
1776
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1777
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
1778
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
1779
|
+
}, z.core.$strip>;
|
|
1780
|
+
type UpdateAgentInfoEventData = z.infer<typeof UpdateAgentInfoEventSchema>;
|
|
1781
|
+
type AssociateRepoEventData = z.infer<typeof AssociateRepoEventDataSchema>;
|
|
1782
|
+
/**
|
|
1783
|
+
* System message type
|
|
1784
|
+
*/
|
|
1785
|
+
type SystemMessageType = "machine-online" | "machine-offline" | "chat-added" | "chat-removed" | "chat-member-added" | "chat-member-removed" | "repo-added" | "repo-removed" | "pr-state-changed" | "draft-agent-added" | "agent-updated";
|
|
1786
|
+
/**
|
|
1787
|
+
* PR state changed schema
|
|
1788
|
+
*/
|
|
1789
|
+
declare const PrStateChangedSchema: z.ZodObject<{
|
|
1790
|
+
taskId: z.ZodString;
|
|
1791
|
+
pullRequestNumber: z.ZodNumber;
|
|
1792
|
+
pullRequestUrl: z.ZodString;
|
|
1793
|
+
oldState: z.ZodNullable<z.ZodEnum<{
|
|
1794
|
+
open: "open";
|
|
1795
|
+
closed: "closed";
|
|
1796
|
+
merged: "merged";
|
|
1797
|
+
}>>;
|
|
1798
|
+
newState: z.ZodEnum<{
|
|
1799
|
+
open: "open";
|
|
1800
|
+
closed: "closed";
|
|
1801
|
+
merged: "merged";
|
|
1802
|
+
}>;
|
|
1803
|
+
changedAt: z.ZodString;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
type PrStateChangedData = z.infer<typeof PrStateChangedSchema>;
|
|
1806
|
+
/**
|
|
1807
|
+
* System message event schema
|
|
1808
|
+
* - added events: data is the full entity or array (LocalMachine, Chat, ChatMember[], Repository)
|
|
1809
|
+
* - removed events: data is { id: string } or array [{ id: string }]
|
|
1810
|
+
* - pr-state-changed: data is PrStateChangedData
|
|
1811
|
+
*/
|
|
1812
|
+
declare const SystemMessageSchema: z.ZodObject<{
|
|
1813
|
+
eventId: z.ZodString;
|
|
1814
|
+
type: z.ZodEnum<{
|
|
1815
|
+
"machine-online": "machine-online";
|
|
1816
|
+
"machine-offline": "machine-offline";
|
|
1817
|
+
"chat-added": "chat-added";
|
|
1818
|
+
"chat-removed": "chat-removed";
|
|
1819
|
+
"chat-member-added": "chat-member-added";
|
|
1820
|
+
"chat-member-removed": "chat-member-removed";
|
|
1821
|
+
"repo-added": "repo-added";
|
|
1822
|
+
"repo-removed": "repo-removed";
|
|
1823
|
+
"pr-state-changed": "pr-state-changed";
|
|
1824
|
+
"draft-agent-added": "draft-agent-added";
|
|
1825
|
+
"agent-updated": "agent-updated";
|
|
1826
|
+
"task-added": "task-added";
|
|
1827
|
+
}>;
|
|
1828
|
+
data: z.ZodUnion<readonly [z.ZodObject<{
|
|
1829
|
+
id: z.ZodString;
|
|
1830
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1831
|
+
id: z.ZodString;
|
|
1832
|
+
owner: z.ZodString;
|
|
1833
|
+
type: z.ZodEnum<{
|
|
1834
|
+
direct: "direct";
|
|
1835
|
+
group: "group";
|
|
1836
|
+
}>;
|
|
1837
|
+
title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1838
|
+
createdAt: z.ZodString;
|
|
1839
|
+
updatedAt: z.ZodString;
|
|
1840
|
+
defaultMachineId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1841
|
+
defaultCloudId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1842
|
+
defaultRepositoryId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1843
|
+
defaultBaseBranch: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1844
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
1845
|
+
id: z.ZodString;
|
|
1846
|
+
chatId: z.ZodString;
|
|
1847
|
+
memberCode: z.ZodString;
|
|
1848
|
+
type: z.ZodEnum<{
|
|
1849
|
+
human: "human";
|
|
1850
|
+
agent: "agent";
|
|
1851
|
+
}>;
|
|
1852
|
+
role: z.ZodString;
|
|
1853
|
+
createdAt: z.ZodString;
|
|
1854
|
+
updatedAt: z.ZodString;
|
|
1855
|
+
}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
1856
|
+
id: z.ZodString;
|
|
1857
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
1858
|
+
id: z.ZodString;
|
|
1859
|
+
owner: z.ZodString;
|
|
1860
|
+
name: z.ZodString;
|
|
1861
|
+
fullName: z.ZodString;
|
|
1862
|
+
defaultBranch: z.ZodString;
|
|
1863
|
+
isPrivate: z.ZodBoolean;
|
|
1864
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1865
|
+
url: z.ZodString;
|
|
1866
|
+
createdAt: z.ZodString;
|
|
1867
|
+
updatedAt: z.ZodString;
|
|
1868
|
+
gitServerId: z.ZodString;
|
|
1869
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1870
|
+
taskId: z.ZodString;
|
|
1871
|
+
pullRequestNumber: z.ZodNumber;
|
|
1872
|
+
pullRequestUrl: z.ZodString;
|
|
1873
|
+
oldState: z.ZodNullable<z.ZodEnum<{
|
|
1874
|
+
open: "open";
|
|
1875
|
+
closed: "closed";
|
|
1876
|
+
merged: "merged";
|
|
1877
|
+
}>>;
|
|
1878
|
+
newState: z.ZodEnum<{
|
|
1879
|
+
open: "open";
|
|
1880
|
+
closed: "closed";
|
|
1881
|
+
merged: "merged";
|
|
1882
|
+
}>;
|
|
1883
|
+
changedAt: z.ZodString;
|
|
1884
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1885
|
+
id: z.ZodString;
|
|
1886
|
+
name: z.ZodString;
|
|
1887
|
+
displayName: z.ZodString;
|
|
1888
|
+
agentDir: z.ZodString;
|
|
1889
|
+
type: z.ZodEnum<{
|
|
1890
|
+
claude: "claude";
|
|
1891
|
+
codex: "codex";
|
|
1892
|
+
companion: "companion";
|
|
1893
|
+
}>;
|
|
1894
|
+
avatar: z.ZodNullable<z.ZodString>;
|
|
1895
|
+
userId: z.ZodString;
|
|
1896
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1897
|
+
enable: z.ZodBoolean;
|
|
1898
|
+
config: z.ZodNullable<z.ZodObject<{
|
|
1899
|
+
environmentSchema: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1900
|
+
name: z.ZodString;
|
|
1901
|
+
type: z.ZodEnum<{
|
|
1902
|
+
string: "string";
|
|
1903
|
+
number: "number";
|
|
1904
|
+
boolean: "boolean";
|
|
1905
|
+
secret: "secret";
|
|
1906
|
+
}>;
|
|
1907
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1908
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
1909
|
+
defaultValue: z.ZodOptional<z.ZodString>;
|
|
1910
|
+
}, z.core.$strip>>>;
|
|
1911
|
+
displayConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1912
|
+
createPR: z.ZodOptional<z.ZodString>;
|
|
1913
|
+
viewPR: z.ZodOptional<z.ZodString>;
|
|
1914
|
+
mergePR: z.ZodOptional<z.ZodString>;
|
|
1915
|
+
approvePR: z.ZodOptional<z.ZodString>;
|
|
1916
|
+
merged: z.ZodOptional<z.ZodString>;
|
|
1917
|
+
closed: z.ZodOptional<z.ZodString>;
|
|
1918
|
+
recreatePR: z.ZodOptional<z.ZodString>;
|
|
1919
|
+
permissionCanSendMessage: z.ZodOptional<z.ZodString>;
|
|
1920
|
+
permissionCanSendMessageDesc: z.ZodOptional<z.ZodString>;
|
|
1921
|
+
permissionCanCreatePr: z.ZodOptional<z.ZodString>;
|
|
1922
|
+
permissionCanCreatePrDesc: z.ZodOptional<z.ZodString>;
|
|
1923
|
+
permissionCanApprovePr: z.ZodOptional<z.ZodString>;
|
|
1924
|
+
permissionCanApprovePrDesc: z.ZodOptional<z.ZodString>;
|
|
1925
|
+
permissionCanViewPr: z.ZodOptional<z.ZodString>;
|
|
1926
|
+
permissionCanViewPrDesc: z.ZodOptional<z.ZodString>;
|
|
1927
|
+
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1928
|
+
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1929
|
+
}, z.core.$strip>>>;
|
|
1930
|
+
signature: z.ZodOptional<z.ZodString>;
|
|
1931
|
+
guildMsg: z.ZodOptional<z.ZodString>;
|
|
1932
|
+
placeholderMsg: z.ZodOptional<z.ZodString>;
|
|
1933
|
+
}, z.core.$strip>>;
|
|
1934
|
+
permissions: z.ZodNullable<z.ZodObject<{
|
|
1935
|
+
role: z.ZodString;
|
|
1936
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1937
|
+
}, z.core.$strip>>;
|
|
1938
|
+
publishedAgentId: z.ZodNullable<z.ZodString>;
|
|
1939
|
+
sourceTaskId: z.ZodNullable<z.ZodString>;
|
|
1940
|
+
createdAt: z.ZodString;
|
|
1941
|
+
updatedAt: z.ZodString;
|
|
1942
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1943
|
+
id: z.ZodString;
|
|
1944
|
+
name: z.ZodString;
|
|
1945
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
1946
|
+
type: z.ZodEnum<{
|
|
1947
|
+
claude: "claude";
|
|
1948
|
+
codex: "codex";
|
|
1949
|
+
companion: "companion";
|
|
1950
|
+
}>;
|
|
1951
|
+
avatar: z.ZodNullable<z.ZodString>;
|
|
1952
|
+
userId: z.ZodString;
|
|
1953
|
+
description: z.ZodNullable<z.ZodString>;
|
|
1954
|
+
signature: z.ZodNullable<z.ZodString>;
|
|
1955
|
+
guildMsg: z.ZodString;
|
|
1956
|
+
placeholderMsg: z.ZodString;
|
|
1957
|
+
developerName: z.ZodString;
|
|
1958
|
+
developerEmail: z.ZodNullable<z.ZodString>;
|
|
1959
|
+
gitRepoId: z.ZodNullable<z.ZodString>;
|
|
1960
|
+
supportLocal: z.ZodBoolean;
|
|
1961
|
+
enable: z.ZodBoolean;
|
|
1962
|
+
config: z.ZodNullable<z.ZodObject<{
|
|
1963
|
+
displayConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1964
|
+
createPR: z.ZodOptional<z.ZodString>;
|
|
1965
|
+
viewPR: z.ZodOptional<z.ZodString>;
|
|
1966
|
+
mergePR: z.ZodOptional<z.ZodString>;
|
|
1967
|
+
approvePR: z.ZodOptional<z.ZodString>;
|
|
1968
|
+
merged: z.ZodOptional<z.ZodString>;
|
|
1969
|
+
closed: z.ZodOptional<z.ZodString>;
|
|
1970
|
+
recreatePR: z.ZodOptional<z.ZodString>;
|
|
1971
|
+
permissionCanSendMessage: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
permissionCanSendMessageDesc: z.ZodOptional<z.ZodString>;
|
|
1973
|
+
permissionCanCreatePr: z.ZodOptional<z.ZodString>;
|
|
1974
|
+
permissionCanCreatePrDesc: z.ZodOptional<z.ZodString>;
|
|
1975
|
+
permissionCanApprovePr: z.ZodOptional<z.ZodString>;
|
|
1976
|
+
permissionCanApprovePrDesc: z.ZodOptional<z.ZodString>;
|
|
1977
|
+
permissionCanViewPr: z.ZodOptional<z.ZodString>;
|
|
1978
|
+
permissionCanViewPrDesc: z.ZodOptional<z.ZodString>;
|
|
1979
|
+
permissionCanMergePr: z.ZodOptional<z.ZodString>;
|
|
1980
|
+
permissionCanMergePrDesc: z.ZodOptional<z.ZodString>;
|
|
1981
|
+
}, z.core.$strip>>>;
|
|
1982
|
+
machineId: z.ZodOptional<z.ZodString>;
|
|
1983
|
+
heartbeatTaskId: z.ZodOptional<z.ZodString>;
|
|
1984
|
+
}, z.core.$strip>>;
|
|
1985
|
+
permissions: z.ZodNullable<z.ZodObject<{
|
|
1986
|
+
role: z.ZodString;
|
|
1987
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1988
|
+
}, z.core.$strip>>;
|
|
1989
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1990
|
+
id: z.ZodString;
|
|
1991
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
1992
|
+
chat: "chat";
|
|
1993
|
+
work: "work";
|
|
1994
|
+
shadow: "shadow";
|
|
1995
|
+
}>>;
|
|
1996
|
+
chatId: z.ZodString;
|
|
1997
|
+
userId: z.ZodString;
|
|
1998
|
+
state: z.ZodString;
|
|
1999
|
+
workerStatus: z.ZodNullable<z.ZodEnum<{
|
|
2000
|
+
initializing: "initializing";
|
|
2001
|
+
ready: "ready";
|
|
2002
|
+
running: "running";
|
|
2003
|
+
}>>;
|
|
2004
|
+
agentId: z.ZodString;
|
|
2005
|
+
machineId: z.ZodNullable<z.ZodString>;
|
|
2006
|
+
cloudId: z.ZodNullable<z.ZodString>;
|
|
2007
|
+
repositoryId: z.ZodNullable<z.ZodString>;
|
|
2008
|
+
baseBranch: z.ZodNullable<z.ZodString>;
|
|
2009
|
+
title: z.ZodNullable<z.ZodString>;
|
|
2010
|
+
customTitle: z.ZodNullable<z.ZodString>;
|
|
2011
|
+
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
2012
|
+
dataEncryptionKey: z.ZodNullable<z.ZodString>;
|
|
2013
|
+
ownerEncryptedDataKey: z.ZodNullable<z.ZodString>;
|
|
2014
|
+
cwd: z.ZodNullable<z.ZodString>;
|
|
2015
|
+
userCwd: z.ZodNullable<z.ZodString>;
|
|
2016
|
+
forceUserCwd: z.ZodNullable<z.ZodBoolean>;
|
|
2017
|
+
repositorySourceType: z.ZodNullable<z.ZodEnum<{
|
|
2018
|
+
temporary: "temporary";
|
|
2019
|
+
directory: "directory";
|
|
2020
|
+
"git-server": "git-server";
|
|
2021
|
+
}>>;
|
|
2022
|
+
pullRequestNumber: z.ZodNullable<z.ZodNumber>;
|
|
2023
|
+
pullRequestUrl: z.ZodNullable<z.ZodString>;
|
|
2024
|
+
pullRequestState: z.ZodNullable<z.ZodEnum<{
|
|
2025
|
+
open: "open";
|
|
2026
|
+
closed: "closed";
|
|
2027
|
+
merged: "merged";
|
|
2028
|
+
}>>;
|
|
2029
|
+
pullRequestStateChangedAt: z.ZodNullable<z.ZodString>;
|
|
2030
|
+
gitStats: z.ZodNullable<z.ZodObject<{
|
|
2031
|
+
totalInsertions: z.ZodNumber;
|
|
2032
|
+
totalDeletions: z.ZodNumber;
|
|
2033
|
+
files: z.ZodArray<z.ZodObject<{
|
|
2034
|
+
path: z.ZodString;
|
|
2035
|
+
insertions: z.ZodNumber;
|
|
2036
|
+
deletions: z.ZodNumber;
|
|
2037
|
+
}, z.core.$strip>>;
|
|
2038
|
+
}, z.core.$strip>>;
|
|
2039
|
+
totalDuration: z.ZodNullable<z.ZodNumber>;
|
|
2040
|
+
rootTaskId: z.ZodNullable<z.ZodString>;
|
|
2041
|
+
parentTaskId: z.ZodNullable<z.ZodString>;
|
|
2042
|
+
taskAgentIds: z.ZodArray<z.ZodString>;
|
|
2043
|
+
createdAt: z.ZodString;
|
|
2044
|
+
updatedAt: z.ZodString;
|
|
2045
|
+
}, z.core.$strip>]>;
|
|
2046
|
+
timestamp: z.ZodString;
|
|
2047
|
+
}, z.core.$strip>;
|
|
2048
|
+
type SystemMessageEventData = z.infer<typeof SystemMessageSchema>;
|
|
2049
|
+
declare const DaemonGitlabOperationSchema: z.ZodEnum<{
|
|
2050
|
+
listRepos: "listRepos";
|
|
2051
|
+
listBranches: "listBranches";
|
|
2052
|
+
createMergeRequest: "createMergeRequest";
|
|
2053
|
+
getMergeRequest: "getMergeRequest";
|
|
2054
|
+
listMergeRequests: "listMergeRequests";
|
|
2055
|
+
requestGitlabApi: "requestGitlabApi";
|
|
2056
|
+
resolveGitAuthContext: "resolveGitAuthContext";
|
|
2057
|
+
}>;
|
|
2058
|
+
type DaemonGitlabOperation = z.infer<typeof DaemonGitlabOperationSchema>;
|
|
2059
|
+
/**
|
|
2060
|
+
* API → Daemon: Request to execute a GitLab operation via local PAT
|
|
2061
|
+
*/
|
|
2062
|
+
declare const DaemonGitlabRequestSchema: z.ZodObject<{
|
|
2063
|
+
eventId: z.ZodString;
|
|
2064
|
+
requestId: z.ZodString;
|
|
2065
|
+
userId: z.ZodString;
|
|
2066
|
+
gitServerId: z.ZodString;
|
|
2067
|
+
operation: z.ZodEnum<{
|
|
2068
|
+
listRepos: "listRepos";
|
|
2069
|
+
listBranches: "listBranches";
|
|
2070
|
+
createMergeRequest: "createMergeRequest";
|
|
2071
|
+
getMergeRequest: "getMergeRequest";
|
|
2072
|
+
listMergeRequests: "listMergeRequests";
|
|
2073
|
+
requestGitlabApi: "requestGitlabApi";
|
|
2074
|
+
resolveGitAuthContext: "resolveGitAuthContext";
|
|
2075
|
+
}>;
|
|
2076
|
+
payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2077
|
+
ttlMs: z.ZodNumber;
|
|
2078
|
+
nonce: z.ZodString;
|
|
2079
|
+
}, z.core.$strip>;
|
|
2080
|
+
type DaemonGitlabRequestEventData = z.infer<typeof DaemonGitlabRequestSchema>;
|
|
2081
|
+
/**
|
|
2082
|
+
* Daemon → API: Response from GitLab operation execution
|
|
2083
|
+
*/
|
|
2084
|
+
declare const DaemonGitlabResponseSchema: z.ZodObject<{
|
|
2085
|
+
eventId: z.ZodString;
|
|
2086
|
+
requestId: z.ZodString;
|
|
2087
|
+
success: z.ZodBoolean;
|
|
2088
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
2089
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
2090
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
2091
|
+
machineId: z.ZodString;
|
|
2092
|
+
executionTimeMs: z.ZodNumber;
|
|
2093
|
+
}, z.core.$strip>;
|
|
2094
|
+
type DaemonGitlabResponseEventData = z.infer<typeof DaemonGitlabResponseSchema>;
|
|
2095
|
+
declare const CompanionHeartbeatRequestSchema: z.ZodObject<{
|
|
2096
|
+
eventId: z.ZodString;
|
|
2097
|
+
machineId: z.ZodString;
|
|
2098
|
+
agentId: z.ZodString;
|
|
2099
|
+
chatId: z.ZodString;
|
|
2100
|
+
userId: z.ZodString;
|
|
2101
|
+
timestamp: z.ZodString;
|
|
2102
|
+
}, z.core.$strip>;
|
|
2103
|
+
type CompanionHeartbeatRequestData = z.infer<typeof CompanionHeartbeatRequestSchema>;
|
|
2104
|
+
declare const CompanionHeartbeatResponseSchema: z.ZodObject<{
|
|
2105
|
+
eventId: z.ZodString;
|
|
2106
|
+
taskId: z.ZodString;
|
|
2107
|
+
chatId: z.ZodString;
|
|
2108
|
+
}, z.core.$strip>;
|
|
2109
|
+
type CompanionHeartbeatResponseData = z.infer<typeof CompanionHeartbeatResponseSchema>;
|
|
2110
|
+
declare const ResetTaskSessionSchema: z.ZodObject<{
|
|
2111
|
+
eventId: z.ZodString;
|
|
2112
|
+
taskId: z.ZodString;
|
|
2113
|
+
}, z.core.$strip>;
|
|
2114
|
+
type ResetTaskSessionEventData = z.infer<typeof ResetTaskSessionSchema>;
|
|
2115
|
+
type EventData = AppAliveEventData | ApiServerAliveEventData | MachineAliveEventData | ShutdownMachineData | WorkerInitializingEventData | WorkerInitializedEventData | WorkerReadyEventData | WorkerAliveEventData | WorkerExitEventData | WorkerRunningEventData | WorkerStatusRequestEventData | ChatWorkersStatusRequestEventData | ChatWorkersStatusResponseEventData | CreateTaskEventData | ResumeTaskEventData | CancelTaskEventData | StopTaskEventData | TaskMessageEventData | ChangeTaskTitleEventData | TaskStateChangeEventData | UpdateTaskAgentSessionIdEventData | TaskInfoUpdateEventData | MergeRequestEventData | TaskStoppedEventData | SubTaskResultUpdatedEventData | SystemMessageEventData | CreditExhaustedEventData | RtcIceServersRequestEventData | RtcIceServersResponseEventData | MachineRtcRequestEventData | MachineRtcResponseEventData | RtcSignalEventData | WorkspaceFileRequestEventData | WorkspaceFileResponseEventData | UpdateAgentInfoEventData | DaemonGitlabRequestEventData | DaemonGitlabResponseEventData | CompanionHeartbeatRequestData | CompanionHeartbeatResponseData | ResetTaskSessionEventData;
|
|
2116
|
+
type EventMap = {
|
|
2117
|
+
"app-alive": AppAliveEventData;
|
|
2118
|
+
"api-server-alive": ApiServerAliveEventData;
|
|
2119
|
+
"machine-alive": MachineAliveEventData;
|
|
2120
|
+
"worker-initializing": WorkerInitializingEventData;
|
|
2121
|
+
"worker-initialized": WorkerInitializedEventData;
|
|
2122
|
+
"worker-ready": WorkerReadyEventData;
|
|
2123
|
+
"worker-alive": WorkerAliveEventData;
|
|
2124
|
+
"worker-exit": WorkerExitEventData;
|
|
2125
|
+
"worker-running": WorkerRunningEventData;
|
|
2126
|
+
"worker-status-request": WorkerStatusRequestEventData;
|
|
2127
|
+
"chat-workers-status-request": ChatWorkersStatusRequestEventData;
|
|
2128
|
+
"chat-workers-status-response": ChatWorkersStatusResponseEventData;
|
|
2129
|
+
"create-task": CreateTaskEventData;
|
|
2130
|
+
"resume-task": ResumeTaskEventData;
|
|
2131
|
+
"cancel-task": CancelTaskEventData;
|
|
2132
|
+
"stop-task": StopTaskEventData;
|
|
2133
|
+
"task-message": TaskMessageEventData;
|
|
2134
|
+
"change-task-title": ChangeTaskTitleEventData;
|
|
2135
|
+
"task-state-change": TaskStateChangeEventData;
|
|
2136
|
+
"update-task-agent-session-id": UpdateTaskAgentSessionIdEventData;
|
|
2137
|
+
"task-info-update": TaskInfoUpdateEventData;
|
|
2138
|
+
"show-modal": ShowModalEventData;
|
|
2139
|
+
"merge-request": MergeRequestEventData;
|
|
2140
|
+
"merge-pr": MergePullRequestEventData;
|
|
2141
|
+
"deploy-agent": DeployAgentEventData;
|
|
2142
|
+
"deploy-agent-complete": DeployAgentCompleteEventData;
|
|
2143
|
+
"task-stopped": TaskStoppedEventData;
|
|
2144
|
+
"sub-task-result-updated": SubTaskResultUpdatedEventData;
|
|
2145
|
+
"associate-repo": AssociateRepoEventData;
|
|
2146
|
+
"update-agent-info": UpdateAgentInfoEventData;
|
|
2147
|
+
"system-message": SystemMessageEventData;
|
|
2148
|
+
"credit-exhausted": CreditExhaustedEventData;
|
|
2149
|
+
"rtc-ice-servers-request": RtcIceServersRequestEventData;
|
|
2150
|
+
"rtc-ice-servers-response": RtcIceServersResponseEventData;
|
|
2151
|
+
"machine-rtc-request": MachineRtcRequestEventData;
|
|
2152
|
+
"machine-rtc-response": MachineRtcResponseEventData;
|
|
2153
|
+
"rtc-signal": RtcSignalEventData;
|
|
2154
|
+
"workspace-file-request": WorkspaceFileRequestEventData;
|
|
2155
|
+
"workspace-file-response": WorkspaceFileResponseEventData;
|
|
2156
|
+
"rpc-call": RpcCallEventData;
|
|
2157
|
+
"daemon-gitlab-request": DaemonGitlabRequestEventData;
|
|
2158
|
+
"daemon-gitlab-response": DaemonGitlabResponseEventData;
|
|
2159
|
+
"request-companion-heartbeat": CompanionHeartbeatRequestData;
|
|
2160
|
+
"companion-heartbeat-response": CompanionHeartbeatResponseData;
|
|
2161
|
+
"reset-task-session": ResetTaskSessionEventData;
|
|
2162
|
+
"event-ack": EventAckData;
|
|
2163
|
+
};
|
|
2164
|
+
type EventName = keyof EventMap;
|
|
2165
|
+
declare const EventSchemaMap: Record<EventName, z.ZodType<any>>;
|
|
2166
|
+
/**
|
|
2167
|
+
* only sent by worker and which need to send to human in chat room
|
|
2168
|
+
*/
|
|
2169
|
+
type WorkerTaskEvent = "worker-initializing" | "worker-initialized" | "worker-ready" | "worker-exit" | "worker-running" | "change-task-title" | "update-task-agent-session-id" | "reset-task-session" | "merge-request" | "merge-pr" | "associate-repo" | "update-agent-info";
|
|
2170
|
+
declare const workerTaskEvents: WorkerTaskEvent[];
|
|
2171
|
+
|
|
2172
|
+
/**
|
|
2173
|
+
* Agent system context interface
|
|
2174
|
+
*
|
|
2175
|
+
* Different environments (CLI, API server) implement this interface
|
|
2176
|
+
* to provide agent directory resolution
|
|
2177
|
+
*/
|
|
2178
|
+
|
|
2179
|
+
interface AgentContext {
|
|
2180
|
+
/**
|
|
2181
|
+
* Resolve the full path to an agent directory
|
|
2182
|
+
*/
|
|
2183
|
+
resolveAgentDir(agentId: string): string;
|
|
2184
|
+
}
|
|
2185
|
+
declare function setAgentContext(context: AgentContext): void;
|
|
2186
|
+
declare function getAgentContext(): AgentContext;
|
|
2187
|
+
/**
|
|
2188
|
+
* AgentrixContext - RPC interface for agent code to interact with Agentrix services
|
|
2189
|
+
*
|
|
2190
|
+
* This interface is implemented by CLI's AgentContextImpl and injected into custom MCP tools.
|
|
2191
|
+
* Agent code cannot run standalone - it requires the CLI to provide this implementation.
|
|
2192
|
+
*
|
|
2193
|
+
* @see cli/src/worker/agentContext.ts - AgentContextImpl (real RPC implementation)
|
|
2194
|
+
*/
|
|
2195
|
+
interface AgentrixContext {
|
|
2196
|
+
/**
|
|
2197
|
+
* Print execution log in log files
|
|
2198
|
+
*/
|
|
2199
|
+
log(str: string): void;
|
|
2200
|
+
/**
|
|
2201
|
+
* Get the current workspace directory
|
|
2202
|
+
*/
|
|
2203
|
+
getWorkspace(): string;
|
|
2204
|
+
/**
|
|
2205
|
+
* Get the current user ID
|
|
2206
|
+
*/
|
|
2207
|
+
getUserId(): string;
|
|
2208
|
+
/**
|
|
2209
|
+
* Get the current task ID
|
|
2210
|
+
*/
|
|
2211
|
+
getTaskId(): string;
|
|
2212
|
+
/**
|
|
2213
|
+
* Get the current chat ID
|
|
2214
|
+
*/
|
|
2215
|
+
getChatId(): string;
|
|
2216
|
+
/**
|
|
2217
|
+
* Get the root task ID of the current task tree
|
|
2218
|
+
* If this task is the root, returns its own ID
|
|
2219
|
+
*/
|
|
2220
|
+
getRootTaskId(): string;
|
|
2221
|
+
/**
|
|
2222
|
+
* Get the parent task ID
|
|
2223
|
+
* Returns null if this is a root task
|
|
2224
|
+
*/
|
|
2225
|
+
getParentTaskId(): string | null;
|
|
2226
|
+
/**
|
|
2227
|
+
* Get all agents available for the current task
|
|
2228
|
+
*/
|
|
2229
|
+
getTaskAgents(): TaskAgentInfo[];
|
|
2230
|
+
/**
|
|
2231
|
+
* Create a new draft agent in the database
|
|
2232
|
+
*/
|
|
2233
|
+
createDraftAgent(params: {
|
|
2234
|
+
name: string;
|
|
2235
|
+
agentDir: string;
|
|
2236
|
+
type?: 'claude' | 'codex';
|
|
2237
|
+
avatar?: string;
|
|
2238
|
+
description?: string;
|
|
2239
|
+
envVars?: Array<{
|
|
2240
|
+
name: string;
|
|
2241
|
+
type: 'string' | 'number' | 'boolean' | 'secret';
|
|
2242
|
+
description?: string;
|
|
2243
|
+
required: boolean;
|
|
2244
|
+
defaultValue?: string;
|
|
2245
|
+
}>;
|
|
2246
|
+
signature?: string;
|
|
2247
|
+
guildMsg?: string;
|
|
2248
|
+
placeholderMsg?: string;
|
|
2249
|
+
}): Promise<{
|
|
2250
|
+
agentId: string;
|
|
2251
|
+
displayName: string;
|
|
2252
|
+
}>;
|
|
2253
|
+
/**
|
|
2254
|
+
* Update an existing draft agent in the database
|
|
2255
|
+
*/
|
|
2256
|
+
updateDraftAgent(id: string, updates: {
|
|
2257
|
+
avatar?: string | null;
|
|
2258
|
+
description?: string | null;
|
|
2259
|
+
config?: {
|
|
2260
|
+
environmentSchema?: Array<{
|
|
2261
|
+
name: string;
|
|
2262
|
+
type: 'string' | 'number' | 'boolean' | 'secret';
|
|
2263
|
+
description?: string;
|
|
2264
|
+
required: boolean;
|
|
2265
|
+
defaultValue?: string;
|
|
2266
|
+
}>;
|
|
2267
|
+
displayConfig?: Record<string, any>;
|
|
2268
|
+
signature?: string;
|
|
2269
|
+
guildMsg?: string;
|
|
2270
|
+
placeholderMsg?: string;
|
|
2271
|
+
};
|
|
2272
|
+
}): Promise<any>;
|
|
2273
|
+
/**
|
|
2274
|
+
* Create a sub task for multi-agent collaboration
|
|
2275
|
+
* Automatically inherits chatId, rootTaskId, machineId/cloudId from current task
|
|
2276
|
+
* Sets parentTaskId to current taskId
|
|
2277
|
+
*/
|
|
2278
|
+
startSubTask(params: {
|
|
2279
|
+
agentId: string;
|
|
2280
|
+
message: SDKUserMessage;
|
|
2281
|
+
title: string;
|
|
2282
|
+
}): Promise<{
|
|
2283
|
+
taskId: string;
|
|
2284
|
+
}>;
|
|
2285
|
+
/**
|
|
2286
|
+
* Create a group task with structured todos
|
|
2287
|
+
* Automatically inherits chatId, rootTaskId, machineId/cloudId from current task
|
|
2288
|
+
* Sets parentTaskId to current taskId
|
|
2289
|
+
*/
|
|
2290
|
+
startGroupTask(params: {
|
|
2291
|
+
agentId: string;
|
|
2292
|
+
message: SDKUserMessage;
|
|
2293
|
+
title: string;
|
|
2294
|
+
todos: Array<{
|
|
2295
|
+
agentId: string;
|
|
2296
|
+
title: string;
|
|
2297
|
+
instructions: string;
|
|
2298
|
+
}>;
|
|
2299
|
+
}): Promise<{
|
|
2300
|
+
taskId: string;
|
|
2301
|
+
}>;
|
|
2302
|
+
/**
|
|
2303
|
+
* Send a message to a task
|
|
2304
|
+
*
|
|
2305
|
+
* Target behavior:
|
|
2306
|
+
* - 'agent': Routes SDKUserMessage to task's agent worker (injects as user input)
|
|
2307
|
+
* - 'user': Broadcasts SDKAssistantMessage to users viewing the task (shows in chat UI)
|
|
2308
|
+
*/
|
|
2309
|
+
sendMessage(params: {
|
|
2310
|
+
taskId: string;
|
|
2311
|
+
message: SDKUserMessage | SDKAssistantMessage;
|
|
2312
|
+
target: SendMessageTarget;
|
|
2313
|
+
}): Promise<void>;
|
|
2314
|
+
/**
|
|
2315
|
+
* Show a modal dialog to users viewing a task
|
|
2316
|
+
* Used for interactive UI elements like configuration dialogs
|
|
2317
|
+
*/
|
|
2318
|
+
showModal(params: {
|
|
2319
|
+
taskId: string;
|
|
2320
|
+
modalName: string;
|
|
2321
|
+
modalData: Record<string, any>;
|
|
2322
|
+
}): Promise<void>;
|
|
2323
|
+
/**
|
|
2324
|
+
* Get the session file path and state of a task
|
|
2325
|
+
* Used to read completed task's session for analysis
|
|
2326
|
+
*/
|
|
2327
|
+
getTaskSession(taskId: string): Promise<{
|
|
2328
|
+
sessionPath: string;
|
|
2329
|
+
state: TaskState;
|
|
2330
|
+
}>;
|
|
2331
|
+
/**
|
|
2332
|
+
* Find a sub task by agent ID
|
|
2333
|
+
* Searches direct sub tasks (parentTaskId = current taskId) for the given agent
|
|
2334
|
+
*/
|
|
2335
|
+
findSubTaskByAgent(agentId: string): Promise<{
|
|
2336
|
+
taskId: string;
|
|
2337
|
+
} | null>;
|
|
2338
|
+
/**
|
|
2339
|
+
* List direct sub tasks under the current task
|
|
2340
|
+
*/
|
|
2341
|
+
listSubTasks(): Promise<SubTaskSummary[]>;
|
|
2342
|
+
/**
|
|
2343
|
+
* List recent tasks in the current chat
|
|
2344
|
+
* Used by companion to review recent task activity
|
|
2345
|
+
*/
|
|
2346
|
+
listTasks(params?: {
|
|
2347
|
+
limit?: number;
|
|
2348
|
+
status?: 'all' | 'active' | 'completed';
|
|
2349
|
+
}): Promise<RecentTaskSummary[]>;
|
|
2350
|
+
/**
|
|
2351
|
+
* Upload a file to the agent's storage
|
|
2352
|
+
*/
|
|
2353
|
+
uploadFile(params: {
|
|
2354
|
+
name: string;
|
|
2355
|
+
path: string;
|
|
2356
|
+
contentType?: string;
|
|
2357
|
+
visibility?: 'public' | 'private';
|
|
2358
|
+
}): Promise<{
|
|
2359
|
+
fileId: string;
|
|
2360
|
+
name: string;
|
|
2361
|
+
size: number;
|
|
2362
|
+
contentType: string;
|
|
2363
|
+
url: string;
|
|
2364
|
+
}>;
|
|
2365
|
+
/**
|
|
2366
|
+
* List all available agents for the current user (published + draft)
|
|
2367
|
+
* Returns both system agents and user's own agents
|
|
2368
|
+
*/
|
|
2369
|
+
listAgents(): Promise<{
|
|
2370
|
+
agents: Array<{
|
|
2371
|
+
id: string;
|
|
2372
|
+
name: string;
|
|
2373
|
+
displayName: string | null;
|
|
2374
|
+
type: string;
|
|
2375
|
+
description: string | null;
|
|
2376
|
+
signature: string | null;
|
|
2377
|
+
avatar: string | null;
|
|
2378
|
+
developerName: string;
|
|
2379
|
+
}>;
|
|
2380
|
+
draftAgents: Array<{
|
|
2381
|
+
id: string;
|
|
2382
|
+
name: string;
|
|
2383
|
+
displayName: string;
|
|
2384
|
+
type: string;
|
|
2385
|
+
description: string | null;
|
|
2386
|
+
agentDir: string;
|
|
2387
|
+
developerName?: string;
|
|
2388
|
+
}>;
|
|
2389
|
+
}>;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
/**
|
|
2393
|
+
* Agent type definitions for multi-framework agent configuration system.
|
|
2394
|
+
*
|
|
2395
|
+
* Each agent is a git repository with a standardized directory structure:
|
|
2396
|
+
* - agent.json: Metadata and framework declarations
|
|
2397
|
+
* - claude/: Claude Agent SDK specific configuration
|
|
2398
|
+
* - .codex/: OpenAI Codex specific configuration
|
|
2399
|
+
*/
|
|
2400
|
+
|
|
2401
|
+
/**
|
|
2402
|
+
* Supported agent frameworks
|
|
2403
|
+
*/
|
|
2404
|
+
declare const FRAMEWORK_TYPES: readonly ["claude", "codex"];
|
|
2405
|
+
type FrameworkType = typeof FRAMEWORK_TYPES[number];
|
|
2406
|
+
/**
|
|
2407
|
+
* Agent metadata from agent.json (root level)
|
|
2408
|
+
*/
|
|
2409
|
+
interface AgentMetadata {
|
|
2410
|
+
name: string;
|
|
2411
|
+
version: string;
|
|
2412
|
+
description?: string;
|
|
2413
|
+
}
|
|
2414
|
+
/**
|
|
2415
|
+
* Claude-specific agent configuration from claude/config.json
|
|
2416
|
+
*/
|
|
2417
|
+
interface ClaudeAgentConfig {
|
|
2418
|
+
model?: string;
|
|
2419
|
+
fallbackModel?: string;
|
|
2420
|
+
maxTurns?: number;
|
|
2421
|
+
extraArgs?: Record<string, string | null>;
|
|
2422
|
+
systemPrompt?: {
|
|
2423
|
+
path: string;
|
|
2424
|
+
mode?: 'append' | 'replace';
|
|
2425
|
+
};
|
|
2426
|
+
settings?: {
|
|
2427
|
+
permissionMode?: 'default' | 'acceptEdits' | 'bypassPermissions' | 'plan';
|
|
2428
|
+
allowedTools?: string[];
|
|
2429
|
+
};
|
|
2430
|
+
pullRequestPrompt?: {
|
|
2431
|
+
path: string;
|
|
2432
|
+
mode?: 'append' | 'replace';
|
|
2433
|
+
};
|
|
2434
|
+
sdkMcpTools?: string[];
|
|
2435
|
+
}
|
|
2436
|
+
/**
|
|
2437
|
+
* Complete agent configuration after loading
|
|
2438
|
+
*/
|
|
2439
|
+
interface AgentConfig {
|
|
2440
|
+
metadata: AgentMetadata;
|
|
2441
|
+
framework: FrameworkType;
|
|
2442
|
+
claude?: {
|
|
2443
|
+
config: ClaudeAgentConfig;
|
|
2444
|
+
systemPrompt?: string;
|
|
2445
|
+
/** Pull request prompt template content */
|
|
2446
|
+
prPromptTemplate?: string;
|
|
2447
|
+
/** Absolute paths to discovered plugins */
|
|
2448
|
+
plugins: string[];
|
|
2449
|
+
};
|
|
2450
|
+
codex?: {};
|
|
2451
|
+
}
|
|
2452
|
+
/**
|
|
2453
|
+
* Agent directory validation result
|
|
2454
|
+
*/
|
|
2455
|
+
interface ValidationResult {
|
|
2456
|
+
valid: boolean;
|
|
2457
|
+
errors: string[];
|
|
2458
|
+
warnings: string[];
|
|
2459
|
+
}
|
|
2460
|
+
/**
|
|
2461
|
+
* Options for loading an agent
|
|
2462
|
+
*/
|
|
2463
|
+
interface LoadAgentOptions {
|
|
2464
|
+
agentId: string;
|
|
2465
|
+
framework: FrameworkType;
|
|
2466
|
+
validateOnly?: boolean;
|
|
2467
|
+
agentDir?: string;
|
|
2468
|
+
}
|
|
2469
|
+
/**
|
|
2470
|
+
* Input for RepositoryInit hook (Agentrix custom hook)
|
|
2471
|
+
*
|
|
2472
|
+
* Called once when initializing a new git repository.
|
|
2473
|
+
* Allows agent to set up initial files (.gitignore, README, etc.) before
|
|
2474
|
+
* the first commit.
|
|
2475
|
+
*
|
|
2476
|
+
* @example
|
|
2477
|
+
* ```typescript
|
|
2478
|
+
* import type { RepositoryInitHookInput } from '@agentrix/shared';
|
|
2479
|
+
*
|
|
2480
|
+
* export async function RepositoryInit(
|
|
2481
|
+
* input: RepositoryInitHookInput,
|
|
2482
|
+
* toolUseID: string,
|
|
2483
|
+
* options: { signal: AbortSignal }
|
|
2484
|
+
* ) {
|
|
2485
|
+
* // Set up initial files
|
|
2486
|
+
* const gitignorePath = join(input.workspace_path, '.gitignore');
|
|
2487
|
+
* appendFileSync(gitignorePath, '\n.env.local\ntmp/\n');
|
|
2488
|
+
* return {};
|
|
2489
|
+
* }
|
|
2490
|
+
* ```
|
|
2491
|
+
*/
|
|
2492
|
+
interface RepositoryInitHookInput {
|
|
2493
|
+
/**
|
|
2494
|
+
* Hook event name (always 'RepositoryInit' for this hook type)
|
|
2495
|
+
*/
|
|
2496
|
+
hook_event_name: 'RepositoryInit';
|
|
2497
|
+
/**
|
|
2498
|
+
* Absolute path to the workspace directory
|
|
2499
|
+
*/
|
|
2500
|
+
workspace_path: string;
|
|
2501
|
+
/**
|
|
2502
|
+
* Task ID for this workspace
|
|
2503
|
+
*/
|
|
2504
|
+
task_id: string;
|
|
2505
|
+
}
|
|
2506
|
+
/**
|
|
2507
|
+
* Hook factory function type
|
|
2508
|
+
*
|
|
2509
|
+
* When hooks need access to AgentrixContext (workspace, userId, taskId, RPC methods),
|
|
2510
|
+
* export a default function that receives context and returns the hooks object.
|
|
2511
|
+
*
|
|
2512
|
+
* @example
|
|
2513
|
+
* ```typescript
|
|
2514
|
+
* import type { HookFactory, AgentrixContext } from '@agentrix/shared';
|
|
2515
|
+
* import type { PreToolUseHookInput } from '@anthropic-ai/claude-agent-sdk';
|
|
2516
|
+
*
|
|
2517
|
+
* const createHooks: HookFactory = (context: AgentrixContext) => ({
|
|
2518
|
+
* PreToolUse: async (input: PreToolUseHookInput) => {
|
|
2519
|
+
* const workspace = context.getWorkspace();
|
|
2520
|
+
* const taskId = context.getTaskId();
|
|
2521
|
+
* console.log(`[PreToolUse] Task ${taskId} in ${workspace}`);
|
|
2522
|
+
* return { decision: 'approve' as const };
|
|
2523
|
+
* },
|
|
2524
|
+
* });
|
|
2525
|
+
*
|
|
2526
|
+
* export default createHooks;
|
|
2527
|
+
* ```
|
|
2528
|
+
*/
|
|
2529
|
+
type HookFactory = (context: AgentrixContext) => Record<string, HookCallback>;
|
|
2530
|
+
|
|
2531
|
+
/**
|
|
2532
|
+
* Zod schemas for validating agent configuration files
|
|
2533
|
+
*/
|
|
2534
|
+
|
|
2535
|
+
/**
|
|
2536
|
+
* Agent metadata schema (agent.json)
|
|
2537
|
+
*/
|
|
2538
|
+
declare const AgentMetadataSchema: z.ZodObject<{
|
|
2539
|
+
name: z.ZodString;
|
|
2540
|
+
version: z.ZodString;
|
|
2541
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2542
|
+
}, z.core.$strip>;
|
|
2543
|
+
/**
|
|
2544
|
+
* Claude agent configuration schema (claude/config.json)
|
|
2545
|
+
*/
|
|
2546
|
+
declare const ClaudeConfigSchema: z.ZodObject<{
|
|
2547
|
+
model: z.ZodOptional<z.ZodString>;
|
|
2548
|
+
fallbackModel: z.ZodOptional<z.ZodString>;
|
|
2549
|
+
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
2550
|
+
extraArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
2551
|
+
systemPrompt: z.ZodOptional<z.ZodObject<{
|
|
2552
|
+
path: z.ZodString;
|
|
2553
|
+
mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2554
|
+
append: "append";
|
|
2555
|
+
replace: "replace";
|
|
2556
|
+
}>>>;
|
|
2557
|
+
}, z.core.$strip>>;
|
|
2558
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
2559
|
+
permissionMode: z.ZodOptional<z.ZodEnum<{
|
|
2560
|
+
default: "default";
|
|
2561
|
+
acceptEdits: "acceptEdits";
|
|
2562
|
+
bypassPermissions: "bypassPermissions";
|
|
2563
|
+
plan: "plan";
|
|
2564
|
+
}>>;
|
|
2565
|
+
allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2566
|
+
}, z.core.$strip>>;
|
|
2567
|
+
pullRequestPrompt: z.ZodOptional<z.ZodObject<{
|
|
2568
|
+
path: z.ZodString;
|
|
2569
|
+
mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
2570
|
+
append: "append";
|
|
2571
|
+
replace: "replace";
|
|
2572
|
+
}>>>;
|
|
2573
|
+
}, z.core.$strip>>;
|
|
2574
|
+
sdkMcpTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2575
|
+
}, z.core.$strip>;
|
|
2576
|
+
|
|
2577
|
+
/**
|
|
2578
|
+
* Custom error types for agent loading system
|
|
2579
|
+
*/
|
|
2580
|
+
declare class AgentError extends Error {
|
|
2581
|
+
constructor(message: string);
|
|
2582
|
+
}
|
|
2583
|
+
declare class AgentNotFoundError extends AgentError {
|
|
2584
|
+
constructor(agentId: string);
|
|
2585
|
+
}
|
|
2586
|
+
declare class AgentConfigValidationError extends AgentError {
|
|
2587
|
+
readonly errors?: string[] | undefined;
|
|
2588
|
+
constructor(message: string, errors?: string[] | undefined);
|
|
2589
|
+
}
|
|
2590
|
+
declare class FrameworkNotSupportedError extends AgentError {
|
|
2591
|
+
constructor(agentId: string, framework: string);
|
|
2592
|
+
}
|
|
2593
|
+
declare class AgentLoadError extends AgentError {
|
|
2594
|
+
readonly cause?: Error | undefined;
|
|
2595
|
+
constructor(message: string, cause?: Error | undefined);
|
|
2596
|
+
}
|
|
2597
|
+
declare class MissingAgentFileError extends AgentError {
|
|
2598
|
+
constructor(filePath: string);
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
export { CompanionHeartbeatRequestSchema as $, AskUserQuestionSchema as C, AskUserResponseMessageSchema as E, AskUserResponseReasonSchema as G, AskUserResponseStatusSchema as I, AssociateRepoEventDataSchema as K, CancelTaskRequestSchema as N, CancelTaskResponseSchema as Q, ChangeTaskTitleEventSchema as S, ChatWorkersStatusRequestSchema as U, ChatWorkersStatusResponseSchema as W, ClaudeConfigSchema as Y, ActiveAgentSchema as a, CompanionHeartbeatResponseSchema as a1, CreateMergeRequestResponseSchema as a5, CreateMergeRequestSchema as a6, FindTaskByAgentResponseSchema as aB, FrameworkNotSupportedError as aC, GetTaskSessionResponseSchema as aF, ListRecentTasksRequestSchema as aI, ListRecentTasksResponseSchema as aK, ListSubTasksRequestSchema as aM, ListSubTasksResponseSchema as aO, ListTasksRequestSchema as aQ, ListTasksResponseSchema as aS, MachineAliveEventSchema as aV, MachineRtcRequestSchema as aX, MachineRtcResponseSchema as aZ, CreateTaskShareResponseSchema as aa, CreateTaskShareSchema as ab, CreditExhaustedEventSchema as ad, DaemonGitlabOperationSchema as af, DaemonGitlabRequestSchema as ah, DaemonGitlabResponseSchema as aj, DeployAgentCompleteEventSchema as al, DeployAgentEventSchema as an, EventAckSchema as ap, EventSchemaMap as at, FRAMEWORK_TYPES as au, FillEventsRequestSchema as aw, FindTaskByAgentRequestSchema as az, MergePullRequestEventSchema as b0, MergeRequestEventSchema as b2, MissingAgentFileError as b3, PermissionResponseRequestSchema as b5, PermissionResponseResponseSchema as b7, PreviewMetadataSchema as b9, RtcIceServerSchema as bA, RtcIceServersRequestSchema as bC, RtcIceServersResponseSchema as bE, RtcSignalSchema as bG, SendTaskMessageRequestSchema as bJ, SendTaskMessageResponseSchema as bL, ShowModalEventDataSchema as bN, ShowModalRequestSchema as bP, ShowModalResponseSchema as bR, ShutdownMachineSchema as bT, StartTaskRequestSchema as bV, StartTaskResponseSchema as bX, StopTaskRequestSchema as b_, PreviewMethodSchema as bb, PreviewProjectTypeSchema as bd, ProjectDirectoryResponseSchema as bf, ProjectEntrySchema as bh, QueryEventsRequestSchema as bj, RecentTaskSummarySchema as bm, ResetTaskSessionSchema as bp, ResumeTaskRequestSchema as bs, ResumeTaskResponseSchema as bu, RpcCallEventSchema as bw, RpcResponseSchema as by, AgentConfigValidationError as c, StopTaskResponseSchema as c0, StopTaskSchema as c1, SubTaskResultUpdatedEventSchema as c4, SubTaskSummarySchema as c6, SystemMessageSchema as c8, UpdateAgentInfoEventSchema as cA, UpdateTaskAgentSessionIdEventSchema as cC, UpdateTaskTitleRequestSchema as cE, UpdateTaskTitleResponseSchema as cG, WorkerAliveEventSchema as cJ, WorkerExitSchema as cL, WorkerInitializedSchema as cN, WorkerInitializingSchema as cP, WorkerReadySchema as cR, WorkerRunningSchema as cT, WorkerStatusRequestSchema as cV, WorkerStatusValueSchema as cX, WorkspaceFileRequestSchema as c_, TaskAgentInfoSchema as cb, TaskArtifactsStatsSchema as cd, TaskArtifactsSummarySchema as cf, TaskInfoUpdateEventDataSchema as ci, TaskItemSchema as ck, TaskMessageSchema as cn, TaskStateChangeEventSchema as cq, TaskStoppedEventSchema as cs, TaskTodoSchema as cu, UnarchiveTaskRequestSchema as cw, UnarchiveTaskResponseSchema as cy, WorkspaceFileResponseSchema as d0, baseTaskSchema as d1, cancelTaskRequestSchema as d2, cancelTaskSchema as d3, createEventId as d4, createMergeRequestSchema as d5, createTaskSchema as d6, getAgentContext as d7, isAskUserMessage as d8, isAskUserResponseMessage as d9, isCompanionHeartbeatMessage as da, isCompanionReminderMessage as db, isSDKMessage as dc, isSDKUserMessage as dd, isSubTaskAskUserMessage as de, permissionResponseRequestSchema as df, resumeTaskRequestSchema as dg, resumeTaskSchema as dh, setAgentContext as di, startTaskSchema as dj, stopTaskRequestSchema as dk, workerTaskEvents as dl, AgentError as e, AgentLoadError as f, AgentMetadataSchema as h, AgentNotFoundError as i, ApiServerAliveEventSchema as l, AppAliveEventSchema as n, ApprovePrRequestSchema as p, ApprovePrResponseSchema as r, ArchiveTaskRequestSchema as t, ArchiveTaskResponseSchema as v, AskUserMessageSchema as x, AskUserOptionSchema as z };
|
|
2602
|
+
export type { ActiveAgent as A, AskUserQuestion as B, AskUserResponseMessage as D, AskUserResponseReason as F, AskUserResponseStatus as H, AssociateRepoEventData as J, CancelTaskEventData as L, CancelTaskRequest as M, CancelTaskResponse as O, PreviewMetadata as P, ChangeTaskTitleEventData as R, ChatWorkersStatusRequestEventData as T, ChatWorkersStatusResponseEventData as V, ClaudeAgentConfig as X, CompanionHeartbeatMessage as Z, CompanionHeartbeatRequestData as _, MergePullRequestEventData as a$, CompanionHeartbeatResponseData as a0, CompanionReminderMessage as a2, CreateMergeRequestRequest as a3, CreateMergeRequestResponse as a4, CreateTaskEventData as a7, CreateTaskShareRequest as a8, CreateTaskShareResponse as a9, FindTaskByAgentResponse as aA, FrameworkType as aD, GetTaskSessionResponse as aE, HookFactory as aG, ListRecentTasksRequest as aH, ListRecentTasksResponse as aJ, ListSubTasksRequest as aL, ListSubTasksResponse as aN, ListTasksRequest as aP, ListTasksResponse as aR, LoadAgentOptions as aT, MachineAliveEventData as aU, MachineRtcRequestEventData as aW, MachineRtcResponseEventData as aY, MergePullRequestAck as a_, CreditExhaustedEventData as ac, DaemonGitlabOperation as ae, DaemonGitlabRequestEventData as ag, DaemonGitlabResponseEventData as ai, DeployAgentCompleteEventData as ak, DeployAgentEventData as am, EventAckData as ao, EventData as aq, EventMap as ar, EventName as as, FillEventsRequest as av, FillEventsResponse as ax, FindTaskByAgentRequest as ay, AgentConfig as b, StopTaskResponse as b$, MergeRequestEventData as b1, PermissionResponseRequest as b4, PermissionResponseResponse as b6, PrStateChangedData as b8, RtcIceServersRequestEventData as bB, RtcIceServersResponseEventData as bD, RtcSignalEventData as bF, SendMessageTarget as bH, SendTaskMessageRequest as bI, SendTaskMessageResponse as bK, ShowModalEventData as bM, ShowModalRequest as bO, ShowModalResponse as bQ, ShutdownMachineData as bS, StartTaskRequest as bU, StartTaskResponse as bW, StopTaskEventData as bY, StopTaskRequest as bZ, PreviewMethod as ba, PreviewProjectType as bc, ProjectDirectoryResponse as be, ProjectEntry as bg, QueryEventsRequest as bi, QueryEventsResponse as bk, RecentTaskSummary as bl, RepositoryInitHookInput as bn, ResetTaskSessionEventData as bo, ResumeTaskEventData as bq, ResumeTaskRequest as br, ResumeTaskResponse as bt, RpcCallEventData as bv, RpcResponseData as bx, RtcIceServer as bz, WorkspaceFileResponseEventData as c$, SubTaskAskUserMessage as c2, SubTaskResultUpdatedEventData as c3, SubTaskSummary as c5, SystemMessageEventData as c7, SystemMessageType as c9, UpdateTaskAgentSessionIdEventData as cB, UpdateTaskTitleRequest as cD, UpdateTaskTitleResponse as cF, ValidationResult as cH, WorkerAliveEventData as cI, WorkerExitEventData as cK, WorkerInitializedEventData as cM, WorkerInitializingEventData as cO, WorkerReadyEventData as cQ, WorkerRunningEventData as cS, WorkerStatusRequestEventData as cU, WorkerStatusValue as cW, WorkerTaskEvent as cY, WorkspaceFileRequestEventData as cZ, TaskAgentInfo as ca, TaskArtifactsStats as cc, TaskArtifactsSummary as ce, TaskEvent as cg, TaskInfoUpdateEventData as ch, TaskItem as cj, TaskMessageEventData as cl, TaskMessagePayload as cm, TaskState as co, TaskStateChangeEventData as cp, TaskStoppedEventData as cr, TaskTodo as ct, UnarchiveTaskRequest as cv, UnarchiveTaskResponse as cx, UpdateAgentInfoEventData as cz, AgentContext as d, AgentMetadata as g, AgentrixContext as j, ApiServerAliveEventData as k, AppAliveEventData as m, ApprovePrRequest as o, ApprovePrResponse as q, ArchiveTaskRequest as s, ArchiveTaskResponse as u, AskUserMessage as w, AskUserOption as y };
|