@maudecode/talaria-web-contracts 0.0.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/router.d.ts +449 -2
- package/dist/routes/chat.d.ts +54 -1
- package/dist/routes/sessions.d.ts +296 -1
- package/dist/routes/sessions.js +2 -2
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/settings.d.ts +8 -0
- package/dist/routes/tools.d.ts +91 -0
- package/dist/routes/tools.js +4 -3
- package/dist/routes/tools.js.map +1 -1
- package/dist/sidecar/runtime.js +1 -0
- package/dist/sidecar/runtime.js.map +1 -1
- package/dist/sse.d.ts +4 -0
- package/dist/sse.js +3 -2
- package/dist/sse.js.map +1 -1
- package/dist/views.d.ts +339 -1
- package/dist/views.js +32 -6
- package/dist/views.js.map +1 -1
- package/fixtures/sidecar/runtime.json +11 -11
- package/fixtures/sidecar/text.json +2 -2
- package/package.json +1 -1
package/dist/views.d.ts
CHANGED
|
@@ -59,6 +59,86 @@ export declare const MessageRoleSchema: z.ZodEnum<{
|
|
|
59
59
|
}>;
|
|
60
60
|
/** Persisted rows have integer ids; live rows carry string ids. */
|
|
61
61
|
export declare const MessageIdSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
62
|
+
/** One normalized activity row: the server decides role, order, tool completion/error, and steering consumption. */
|
|
63
|
+
export declare const ActivitySceneRowSchema: z.ZodObject<{
|
|
64
|
+
row_id: z.ZodString;
|
|
65
|
+
order_index: z.ZodNumber;
|
|
66
|
+
role: z.ZodEnum<{
|
|
67
|
+
reasoning: "reasoning";
|
|
68
|
+
tool: "tool";
|
|
69
|
+
prose: "prose";
|
|
70
|
+
steering: "steering";
|
|
71
|
+
}>;
|
|
72
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
text: z.ZodOptional<z.ZodString>;
|
|
74
|
+
titles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
|
+
tool: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
name: z.ZodString;
|
|
78
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
79
|
+
preview: z.ZodNullable<z.ZodString>;
|
|
80
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
81
|
+
done: z.ZodBoolean;
|
|
82
|
+
is_error: z.ZodBoolean;
|
|
83
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
84
|
+
cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
85
|
+
}, z.core.$loose>>;
|
|
86
|
+
steering: z.ZodOptional<z.ZodObject<{
|
|
87
|
+
steer_id: z.ZodString;
|
|
88
|
+
consumed: z.ZodBoolean;
|
|
89
|
+
submitted_at: z.ZodNullable<z.ZodNumber>;
|
|
90
|
+
consumed_at: z.ZodNullable<z.ZodNumber>;
|
|
91
|
+
phase_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
92
|
+
}, z.core.$loose>>;
|
|
93
|
+
}, z.core.$loose>;
|
|
94
|
+
export type ActivitySceneRow = z.infer<typeof ActivitySceneRowSchema>;
|
|
95
|
+
/** `_anchor_activity_scene`: a completed turn's server-owned presentation: the rows under "Worked" (a tail preview plus paging fields), the visible final answer, the outcome, and the default disclosure. */
|
|
96
|
+
export declare const ActivitySceneSchema: z.ZodObject<{
|
|
97
|
+
version: z.ZodLiteral<"activity_scene_v1">;
|
|
98
|
+
activity_rows: z.ZodArray<z.ZodObject<{
|
|
99
|
+
row_id: z.ZodString;
|
|
100
|
+
order_index: z.ZodNumber;
|
|
101
|
+
role: z.ZodEnum<{
|
|
102
|
+
reasoning: "reasoning";
|
|
103
|
+
tool: "tool";
|
|
104
|
+
prose: "prose";
|
|
105
|
+
steering: "steering";
|
|
106
|
+
}>;
|
|
107
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
text: z.ZodOptional<z.ZodString>;
|
|
109
|
+
titles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
tool: z.ZodOptional<z.ZodObject<{
|
|
111
|
+
id: z.ZodString;
|
|
112
|
+
name: z.ZodString;
|
|
113
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
114
|
+
preview: z.ZodNullable<z.ZodString>;
|
|
115
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
116
|
+
done: z.ZodBoolean;
|
|
117
|
+
is_error: z.ZodBoolean;
|
|
118
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
119
|
+
cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
120
|
+
}, z.core.$loose>>;
|
|
121
|
+
steering: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
steer_id: z.ZodString;
|
|
123
|
+
consumed: z.ZodBoolean;
|
|
124
|
+
submitted_at: z.ZodNullable<z.ZodNumber>;
|
|
125
|
+
consumed_at: z.ZodNullable<z.ZodNumber>;
|
|
126
|
+
phase_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
127
|
+
}, z.core.$loose>>;
|
|
128
|
+
}, z.core.$loose>>;
|
|
129
|
+
final_answer: z.ZodOptional<z.ZodString>;
|
|
130
|
+
turn_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
131
|
+
terminal_state: z.ZodOptional<z.ZodString>;
|
|
132
|
+
expanded_by_default: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
+
final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
has_consumed_steering: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
activity_rows_total: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
activity_rows_offset: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
activity_rows_complete: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
activity_rows_omitted: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
activity_scene_ref: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, z.core.$loose>;
|
|
141
|
+
export type ActivityScene = z.infer<typeof ActivitySceneSchema>;
|
|
62
142
|
export declare const MessageSchema: z.ZodObject<{
|
|
63
143
|
role: z.ZodString;
|
|
64
144
|
content: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodObject<{
|
|
@@ -108,6 +188,59 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
108
188
|
provider_details: z.ZodOptional<z.ZodUnknown>;
|
|
109
189
|
provider_details_label: z.ZodOptional<z.ZodString>;
|
|
110
190
|
recovery_control: z.ZodOptional<z.ZodUnknown>;
|
|
191
|
+
_anchor_activity_scene: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
version: z.ZodLiteral<"activity_scene_v1">;
|
|
193
|
+
activity_rows: z.ZodArray<z.ZodObject<{
|
|
194
|
+
row_id: z.ZodString;
|
|
195
|
+
order_index: z.ZodNumber;
|
|
196
|
+
role: z.ZodEnum<{
|
|
197
|
+
reasoning: "reasoning";
|
|
198
|
+
tool: "tool";
|
|
199
|
+
prose: "prose";
|
|
200
|
+
steering: "steering";
|
|
201
|
+
}>;
|
|
202
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
text: z.ZodOptional<z.ZodString>;
|
|
204
|
+
titles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
205
|
+
tool: z.ZodOptional<z.ZodObject<{
|
|
206
|
+
id: z.ZodString;
|
|
207
|
+
name: z.ZodString;
|
|
208
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
209
|
+
preview: z.ZodNullable<z.ZodString>;
|
|
210
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
211
|
+
done: z.ZodBoolean;
|
|
212
|
+
is_error: z.ZodBoolean;
|
|
213
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
214
|
+
cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
215
|
+
}, z.core.$loose>>;
|
|
216
|
+
steering: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
steer_id: z.ZodString;
|
|
218
|
+
consumed: z.ZodBoolean;
|
|
219
|
+
submitted_at: z.ZodNullable<z.ZodNumber>;
|
|
220
|
+
consumed_at: z.ZodNullable<z.ZodNumber>;
|
|
221
|
+
phase_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
222
|
+
}, z.core.$loose>>;
|
|
223
|
+
}, z.core.$loose>>;
|
|
224
|
+
final_answer: z.ZodOptional<z.ZodString>;
|
|
225
|
+
turn_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
226
|
+
terminal_state: z.ZodOptional<z.ZodString>;
|
|
227
|
+
expanded_by_default: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
has_consumed_steering: z.ZodOptional<z.ZodBoolean>;
|
|
230
|
+
activity_rows_total: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
activity_rows_offset: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
activity_rows_complete: z.ZodOptional<z.ZodBoolean>;
|
|
233
|
+
activity_rows_omitted: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
activity_scene_ref: z.ZodOptional<z.ZodString>;
|
|
235
|
+
}, z.core.$loose>>;
|
|
236
|
+
_turn_id: z.ZodOptional<z.ZodString>;
|
|
237
|
+
_steer: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
steer_id: z.ZodString;
|
|
239
|
+
submitted_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
240
|
+
consumed_at: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
}, z.core.$loose>>;
|
|
243
|
+
_final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
111
244
|
}, z.core.$loose>;
|
|
112
245
|
export type Message = z.infer<typeof MessageSchema>;
|
|
113
246
|
export declare const ComposerDraftSchema: z.ZodObject<{
|
|
@@ -171,6 +304,59 @@ export declare const SessionSchema: z.ZodObject<{
|
|
|
171
304
|
provider_details: z.ZodOptional<z.ZodUnknown>;
|
|
172
305
|
provider_details_label: z.ZodOptional<z.ZodString>;
|
|
173
306
|
recovery_control: z.ZodOptional<z.ZodUnknown>;
|
|
307
|
+
_anchor_activity_scene: z.ZodOptional<z.ZodObject<{
|
|
308
|
+
version: z.ZodLiteral<"activity_scene_v1">;
|
|
309
|
+
activity_rows: z.ZodArray<z.ZodObject<{
|
|
310
|
+
row_id: z.ZodString;
|
|
311
|
+
order_index: z.ZodNumber;
|
|
312
|
+
role: z.ZodEnum<{
|
|
313
|
+
reasoning: "reasoning";
|
|
314
|
+
tool: "tool";
|
|
315
|
+
prose: "prose";
|
|
316
|
+
steering: "steering";
|
|
317
|
+
}>;
|
|
318
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
319
|
+
text: z.ZodOptional<z.ZodString>;
|
|
320
|
+
titles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
321
|
+
tool: z.ZodOptional<z.ZodObject<{
|
|
322
|
+
id: z.ZodString;
|
|
323
|
+
name: z.ZodString;
|
|
324
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
325
|
+
preview: z.ZodNullable<z.ZodString>;
|
|
326
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
327
|
+
done: z.ZodBoolean;
|
|
328
|
+
is_error: z.ZodBoolean;
|
|
329
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
330
|
+
cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
331
|
+
}, z.core.$loose>>;
|
|
332
|
+
steering: z.ZodOptional<z.ZodObject<{
|
|
333
|
+
steer_id: z.ZodString;
|
|
334
|
+
consumed: z.ZodBoolean;
|
|
335
|
+
submitted_at: z.ZodNullable<z.ZodNumber>;
|
|
336
|
+
consumed_at: z.ZodNullable<z.ZodNumber>;
|
|
337
|
+
phase_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
338
|
+
}, z.core.$loose>>;
|
|
339
|
+
}, z.core.$loose>>;
|
|
340
|
+
final_answer: z.ZodOptional<z.ZodString>;
|
|
341
|
+
turn_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
342
|
+
terminal_state: z.ZodOptional<z.ZodString>;
|
|
343
|
+
expanded_by_default: z.ZodOptional<z.ZodBoolean>;
|
|
344
|
+
final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
345
|
+
has_consumed_steering: z.ZodOptional<z.ZodBoolean>;
|
|
346
|
+
activity_rows_total: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
activity_rows_offset: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
activity_rows_complete: z.ZodOptional<z.ZodBoolean>;
|
|
349
|
+
activity_rows_omitted: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
activity_scene_ref: z.ZodOptional<z.ZodString>;
|
|
351
|
+
}, z.core.$loose>>;
|
|
352
|
+
_turn_id: z.ZodOptional<z.ZodString>;
|
|
353
|
+
_steer: z.ZodOptional<z.ZodObject<{
|
|
354
|
+
steer_id: z.ZodString;
|
|
355
|
+
submitted_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
356
|
+
consumed_at: z.ZodOptional<z.ZodNumber>;
|
|
357
|
+
phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
358
|
+
}, z.core.$loose>>;
|
|
359
|
+
_final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
174
360
|
}, z.core.$loose>>>;
|
|
175
361
|
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
176
362
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -314,6 +500,59 @@ export declare const SessionEnvelopeSchema: z.ZodObject<{
|
|
|
314
500
|
provider_details: z.ZodOptional<z.ZodUnknown>;
|
|
315
501
|
provider_details_label: z.ZodOptional<z.ZodString>;
|
|
316
502
|
recovery_control: z.ZodOptional<z.ZodUnknown>;
|
|
503
|
+
_anchor_activity_scene: z.ZodOptional<z.ZodObject<{
|
|
504
|
+
version: z.ZodLiteral<"activity_scene_v1">;
|
|
505
|
+
activity_rows: z.ZodArray<z.ZodObject<{
|
|
506
|
+
row_id: z.ZodString;
|
|
507
|
+
order_index: z.ZodNumber;
|
|
508
|
+
role: z.ZodEnum<{
|
|
509
|
+
reasoning: "reasoning";
|
|
510
|
+
tool: "tool";
|
|
511
|
+
prose: "prose";
|
|
512
|
+
steering: "steering";
|
|
513
|
+
}>;
|
|
514
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
text: z.ZodOptional<z.ZodString>;
|
|
516
|
+
titles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
517
|
+
tool: z.ZodOptional<z.ZodObject<{
|
|
518
|
+
id: z.ZodString;
|
|
519
|
+
name: z.ZodString;
|
|
520
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
521
|
+
preview: z.ZodNullable<z.ZodString>;
|
|
522
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
523
|
+
done: z.ZodBoolean;
|
|
524
|
+
is_error: z.ZodBoolean;
|
|
525
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
526
|
+
cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
527
|
+
}, z.core.$loose>>;
|
|
528
|
+
steering: z.ZodOptional<z.ZodObject<{
|
|
529
|
+
steer_id: z.ZodString;
|
|
530
|
+
consumed: z.ZodBoolean;
|
|
531
|
+
submitted_at: z.ZodNullable<z.ZodNumber>;
|
|
532
|
+
consumed_at: z.ZodNullable<z.ZodNumber>;
|
|
533
|
+
phase_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
534
|
+
}, z.core.$loose>>;
|
|
535
|
+
}, z.core.$loose>>;
|
|
536
|
+
final_answer: z.ZodOptional<z.ZodString>;
|
|
537
|
+
turn_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
538
|
+
terminal_state: z.ZodOptional<z.ZodString>;
|
|
539
|
+
expanded_by_default: z.ZodOptional<z.ZodBoolean>;
|
|
540
|
+
final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
541
|
+
has_consumed_steering: z.ZodOptional<z.ZodBoolean>;
|
|
542
|
+
activity_rows_total: z.ZodOptional<z.ZodNumber>;
|
|
543
|
+
activity_rows_offset: z.ZodOptional<z.ZodNumber>;
|
|
544
|
+
activity_rows_complete: z.ZodOptional<z.ZodBoolean>;
|
|
545
|
+
activity_rows_omitted: z.ZodOptional<z.ZodNumber>;
|
|
546
|
+
activity_scene_ref: z.ZodOptional<z.ZodString>;
|
|
547
|
+
}, z.core.$loose>>;
|
|
548
|
+
_turn_id: z.ZodOptional<z.ZodString>;
|
|
549
|
+
_steer: z.ZodOptional<z.ZodObject<{
|
|
550
|
+
steer_id: z.ZodString;
|
|
551
|
+
submitted_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
552
|
+
consumed_at: z.ZodOptional<z.ZodNumber>;
|
|
553
|
+
phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
554
|
+
}, z.core.$loose>>;
|
|
555
|
+
_final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
317
556
|
}, z.core.$loose>>>;
|
|
318
557
|
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
319
558
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -587,7 +826,7 @@ export type ChatStartRequest = z.infer<typeof ChatStartRequestSchema>;
|
|
|
587
826
|
export declare const ChatStartResponseSchema: z.ZodObject<{
|
|
588
827
|
stream_id: z.ZodOptional<z.ZodString>;
|
|
589
828
|
session_id: z.ZodOptional<z.ZodString>;
|
|
590
|
-
turn_id: z.ZodOptional<z.
|
|
829
|
+
turn_id: z.ZodOptional<z.ZodString>;
|
|
591
830
|
user_message_id: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
592
831
|
pending_started_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
593
832
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -653,6 +892,59 @@ export declare const ChatStartResponseSchema: z.ZodObject<{
|
|
|
653
892
|
provider_details: z.ZodOptional<z.ZodUnknown>;
|
|
654
893
|
provider_details_label: z.ZodOptional<z.ZodString>;
|
|
655
894
|
recovery_control: z.ZodOptional<z.ZodUnknown>;
|
|
895
|
+
_anchor_activity_scene: z.ZodOptional<z.ZodObject<{
|
|
896
|
+
version: z.ZodLiteral<"activity_scene_v1">;
|
|
897
|
+
activity_rows: z.ZodArray<z.ZodObject<{
|
|
898
|
+
row_id: z.ZodString;
|
|
899
|
+
order_index: z.ZodNumber;
|
|
900
|
+
role: z.ZodEnum<{
|
|
901
|
+
reasoning: "reasoning";
|
|
902
|
+
tool: "tool";
|
|
903
|
+
prose: "prose";
|
|
904
|
+
steering: "steering";
|
|
905
|
+
}>;
|
|
906
|
+
created_at: z.ZodOptional<z.ZodNumber>;
|
|
907
|
+
text: z.ZodOptional<z.ZodString>;
|
|
908
|
+
titles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
909
|
+
tool: z.ZodOptional<z.ZodObject<{
|
|
910
|
+
id: z.ZodString;
|
|
911
|
+
name: z.ZodString;
|
|
912
|
+
args: z.ZodOptional<z.ZodUnknown>;
|
|
913
|
+
preview: z.ZodNullable<z.ZodString>;
|
|
914
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
915
|
+
done: z.ZodBoolean;
|
|
916
|
+
is_error: z.ZodBoolean;
|
|
917
|
+
duration: z.ZodNullable<z.ZodNumber>;
|
|
918
|
+
cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
919
|
+
}, z.core.$loose>>;
|
|
920
|
+
steering: z.ZodOptional<z.ZodObject<{
|
|
921
|
+
steer_id: z.ZodString;
|
|
922
|
+
consumed: z.ZodBoolean;
|
|
923
|
+
submitted_at: z.ZodNullable<z.ZodNumber>;
|
|
924
|
+
consumed_at: z.ZodNullable<z.ZodNumber>;
|
|
925
|
+
phase_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
926
|
+
}, z.core.$loose>>;
|
|
927
|
+
}, z.core.$loose>>;
|
|
928
|
+
final_answer: z.ZodOptional<z.ZodString>;
|
|
929
|
+
turn_duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
930
|
+
terminal_state: z.ZodOptional<z.ZodString>;
|
|
931
|
+
expanded_by_default: z.ZodOptional<z.ZodBoolean>;
|
|
932
|
+
final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
933
|
+
has_consumed_steering: z.ZodOptional<z.ZodBoolean>;
|
|
934
|
+
activity_rows_total: z.ZodOptional<z.ZodNumber>;
|
|
935
|
+
activity_rows_offset: z.ZodOptional<z.ZodNumber>;
|
|
936
|
+
activity_rows_complete: z.ZodOptional<z.ZodBoolean>;
|
|
937
|
+
activity_rows_omitted: z.ZodOptional<z.ZodNumber>;
|
|
938
|
+
activity_scene_ref: z.ZodOptional<z.ZodString>;
|
|
939
|
+
}, z.core.$loose>>;
|
|
940
|
+
_turn_id: z.ZodOptional<z.ZodString>;
|
|
941
|
+
_steer: z.ZodOptional<z.ZodObject<{
|
|
942
|
+
steer_id: z.ZodString;
|
|
943
|
+
submitted_at: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
944
|
+
consumed_at: z.ZodOptional<z.ZodNumber>;
|
|
945
|
+
phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
946
|
+
}, z.core.$loose>>;
|
|
947
|
+
_final_phase_duration: z.ZodOptional<z.ZodNumber>;
|
|
656
948
|
}, z.core.$loose>>>;
|
|
657
949
|
tool_calls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
658
950
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1094,6 +1386,10 @@ export declare const SettingsSchema: z.ZodObject<{
|
|
|
1094
1386
|
webui_version: z.ZodOptional<z.ZodString>;
|
|
1095
1387
|
agent_version: z.ZodOptional<z.ZodString>;
|
|
1096
1388
|
update_channel: z.ZodOptional<z.ZodString>;
|
|
1389
|
+
agent_update_channel: z.ZodOptional<z.ZodEnum<{
|
|
1390
|
+
stable: "stable";
|
|
1391
|
+
experimental: "experimental";
|
|
1392
|
+
}>>;
|
|
1097
1393
|
update_channel_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1098
1394
|
max_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1099
1395
|
max_tokens_effective: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -1598,6 +1894,14 @@ export declare const SystemHealthSchema: z.ZodObject<{
|
|
|
1598
1894
|
}, z.core.$loose>;
|
|
1599
1895
|
export declare const UpdateTargetSchema: z.ZodObject<{
|
|
1600
1896
|
name: z.ZodOptional<z.ZodString>;
|
|
1897
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
1898
|
+
stable: "stable";
|
|
1899
|
+
experimental: "experimental";
|
|
1900
|
+
}>>;
|
|
1901
|
+
unsupported: z.ZodOptional<z.ZodBoolean>;
|
|
1902
|
+
supported_revision: z.ZodOptional<z.ZodString>;
|
|
1903
|
+
supported_version: z.ZodOptional<z.ZodString>;
|
|
1904
|
+
candidate_revision: z.ZodOptional<z.ZodString>;
|
|
1601
1905
|
behind: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1602
1906
|
current_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1603
1907
|
latest_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1607,6 +1911,8 @@ export declare const UpdateTargetSchema: z.ZodObject<{
|
|
|
1607
1911
|
ok: z.ZodOptional<z.ZodBoolean>;
|
|
1608
1912
|
manual_update: z.ZodOptional<z.ZodBoolean>;
|
|
1609
1913
|
no_git: z.ZodOptional<z.ZodBoolean>;
|
|
1914
|
+
install_kind: z.ZodOptional<z.ZodLiteral<"npm">>;
|
|
1915
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
1610
1916
|
dirty: z.ZodOptional<z.ZodBoolean>;
|
|
1611
1917
|
metadata_repair: z.ZodOptional<z.ZodBoolean>;
|
|
1612
1918
|
release_url: z.ZodOptional<z.ZodString>;
|
|
@@ -1617,10 +1923,22 @@ export declare const UpdatesCheckSchema: z.ZodObject<{
|
|
|
1617
1923
|
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
1618
1924
|
cached: z.ZodOptional<z.ZodBoolean>;
|
|
1619
1925
|
channel: z.ZodOptional<z.ZodString>;
|
|
1926
|
+
agent_channel: z.ZodOptional<z.ZodEnum<{
|
|
1927
|
+
stable: "stable";
|
|
1928
|
+
experimental: "experimental";
|
|
1929
|
+
}>>;
|
|
1620
1930
|
checked_at: z.ZodOptional<z.ZodNumber>;
|
|
1621
1931
|
include_agent: z.ZodOptional<z.ZodBoolean>;
|
|
1622
1932
|
webui: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1623
1933
|
name: z.ZodOptional<z.ZodString>;
|
|
1934
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
1935
|
+
stable: "stable";
|
|
1936
|
+
experimental: "experimental";
|
|
1937
|
+
}>>;
|
|
1938
|
+
unsupported: z.ZodOptional<z.ZodBoolean>;
|
|
1939
|
+
supported_revision: z.ZodOptional<z.ZodString>;
|
|
1940
|
+
supported_version: z.ZodOptional<z.ZodString>;
|
|
1941
|
+
candidate_revision: z.ZodOptional<z.ZodString>;
|
|
1624
1942
|
behind: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1625
1943
|
current_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1626
1944
|
latest_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1630,6 +1948,8 @@ export declare const UpdatesCheckSchema: z.ZodObject<{
|
|
|
1630
1948
|
ok: z.ZodOptional<z.ZodBoolean>;
|
|
1631
1949
|
manual_update: z.ZodOptional<z.ZodBoolean>;
|
|
1632
1950
|
no_git: z.ZodOptional<z.ZodBoolean>;
|
|
1951
|
+
install_kind: z.ZodOptional<z.ZodLiteral<"npm">>;
|
|
1952
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
1633
1953
|
dirty: z.ZodOptional<z.ZodBoolean>;
|
|
1634
1954
|
metadata_repair: z.ZodOptional<z.ZodBoolean>;
|
|
1635
1955
|
release_url: z.ZodOptional<z.ZodString>;
|
|
@@ -1638,6 +1958,14 @@ export declare const UpdatesCheckSchema: z.ZodObject<{
|
|
|
1638
1958
|
}, z.core.$loose>>>;
|
|
1639
1959
|
agent: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1640
1960
|
name: z.ZodOptional<z.ZodString>;
|
|
1961
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
1962
|
+
stable: "stable";
|
|
1963
|
+
experimental: "experimental";
|
|
1964
|
+
}>>;
|
|
1965
|
+
unsupported: z.ZodOptional<z.ZodBoolean>;
|
|
1966
|
+
supported_revision: z.ZodOptional<z.ZodString>;
|
|
1967
|
+
supported_version: z.ZodOptional<z.ZodString>;
|
|
1968
|
+
candidate_revision: z.ZodOptional<z.ZodString>;
|
|
1641
1969
|
behind: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1642
1970
|
current_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1643
1971
|
latest_sha: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1647,6 +1975,8 @@ export declare const UpdatesCheckSchema: z.ZodObject<{
|
|
|
1647
1975
|
ok: z.ZodOptional<z.ZodBoolean>;
|
|
1648
1976
|
manual_update: z.ZodOptional<z.ZodBoolean>;
|
|
1649
1977
|
no_git: z.ZodOptional<z.ZodBoolean>;
|
|
1978
|
+
install_kind: z.ZodOptional<z.ZodLiteral<"npm">>;
|
|
1979
|
+
npm: z.ZodOptional<z.ZodString>;
|
|
1650
1980
|
dirty: z.ZodOptional<z.ZodBoolean>;
|
|
1651
1981
|
metadata_repair: z.ZodOptional<z.ZodBoolean>;
|
|
1652
1982
|
release_url: z.ZodOptional<z.ZodString>;
|
|
@@ -1667,6 +1997,14 @@ export declare const UpdateApplySchema: z.ZodObject<{
|
|
|
1667
1997
|
error: z.ZodOptional<z.ZodString>;
|
|
1668
1998
|
message: z.ZodOptional<z.ZodString>;
|
|
1669
1999
|
lock: z.ZodOptional<z.ZodUnknown>;
|
|
2000
|
+
confirmation_required: z.ZodOptional<z.ZodBoolean>;
|
|
2001
|
+
candidate_revision: z.ZodOptional<z.ZodString>;
|
|
2002
|
+
supported_revision: z.ZodOptional<z.ZodString>;
|
|
2003
|
+
supported_version: z.ZodOptional<z.ZodString>;
|
|
2004
|
+
agent_channel: z.ZodOptional<z.ZodEnum<{
|
|
2005
|
+
stable: "stable";
|
|
2006
|
+
experimental: "experimental";
|
|
2007
|
+
}>>;
|
|
1670
2008
|
}, z.core.$loose>;
|
|
1671
2009
|
export declare const PluginSchema: z.ZodObject<{
|
|
1672
2010
|
key: z.ZodString;
|
package/dist/views.js
CHANGED
|
@@ -26,11 +26,37 @@ export const MessageContentSchema = z.union([z.string(), z.array(ContentPartSche
|
|
|
26
26
|
export const MessageRoleSchema = z.enum(['user', 'assistant', 'system', 'tool']);
|
|
27
27
|
/** Persisted rows have integer ids; live rows carry string ids. */
|
|
28
28
|
export const MessageIdSchema = z.union([z.string(), z.number()]);
|
|
29
|
+
/** One normalized activity row: the server decides role, order, tool completion/error, and steering consumption. */
|
|
30
|
+
export const ActivitySceneRowSchema = z.looseObject({
|
|
31
|
+
row_id: z.string(), order_index: z.number().int(), role: z.enum(['prose', 'reasoning', 'tool', 'steering']), created_at: z.number().optional(),
|
|
32
|
+
text: z.string().optional(), titles: z.array(z.string()).optional(),
|
|
33
|
+
tool: z.looseObject({ id: z.string(), name: z.string(), args: Json.optional(), preview: z.string().nullable(), result: Json.optional(), done: z.boolean(), is_error: z.boolean(), duration: z.number().nullable(), cost_usd: z.number().nullable() }).optional(),
|
|
34
|
+
steering: z.looseObject({ steer_id: z.string(), consumed: z.boolean(), submitted_at: z.number().nullable(), consumed_at: z.number().nullable(), phase_duration: z.number().nullable().optional() }).optional(),
|
|
35
|
+
});
|
|
36
|
+
/** `_anchor_activity_scene`: a completed turn's server-owned presentation: the rows under "Worked" (a tail preview plus paging fields), the visible final answer, the outcome, and the default disclosure. */
|
|
37
|
+
export const ActivitySceneSchema = z.looseObject({
|
|
38
|
+
version: z.literal('activity_scene_v1'), activity_rows: z.array(ActivitySceneRowSchema), final_answer: z.string().optional(), turn_duration: z.number().nullable().optional(),
|
|
39
|
+
/** The turn's outcome (`completed`, `no_response`, `error`, `cancelled`, `interrupted`, `tool_limit_reached`, ...). */
|
|
40
|
+
terminal_state: z.string().optional(),
|
|
41
|
+
/** Whether the "Worked" disclosure opens by default: an unsuccessful outcome with work to read. */
|
|
42
|
+
expanded_by_default: z.boolean().optional(),
|
|
43
|
+
/** Seconds from the turn's last consumed steer to its end, when it has steers. */
|
|
44
|
+
final_phase_duration: z.number().optional(),
|
|
45
|
+
/** Whether any row of the whole scene (not only this preview) is a consumed steer. */
|
|
46
|
+
has_consumed_steering: z.boolean().optional(),
|
|
47
|
+
activity_rows_total: z.number().int().optional(), activity_rows_offset: z.number().int().optional(), activity_rows_complete: z.boolean().optional(), activity_rows_omitted: z.number().int().optional(), activity_scene_ref: z.string().optional(),
|
|
48
|
+
});
|
|
29
49
|
export const MessageSchema = z.looseObject({
|
|
30
50
|
role: z.string(), content: MessageContentSchema.optional(), id: MessageIdSchema.optional(), message_id: MessageIdSchema.optional(), timestamp: z.number().nullable().optional(),
|
|
31
51
|
attachments: z.array(AttachmentSchema).optional(), tool_calls: z.array(ToolCallSchema).optional(), reasoning: z.union([z.string(), z.array(Json)]).nullable().optional(), reasoning_content: z.string().nullable().optional(),
|
|
32
52
|
thinking: z.string().nullable().optional(), tool_call_id: z.string().optional(), tool_use_id: z.string().optional(), name: z.string().optional(), badge: z.string().optional(), label: z.string().optional(),
|
|
33
|
-
provider_details: Json.optional(), provider_details_label: z.string().optional(), recovery_control: Json.optional(),
|
|
53
|
+
provider_details: Json.optional(), provider_details_label: z.string().optional(), recovery_control: Json.optional(), _anchor_activity_scene: ActivitySceneSchema.optional(),
|
|
54
|
+
/** The turn this row belongs to; the server stamps every row it sends, so clients group turns by equality alone. */
|
|
55
|
+
_turn_id: z.string().optional(),
|
|
56
|
+
/** A consumed steer at its causal place in the turn: display-only, never model history. A steer only the Agent recorded has no timing. */
|
|
57
|
+
_steer: z.looseObject({ steer_id: z.string(), submitted_at: z.number().nullable().optional(), consumed_at: z.number().optional(), phase_duration: z.number().optional() }).optional(),
|
|
58
|
+
/** On a steered turn's last reply: seconds from the last consumed steer to the turn's end. */
|
|
59
|
+
_final_phase_duration: z.number().optional(),
|
|
34
60
|
});
|
|
35
61
|
export const ComposerDraftSchema = z.looseObject({ text: z.string().optional(), files: z.array(Json).optional() });
|
|
36
62
|
/** Full session record from `GET /api/session` and mutations returning `session`. */
|
|
@@ -77,7 +103,7 @@ export const ChatStartRequestSchema = z.looseObject({
|
|
|
77
103
|
});
|
|
78
104
|
/** Accepted turn. `stream_id` is the owner identity for the SSE connection. */
|
|
79
105
|
export const ChatStartResponseSchema = z.looseObject({
|
|
80
|
-
stream_id: z.string().optional(), session_id: SessionIdSchema.optional(), turn_id:
|
|
106
|
+
stream_id: z.string().optional(), session_id: SessionIdSchema.optional(), turn_id: z.string().optional(), user_message_id: z.union([z.string(), z.number()]).nullable().optional(), pending_started_at: z.number().nullable().optional(),
|
|
81
107
|
title: z.string().optional(), effective_model: z.string().optional(), effective_model_provider: z.string().optional(), queued: z.boolean().optional(), ok: z.boolean().optional(), status: z.string().optional(), reason: z.string().optional(), session: SessionSchema.optional(),
|
|
82
108
|
});
|
|
83
109
|
export const StreamStatusSchema = z.looseObject({ active: z.boolean(), stream_id: z.string(), replay_available: z.boolean().optional(), journal: Json.optional() });
|
|
@@ -127,7 +153,7 @@ export const SettingsSchema = z.looseObject({
|
|
|
127
153
|
fade_text_effect: z.boolean().optional(), hidden_tabs: z.array(z.string()).optional(), composer_control_order: z.array(z.string()).optional(), show_cli_sessions: z.boolean().optional(), show_claude_code_sessions: z.boolean().optional(),
|
|
128
154
|
show_cron_sessions: z.boolean().optional(), show_webhook_sessions: z.boolean().optional(), show_kanban_sessions: z.boolean().optional(), check_for_updates: z.boolean().optional(), ignore_agent_updates: z.boolean().optional(),
|
|
129
155
|
auth_enabled: z.boolean().optional(), password_auth_enabled: z.boolean().optional(), password_env_var: z.boolean().optional(), passkeys_enabled: z.boolean().optional(), passwordless_enabled: z.boolean().optional(),
|
|
130
|
-
auth_disabled_acknowledged: z.boolean().optional(), webui_version: z.string().optional(), agent_version: z.string().optional(), update_channel: z.string().optional(), update_channel_version: NullableString.optional(),
|
|
156
|
+
auth_disabled_acknowledged: z.boolean().optional(), webui_version: z.string().optional(), agent_version: z.string().optional(), update_channel: z.string().optional(), agent_update_channel: z.enum(['stable', 'experimental']).optional(), update_channel_version: NullableString.optional(),
|
|
131
157
|
max_tokens: NullableNumber.optional(), max_tokens_effective: NullableNumber.optional(), max_tokens_fallback: NullableNumber.optional(), tts_engine: z.string().optional(), tts_voice: z.string().optional(),
|
|
132
158
|
dictation_append: z.boolean().optional(), persisted_speech_keys: z.array(z.string()).optional(),
|
|
133
159
|
});
|
|
@@ -195,10 +221,10 @@ export const SystemHealthSchema = z.looseObject({
|
|
|
195
221
|
available: z.boolean().optional(), status: z.string().optional(), checked_at: z.string().optional(), cpu: Json.nullable().optional(), memory: Json.nullable().optional(), disk: z.looseObject({ percent: z.number().optional(), total_bytes: z.number().optional(), used_bytes: z.number().optional() }).nullable().optional(),
|
|
196
222
|
errors: z.array(z.looseObject({ code: z.string().optional(), metric: z.string().optional() })).optional(), webui_runtime: Json.optional(),
|
|
197
223
|
});
|
|
198
|
-
export const UpdateTargetSchema = z.looseObject({ name: z.string().optional(), behind: z.number().nullable().optional(), current_sha: z.string().nullable().optional(), latest_sha: z.string().nullable().optional(), compare_url: z.string().optional(), repo_url: z.string().optional(), error: z.string().optional(), ok: z.boolean().optional(), manual_update: z.boolean().optional(), no_git: z.boolean().optional(), dirty: z.boolean().optional(), metadata_repair: z.boolean().optional(), release_url: z.string().optional(), ignored: z.boolean().optional(), current_version: z.string().optional() });
|
|
199
|
-
export const UpdatesCheckSchema = z.looseObject({ disabled: z.boolean().optional(), cached: z.boolean().optional(), channel: z.string().optional(), checked_at: z.number().optional(), include_agent: z.boolean().optional(), webui: UpdateTargetSchema.nullable().optional(), agent: UpdateTargetSchema.nullable().optional() });
|
|
224
|
+
export const UpdateTargetSchema = z.looseObject({ name: z.string().optional(), channel: z.enum(['stable', 'experimental']).optional(), unsupported: z.boolean().optional(), supported_revision: z.string().optional(), supported_version: z.string().optional(), candidate_revision: z.string().optional(), behind: z.number().nullable().optional(), current_sha: z.string().nullable().optional(), latest_sha: z.string().nullable().optional(), compare_url: z.string().optional(), repo_url: z.string().optional(), error: z.string().optional(), ok: z.boolean().optional(), manual_update: z.boolean().optional(), no_git: z.boolean().optional(), install_kind: z.literal('npm').optional(), npm: z.string().optional(), dirty: z.boolean().optional(), metadata_repair: z.boolean().optional(), release_url: z.string().optional(), ignored: z.boolean().optional(), current_version: z.string().optional() });
|
|
225
|
+
export const UpdatesCheckSchema = z.looseObject({ disabled: z.boolean().optional(), cached: z.boolean().optional(), channel: z.string().optional(), agent_channel: z.enum(['stable', 'experimental']).optional(), checked_at: z.number().optional(), include_agent: z.boolean().optional(), webui: UpdateTargetSchema.nullable().optional(), agent: UpdateTargetSchema.nullable().optional() });
|
|
200
226
|
export const UpdatesSummarySchema = z.looseObject({ summary: z.string().optional(), text: z.string().optional(), ok: z.boolean().optional(), error: z.string().optional(), diff_links: z.array(Json).optional() });
|
|
201
|
-
export const UpdateApplySchema = z.looseObject({ ok: z.boolean().optional(), status: z.string().optional(), error: z.string().optional(), message: z.string().optional(), lock: Json.optional() });
|
|
227
|
+
export const UpdateApplySchema = z.looseObject({ ok: z.boolean().optional(), status: z.string().optional(), error: z.string().optional(), message: z.string().optional(), lock: Json.optional(), confirmation_required: z.boolean().optional(), candidate_revision: z.string().optional(), supported_revision: z.string().optional(), supported_version: z.string().optional(), agent_channel: z.enum(['stable', 'experimental']).optional() });
|
|
202
228
|
export const PluginSchema = z.looseObject({ key: z.string(), name: z.string().optional(), kind: z.string().optional(), enabled: z.boolean().optional(), description: z.string().optional(), version: z.string().optional(), activation: z.string().optional(), is_active_provider: z.boolean().optional(), hooks: z.array(Json).optional() });
|
|
203
229
|
export const PluginsSchema = z.looseObject({ plugins: z.array(PluginSchema), empty: z.boolean().optional(), read_only: z.boolean().optional(), supported_hooks: z.array(z.string()).optional(), unavailable: z.boolean().optional() });
|
|
204
230
|
export const McpServerSchema = z.looseObject({ name: z.string(), id: z.string().optional(), transport: z.string().optional(), enabled: z.boolean().optional(), active: z.boolean().optional(), status: z.string().optional(), tools: z.number().optional(), tool_count: z.number().int().nullable().optional(), health: z.string().optional(), health_detail: z.string().optional(), health_checked_at: Json.optional(), health_pending: z.boolean().optional() });
|