byterover-cli 3.10.3 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/README.md +4 -2
  2. package/dist/agent/core/domain/llm/registry.d.ts +12 -0
  3. package/dist/agent/core/domain/llm/registry.js +49 -0
  4. package/dist/agent/core/domain/llm/types.d.ts +6 -0
  5. package/dist/agent/core/interfaces/i-content-generator.d.ts +8 -0
  6. package/dist/agent/infra/llm/agent-llm-service.js +18 -6
  7. package/dist/agent/infra/llm/context/context-manager.d.ts +4 -1
  8. package/dist/agent/infra/llm/context/context-manager.js +5 -1
  9. package/dist/agent/infra/llm/generators/ai-sdk-content-generator.d.ts +13 -0
  10. package/dist/agent/infra/llm/generators/ai-sdk-content-generator.js +19 -6
  11. package/dist/agent/infra/llm/generators/ai-sdk-message-converter.js +16 -4
  12. package/dist/agent/infra/llm/generators/byterover-content-generator.d.ts +1 -0
  13. package/dist/agent/infra/llm/generators/byterover-content-generator.js +4 -1
  14. package/dist/agent/infra/llm/model-capabilities.d.ts +2 -1
  15. package/dist/agent/infra/llm/model-capabilities.js +6 -4
  16. package/dist/agent/infra/llm/providers/anthropic.js +2 -0
  17. package/dist/agent/infra/llm/providers/deepseek.d.ts +10 -0
  18. package/dist/agent/infra/llm/providers/deepseek.js +33 -0
  19. package/dist/agent/infra/llm/providers/glm-coding-plan.d.ts +9 -0
  20. package/dist/agent/infra/llm/providers/glm-coding-plan.js +32 -0
  21. package/dist/agent/infra/llm/providers/index.js +4 -0
  22. package/dist/agent/infra/llm/providers/openrouter.js +2 -0
  23. package/dist/agent/infra/tools/implementations/curate-tool.js +18 -8
  24. package/dist/oclif/commands/query.js +7 -1
  25. package/dist/oclif/lib/task-client.d.ts +9 -0
  26. package/dist/oclif/lib/task-client.js +11 -1
  27. package/dist/server/constants.d.ts +6 -0
  28. package/dist/server/constants.js +11 -0
  29. package/dist/server/core/domain/entities/provider-registry.js +26 -0
  30. package/dist/server/core/domain/entities/task-history-entry.d.ts +775 -0
  31. package/dist/server/core/domain/entities/task-history-entry.js +88 -0
  32. package/dist/server/core/domain/transport/schemas.d.ts +1403 -11
  33. package/dist/server/core/domain/transport/schemas.js +157 -6
  34. package/dist/server/core/domain/transport/task-info.d.ts +18 -0
  35. package/dist/server/core/interfaces/process/i-task-lifecycle-hook.d.ts +7 -0
  36. package/dist/server/core/interfaces/storage/i-task-history-store.d.ts +62 -0
  37. package/dist/server/core/interfaces/storage/i-task-history-store.js +1 -0
  38. package/dist/server/infra/daemon/brv-server.js +43 -18
  39. package/dist/server/infra/dream/dream-response-schemas.d.ts +24 -0
  40. package/dist/server/infra/dream/dream-response-schemas.js +7 -0
  41. package/dist/server/infra/dream/operations/consolidate.js +21 -8
  42. package/dist/server/infra/dream/operations/synthesize.js +35 -8
  43. package/dist/server/infra/http/provider-model-fetcher-registry.js +5 -0
  44. package/dist/server/infra/http/provider-model-fetchers.js +54 -27
  45. package/dist/server/infra/process/query-log-handler.d.ts +6 -0
  46. package/dist/server/infra/process/query-log-handler.js +23 -0
  47. package/dist/server/infra/process/task-history-entry-builder.d.ts +36 -0
  48. package/dist/server/infra/process/task-history-entry-builder.js +101 -0
  49. package/dist/server/infra/process/task-history-hook.d.ts +37 -0
  50. package/dist/server/infra/process/task-history-hook.js +70 -0
  51. package/dist/server/infra/process/task-history-store-cache.d.ts +25 -0
  52. package/dist/server/infra/process/task-history-store-cache.js +106 -0
  53. package/dist/server/infra/process/task-router.d.ts +72 -0
  54. package/dist/server/infra/process/task-router.js +690 -15
  55. package/dist/server/infra/process/transport-handlers.d.ts +8 -0
  56. package/dist/server/infra/process/transport-handlers.js +2 -0
  57. package/dist/server/infra/storage/file-task-history-store.d.ts +294 -0
  58. package/dist/server/infra/storage/file-task-history-store.js +912 -0
  59. package/dist/shared/transport/events/index.d.ts +5 -0
  60. package/dist/shared/transport/events/task-events.d.ts +204 -1
  61. package/dist/shared/transport/events/task-events.js +11 -0
  62. package/dist/tui/features/tasks/hooks/use-task-subscriptions.js +7 -0
  63. package/dist/tui/features/tasks/stores/tasks-store.d.ts +4 -16
  64. package/dist/tui/features/tasks/stores/tasks-store.js +7 -0
  65. package/dist/tui/types/messages.d.ts +2 -9
  66. package/dist/webui/assets/index-DyVvFoM6.css +1 -0
  67. package/dist/webui/assets/index-lr0byHh9.js +130 -0
  68. package/dist/webui/index.html +2 -2
  69. package/dist/webui/sw.js +1 -1
  70. package/dist/webui/workbox-9c191d2f.js +1 -0
  71. package/oclif.manifest.json +985 -985
  72. package/package.json +1 -1
  73. package/dist/webui/assets/index-CvcqpMYn.css +0 -1
  74. package/dist/webui/assets/index-thSZZahh.js +0 -130
  75. package/dist/webui/workbox-8c29f6e4.js +0 -1
