dsh-watcher 0.4.4 → 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 +13 -8
- package/README.md +13 -8
- package/lib/client.js +451 -294
- 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,67 +0,0 @@
|
|
|
1
|
-
import type { ConversationNode } from '@deepseek-ai/dsh-client-ui-conversation/client';
|
|
2
|
-
import type { WorkGroup, WorkItem, WorkPicture, WorkStep, WorkTurn } from './fold.ts';
|
|
3
|
-
/** A measured decode rate or an explicit absence of enough source evidence. */
|
|
4
|
-
export type DecodeThroughput = {
|
|
5
|
-
kind: 'measured';
|
|
6
|
-
decodeMs: number;
|
|
7
|
-
outputTokens: number;
|
|
8
|
-
tokensPerSecond: number;
|
|
9
|
-
} | {
|
|
10
|
-
kind: 'unavailable';
|
|
11
|
-
};
|
|
12
|
-
/** Performance evidence correlated to one visible Turn. */
|
|
13
|
-
export interface TurnPerformance {
|
|
14
|
-
/** Sum of step/start → assistant/message intervals carrying recorded timing. */
|
|
15
|
-
modelMs: number | null;
|
|
16
|
-
/** Sum of tool/call → tool/result intervals represented by this Turn. */
|
|
17
|
-
toolMs: number | null;
|
|
18
|
-
/** Lowest-step request dispatch → first non-empty token delta. */
|
|
19
|
-
ttftMs: number | null;
|
|
20
|
-
/** Output tokens divided only by first-token → message decode time. */
|
|
21
|
-
throughput: DecodeThroughput;
|
|
22
|
-
}
|
|
23
|
-
/** A trustworthy wall-clock reading or a lower bound caused by a clipped start. */
|
|
24
|
-
export type ElapsedReading = {
|
|
25
|
-
kind: 'exact';
|
|
26
|
-
durationMs: number;
|
|
27
|
-
} | {
|
|
28
|
-
kind: 'lower-bound';
|
|
29
|
-
durationMs: number;
|
|
30
|
-
} | {
|
|
31
|
-
kind: 'unavailable';
|
|
32
|
-
};
|
|
33
|
-
/** Whole-session wall-clock evidence for the complete history or current loaded window. */
|
|
34
|
-
export type SessionTiming = {
|
|
35
|
-
kind: 'unavailable';
|
|
36
|
-
} | {
|
|
37
|
-
kind: 'measured';
|
|
38
|
-
coverage: 'complete' | 'partial';
|
|
39
|
-
startTime: number;
|
|
40
|
-
endTime: number;
|
|
41
|
-
elapsedMs: number;
|
|
42
|
-
activeTurnMs: number;
|
|
43
|
-
betweenTurnMs: number;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Correlate durable assistant timing/usage with Watcher's occurrence-preserving Turns.
|
|
47
|
-
* Missing timing or provider usage stays unavailable; this function never estimates it.
|
|
48
|
-
*/
|
|
49
|
-
export declare function deriveTurnPerformance(nodes: readonly ConversationNode[], turns: readonly WorkTurn[]): ReadonlyMap<number, TurnPerformance>;
|
|
50
|
-
/** Settled Turn duration, live current duration, or a lower bound for a clipped Turn start. */
|
|
51
|
-
export declare function turnElapsedReading(turn: WorkTurn, live: boolean, now: number): ElapsedReading;
|
|
52
|
-
/** Backward-compatible numeric face for callers that do not need coverage copy. */
|
|
53
|
-
export declare function turnElapsedMs(turn: WorkTurn, live: boolean, now: number): number | null;
|
|
54
|
-
/** One phase's wall-clock span from its first Step start to its last Step end. */
|
|
55
|
-
export declare function groupElapsedMs(group: WorkGroup, live: boolean, now: number): number | null;
|
|
56
|
-
/** One Step's wall-clock span, including model, tools, and in-step waits. */
|
|
57
|
-
export declare function stepElapsedMs(step: WorkStep, live: boolean, now: number): number | null;
|
|
58
|
-
/** One execution's settled duration or live elapsed interval. */
|
|
59
|
-
export declare function itemElapsedMs(item: WorkItem, live: boolean, now: number): number | null;
|
|
60
|
-
/**
|
|
61
|
-
* Decompose the loaded session span into DSH Turn intervals and time between Turns.
|
|
62
|
-
* Partial history is labelled as a window; missing Turn starts use observed work only.
|
|
63
|
-
*/
|
|
64
|
-
export declare function deriveSessionTiming(picture: WorkPicture, now: number): SessionTiming;
|
|
65
|
-
/** Whole tokens from ten up, one decimal below, matching DSH's RC8 chat chrome. */
|
|
66
|
-
export declare function formatTokensPerSecond(tokensPerSecond: number): string;
|
|
67
|
-
//# sourceMappingURL=performance.d.ts.map
|