dsh-watcher 0.4.3 → 0.5.1
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/README.en.md +18 -2
- package/README.md +18 -2
- package/lib/client.js +523 -289
- package/lib/client.js.map +1 -1
- package/lib/dsh-watcher.js +18 -13
- package/package.json +25 -24
- package/lib/types/client/Insights.d.ts +0 -18
- package/lib/types/client/TimingPanel.d.ts +0 -7
- package/lib/types/client/Watcher.d.ts +0 -9
- package/lib/types/client/disclosure-depth.d.ts +0 -22
- package/lib/types/client/index.d.ts +0 -9
- package/lib/types/client/model-trace-definition.d.ts +0 -11
- package/lib/types/client/step-timeline.d.ts +0 -15
- package/lib/types/dsh-watcher.d.ts +0 -6
- package/lib/types/hub/aggregation.d.ts +0 -40
- package/lib/types/hub/follow.d.ts +0 -27
- package/lib/types/hub/history.d.ts +0 -30
- package/lib/types/hub/overview.d.ts +0 -10
- package/lib/types/hub/watcher.d.ts +0 -4
- package/lib/types/insights/projection.d.ts +0 -367
- package/lib/types/observation/fold.d.ts +0 -207
- package/lib/types/observation/model-trace.d.ts +0 -96
- package/lib/types/observation/performance.d.ts +0 -67
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
-
export declare const viewSchema: z.ZodObject<{
|
|
4
|
-
version: z.ZodLiteral<1>;
|
|
5
|
-
sessionId: z.ZodString;
|
|
6
|
-
seq: z.ZodNumber;
|
|
7
|
-
updatedAt: z.ZodNumber;
|
|
8
|
-
totals: z.ZodObject<{
|
|
9
|
-
calls: z.ZodNumber;
|
|
10
|
-
reported: z.ZodNumber;
|
|
11
|
-
exactTotals: z.ZodNumber;
|
|
12
|
-
tokens: z.ZodNumber;
|
|
13
|
-
input: z.ZodNumber;
|
|
14
|
-
output: z.ZodNumber;
|
|
15
|
-
cacheRead: z.ZodNumber;
|
|
16
|
-
cacheWrite: z.ZodNumber;
|
|
17
|
-
reasoning: z.ZodNumber;
|
|
18
|
-
reasoningReports: z.ZodNumber;
|
|
19
|
-
modelMs: z.ZodNumber;
|
|
20
|
-
timedCalls: z.ZodNumber;
|
|
21
|
-
firstMs: z.ZodNumber;
|
|
22
|
-
firstSamples: z.ZodNumber;
|
|
23
|
-
reasoningMs: z.ZodNumber;
|
|
24
|
-
tools: z.ZodNumber;
|
|
25
|
-
toolErrors: z.ZodNumber;
|
|
26
|
-
toolMs: z.ZodNumber;
|
|
27
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
retries: z.ZodNumber;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
models: z.ZodArray<z.ZodObject<{
|
|
31
|
-
calls: z.ZodNumber;
|
|
32
|
-
reported: z.ZodNumber;
|
|
33
|
-
exactTotals: z.ZodNumber;
|
|
34
|
-
tokens: z.ZodNumber;
|
|
35
|
-
input: z.ZodNumber;
|
|
36
|
-
output: z.ZodNumber;
|
|
37
|
-
cacheRead: z.ZodNumber;
|
|
38
|
-
cacheWrite: z.ZodNumber;
|
|
39
|
-
reasoning: z.ZodNumber;
|
|
40
|
-
reasoningReports: z.ZodNumber;
|
|
41
|
-
modelMs: z.ZodNumber;
|
|
42
|
-
timedCalls: z.ZodNumber;
|
|
43
|
-
firstMs: z.ZodNumber;
|
|
44
|
-
firstSamples: z.ZodNumber;
|
|
45
|
-
reasoningMs: z.ZodNumber;
|
|
46
|
-
tools: z.ZodNumber;
|
|
47
|
-
toolErrors: z.ZodNumber;
|
|
48
|
-
toolMs: z.ZodNumber;
|
|
49
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
50
|
-
retries: z.ZodNumber;
|
|
51
|
-
provider: z.ZodString;
|
|
52
|
-
model: z.ZodString;
|
|
53
|
-
effort: z.ZodOptional<z.ZodString>;
|
|
54
|
-
}, z.core.$strip>>;
|
|
55
|
-
turn: z.ZodNullable<z.ZodObject<{
|
|
56
|
-
number: z.ZodNumber;
|
|
57
|
-
startedAt: z.ZodNumber;
|
|
58
|
-
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
59
|
-
steps: z.ZodNumber;
|
|
60
|
-
stats: z.ZodObject<{
|
|
61
|
-
calls: z.ZodNumber;
|
|
62
|
-
reported: z.ZodNumber;
|
|
63
|
-
exactTotals: z.ZodNumber;
|
|
64
|
-
tokens: z.ZodNumber;
|
|
65
|
-
input: z.ZodNumber;
|
|
66
|
-
output: z.ZodNumber;
|
|
67
|
-
cacheRead: z.ZodNumber;
|
|
68
|
-
cacheWrite: z.ZodNumber;
|
|
69
|
-
reasoning: z.ZodNumber;
|
|
70
|
-
reasoningReports: z.ZodNumber;
|
|
71
|
-
modelMs: z.ZodNumber;
|
|
72
|
-
timedCalls: z.ZodNumber;
|
|
73
|
-
firstMs: z.ZodNumber;
|
|
74
|
-
firstSamples: z.ZodNumber;
|
|
75
|
-
reasoningMs: z.ZodNumber;
|
|
76
|
-
tools: z.ZodNumber;
|
|
77
|
-
toolErrors: z.ZodNumber;
|
|
78
|
-
toolMs: z.ZodNumber;
|
|
79
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
80
|
-
retries: z.ZodNumber;
|
|
81
|
-
}, z.core.$strip>;
|
|
82
|
-
route: z.ZodOptional<z.ZodObject<{
|
|
83
|
-
provider: z.ZodString;
|
|
84
|
-
model: z.ZodString;
|
|
85
|
-
effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
|
-
}, z.core.$strip>>;
|
|
87
|
-
}, z.core.$strip>>;
|
|
88
|
-
pending: z.ZodNullable<z.ZodObject<{
|
|
89
|
-
turn: z.ZodNumber;
|
|
90
|
-
step: z.ZodNumber;
|
|
91
|
-
start: z.ZodNullable<z.ZodNumber>;
|
|
92
|
-
reasoningFirst: z.ZodNullable<z.ZodNumber>;
|
|
93
|
-
reasoningLast: z.ZodNullable<z.ZodNumber>;
|
|
94
|
-
lastContentAt: z.ZodNullable<z.ZodNumber>;
|
|
95
|
-
}, z.core.$strip>>;
|
|
96
|
-
findings: z.ZodArray<z.ZodObject<{
|
|
97
|
-
id: z.ZodString;
|
|
98
|
-
kind: z.ZodString;
|
|
99
|
-
turn: z.ZodNumber;
|
|
100
|
-
seqs: z.ZodArray<z.ZodNumber>;
|
|
101
|
-
steps: z.ZodArray<z.ZodNumber>;
|
|
102
|
-
title: z.ZodString;
|
|
103
|
-
detail: z.ZodString;
|
|
104
|
-
}, z.core.$strip>>;
|
|
105
|
-
findingCount: z.ZodNumber;
|
|
106
|
-
}, z.core.$strip>;
|
|
107
|
-
declare const stateSchema: z.ZodObject<{
|
|
108
|
-
version: z.ZodLiteral<1>;
|
|
109
|
-
sessionId: z.ZodString;
|
|
110
|
-
skip: z.ZodNumber;
|
|
111
|
-
seq: z.ZodNumber;
|
|
112
|
-
updatedAt: z.ZodNumber;
|
|
113
|
-
route: z.ZodObject<{
|
|
114
|
-
provider: z.ZodString;
|
|
115
|
-
model: z.ZodString;
|
|
116
|
-
effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
-
}, z.core.$strip>;
|
|
118
|
-
totals: z.ZodObject<{
|
|
119
|
-
calls: z.ZodNumber;
|
|
120
|
-
reported: z.ZodNumber;
|
|
121
|
-
exactTotals: z.ZodNumber;
|
|
122
|
-
tokens: z.ZodNumber;
|
|
123
|
-
input: z.ZodNumber;
|
|
124
|
-
output: z.ZodNumber;
|
|
125
|
-
cacheRead: z.ZodNumber;
|
|
126
|
-
cacheWrite: z.ZodNumber;
|
|
127
|
-
reasoning: z.ZodNumber;
|
|
128
|
-
reasoningReports: z.ZodNumber;
|
|
129
|
-
modelMs: z.ZodNumber;
|
|
130
|
-
timedCalls: z.ZodNumber;
|
|
131
|
-
firstMs: z.ZodNumber;
|
|
132
|
-
firstSamples: z.ZodNumber;
|
|
133
|
-
reasoningMs: z.ZodNumber;
|
|
134
|
-
tools: z.ZodNumber;
|
|
135
|
-
toolErrors: z.ZodNumber;
|
|
136
|
-
toolMs: z.ZodNumber;
|
|
137
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
138
|
-
retries: z.ZodNumber;
|
|
139
|
-
}, z.core.$strip>;
|
|
140
|
-
models: z.ZodArray<z.ZodObject<{
|
|
141
|
-
calls: z.ZodNumber;
|
|
142
|
-
reported: z.ZodNumber;
|
|
143
|
-
exactTotals: z.ZodNumber;
|
|
144
|
-
tokens: z.ZodNumber;
|
|
145
|
-
input: z.ZodNumber;
|
|
146
|
-
output: z.ZodNumber;
|
|
147
|
-
cacheRead: z.ZodNumber;
|
|
148
|
-
cacheWrite: z.ZodNumber;
|
|
149
|
-
reasoning: z.ZodNumber;
|
|
150
|
-
reasoningReports: z.ZodNumber;
|
|
151
|
-
modelMs: z.ZodNumber;
|
|
152
|
-
timedCalls: z.ZodNumber;
|
|
153
|
-
firstMs: z.ZodNumber;
|
|
154
|
-
firstSamples: z.ZodNumber;
|
|
155
|
-
reasoningMs: z.ZodNumber;
|
|
156
|
-
tools: z.ZodNumber;
|
|
157
|
-
toolErrors: z.ZodNumber;
|
|
158
|
-
toolMs: z.ZodNumber;
|
|
159
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
160
|
-
retries: z.ZodNumber;
|
|
161
|
-
provider: z.ZodString;
|
|
162
|
-
model: z.ZodString;
|
|
163
|
-
}, z.core.$strip>>;
|
|
164
|
-
turn: z.ZodNullable<z.ZodObject<{
|
|
165
|
-
number: z.ZodNumber;
|
|
166
|
-
startedAt: z.ZodNumber;
|
|
167
|
-
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
168
|
-
steps: z.ZodNumber;
|
|
169
|
-
stats: z.ZodObject<{
|
|
170
|
-
calls: z.ZodNumber;
|
|
171
|
-
reported: z.ZodNumber;
|
|
172
|
-
exactTotals: z.ZodNumber;
|
|
173
|
-
tokens: z.ZodNumber;
|
|
174
|
-
input: z.ZodNumber;
|
|
175
|
-
output: z.ZodNumber;
|
|
176
|
-
cacheRead: z.ZodNumber;
|
|
177
|
-
cacheWrite: z.ZodNumber;
|
|
178
|
-
reasoning: z.ZodNumber;
|
|
179
|
-
reasoningReports: z.ZodNumber;
|
|
180
|
-
modelMs: z.ZodNumber;
|
|
181
|
-
timedCalls: z.ZodNumber;
|
|
182
|
-
firstMs: z.ZodNumber;
|
|
183
|
-
firstSamples: z.ZodNumber;
|
|
184
|
-
reasoningMs: z.ZodNumber;
|
|
185
|
-
tools: z.ZodNumber;
|
|
186
|
-
toolErrors: z.ZodNumber;
|
|
187
|
-
toolMs: z.ZodNumber;
|
|
188
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
189
|
-
retries: z.ZodNumber;
|
|
190
|
-
}, z.core.$strip>;
|
|
191
|
-
route: z.ZodOptional<z.ZodObject<{
|
|
192
|
-
provider: z.ZodString;
|
|
193
|
-
model: z.ZodString;
|
|
194
|
-
effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
195
|
-
}, z.core.$strip>>;
|
|
196
|
-
}, z.core.$strip>>;
|
|
197
|
-
open: z.ZodNullable<z.ZodObject<{
|
|
198
|
-
turn: z.ZodNumber;
|
|
199
|
-
step: z.ZodNumber;
|
|
200
|
-
start: z.ZodNullable<z.ZodNumber>;
|
|
201
|
-
first: z.ZodNullable<z.ZodNumber>;
|
|
202
|
-
reasoningFirst: z.ZodNullable<z.ZodNumber>;
|
|
203
|
-
reasoningLast: z.ZodNullable<z.ZodNumber>;
|
|
204
|
-
lastContentAt: z.ZodNullable<z.ZodNumber>;
|
|
205
|
-
usage: z.ZodNullable<z.ZodObject<{
|
|
206
|
-
input: z.ZodNumber;
|
|
207
|
-
output: z.ZodNumber;
|
|
208
|
-
cacheRead: z.ZodNumber;
|
|
209
|
-
cacheWrite: z.ZodNumber;
|
|
210
|
-
reasoning: z.ZodNullable<z.ZodNumber>;
|
|
211
|
-
tokens: z.ZodNumber;
|
|
212
|
-
exact: z.ZodBoolean;
|
|
213
|
-
}, z.core.$strip>>;
|
|
214
|
-
route: z.ZodObject<{
|
|
215
|
-
provider: z.ZodString;
|
|
216
|
-
model: z.ZodString;
|
|
217
|
-
effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
|
-
}, z.core.$strip>;
|
|
219
|
-
}, z.core.$strip>>;
|
|
220
|
-
tools: z.ZodArray<z.ZodObject<{
|
|
221
|
-
id: z.ZodString;
|
|
222
|
-
name: z.ZodString;
|
|
223
|
-
start: z.ZodNumber;
|
|
224
|
-
seq: z.ZodNumber;
|
|
225
|
-
step: z.ZodNumber;
|
|
226
|
-
route: z.ZodObject<{
|
|
227
|
-
provider: z.ZodString;
|
|
228
|
-
model: z.ZodString;
|
|
229
|
-
effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
|
-
}, z.core.$strip>;
|
|
231
|
-
signature: z.ZodNullable<z.ZodString>;
|
|
232
|
-
}, z.core.$strip>>;
|
|
233
|
-
previousFailure: z.ZodNullable<z.ZodObject<{
|
|
234
|
-
signature: z.ZodString;
|
|
235
|
-
resultHash: z.ZodString;
|
|
236
|
-
turn: z.ZodNumber;
|
|
237
|
-
seqs: z.ZodArray<z.ZodNumber>;
|
|
238
|
-
steps: z.ZodArray<z.ZodNumber>;
|
|
239
|
-
}, z.core.$strip>>;
|
|
240
|
-
findings: z.ZodArray<z.ZodObject<{
|
|
241
|
-
id: z.ZodString;
|
|
242
|
-
kind: z.ZodString;
|
|
243
|
-
turn: z.ZodNumber;
|
|
244
|
-
seqs: z.ZodArray<z.ZodNumber>;
|
|
245
|
-
steps: z.ZodArray<z.ZodNumber>;
|
|
246
|
-
title: z.ZodString;
|
|
247
|
-
detail: z.ZodString;
|
|
248
|
-
}, z.core.$strip>>;
|
|
249
|
-
findingCount: z.ZodNumber;
|
|
250
|
-
wire: z.ZodObject<{
|
|
251
|
-
version: z.ZodLiteral<1>;
|
|
252
|
-
sessionId: z.ZodString;
|
|
253
|
-
seq: z.ZodNumber;
|
|
254
|
-
updatedAt: z.ZodNumber;
|
|
255
|
-
totals: z.ZodObject<{
|
|
256
|
-
calls: z.ZodNumber;
|
|
257
|
-
reported: z.ZodNumber;
|
|
258
|
-
exactTotals: z.ZodNumber;
|
|
259
|
-
tokens: z.ZodNumber;
|
|
260
|
-
input: z.ZodNumber;
|
|
261
|
-
output: z.ZodNumber;
|
|
262
|
-
cacheRead: z.ZodNumber;
|
|
263
|
-
cacheWrite: z.ZodNumber;
|
|
264
|
-
reasoning: z.ZodNumber;
|
|
265
|
-
reasoningReports: z.ZodNumber;
|
|
266
|
-
modelMs: z.ZodNumber;
|
|
267
|
-
timedCalls: z.ZodNumber;
|
|
268
|
-
firstMs: z.ZodNumber;
|
|
269
|
-
firstSamples: z.ZodNumber;
|
|
270
|
-
reasoningMs: z.ZodNumber;
|
|
271
|
-
tools: z.ZodNumber;
|
|
272
|
-
toolErrors: z.ZodNumber;
|
|
273
|
-
toolMs: z.ZodNumber;
|
|
274
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
275
|
-
retries: z.ZodNumber;
|
|
276
|
-
}, z.core.$strip>;
|
|
277
|
-
models: z.ZodArray<z.ZodObject<{
|
|
278
|
-
calls: z.ZodNumber;
|
|
279
|
-
reported: z.ZodNumber;
|
|
280
|
-
exactTotals: z.ZodNumber;
|
|
281
|
-
tokens: z.ZodNumber;
|
|
282
|
-
input: z.ZodNumber;
|
|
283
|
-
output: z.ZodNumber;
|
|
284
|
-
cacheRead: z.ZodNumber;
|
|
285
|
-
cacheWrite: z.ZodNumber;
|
|
286
|
-
reasoning: z.ZodNumber;
|
|
287
|
-
reasoningReports: z.ZodNumber;
|
|
288
|
-
modelMs: z.ZodNumber;
|
|
289
|
-
timedCalls: z.ZodNumber;
|
|
290
|
-
firstMs: z.ZodNumber;
|
|
291
|
-
firstSamples: z.ZodNumber;
|
|
292
|
-
reasoningMs: z.ZodNumber;
|
|
293
|
-
tools: z.ZodNumber;
|
|
294
|
-
toolErrors: z.ZodNumber;
|
|
295
|
-
toolMs: z.ZodNumber;
|
|
296
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
297
|
-
retries: z.ZodNumber;
|
|
298
|
-
provider: z.ZodString;
|
|
299
|
-
model: z.ZodString;
|
|
300
|
-
effort: z.ZodOptional<z.ZodString>;
|
|
301
|
-
}, z.core.$strip>>;
|
|
302
|
-
turn: z.ZodNullable<z.ZodObject<{
|
|
303
|
-
number: z.ZodNumber;
|
|
304
|
-
startedAt: z.ZodNumber;
|
|
305
|
-
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
306
|
-
steps: z.ZodNumber;
|
|
307
|
-
stats: z.ZodObject<{
|
|
308
|
-
calls: z.ZodNumber;
|
|
309
|
-
reported: z.ZodNumber;
|
|
310
|
-
exactTotals: z.ZodNumber;
|
|
311
|
-
tokens: z.ZodNumber;
|
|
312
|
-
input: z.ZodNumber;
|
|
313
|
-
output: z.ZodNumber;
|
|
314
|
-
cacheRead: z.ZodNumber;
|
|
315
|
-
cacheWrite: z.ZodNumber;
|
|
316
|
-
reasoning: z.ZodNumber;
|
|
317
|
-
reasoningReports: z.ZodNumber;
|
|
318
|
-
modelMs: z.ZodNumber;
|
|
319
|
-
timedCalls: z.ZodNumber;
|
|
320
|
-
firstMs: z.ZodNumber;
|
|
321
|
-
firstSamples: z.ZodNumber;
|
|
322
|
-
reasoningMs: z.ZodNumber;
|
|
323
|
-
tools: z.ZodNumber;
|
|
324
|
-
toolErrors: z.ZodNumber;
|
|
325
|
-
toolMs: z.ZodNumber;
|
|
326
|
-
bashMs: z.ZodOptional<z.ZodNumber>;
|
|
327
|
-
retries: z.ZodNumber;
|
|
328
|
-
}, z.core.$strip>;
|
|
329
|
-
route: z.ZodOptional<z.ZodObject<{
|
|
330
|
-
provider: z.ZodString;
|
|
331
|
-
model: z.ZodString;
|
|
332
|
-
effort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
333
|
-
}, z.core.$strip>>;
|
|
334
|
-
}, z.core.$strip>>;
|
|
335
|
-
pending: z.ZodNullable<z.ZodObject<{
|
|
336
|
-
turn: z.ZodNumber;
|
|
337
|
-
step: z.ZodNumber;
|
|
338
|
-
start: z.ZodNullable<z.ZodNumber>;
|
|
339
|
-
reasoningFirst: z.ZodNullable<z.ZodNumber>;
|
|
340
|
-
reasoningLast: z.ZodNullable<z.ZodNumber>;
|
|
341
|
-
lastContentAt: z.ZodNullable<z.ZodNumber>;
|
|
342
|
-
}, z.core.$strip>>;
|
|
343
|
-
findings: z.ZodArray<z.ZodObject<{
|
|
344
|
-
id: z.ZodString;
|
|
345
|
-
kind: z.ZodString;
|
|
346
|
-
turn: z.ZodNumber;
|
|
347
|
-
seqs: z.ZodArray<z.ZodNumber>;
|
|
348
|
-
steps: z.ZodArray<z.ZodNumber>;
|
|
349
|
-
title: z.ZodString;
|
|
350
|
-
detail: z.ZodString;
|
|
351
|
-
}, z.core.$strip>>;
|
|
352
|
-
findingCount: z.ZodNumber;
|
|
353
|
-
}, z.core.$strip>;
|
|
354
|
-
}, z.core.$strip>;
|
|
355
|
-
export type InsightsView = z.infer<typeof viewSchema>;
|
|
356
|
-
type InsightsState = z.infer<typeof stateSchema>;
|
|
357
|
-
declare module '@deepseek-ai/dsh-session-projection/types' {
|
|
358
|
-
interface SessionProjectionStateMap {
|
|
359
|
-
watcherInsights: InsightsState;
|
|
360
|
-
}
|
|
361
|
-
interface SessionProjectionMap {
|
|
362
|
-
watcherInsights: InsightsView;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
export declare function installProjection(ctx: Context): void;
|
|
366
|
-
export {};
|
|
367
|
-
//# sourceMappingURL=projection.d.ts.map
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import type { ConversationNode, ConversationViewSnapshotStore, RunningToolCall } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
-
import type { ChatSnapshot } from '@deepseek-ai/dsh-client-ui-chat/client';
|
|
3
|
-
import type { SessionPendingInteractionBase } from '@deepseek-ai/dsh-client-ui-session/client';
|
|
4
|
-
import { type ModelStepTrace } from './model-trace.ts';
|
|
5
|
-
/** Watcher-owned projection assembled from the public RC1 Session and Conversation stores. */
|
|
6
|
-
export interface WatcherSnapshot {
|
|
7
|
-
readonly views: ConversationViewSnapshotStore;
|
|
8
|
-
readonly chat: ChatSnapshot;
|
|
9
|
-
readonly nodes: readonly ConversationNode[];
|
|
10
|
-
readonly turnTimings: ReadonlyMap<number, {
|
|
11
|
-
readonly startTime: number;
|
|
12
|
-
readonly endTime?: number;
|
|
13
|
-
}>;
|
|
14
|
-
readonly runningCalls: readonly RunningToolCall[];
|
|
15
|
-
readonly pending: readonly SessionPendingInteractionBase[];
|
|
16
|
-
readonly blank: boolean;
|
|
17
|
-
readonly running: boolean;
|
|
18
|
-
readonly hasMore: boolean;
|
|
19
|
-
}
|
|
20
|
-
/** One truthful lifecycle state. Result presence alone never means success. */
|
|
21
|
-
export type WorkStatus = 'running' | 'waiting' | 'success' | 'failure' | 'returned' | 'interrupted' | 'unknown';
|
|
22
|
-
/** User-facing phases used by the compact work rail. */
|
|
23
|
-
export type WorkPhase = 'request' | 'steering' | 'plan' | 'investigate' | 'build' | 'verify' | 'activate' | 'desktop' | 'answer' | 'model' | 'wait' | 'failure' | 'other';
|
|
24
|
-
export type WorkSource = 'tool' | 'user' | 'steering' | 'assistant' | 'artifact' | 'interaction' | 'turn' | 'model';
|
|
25
|
-
export type WorkPresentation = {
|
|
26
|
-
kind: 'terminal';
|
|
27
|
-
command: string;
|
|
28
|
-
cwd: string | null;
|
|
29
|
-
output: string;
|
|
30
|
-
exitCode: number | null;
|
|
31
|
-
signal: string | null;
|
|
32
|
-
running: boolean;
|
|
33
|
-
} | {
|
|
34
|
-
kind: 'read';
|
|
35
|
-
label: string;
|
|
36
|
-
lang: string | null;
|
|
37
|
-
lines: readonly {
|
|
38
|
-
number: number;
|
|
39
|
-
text: string;
|
|
40
|
-
}[];
|
|
41
|
-
totalLines: number;
|
|
42
|
-
} | {
|
|
43
|
-
kind: 'diff';
|
|
44
|
-
diffs: {
|
|
45
|
-
path: string;
|
|
46
|
-
oldText: string | null;
|
|
47
|
-
newText: string;
|
|
48
|
-
}[];
|
|
49
|
-
} | {
|
|
50
|
-
kind: 'json';
|
|
51
|
-
data: object | unknown[];
|
|
52
|
-
} | {
|
|
53
|
-
kind: 'text';
|
|
54
|
-
text: string;
|
|
55
|
-
} | {
|
|
56
|
-
kind: 'image';
|
|
57
|
-
attachment: unknown;
|
|
58
|
-
} | {
|
|
59
|
-
kind: 'empty';
|
|
60
|
-
};
|
|
61
|
-
/** Immutable evidence for one recorded occurrence. */
|
|
62
|
-
export interface WorkItem {
|
|
63
|
-
id: string;
|
|
64
|
-
seq: number;
|
|
65
|
-
resultSeq: number | null;
|
|
66
|
-
time: number;
|
|
67
|
-
resultTime: number | null;
|
|
68
|
-
turn: number;
|
|
69
|
-
step: number;
|
|
70
|
-
source: WorkSource;
|
|
71
|
-
phase: WorkPhase;
|
|
72
|
-
status: WorkStatus;
|
|
73
|
-
title: string;
|
|
74
|
-
subtitle: string;
|
|
75
|
-
toolName: string | null;
|
|
76
|
-
callId: string | null;
|
|
77
|
-
args: Record<string, unknown>;
|
|
78
|
-
argsRaw: string | null;
|
|
79
|
-
rawText: string;
|
|
80
|
-
rawValue: unknown;
|
|
81
|
-
presentation: WorkPresentation;
|
|
82
|
-
durationMs: number | null;
|
|
83
|
-
exitCode: number | null;
|
|
84
|
-
signal: string | null;
|
|
85
|
-
signature: string | null;
|
|
86
|
-
intentKey: string | null;
|
|
87
|
-
target: string | null;
|
|
88
|
-
retryOf: string | null;
|
|
89
|
-
retryIndex: number;
|
|
90
|
-
iterationIndex: number;
|
|
91
|
-
recoveredBy: string | null;
|
|
92
|
-
}
|
|
93
|
-
export interface WorkStep {
|
|
94
|
-
id: string;
|
|
95
|
-
turn: number;
|
|
96
|
-
step: number;
|
|
97
|
-
phase: WorkPhase;
|
|
98
|
-
status: WorkStatus;
|
|
99
|
-
title: string;
|
|
100
|
-
subtitle: string;
|
|
101
|
-
items: readonly WorkItem[];
|
|
102
|
-
parallel: boolean;
|
|
103
|
-
executionCount: number;
|
|
104
|
-
retryCount: number;
|
|
105
|
-
iterationCount: number;
|
|
106
|
-
unconfirmedFailureCount: number;
|
|
107
|
-
firstSeq: number;
|
|
108
|
-
lastSeq: number;
|
|
109
|
-
startTime: number | null;
|
|
110
|
-
endTime: number | null;
|
|
111
|
-
model: ModelStepTrace | null;
|
|
112
|
-
}
|
|
113
|
-
/** One consecutive phase inside one Turn. Every child Step remains addressable. */
|
|
114
|
-
export interface WorkGroup {
|
|
115
|
-
id: string;
|
|
116
|
-
turn: number;
|
|
117
|
-
phase: WorkPhase;
|
|
118
|
-
status: WorkStatus;
|
|
119
|
-
title: string;
|
|
120
|
-
subtitle: string;
|
|
121
|
-
steps: readonly WorkStep[];
|
|
122
|
-
items: readonly WorkItem[];
|
|
123
|
-
executionCount: number;
|
|
124
|
-
parallelStepCount: number;
|
|
125
|
-
retryCount: number;
|
|
126
|
-
iterationCount: number;
|
|
127
|
-
unconfirmedFailureCount: number;
|
|
128
|
-
firstSeq: number;
|
|
129
|
-
lastSeq: number;
|
|
130
|
-
startTime: number | null;
|
|
131
|
-
endTime: number | null;
|
|
132
|
-
}
|
|
133
|
-
export interface WorkTurn {
|
|
134
|
-
turn: number;
|
|
135
|
-
status: WorkStatus;
|
|
136
|
-
groups: readonly WorkGroup[];
|
|
137
|
-
startTime: number | null;
|
|
138
|
-
endTime: number | null;
|
|
139
|
-
}
|
|
140
|
-
export interface WorkPicture {
|
|
141
|
-
nodes: readonly WorkGroup[];
|
|
142
|
-
turns: readonly WorkTurn[];
|
|
143
|
-
now: {
|
|
144
|
-
phase: WorkPhase;
|
|
145
|
-
label: string;
|
|
146
|
-
status: WorkStatus;
|
|
147
|
-
};
|
|
148
|
-
actionCount: number;
|
|
149
|
-
stepCount: number;
|
|
150
|
-
turnCount: number;
|
|
151
|
-
parallelStepCount: number;
|
|
152
|
-
retryCount: number;
|
|
153
|
-
iterationCount: number;
|
|
154
|
-
pendingCount: number;
|
|
155
|
-
unconfirmedFailureCount: number;
|
|
156
|
-
running: boolean;
|
|
157
|
-
partialHistory: boolean;
|
|
158
|
-
}
|
|
159
|
-
interface ToolPair {
|
|
160
|
-
callId: string;
|
|
161
|
-
seq: number;
|
|
162
|
-
resultSeq: number | null;
|
|
163
|
-
time: number;
|
|
164
|
-
resultTime: number | null;
|
|
165
|
-
turn: number;
|
|
166
|
-
step: number;
|
|
167
|
-
name: string;
|
|
168
|
-
args: Record<string, unknown>;
|
|
169
|
-
argsRaw: string;
|
|
170
|
-
result: unknown;
|
|
171
|
-
meta: unknown;
|
|
172
|
-
callView: unknown;
|
|
173
|
-
resultView: unknown;
|
|
174
|
-
orphan: boolean;
|
|
175
|
-
}
|
|
176
|
-
interface EventLike {
|
|
177
|
-
type: string;
|
|
178
|
-
seq?: number;
|
|
179
|
-
time?: number;
|
|
180
|
-
data?: unknown;
|
|
181
|
-
}
|
|
182
|
-
export declare const EMPTY_PICTURE: WorkPicture;
|
|
183
|
-
/** Stable exact signature used only for evidence-backed retry detection. */
|
|
184
|
-
export declare function normalizedSignature(toolName: string, args: Record<string, unknown>): string;
|
|
185
|
-
/** Public RC1 Session/Conversation projection to occurrence-preserving tool pairs. */
|
|
186
|
-
export declare function pairsFromSnapshot(snapshot: WatcherSnapshot): ToolPair[];
|
|
187
|
-
/** Pair every log call/result and preserve an orphan result instead of dropping it. */
|
|
188
|
-
export declare function pairTools(events: readonly EventLike[]): ToolPair[];
|
|
189
|
-
export declare function phaseTitle(phase: WorkPhase): string;
|
|
190
|
-
/** Fold the official RC8 snapshot without flattening Turn/Step identity. */
|
|
191
|
-
export declare function foldSnapshot(snapshot: WatcherSnapshot, options?: {
|
|
192
|
-
running?: boolean;
|
|
193
|
-
}): WorkPicture;
|
|
194
|
-
/**
|
|
195
|
-
* Retain every occurrence already observed in this mounted page while the
|
|
196
|
-
* official RC8 window advances. Latest evidence wins by stable occurrence id,
|
|
197
|
-
* so running → result updates one row instead of duplicating or removing it.
|
|
198
|
-
*/
|
|
199
|
-
export declare function mergeObservedPictures(previous: WorkPicture, current: WorkPicture): WorkPicture;
|
|
200
|
-
/** Fold a full session JSONL replay, including approvals, steering, images, and orphan results. */
|
|
201
|
-
export declare function foldEvents(events: readonly EventLike[], options?: {
|
|
202
|
-
running?: boolean;
|
|
203
|
-
}): WorkPicture;
|
|
204
|
-
/** Parse valid JSONL lines and skip only a torn final line. */
|
|
205
|
-
export declare function parseJsonl(text: string): EventLike[];
|
|
206
|
-
export {};
|
|
207
|
-
//# sourceMappingURL=fold.d.ts.map
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/** One timestamped provider-exposed reasoning fragment. */
|
|
2
|
-
export interface ReasoningFragment {
|
|
3
|
-
readonly seq: number;
|
|
4
|
-
readonly time: number;
|
|
5
|
-
readonly text: string;
|
|
6
|
-
}
|
|
7
|
-
interface ModelAttemptEvidence {
|
|
8
|
-
readonly attempt: number;
|
|
9
|
-
/** Only the first attempt has an authoritative request-entry boundary. */
|
|
10
|
-
readonly startedAt: number | null;
|
|
11
|
-
readonly firstTokenTime: number | null;
|
|
12
|
-
readonly firstReasoningTime: number | null;
|
|
13
|
-
readonly lastReasoningTime: number | null;
|
|
14
|
-
readonly firstOutputTime: number | null;
|
|
15
|
-
readonly reasoningText: string;
|
|
16
|
-
readonly fragments: readonly ReasoningFragment[];
|
|
17
|
-
}
|
|
18
|
-
export type ModelAttempt = ModelAttemptEvidence & ({
|
|
19
|
-
readonly kind: 'running';
|
|
20
|
-
} | {
|
|
21
|
-
readonly kind: 'complete';
|
|
22
|
-
readonly endedAt: number;
|
|
23
|
-
} | {
|
|
24
|
-
readonly kind: 'retried';
|
|
25
|
-
readonly endedAt: number;
|
|
26
|
-
readonly retry: number;
|
|
27
|
-
readonly retryDelayMs: number;
|
|
28
|
-
} | {
|
|
29
|
-
readonly kind: 'interrupted';
|
|
30
|
-
readonly endedAt: number;
|
|
31
|
-
});
|
|
32
|
-
type ModelAttempts = readonly [ModelAttempt, ...ModelAttempt[]];
|
|
33
|
-
/** Provider/model evidence owned by one authoritative DSH Step. */
|
|
34
|
-
export interface ModelStepTrace {
|
|
35
|
-
readonly turn: number;
|
|
36
|
-
readonly step: number;
|
|
37
|
-
/** Stable identity anchor: the first model event observed for this Step. */
|
|
38
|
-
readonly startSeq: number;
|
|
39
|
-
/** Mutable activity cursor: the newest model event folded into this trace. */
|
|
40
|
-
readonly lastSeq: number;
|
|
41
|
-
readonly startTime: number | null;
|
|
42
|
-
readonly attempts: ModelAttempts;
|
|
43
|
-
readonly reasoningTokens: number | null;
|
|
44
|
-
}
|
|
45
|
-
export type ModelStageMetrics = {
|
|
46
|
-
readonly kind: 'measured' | 'partial';
|
|
47
|
-
readonly live: boolean;
|
|
48
|
-
readonly totalMs: number | null;
|
|
49
|
-
readonly firstResponseMs: number | null;
|
|
50
|
-
readonly visibleReasoningMs: number | null;
|
|
51
|
-
readonly outputMs: number | null;
|
|
52
|
-
readonly unattributedMs: number | null;
|
|
53
|
-
};
|
|
54
|
-
type ModelTraceEventBase = {
|
|
55
|
-
readonly turn: number;
|
|
56
|
-
readonly step: number;
|
|
57
|
-
readonly seq: number;
|
|
58
|
-
readonly time: number;
|
|
59
|
-
readonly lastSeq?: number;
|
|
60
|
-
};
|
|
61
|
-
export type ModelTraceEvent = ModelTraceEventBase & ({
|
|
62
|
-
readonly kind: 'step-start';
|
|
63
|
-
} | {
|
|
64
|
-
readonly kind: 'reasoning-delta';
|
|
65
|
-
readonly text: string;
|
|
66
|
-
readonly fragments?: readonly ReasoningFragment[];
|
|
67
|
-
} | {
|
|
68
|
-
readonly kind: 'output-delta';
|
|
69
|
-
} | {
|
|
70
|
-
readonly kind: 'usage';
|
|
71
|
-
readonly reasoningTokens: number | null;
|
|
72
|
-
} | {
|
|
73
|
-
readonly kind: 'message';
|
|
74
|
-
readonly reasoningText: string | null;
|
|
75
|
-
readonly reasoningTokens: number | null;
|
|
76
|
-
} | {
|
|
77
|
-
readonly kind: 'retry';
|
|
78
|
-
readonly retry: number;
|
|
79
|
-
readonly delayMs: number;
|
|
80
|
-
} | {
|
|
81
|
-
readonly kind: 'step-end';
|
|
82
|
-
});
|
|
83
|
-
/** Expand one Session/Conversation value into the model-stage events it carries. */
|
|
84
|
-
export declare function modelTraceEventsOf(value: unknown): ModelTraceEvent[];
|
|
85
|
-
/** Parse only the first model-stage event carried by one value. */
|
|
86
|
-
export declare function modelTraceEventOf(value: unknown): ModelTraceEvent | null;
|
|
87
|
-
export declare function startModelStepTrace(event: ModelTraceEventBase): ModelStepTrace;
|
|
88
|
-
/** Fold one normalized event without discarding reasoning from a retried attempt. */
|
|
89
|
-
export declare function updateModelStepTrace(trace: ModelStepTrace, event: ModelTraceEvent): ModelStepTrace;
|
|
90
|
-
/** Fold raw Session-like values for golden replay and boundary tests. */
|
|
91
|
-
export declare function foldModelTraceEvents(values: readonly unknown[]): ReadonlyMap<string, ModelStepTrace>;
|
|
92
|
-
/** Derive additive display segments without calling unobserved latency Thinking. */
|
|
93
|
-
export declare function modelStageMetrics(trace: ModelStepTrace, now: number): ModelStageMetrics;
|
|
94
|
-
export declare function hasReasoningEvidence(trace: ModelStepTrace): boolean;
|
|
95
|
-
export {};
|
|
96
|
-
//# sourceMappingURL=model-trace.d.ts.map
|