@@ -0,0 +1,775 @@
1
+ /**
2
+ * Task History Entry — Level 2 schema (full per-task detail).
3
+ *
4
+ * Persisted shape used by `FileTaskHistoryStore` (M2.02+) to keep a
5
+ * per-project journal of every task. Includes provider/model snapshot
6
+ * (M1) plus accumulated llmservice details — response, reasoning,
7
+ * tool calls — so the Web UI can re-render a complete task detail
8
+ * after daemon restart.
9
+ *
10
+ * Discriminated union on `status`:
11
+ * - `created`: just queued, agent has not picked up yet.
12
+ * - `started`: agent acknowledged, `startedAt` set.
13
+ * - `completed` | `error` | `cancelled`: terminal — `completedAt` set.
14
+ *
15
+ * The TS shape lives in `shared/transport/events/task-events.ts` so the
16
+ * web UI can consume it without webui→server boundary inversion. The
17
+ * Zod schema below is the runtime source of truth and carries
18
+ * `satisfies z.ZodType<TaskHistoryEntry>` so any drift between the
19
+ * type and the schema is a typecheck error.
20
+ */
21
+ import { z } from 'zod';
22
+ export type { TaskHistoryEntry, TaskHistoryStatus } from '../../../../shared/transport/events/task-events.js';
23
+ export { TASK_HISTORY_SCHEMA_VERSION } from '../../../../shared/transport/events/task-events.js';
24
+ export declare const ToolCallEventSchema: z.ZodObject<{
25
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
26
+ callId: z.ZodOptional<z.ZodString>;
27
+ error: z.ZodOptional<z.ZodString>;
28
+ errorType: z.ZodOptional<z.ZodString>;
29
+ result: z.ZodOptional<z.ZodUnknown>;
30
+ sessionId: z.ZodString;
31
+ status: z.ZodEnum<["completed", "error", "running"]>;
32
+ timestamp: z.ZodNumber;
33
+ toolName: z.ZodString;
34
+ }, "strip", z.ZodTypeAny, {
35
+ status: "error" | "completed" | "running";
36
+ sessionId: string;
37
+ toolName: string;
38
+ timestamp: number;
39
+ args: Record<string, unknown>;
40
+ error?: string | undefined;
41
+ callId?: string | undefined;
42
+ result?: unknown;
43
+ errorType?: string | undefined;
44
+ }, {
45
+ status: "error" | "completed" | "running";
46
+ sessionId: string;
47
+ toolName: string;
48
+ timestamp: number;
49
+ args: Record<string, unknown>;
50
+ error?: string | undefined;
51
+ callId?: string | undefined;
52
+ result?: unknown;
53
+ errorType?: string | undefined;
54
+ }>;
55
+ export declare const ReasoningContentItemSchema: z.ZodObject<{
56
+ content: z.ZodString;
57
+ isThinking: z.ZodOptional<z.ZodBoolean>;
58
+ timestamp: z.ZodNumber;
59
+ }, "strip", z.ZodTypeAny, {
60
+ timestamp: number;
61
+ content: string;
62
+ isThinking?: boolean | undefined;
63
+ }, {
64
+ timestamp: number;
65
+ content: string;
66
+ isThinking?: boolean | undefined;
67
+ }>;
68
+ export declare const TaskHistoryEntrySchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
69
+ clientCwd: z.ZodOptional<z.ZodString>;
70
+ content: z.ZodString;
71
+ createdAt: z.ZodNumber;
72
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
73
+ folderPath: z.ZodOptional<z.ZodString>;
74
+ id: z.ZodString;
75
+ logId: z.ZodOptional<z.ZodString>;
76
+ model: z.ZodOptional<z.ZodString>;
77
+ projectPath: z.ZodString;
78
+ provider: z.ZodOptional<z.ZodString>;
79
+ reasoningContents: z.ZodOptional<z.ZodArray<z.ZodObject<{
80
+ content: z.ZodString;
81
+ isThinking: z.ZodOptional<z.ZodBoolean>;
82
+ timestamp: z.ZodNumber;
83
+ }, "strip", z.ZodTypeAny, {
84
+ timestamp: number;
85
+ content: string;
86
+ isThinking?: boolean | undefined;
87
+ }, {
88
+ timestamp: number;
89
+ content: string;
90
+ isThinking?: boolean | undefined;
91
+ }>, "many">>;
92
+ responseContent: z.ZodOptional<z.ZodString>;
93
+ schemaVersion: z.ZodLiteral<1>;
94
+ sessionId: z.ZodOptional<z.ZodString>;
95
+ taskId: z.ZodString;
96
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
97
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
98
+ callId: z.ZodOptional<z.ZodString>;
99
+ error: z.ZodOptional<z.ZodString>;
100
+ errorType: z.ZodOptional<z.ZodString>;
101
+ result: z.ZodOptional<z.ZodUnknown>;
102
+ sessionId: z.ZodString;
103
+ status: z.ZodEnum<["completed", "error", "running"]>;
104
+ timestamp: z.ZodNumber;
105
+ toolName: z.ZodString;
106
+ }, "strip", z.ZodTypeAny, {
107
+ status: "error" | "completed" | "running";
108
+ sessionId: string;
109
+ toolName: string;
110
+ timestamp: number;
111
+ args: Record<string, unknown>;
112
+ error?: string | undefined;
113
+ callId?: string | undefined;
114
+ result?: unknown;
115
+ errorType?: string | undefined;
116
+ }, {
117
+ status: "error" | "completed" | "running";
118
+ sessionId: string;
119
+ toolName: string;
120
+ timestamp: number;
121
+ args: Record<string, unknown>;
122
+ error?: string | undefined;
123
+ callId?: string | undefined;
124
+ result?: unknown;
125
+ errorType?: string | undefined;
126
+ }>, "many">>;
127
+ type: z.ZodString;
128
+ worktreeRoot: z.ZodOptional<z.ZodString>;
129
+ } & {
130
+ status: z.ZodLiteral<"created">;
131
+ }, "strip", z.ZodTypeAny, {
132
+ type: string;
133
+ status: "created";
134
+ id: string;
135
+ createdAt: number;
136
+ content: string;
137
+ taskId: string;
138
+ schemaVersion: 1;
139
+ projectPath: string;
140
+ model?: string | undefined;
141
+ sessionId?: string | undefined;
142
+ files?: string[] | undefined;
143
+ provider?: string | undefined;
144
+ toolCalls?: {
145
+ status: "error" | "completed" | "running";
146
+ sessionId: string;
147
+ toolName: string;
148
+ timestamp: number;
149
+ args: Record<string, unknown>;
150
+ error?: string | undefined;
151
+ callId?: string | undefined;
152
+ result?: unknown;
153
+ errorType?: string | undefined;
154
+ }[] | undefined;
155
+ logId?: string | undefined;
156
+ clientCwd?: string | undefined;
157
+ folderPath?: string | undefined;
158
+ reasoningContents?: {
159
+ timestamp: number;
160
+ content: string;
161
+ isThinking?: boolean | undefined;
162
+ }[] | undefined;
163
+ responseContent?: string | undefined;
164
+ worktreeRoot?: string | undefined;
165
+ }, {
166
+ type: string;
167
+ status: "created";
168
+ id: string;
169
+ createdAt: number;
170
+ content: string;
171
+ taskId: string;
172
+ schemaVersion: 1;
173
+ projectPath: string;
174
+ model?: string | undefined;
175
+ sessionId?: string | undefined;
176
+ files?: string[] | undefined;
177
+ provider?: string | undefined;
178
+ toolCalls?: {
179
+ status: "error" | "completed" | "running";
180
+ sessionId: string;
181
+ toolName: string;
182
+ timestamp: number;
183
+ args: Record<string, unknown>;
184
+ error?: string | undefined;
185
+ callId?: string | undefined;
186
+ result?: unknown;
187
+ errorType?: string | undefined;
188
+ }[] | undefined;
189
+ logId?: string | undefined;
190
+ clientCwd?: string | undefined;
191
+ folderPath?: string | undefined;
192
+ reasoningContents?: {
193
+ timestamp: number;
194
+ content: string;
195
+ isThinking?: boolean | undefined;
196
+ }[] | undefined;
197
+ responseContent?: string | undefined;
198
+ worktreeRoot?: string | undefined;
199
+ }>, z.ZodObject<{
200
+ clientCwd: z.ZodOptional<z.ZodString>;
201
+ content: z.ZodString;
202
+ createdAt: z.ZodNumber;
203
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
204
+ folderPath: z.ZodOptional<z.ZodString>;
205
+ id: z.ZodString;
206
+ logId: z.ZodOptional<z.ZodString>;
207
+ model: z.ZodOptional<z.ZodString>;
208
+ projectPath: z.ZodString;
209
+ provider: z.ZodOptional<z.ZodString>;
210
+ reasoningContents: z.ZodOptional<z.ZodArray<z.ZodObject<{
211
+ content: z.ZodString;
212
+ isThinking: z.ZodOptional<z.ZodBoolean>;
213
+ timestamp: z.ZodNumber;
214
+ }, "strip", z.ZodTypeAny, {
215
+ timestamp: number;
216
+ content: string;
217
+ isThinking?: boolean | undefined;
218
+ }, {
219
+ timestamp: number;
220
+ content: string;
221
+ isThinking?: boolean | undefined;
222
+ }>, "many">>;
223
+ responseContent: z.ZodOptional<z.ZodString>;
224
+ schemaVersion: z.ZodLiteral<1>;
225
+ sessionId: z.ZodOptional<z.ZodString>;
226
+ taskId: z.ZodString;
227
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
228
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
229
+ callId: z.ZodOptional<z.ZodString>;
230
+ error: z.ZodOptional<z.ZodString>;
231
+ errorType: z.ZodOptional<z.ZodString>;
232
+ result: z.ZodOptional<z.ZodUnknown>;
233
+ sessionId: z.ZodString;
234
+ status: z.ZodEnum<["completed", "error", "running"]>;
235
+ timestamp: z.ZodNumber;
236
+ toolName: z.ZodString;
237
+ }, "strip", z.ZodTypeAny, {
238
+ status: "error" | "completed" | "running";
239
+ sessionId: string;
240
+ toolName: string;
241
+ timestamp: number;
242
+ args: Record<string, unknown>;
243
+ error?: string | undefined;
244
+ callId?: string | undefined;
245
+ result?: unknown;
246
+ errorType?: string | undefined;
247
+ }, {
248
+ status: "error" | "completed" | "running";
249
+ sessionId: string;
250
+ toolName: string;
251
+ timestamp: number;
252
+ args: Record<string, unknown>;
253
+ error?: string | undefined;
254
+ callId?: string | undefined;
255
+ result?: unknown;
256
+ errorType?: string | undefined;
257
+ }>, "many">>;
258
+ type: z.ZodString;
259
+ worktreeRoot: z.ZodOptional<z.ZodString>;
260
+ } & {
261
+ startedAt: z.ZodNumber;
262
+ status: z.ZodLiteral<"started">;
263
+ }, "strip", z.ZodTypeAny, {
264
+ type: string;
265
+ status: "started";
266
+ id: string;
267
+ createdAt: number;
268
+ content: string;
269
+ startedAt: number;
270
+ taskId: string;
271
+ schemaVersion: 1;
272
+ projectPath: string;
273
+ model?: string | undefined;
274
+ sessionId?: string | undefined;
275
+ files?: string[] | undefined;
276
+ provider?: string | undefined;
277
+ toolCalls?: {
278
+ status: "error" | "completed" | "running";
279
+ sessionId: string;
280
+ toolName: string;
281
+ timestamp: number;
282
+ args: Record<string, unknown>;
283
+ error?: string | undefined;
284
+ callId?: string | undefined;
285
+ result?: unknown;
286
+ errorType?: string | undefined;
287
+ }[] | undefined;
288
+ logId?: string | undefined;
289
+ clientCwd?: string | undefined;
290
+ folderPath?: string | undefined;
291
+ reasoningContents?: {
292
+ timestamp: number;
293
+ content: string;
294
+ isThinking?: boolean | undefined;
295
+ }[] | undefined;
296
+ responseContent?: string | undefined;
297
+ worktreeRoot?: string | undefined;
298
+ }, {
299
+ type: string;
300
+ status: "started";
301
+ id: string;
302
+ createdAt: number;
303
+ content: string;
304
+ startedAt: number;
305
+ taskId: string;
306
+ schemaVersion: 1;
307
+ projectPath: string;
308
+ model?: string | undefined;
309
+ sessionId?: string | undefined;
310
+ files?: string[] | undefined;
311
+ provider?: string | undefined;
312
+ toolCalls?: {
313
+ status: "error" | "completed" | "running";
314
+ sessionId: string;
315
+ toolName: string;
316
+ timestamp: number;
317
+ args: Record<string, unknown>;
318
+ error?: string | undefined;
319
+ callId?: string | undefined;
320
+ result?: unknown;
321
+ errorType?: string | undefined;
322
+ }[] | undefined;
323
+ logId?: string | undefined;
324
+ clientCwd?: string | undefined;
325
+ folderPath?: string | undefined;
326
+ reasoningContents?: {
327
+ timestamp: number;
328
+ content: string;
329
+ isThinking?: boolean | undefined;
330
+ }[] | undefined;
331
+ responseContent?: string | undefined;
332
+ worktreeRoot?: string | undefined;
333
+ }>, z.ZodObject<{
334
+ clientCwd: z.ZodOptional<z.ZodString>;
335
+ content: z.ZodString;
336
+ createdAt: z.ZodNumber;
337
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
338
+ folderPath: z.ZodOptional<z.ZodString>;
339
+ id: z.ZodString;
340
+ logId: z.ZodOptional<z.ZodString>;
341
+ model: z.ZodOptional<z.ZodString>;
342
+ projectPath: z.ZodString;
343
+ provider: z.ZodOptional<z.ZodString>;
344
+ reasoningContents: z.ZodOptional<z.ZodArray<z.ZodObject<{
345
+ content: z.ZodString;
346
+ isThinking: z.ZodOptional<z.ZodBoolean>;
347
+ timestamp: z.ZodNumber;
348
+ }, "strip", z.ZodTypeAny, {
349
+ timestamp: number;
350
+ content: string;
351
+ isThinking?: boolean | undefined;
352
+ }, {
353
+ timestamp: number;
354
+ content: string;
355
+ isThinking?: boolean | undefined;
356
+ }>, "many">>;
357
+ responseContent: z.ZodOptional<z.ZodString>;
358
+ schemaVersion: z.ZodLiteral<1>;
359
+ sessionId: z.ZodOptional<z.ZodString>;
360
+ taskId: z.ZodString;
361
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
362
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
363
+ callId: z.ZodOptional<z.ZodString>;
364
+ error: z.ZodOptional<z.ZodString>;
365
+ errorType: z.ZodOptional<z.ZodString>;
366
+ result: z.ZodOptional<z.ZodUnknown>;
367
+ sessionId: z.ZodString;
368
+ status: z.ZodEnum<["completed", "error", "running"]>;
369
+ timestamp: z.ZodNumber;
370
+ toolName: z.ZodString;
371
+ }, "strip", z.ZodTypeAny, {
372
+ status: "error" | "completed" | "running";
373
+ sessionId: string;
374
+ toolName: string;
375
+ timestamp: number;
376
+ args: Record<string, unknown>;
377
+ error?: string | undefined;
378
+ callId?: string | undefined;
379
+ result?: unknown;
380
+ errorType?: string | undefined;
381
+ }, {
382
+ status: "error" | "completed" | "running";
383
+ sessionId: string;
384
+ toolName: string;
385
+ timestamp: number;
386
+ args: Record<string, unknown>;
387
+ error?: string | undefined;
388
+ callId?: string | undefined;
389
+ result?: unknown;
390
+ errorType?: string | undefined;
391
+ }>, "many">>;
392
+ type: z.ZodString;
393
+ worktreeRoot: z.ZodOptional<z.ZodString>;
394
+ } & {
395
+ completedAt: z.ZodNumber;
396
+ result: z.ZodOptional<z.ZodString>;
397
+ startedAt: z.ZodOptional<z.ZodNumber>;
398
+ status: z.ZodLiteral<"completed">;
399
+ }, "strip", z.ZodTypeAny, {
400
+ type: string;
401
+ status: "completed";
402
+ id: string;
403
+ createdAt: number;
404
+ content: string;
405
+ completedAt: number;
406
+ taskId: string;
407
+ schemaVersion: 1;
408
+ projectPath: string;
409
+ model?: string | undefined;
410
+ sessionId?: string | undefined;
411
+ files?: string[] | undefined;
412
+ provider?: string | undefined;
413
+ startedAt?: number | undefined;
414
+ toolCalls?: {
415
+ status: "error" | "completed" | "running";
416
+ sessionId: string;
417
+ toolName: string;
418
+ timestamp: number;
419
+ args: Record<string, unknown>;
420
+ error?: string | undefined;
421
+ callId?: string | undefined;
422
+ result?: unknown;
423
+ errorType?: string | undefined;
424
+ }[] | undefined;
425
+ result?: string | undefined;
426
+ logId?: string | undefined;
427
+ clientCwd?: string | undefined;
428
+ folderPath?: string | undefined;
429
+ reasoningContents?: {
430
+ timestamp: number;
431
+ content: string;
432
+ isThinking?: boolean | undefined;
433
+ }[] | undefined;
434
+ responseContent?: string | undefined;
435
+ worktreeRoot?: string | undefined;
436
+ }, {
437
+ type: string;
438
+ status: "completed";
439
+ id: string;
440
+ createdAt: number;
441
+ content: string;
442
+ completedAt: number;
443
+ taskId: string;
444
+ schemaVersion: 1;
445
+ projectPath: string;
446
+ model?: string | undefined;
447
+ sessionId?: string | undefined;
448
+ files?: string[] | undefined;
449
+ provider?: string | undefined;
450
+ startedAt?: number | undefined;
451
+ toolCalls?: {
452
+ status: "error" | "completed" | "running";
453
+ sessionId: string;
454
+ toolName: string;
455
+ timestamp: number;
456
+ args: Record<string, unknown>;
457
+ error?: string | undefined;
458
+ callId?: string | undefined;
459
+ result?: unknown;
460
+ errorType?: string | undefined;
461
+ }[] | undefined;
462
+ result?: string | undefined;
463
+ logId?: string | undefined;
464
+ clientCwd?: string | undefined;
465
+ folderPath?: string | undefined;
466
+ reasoningContents?: {
467
+ timestamp: number;
468
+ content: string;
469
+ isThinking?: boolean | undefined;
470
+ }[] | undefined;
471
+ responseContent?: string | undefined;
472
+ worktreeRoot?: string | undefined;
473
+ }>, z.ZodObject<{
474
+ clientCwd: z.ZodOptional<z.ZodString>;
475
+ content: z.ZodString;
476
+ createdAt: z.ZodNumber;
477
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
478
+ folderPath: z.ZodOptional<z.ZodString>;
479
+ id: z.ZodString;
480
+ logId: z.ZodOptional<z.ZodString>;
481
+ model: z.ZodOptional<z.ZodString>;
482
+ projectPath: z.ZodString;
483
+ provider: z.ZodOptional<z.ZodString>;
484
+ reasoningContents: z.ZodOptional<z.ZodArray<z.ZodObject<{
485
+ content: z.ZodString;
486
+ isThinking: z.ZodOptional<z.ZodBoolean>;
487
+ timestamp: z.ZodNumber;
488
+ }, "strip", z.ZodTypeAny, {
489
+ timestamp: number;
490
+ content: string;
491
+ isThinking?: boolean | undefined;
492
+ }, {
493
+ timestamp: number;
494
+ content: string;
495
+ isThinking?: boolean | undefined;
496
+ }>, "many">>;
497
+ responseContent: z.ZodOptional<z.ZodString>;
498
+ schemaVersion: z.ZodLiteral<1>;
499
+ sessionId: z.ZodOptional<z.ZodString>;
500
+ taskId: z.ZodString;
501
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
502
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
503
+ callId: z.ZodOptional<z.ZodString>;
504
+ error: z.ZodOptional<z.ZodString>;
505
+ errorType: z.ZodOptional<z.ZodString>;
506
+ result: z.ZodOptional<z.ZodUnknown>;
507
+ sessionId: z.ZodString;
508
+ status: z.ZodEnum<["completed", "error", "running"]>;
509
+ timestamp: z.ZodNumber;
510
+ toolName: z.ZodString;
511
+ }, "strip", z.ZodTypeAny, {
512
+ status: "error" | "completed" | "running";
513
+ sessionId: string;
514
+ toolName: string;
515
+ timestamp: number;
516
+ args: Record<string, unknown>;
517
+ error?: string | undefined;
518
+ callId?: string | undefined;
519
+ result?: unknown;
520
+ errorType?: string | undefined;
521
+ }, {
522
+ status: "error" | "completed" | "running";
523
+ sessionId: string;
524
+ toolName: string;
525
+ timestamp: number;
526
+ args: Record<string, unknown>;
527
+ error?: string | undefined;
528
+ callId?: string | undefined;
529
+ result?: unknown;
530
+ errorType?: string | undefined;
531
+ }>, "many">>;
532
+ type: z.ZodString;
533
+ worktreeRoot: z.ZodOptional<z.ZodString>;
534
+ } & {
535
+ completedAt: z.ZodNumber;
536
+ error: z.ZodObject<{
537
+ code: z.ZodOptional<z.ZodString>;
538
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
539
+ message: z.ZodString;
540
+ name: z.ZodString;
541
+ }, "strip", z.ZodTypeAny, {
542
+ message: string;
543
+ name: string;
544
+ code?: string | undefined;
545
+ details?: Record<string, unknown> | undefined;
546
+ }, {
547
+ message: string;
548
+ name: string;
549
+ code?: string | undefined;
550
+ details?: Record<string, unknown> | undefined;
551
+ }>;
552
+ startedAt: z.ZodOptional<z.ZodNumber>;
553
+ status: z.ZodLiteral<"error">;
554
+ }, "strip", z.ZodTypeAny, {
555
+ type: string;
556
+ status: "error";
557
+ error: {
558
+ message: string;
559
+ name: string;
560
+ code?: string | undefined;
561
+ details?: Record<string, unknown> | undefined;
562
+ };
563
+ id: string;
564
+ createdAt: number;
565
+ content: string;
566
+ completedAt: number;
567
+ taskId: string;
568
+ schemaVersion: 1;
569
+ projectPath: string;
570
+ model?: string | undefined;
571
+ sessionId?: string | undefined;
572
+ files?: string[] | undefined;
573
+ provider?: string | undefined;
574
+ startedAt?: number | undefined;
575
+ toolCalls?: {
576
+ status: "error" | "completed" | "running";
577
+ sessionId: string;
578
+ toolName: string;
579
+ timestamp: number;
580
+ args: Record<string, unknown>;
581
+ error?: string | undefined;
582
+ callId?: string | undefined;
583
+ result?: unknown;
584
+ errorType?: string | undefined;
585
+ }[] | undefined;
586
+ logId?: string | undefined;
587
+ clientCwd?: string | undefined;
588
+ folderPath?: string | undefined;
589
+ reasoningContents?: {
590
+ timestamp: number;
591
+ content: string;
592
+ isThinking?: boolean | undefined;
593
+ }[] | undefined;
594
+ responseContent?: string | undefined;
595
+ worktreeRoot?: string | undefined;
596
+ }, {
597
+ type: string;
598
+ status: "error";
599
+ error: {
600
+ message: string;
601
+ name: string;
602
+ code?: string | undefined;
603
+ details?: Record<string, unknown> | undefined;
604
+ };
605
+ id: string;
606
+ createdAt: number;
607
+ content: string;
608
+ completedAt: number;
609
+ taskId: string;
610
+ schemaVersion: 1;
611
+ projectPath: string;
612
+ model?: string | undefined;
613
+ sessionId?: string | undefined;
614
+ files?: string[] | undefined;
615
+ provider?: string | undefined;
616
+ startedAt?: number | undefined;
617
+ toolCalls?: {
618
+ status: "error" | "completed" | "running";
619
+ sessionId: string;
620
+ toolName: string;
621
+ timestamp: number;
622
+ args: Record<string, unknown>;
623
+ error?: string | undefined;
624
+ callId?: string | undefined;
625
+ result?: unknown;
626
+ errorType?: string | undefined;
627
+ }[] | undefined;
628
+ logId?: string | undefined;
629
+ clientCwd?: string | undefined;
630
+ folderPath?: string | undefined;
631
+ reasoningContents?: {
632
+ timestamp: number;
633
+ content: string;
634
+ isThinking?: boolean | undefined;
635
+ }[] | undefined;
636
+ responseContent?: string | undefined;
637
+ worktreeRoot?: string | undefined;
638
+ }>, z.ZodObject<{
639
+ clientCwd: z.ZodOptional<z.ZodString>;
640
+ content: z.ZodString;
641
+ createdAt: z.ZodNumber;
642
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
643
+ folderPath: z.ZodOptional<z.ZodString>;
644
+ id: z.ZodString;
645
+ logId: z.ZodOptional<z.ZodString>;
646
+ model: z.ZodOptional<z.ZodString>;
647
+ projectPath: z.ZodString;
648
+ provider: z.ZodOptional<z.ZodString>;
649
+ reasoningContents: z.ZodOptional<z.ZodArray<z.ZodObject<{
650
+ content: z.ZodString;
651
+ isThinking: z.ZodOptional<z.ZodBoolean>;
652
+ timestamp: z.ZodNumber;
653
+ }, "strip", z.ZodTypeAny, {
654
+ timestamp: number;
655
+ content: string;
656
+ isThinking?: boolean | undefined;
657
+ }, {
658
+ timestamp: number;
659
+ content: string;
660
+ isThinking?: boolean | undefined;
661
+ }>, "many">>;
662
+ responseContent: z.ZodOptional<z.ZodString>;
663
+ schemaVersion: z.ZodLiteral<1>;
664
+ sessionId: z.ZodOptional<z.ZodString>;
665
+ taskId: z.ZodString;
666
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
667
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
668
+ callId: z.ZodOptional<z.ZodString>;
669
+ error: z.ZodOptional<z.ZodString>;
670
+ errorType: z.ZodOptional<z.ZodString>;
671
+ result: z.ZodOptional<z.ZodUnknown>;
672
+ sessionId: z.ZodString;
673
+ status: z.ZodEnum<["completed", "error", "running"]>;
674
+ timestamp: z.ZodNumber;
675
+ toolName: z.ZodString;
676
+ }, "strip", z.ZodTypeAny, {
677
+ status: "error" | "completed" | "running";
678
+ sessionId: string;
679
+ toolName: string;
680
+ timestamp: number;
681
+ args: Record<string, unknown>;
682
+ error?: string | undefined;
683
+ callId?: string | undefined;
684
+ result?: unknown;
685
+ errorType?: string | undefined;
686
+ }, {
687
+ status: "error" | "completed" | "running";
688
+ sessionId: string;
689
+ toolName: string;
690
+ timestamp: number;
691
+ args: Record<string, unknown>;
692
+ error?: string | undefined;
693
+ callId?: string | undefined;
694
+ result?: unknown;
695
+ errorType?: string | undefined;
696
+ }>, "many">>;
697
+ type: z.ZodString;
698
+ worktreeRoot: z.ZodOptional<z.ZodString>;
699
+ } & {
700
+ completedAt: z.ZodNumber;
701
+ startedAt: z.ZodOptional<z.ZodNumber>;
702
+ status: z.ZodLiteral<"cancelled">;
703
+ }, "strip", z.ZodTypeAny, {
704
+ type: string;
705
+ status: "cancelled";
706
+ id: string;
707
+ createdAt: number;
708
+ content: string;
709
+ completedAt: number;
710
+ taskId: string;
711
+ schemaVersion: 1;
712
+ projectPath: string;
713
+ model?: string | undefined;
714
+ sessionId?: string | undefined;
715
+ files?: string[] | undefined;
716
+ provider?: string | undefined;
717
+ startedAt?: number | undefined;
718
+ toolCalls?: {
719
+ status: "error" | "completed" | "running";
720
+ sessionId: string;
721
+ toolName: string;
722
+ timestamp: number;
723
+ args: Record<string, unknown>;
724
+ error?: string | undefined;
725
+ callId?: string | undefined;
726
+ result?: unknown;
727
+ errorType?: string | undefined;
728
+ }[] | undefined;
729
+ logId?: string | undefined;
730
+ clientCwd?: string | undefined;
731
+ folderPath?: string | undefined;
732
+ reasoningContents?: {
733
+ timestamp: number;
734
+ content: string;
735
+ isThinking?: boolean | undefined;
736
+ }[] | undefined;
737
+ responseContent?: string | undefined;
738
+ worktreeRoot?: string | undefined;
739
+ }, {
740
+ type: string;
741
+ status: "cancelled";
742
+ id: string;
743
+ createdAt: number;
744
+ content: string;
745
+ completedAt: number;
746
+ taskId: string;
747
+ schemaVersion: 1;
748
+ projectPath: string;
749
+ model?: string | undefined;
750
+ sessionId?: string | undefined;
751
+ files?: string[] | undefined;
752
+ provider?: string | undefined;
753
+ startedAt?: number | undefined;
754
+ toolCalls?: {
755
+ status: "error" | "completed" | "running";
756
+ sessionId: string;
757
+ toolName: string;
758
+ timestamp: number;
759
+ args: Record<string, unknown>;
760
+ error?: string | undefined;
761
+ callId?: string | undefined;
762
+ result?: unknown;
763
+ errorType?: string | undefined;
764
+ }[] | undefined;
765
+ logId?: string | undefined;
766
+ clientCwd?: string | undefined;
767
+ folderPath?: string | undefined;
768
+ reasoningContents?: {
769
+ timestamp: number;
770
+ content: string;
771
+ isThinking?: boolean | undefined;
772
+ }[] | undefined;
773
+ responseContent?: string | undefined;
774
+ worktreeRoot?: string | undefined;
775
+ }>]>;