@linxiraos/pi-stats 1.5.0 → 1.5.10
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/CHANGELOG.md +25 -2
- package/THIRD-PARTY-NOTICES.txt +22 -11
- package/dist/client/favicon.ico +0 -0
- package/dist/client/index.css +1 -1
- package/dist/client/index.js +95 -94
- package/dist/types/aggregator.d.ts +5 -0
- package/dist/types/client/api.d.ts +7 -1
- package/dist/types/client/app/nav.d.ts +1 -1
- package/dist/types/client/data/formatters.d.ts +2 -2
- package/dist/types/client/data/range.d.ts +5 -4
- package/dist/types/client/data/series.d.ts +14 -2
- package/dist/types/client/i18n/messages/costs.d.ts +4 -4
- package/dist/types/client/i18n/messages/en.d.ts +86 -6
- package/dist/types/client/i18n/messages/gain.d.ts +2 -2
- package/dist/types/client/i18n/messages/nav.d.ts +2 -0
- package/dist/types/client/i18n/messages/tracking.d.ts +89 -0
- package/dist/types/client/i18n/messages/zh-CN.d.ts +1 -1
- package/dist/types/client/routes/TrackingRoute.d.ts +10 -0
- package/dist/types/client/routes/index.d.ts +1 -0
- package/dist/types/db.d.ts +20 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/parser.d.ts +7 -1
- package/dist/types/rollup.d.ts +4 -0
- package/dist/types/shared-types.d.ts +88 -0
- package/dist/types/spotlight-aggregator.d.ts +24 -5
- package/dist/types/spotlight-ingest.d.ts +48 -9
- package/dist/types/spotlight-worker.d.ts +27 -0
- package/dist/types/trace.d.ts +7 -1
- package/dist/types/tracking.d.ts +29 -0
- package/dist/types/types.d.ts +5 -5
- package/package.json +4 -4
- package/src/aggregator.ts +16 -0
- package/src/client/App.tsx +3 -0
- package/src/client/api.ts +11 -0
- package/src/client/app/nav.ts +3 -0
- package/src/client/data/formatters.ts +7 -7
- package/src/client/data/range.ts +22 -9
- package/src/client/data/series.ts +33 -14
- package/src/client/favicon.ico +0 -0
- package/src/client/i18n/messages/costs.ts +4 -4
- package/src/client/i18n/messages/en.ts +2 -0
- package/src/client/i18n/messages/gain.ts +2 -2
- package/src/client/i18n/messages/nav.ts +2 -0
- package/src/client/i18n/messages/tracking.ts +91 -0
- package/src/client/i18n/messages/zh-CN.ts +2 -0
- package/src/client/routes/CostsRoute.tsx +4 -4
- package/src/client/routes/GainRoute.tsx +5 -4
- package/src/client/routes/ProvidersRoute.tsx +4 -4
- package/src/client/routes/TrackingRoute.tsx +262 -0
- package/src/client/routes/index.ts +1 -0
- package/src/client/routes/tracking.css +94 -0
- package/src/client/spotlight/Overhead.tsx +46 -1
- package/src/db.ts +105 -21
- package/src/gain-aggregator.ts +3 -6
- package/src/index.ts +5 -1
- package/src/parser.ts +75 -10
- package/src/rollup.ts +67 -14
- package/src/server.ts +57 -16
- package/src/shared-types.ts +98 -0
- package/src/spotlight-aggregator.ts +207 -45
- package/src/spotlight-ingest.ts +141 -37
- package/src/spotlight-measures.ts +117 -85
- package/src/spotlight-worker.ts +45 -0
- package/src/trace.ts +56 -20
- package/src/tracking.ts +394 -0
- package/src/types.ts +5 -5
|
@@ -82,6 +82,11 @@ export declare function getOverviewStats(range?: string | null): Promise<Pick<Da
|
|
|
82
82
|
export declare function getModelDashboardStats(range?: string | null): Promise<Pick<DashboardStats, "byModel" | "modelSeries" | "modelPerformanceSeries">>;
|
|
83
83
|
export declare function getCostDashboardStats(range?: string | null): Promise<Pick<DashboardStats, "costSeries">>;
|
|
84
84
|
export declare function getFolderStats(range?: string | null): Promise<FolderStats[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Project folders known to the stats registry. Tracking reads are scoped to
|
|
87
|
+
* this exact set: a caller cannot point the dashboard at an arbitrary path.
|
|
88
|
+
*/
|
|
89
|
+
export declare function getKnownProjectFolders(): Promise<string[]>;
|
|
85
90
|
export declare function getRecentRequests(limit?: number): Promise<MessageStats[]>;
|
|
86
91
|
export declare function getRecentErrors(range?: string | null, limit?: number): Promise<MessageStats[]>;
|
|
87
92
|
export declare function getRequestDetails(id: number): Promise<RequestDetails | null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CostDashboardStats, FolderStats, FrustrationDashboardStats, FrustrationEstimate, FrustrationJobStatus, GainDashboardStats, LiveStatus, MessageStats, ModelDashboardStats, OverviewStats, ProviderDashboardStats, ProviderWindowStats, RequestDetails, SessionSummary, SessionTrace, SpotlightAgentScope, SpotlightDashboardStats, SpotlightSessionContext, TimeRange, ToolDashboardStats } from "./types.js";
|
|
1
|
+
import type { CostDashboardStats, FolderStats, FrustrationDashboardStats, FrustrationEstimate, FrustrationJobStatus, GainDashboardStats, LiveStatus, MessageStats, ModelDashboardStats, OverviewStats, ProviderDashboardStats, ProviderWindowStats, RequestDetails, SessionSummary, SessionTrace, SpotlightAgentScope, SpotlightDashboardStats, SpotlightSessionContext, TimeRange, ToolDashboardStats, TrackingSnapshot } from "./types.js";
|
|
2
2
|
export declare class ApiError extends Error {
|
|
3
3
|
status: number;
|
|
4
4
|
endpoint: string;
|
|
@@ -23,6 +23,12 @@ export declare function getFrustrationEstimate(range: TimeRange, signal?: AbortS
|
|
|
23
23
|
export declare function startFrustrationRun(range: TimeRange): Promise<FrustrationJobStatus>;
|
|
24
24
|
export declare function cancelFrustrationRun(): Promise<FrustrationJobStatus>;
|
|
25
25
|
export declare function getFolderStats(range?: TimeRange, signal?: AbortSignal): Promise<FolderStats[]>;
|
|
26
|
+
/** Project folders in the stats registry, most recently active first. */
|
|
27
|
+
export declare function getTrackingProjects(signal?: AbortSignal): Promise<{
|
|
28
|
+
projects: string[];
|
|
29
|
+
}>;
|
|
30
|
+
/** Read-only tracking snapshot for one project folder from the stats registry. */
|
|
31
|
+
export declare function getTrackingSnapshot(project: string, signal?: AbortSignal): Promise<TrackingSnapshot>;
|
|
26
32
|
export declare function getGainDashboardStats(range?: TimeRange, project?: string | null, signal?: AbortSignal): Promise<GainDashboardStats>;
|
|
27
33
|
export declare function getSpotlightDashboardStats(range?: TimeRange, agent?: SpotlightAgentScope, signal?: AbortSignal): Promise<SpotlightDashboardStats>;
|
|
28
34
|
/** One experiment session's context per request, with and without shaping. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type LucideIcon } from "lucide-react";
|
|
2
2
|
import type { MessageKey } from "../i18n/index.js";
|
|
3
|
-
export type DashboardSection = "overview" | "models" | "providers" | "costs" | "requests" | "errors" | "traces" | "tools" | "frustration" | "projects" | "gain" | "spotlight";
|
|
3
|
+
export type DashboardSection = "overview" | "models" | "providers" | "costs" | "requests" | "errors" | "traces" | "tools" | "frustration" | "projects" | "tracking" | "gain" | "spotlight";
|
|
4
4
|
export interface NavItem {
|
|
5
5
|
id: DashboardSection;
|
|
6
6
|
/** Message key of the sidebar label; render through `t`. */
|
|
@@ -31,8 +31,8 @@ export declare function formatRelativeTime(timestamp: number, now?: number): str
|
|
|
31
31
|
export declare function formatDateTimeShort(timestamp: number): string;
|
|
32
32
|
/** Absolute local date and time to the second ("Sep 28, 14:03:22" / "9月28日 14:03:22"). */
|
|
33
33
|
export declare function formatTimestamp(timestamp: number): string;
|
|
34
|
-
/**
|
|
35
|
-
export declare function
|
|
34
|
+
/** Local day label for the cost/gain charts; `long` adds the weekday and year. */
|
|
35
|
+
export declare function formatLocalDay(timestamp: number, long?: boolean): string;
|
|
36
36
|
/** Wall-clock time of day to the second, using the dashboard locale. */
|
|
37
37
|
export declare function formatTimeOfDay(timestamp: number): string;
|
|
38
38
|
/** Project folder as stored by ingest (`/work-pi/`), without the slashes. */
|
|
@@ -24,9 +24,10 @@ export declare function formatBucket(timestamp: number, bucketMs: number): strin
|
|
|
24
24
|
export declare function formatTick(timestamp: number, bucketMs: number): string;
|
|
25
25
|
/**
|
|
26
26
|
* Contiguous, ascending bucket starts covering `range`, aligned like the
|
|
27
|
-
* server's
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
27
|
+
* server's series buckets: day buckets start at local midnight (a DST day is
|
|
28
|
+
* 23 or 25 hours long), shorter buckets at `(timestamp / bucketMs) * bucketMs`.
|
|
29
|
+
* For all time the axis starts at the earliest data point, so gaps between
|
|
30
|
+
* sessions still render as zeros; it is capped at {@link MAX_BUCKETS} so a
|
|
31
|
+
* stray epoch-zero timestamp cannot explode the axis into decades of empty days.
|
|
31
32
|
*/
|
|
32
33
|
export declare function bucketAxis(range: TimeRange, dataTimestamps: Iterable<number>, bucketMs?: number, now?: number): number[];
|
|
@@ -3,7 +3,18 @@
|
|
|
3
3
|
* into dense chart series aligned to a bucket axis (see `bucketAxis`).
|
|
4
4
|
*/
|
|
5
5
|
import type { ChartSeries } from "../charts/types.js";
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Index of the last bucket starting at or before `timestamp`, or -1 before the
|
|
8
|
+
* axis. Matching by floor instead of exact key keeps data visible when the
|
|
9
|
+
* server's day buckets start at a different midnight than the browser's axis
|
|
10
|
+
* (the two run in different timezones): the day shifts rather than vanishing.
|
|
11
|
+
*/
|
|
12
|
+
export declare function bucketAt(buckets: readonly number[], timestamp: number): number;
|
|
13
|
+
/**
|
|
14
|
+
* Sum `value(point)` into a dense array aligned to `buckets`. Points before
|
|
15
|
+
* the first bucket are dropped; points after the last bucket start land in the
|
|
16
|
+
* last bucket.
|
|
17
|
+
*/
|
|
7
18
|
export declare function densify<P extends {
|
|
8
19
|
timestamp: number;
|
|
9
20
|
}>(points: readonly P[], buckets: readonly number[], value: (point: P) => number): number[];
|
|
@@ -21,7 +32,8 @@ export interface PivotOptions<P> {
|
|
|
21
32
|
}
|
|
22
33
|
/**
|
|
23
34
|
* Pivot long rows into one dense series per key, ranked by total (largest
|
|
24
|
-
* first). Series beyond `limit` merge into a trailing "Other" series.
|
|
35
|
+
* first). Series beyond `limit` merge into a trailing "Other" series. Points
|
|
36
|
+
* are placed like `densify`: dropped before the axis, last bucket after it.
|
|
25
37
|
*/
|
|
26
38
|
export declare function pivotSeries<P extends {
|
|
27
39
|
timestamp: number;
|
|
@@ -9,8 +9,8 @@ export declare const costs: {
|
|
|
9
9
|
readonly "costs.no-usage-in-range": "No usage in this range";
|
|
10
10
|
readonly "costs.empty-hint": "Pick a wider range in the top bar.";
|
|
11
11
|
readonly "costs.daily-estimate": "Daily estimate";
|
|
12
|
-
readonly "costs.daily-by-model": "Per
|
|
13
|
-
readonly "costs.daily-by-component": "Per
|
|
12
|
+
readonly "costs.daily-by-model": "Per day, stacked by model";
|
|
13
|
+
readonly "costs.daily-by-component": "Per day, stacked by billing component";
|
|
14
14
|
readonly "costs.split-by": "Split by";
|
|
15
15
|
readonly "costs.by-model": "By model";
|
|
16
16
|
readonly "costs.by-component": "By component";
|
|
@@ -52,8 +52,8 @@ export declare const costs: {
|
|
|
52
52
|
readonly "costs.no-usage-in-range": "此时间范围内没有用量";
|
|
53
53
|
readonly "costs.empty-hint": "请在顶栏选择更宽的时间范围。";
|
|
54
54
|
readonly "costs.daily-estimate": "每日估算";
|
|
55
|
-
readonly "costs.daily-by-model": "
|
|
56
|
-
readonly "costs.daily-by-component": "
|
|
55
|
+
readonly "costs.daily-by-model": "按本地日统计,按模型堆叠";
|
|
56
|
+
readonly "costs.daily-by-component": "按本地日统计,按计费组件堆叠";
|
|
57
57
|
readonly "costs.split-by": "拆分依据";
|
|
58
58
|
readonly "costs.by-model": "按模型";
|
|
59
59
|
readonly "costs.by-component": "按组件";
|
|
@@ -13,6 +13,7 @@ export declare const enMessages: {
|
|
|
13
13
|
readonly "nav.tools": "Tools";
|
|
14
14
|
readonly "nav.frustration": "Frustration";
|
|
15
15
|
readonly "nav.projects": "Projects";
|
|
16
|
+
readonly "nav.tracking": "Tracking";
|
|
16
17
|
readonly "nav.gain": "Gain";
|
|
17
18
|
readonly "nav.spotlight": "Spotlight";
|
|
18
19
|
readonly "nav.dashboard": "zetacode stats";
|
|
@@ -239,8 +240,8 @@ export declare const enMessages: {
|
|
|
239
240
|
readonly "costs.no-usage-in-range": "No usage in this range";
|
|
240
241
|
readonly "costs.empty-hint": "Pick a wider range in the top bar.";
|
|
241
242
|
readonly "costs.daily-estimate": "Daily estimate";
|
|
242
|
-
readonly "costs.daily-by-model": "Per
|
|
243
|
-
readonly "costs.daily-by-component": "Per
|
|
243
|
+
readonly "costs.daily-by-model": "Per day, stacked by model";
|
|
244
|
+
readonly "costs.daily-by-component": "Per day, stacked by billing component";
|
|
244
245
|
readonly "costs.split-by": "Split by";
|
|
245
246
|
readonly "costs.by-model": "By model";
|
|
246
247
|
readonly "costs.by-component": "By component";
|
|
@@ -622,6 +623,45 @@ export declare const enMessages: {
|
|
|
622
623
|
readonly "projects.errors": "Errors";
|
|
623
624
|
readonly "projects.avg-duration": "Avg duration";
|
|
624
625
|
readonly "projects.last-active": "Last active";
|
|
626
|
+
readonly "tracking.title": "Tracking";
|
|
627
|
+
readonly "tracking.description": "Read-only snapshot of a project's tracking documents: process state, not learned facts.";
|
|
628
|
+
readonly "tracking.project": "Project";
|
|
629
|
+
readonly "tracking.select-project": "Select a project…";
|
|
630
|
+
readonly "tracking.no-projects": "No projects in the stats registry";
|
|
631
|
+
readonly "tracking.no-projects-hint": "Tracking is scoped to folders the stats database has seen.";
|
|
632
|
+
readonly "tracking.read-only": "The dashboard only reads these files; it never writes tracking.";
|
|
633
|
+
readonly "tracking.directory": "Directory";
|
|
634
|
+
readonly "tracking.updated": "Updated";
|
|
635
|
+
readonly "tracking.none": "None";
|
|
636
|
+
readonly "tracking.no-documents": "No tracking documents";
|
|
637
|
+
readonly "tracking.no-documents-hint": "Tracking is opt-in. Run /tracking on, or enable tools → Project Tracking (tracking.enabled) in /settings, then /tracking start.";
|
|
638
|
+
readonly "tracking.status": "Status";
|
|
639
|
+
readonly "tracking.index": "Index";
|
|
640
|
+
readonly "tracking.actions": "Actions";
|
|
641
|
+
readonly "tracking.sessions": "Sessions";
|
|
642
|
+
readonly "tracking.phase": "Phase";
|
|
643
|
+
readonly "tracking.progress": "Progress";
|
|
644
|
+
readonly "tracking.blockers": "Blockers";
|
|
645
|
+
readonly "tracking.decisions": "Decisions";
|
|
646
|
+
readonly "tracking.stage": "Stage";
|
|
647
|
+
readonly "tracking.phases": "Todo phases";
|
|
648
|
+
readonly "tracking.last-updated": "Last updated";
|
|
649
|
+
readonly "tracking.last-session": "Last session";
|
|
650
|
+
readonly "tracking.missing": "Missing";
|
|
651
|
+
readonly "tracking.partial": "Partial";
|
|
652
|
+
readonly "tracking.corrupt": "Corrupt";
|
|
653
|
+
readonly "tracking.error": "Error";
|
|
654
|
+
readonly "tracking.truncated": "Truncated read";
|
|
655
|
+
readonly "tracking.status-missing": "status.json is missing";
|
|
656
|
+
readonly "tracking.status-corrupt": "status.json is not valid JSON";
|
|
657
|
+
readonly "tracking.status-error": "Could not read status.json";
|
|
658
|
+
readonly "tracking.index-missing": "INDEX.md is missing";
|
|
659
|
+
readonly "tracking.actions-missing": "No action log yet";
|
|
660
|
+
readonly "tracking.sessions-missing": "No sessions directory yet";
|
|
661
|
+
readonly "tracking.sessions-empty": "No session documents";
|
|
662
|
+
readonly "tracking.invalid-rows": "{count} malformed action rows skipped";
|
|
663
|
+
readonly "tracking.actions-empty": "The action log has no readable rows";
|
|
664
|
+
readonly "tracking.document-empty": "This document is empty";
|
|
625
665
|
readonly "gain.title": "Gain";
|
|
626
666
|
readonly "gain.description": "Tokens snapcompact kept out of context in {window}.";
|
|
627
667
|
readonly "gain.description-scoped": "Tokens snapcompact kept out of context for {project} in {window}.";
|
|
@@ -638,7 +678,7 @@ export declare const enMessages: {
|
|
|
638
678
|
readonly "gain.hits": "Hits";
|
|
639
679
|
readonly "gain.saved-per-hit": "Saved per hit";
|
|
640
680
|
readonly "gain.savings-over-time": "Savings over time";
|
|
641
|
-
readonly "gain.savings-over-time-description": "Tokens saved per
|
|
681
|
+
readonly "gain.savings-over-time-description": "Tokens saved per day, with the running total";
|
|
642
682
|
readonly "gain.saved-per-day": "Saved per day";
|
|
643
683
|
readonly "gain.cumulative": "Cumulative";
|
|
644
684
|
readonly "gain.by-source": "By source";
|
|
@@ -681,6 +721,7 @@ export declare const enLocale: {
|
|
|
681
721
|
readonly "nav.tools": "Tools";
|
|
682
722
|
readonly "nav.frustration": "Frustration";
|
|
683
723
|
readonly "nav.projects": "Projects";
|
|
724
|
+
readonly "nav.tracking": "Tracking";
|
|
684
725
|
readonly "nav.gain": "Gain";
|
|
685
726
|
readonly "nav.spotlight": "Spotlight";
|
|
686
727
|
readonly "nav.dashboard": "zetacode stats";
|
|
@@ -907,8 +948,8 @@ export declare const enLocale: {
|
|
|
907
948
|
readonly "costs.no-usage-in-range": "No usage in this range";
|
|
908
949
|
readonly "costs.empty-hint": "Pick a wider range in the top bar.";
|
|
909
950
|
readonly "costs.daily-estimate": "Daily estimate";
|
|
910
|
-
readonly "costs.daily-by-model": "Per
|
|
911
|
-
readonly "costs.daily-by-component": "Per
|
|
951
|
+
readonly "costs.daily-by-model": "Per day, stacked by model";
|
|
952
|
+
readonly "costs.daily-by-component": "Per day, stacked by billing component";
|
|
912
953
|
readonly "costs.split-by": "Split by";
|
|
913
954
|
readonly "costs.by-model": "By model";
|
|
914
955
|
readonly "costs.by-component": "By component";
|
|
@@ -1290,6 +1331,45 @@ export declare const enLocale: {
|
|
|
1290
1331
|
readonly "projects.errors": "Errors";
|
|
1291
1332
|
readonly "projects.avg-duration": "Avg duration";
|
|
1292
1333
|
readonly "projects.last-active": "Last active";
|
|
1334
|
+
readonly "tracking.title": "Tracking";
|
|
1335
|
+
readonly "tracking.description": "Read-only snapshot of a project's tracking documents: process state, not learned facts.";
|
|
1336
|
+
readonly "tracking.project": "Project";
|
|
1337
|
+
readonly "tracking.select-project": "Select a project…";
|
|
1338
|
+
readonly "tracking.no-projects": "No projects in the stats registry";
|
|
1339
|
+
readonly "tracking.no-projects-hint": "Tracking is scoped to folders the stats database has seen.";
|
|
1340
|
+
readonly "tracking.read-only": "The dashboard only reads these files; it never writes tracking.";
|
|
1341
|
+
readonly "tracking.directory": "Directory";
|
|
1342
|
+
readonly "tracking.updated": "Updated";
|
|
1343
|
+
readonly "tracking.none": "None";
|
|
1344
|
+
readonly "tracking.no-documents": "No tracking documents";
|
|
1345
|
+
readonly "tracking.no-documents-hint": "Tracking is opt-in. Run /tracking on, or enable tools → Project Tracking (tracking.enabled) in /settings, then /tracking start.";
|
|
1346
|
+
readonly "tracking.status": "Status";
|
|
1347
|
+
readonly "tracking.index": "Index";
|
|
1348
|
+
readonly "tracking.actions": "Actions";
|
|
1349
|
+
readonly "tracking.sessions": "Sessions";
|
|
1350
|
+
readonly "tracking.phase": "Phase";
|
|
1351
|
+
readonly "tracking.progress": "Progress";
|
|
1352
|
+
readonly "tracking.blockers": "Blockers";
|
|
1353
|
+
readonly "tracking.decisions": "Decisions";
|
|
1354
|
+
readonly "tracking.stage": "Stage";
|
|
1355
|
+
readonly "tracking.phases": "Todo phases";
|
|
1356
|
+
readonly "tracking.last-updated": "Last updated";
|
|
1357
|
+
readonly "tracking.last-session": "Last session";
|
|
1358
|
+
readonly "tracking.missing": "Missing";
|
|
1359
|
+
readonly "tracking.partial": "Partial";
|
|
1360
|
+
readonly "tracking.corrupt": "Corrupt";
|
|
1361
|
+
readonly "tracking.error": "Error";
|
|
1362
|
+
readonly "tracking.truncated": "Truncated read";
|
|
1363
|
+
readonly "tracking.status-missing": "status.json is missing";
|
|
1364
|
+
readonly "tracking.status-corrupt": "status.json is not valid JSON";
|
|
1365
|
+
readonly "tracking.status-error": "Could not read status.json";
|
|
1366
|
+
readonly "tracking.index-missing": "INDEX.md is missing";
|
|
1367
|
+
readonly "tracking.actions-missing": "No action log yet";
|
|
1368
|
+
readonly "tracking.sessions-missing": "No sessions directory yet";
|
|
1369
|
+
readonly "tracking.sessions-empty": "No session documents";
|
|
1370
|
+
readonly "tracking.invalid-rows": "{count} malformed action rows skipped";
|
|
1371
|
+
readonly "tracking.actions-empty": "The action log has no readable rows";
|
|
1372
|
+
readonly "tracking.document-empty": "This document is empty";
|
|
1293
1373
|
readonly "gain.title": "Gain";
|
|
1294
1374
|
readonly "gain.description": "Tokens snapcompact kept out of context in {window}.";
|
|
1295
1375
|
readonly "gain.description-scoped": "Tokens snapcompact kept out of context for {project} in {window}.";
|
|
@@ -1306,7 +1386,7 @@ export declare const enLocale: {
|
|
|
1306
1386
|
readonly "gain.hits": "Hits";
|
|
1307
1387
|
readonly "gain.saved-per-hit": "Saved per hit";
|
|
1308
1388
|
readonly "gain.savings-over-time": "Savings over time";
|
|
1309
|
-
readonly "gain.savings-over-time-description": "Tokens saved per
|
|
1389
|
+
readonly "gain.savings-over-time-description": "Tokens saved per day, with the running total";
|
|
1310
1390
|
readonly "gain.saved-per-day": "Saved per day";
|
|
1311
1391
|
readonly "gain.cumulative": "Cumulative";
|
|
1312
1392
|
readonly "gain.by-source": "By source";
|
|
@@ -20,7 +20,7 @@ export declare const gain: {
|
|
|
20
20
|
readonly "gain.hits": "Hits";
|
|
21
21
|
readonly "gain.saved-per-hit": "Saved per hit";
|
|
22
22
|
readonly "gain.savings-over-time": "Savings over time";
|
|
23
|
-
readonly "gain.savings-over-time-description": "Tokens saved per
|
|
23
|
+
readonly "gain.savings-over-time-description": "Tokens saved per day, with the running total";
|
|
24
24
|
readonly "gain.saved-per-day": "Saved per day";
|
|
25
25
|
readonly "gain.cumulative": "Cumulative";
|
|
26
26
|
readonly "gain.by-source": "By source";
|
|
@@ -44,7 +44,7 @@ export declare const gain: {
|
|
|
44
44
|
readonly "gain.hits": "命中次数";
|
|
45
45
|
readonly "gain.saved-per-hit": "每次命中节省";
|
|
46
46
|
readonly "gain.savings-over-time": "节省趋势";
|
|
47
|
-
readonly "gain.savings-over-time-description": "
|
|
47
|
+
readonly "gain.savings-over-time-description": "按本地日统计节省的 Token,以及累计总量";
|
|
48
48
|
readonly "gain.saved-per-day": "每日节省";
|
|
49
49
|
readonly "gain.cumulative": "累计";
|
|
50
50
|
readonly "gain.by-source": "按来源";
|
|
@@ -17,6 +17,7 @@ export declare const nav: {
|
|
|
17
17
|
readonly "nav.tools": "Tools";
|
|
18
18
|
readonly "nav.frustration": "Frustration";
|
|
19
19
|
readonly "nav.projects": "Projects";
|
|
20
|
+
readonly "nav.tracking": "Tracking";
|
|
20
21
|
readonly "nav.gain": "Gain";
|
|
21
22
|
readonly "nav.spotlight": "Spotlight";
|
|
22
23
|
readonly "nav.dashboard": "zetacode stats";
|
|
@@ -38,6 +39,7 @@ export declare const nav: {
|
|
|
38
39
|
readonly "nav.tools": "工具";
|
|
39
40
|
readonly "nav.frustration": "情绪压力";
|
|
40
41
|
readonly "nav.projects": "项目";
|
|
42
|
+
readonly "nav.tracking": "追踪";
|
|
41
43
|
readonly "nav.gain": "收益";
|
|
42
44
|
readonly "nav.spotlight": "亮点";
|
|
43
45
|
readonly "nav.dashboard": "zeta 统计";
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project tracking panel copy. Keys are slugs (`tracking.<name>`); English is
|
|
3
|
+
* the source of truth and `zh-CN` overrides it. Technical terms (`status.json`,
|
|
4
|
+
* `INDEX.md`, `tracking_update`) stay verbatim.
|
|
5
|
+
*/
|
|
6
|
+
export declare const tracking: {
|
|
7
|
+
readonly en: {
|
|
8
|
+
readonly "tracking.title": "Tracking";
|
|
9
|
+
readonly "tracking.description": "Read-only snapshot of a project's tracking documents: process state, not learned facts.";
|
|
10
|
+
readonly "tracking.project": "Project";
|
|
11
|
+
readonly "tracking.select-project": "Select a project…";
|
|
12
|
+
readonly "tracking.no-projects": "No projects in the stats registry";
|
|
13
|
+
readonly "tracking.no-projects-hint": "Tracking is scoped to folders the stats database has seen.";
|
|
14
|
+
readonly "tracking.read-only": "The dashboard only reads these files; it never writes tracking.";
|
|
15
|
+
readonly "tracking.directory": "Directory";
|
|
16
|
+
readonly "tracking.updated": "Updated";
|
|
17
|
+
readonly "tracking.none": "None";
|
|
18
|
+
readonly "tracking.no-documents": "No tracking documents";
|
|
19
|
+
readonly "tracking.no-documents-hint": "Tracking is opt-in. Run /tracking on, or enable tools → Project Tracking (tracking.enabled) in /settings, then /tracking start.";
|
|
20
|
+
readonly "tracking.status": "Status";
|
|
21
|
+
readonly "tracking.index": "Index";
|
|
22
|
+
readonly "tracking.actions": "Actions";
|
|
23
|
+
readonly "tracking.sessions": "Sessions";
|
|
24
|
+
readonly "tracking.phase": "Phase";
|
|
25
|
+
readonly "tracking.progress": "Progress";
|
|
26
|
+
readonly "tracking.blockers": "Blockers";
|
|
27
|
+
readonly "tracking.decisions": "Decisions";
|
|
28
|
+
readonly "tracking.stage": "Stage";
|
|
29
|
+
readonly "tracking.phases": "Todo phases";
|
|
30
|
+
readonly "tracking.last-updated": "Last updated";
|
|
31
|
+
readonly "tracking.last-session": "Last session";
|
|
32
|
+
readonly "tracking.missing": "Missing";
|
|
33
|
+
readonly "tracking.partial": "Partial";
|
|
34
|
+
readonly "tracking.corrupt": "Corrupt";
|
|
35
|
+
readonly "tracking.error": "Error";
|
|
36
|
+
readonly "tracking.truncated": "Truncated read";
|
|
37
|
+
readonly "tracking.status-missing": "status.json is missing";
|
|
38
|
+
readonly "tracking.status-corrupt": "status.json is not valid JSON";
|
|
39
|
+
readonly "tracking.status-error": "Could not read status.json";
|
|
40
|
+
readonly "tracking.index-missing": "INDEX.md is missing";
|
|
41
|
+
readonly "tracking.actions-missing": "No action log yet";
|
|
42
|
+
readonly "tracking.sessions-missing": "No sessions directory yet";
|
|
43
|
+
readonly "tracking.sessions-empty": "No session documents";
|
|
44
|
+
readonly "tracking.invalid-rows": "{count} malformed action rows skipped";
|
|
45
|
+
readonly "tracking.actions-empty": "The action log has no readable rows";
|
|
46
|
+
readonly "tracking.document-empty": "This document is empty";
|
|
47
|
+
};
|
|
48
|
+
readonly "zh-CN": {
|
|
49
|
+
readonly "tracking.title": "追踪";
|
|
50
|
+
readonly "tracking.description": "项目追踪文档的只读快照:这里是过程状态,不是学到的知识事实。";
|
|
51
|
+
readonly "tracking.project": "项目";
|
|
52
|
+
readonly "tracking.select-project": "选择项目…";
|
|
53
|
+
readonly "tracking.no-projects": "统计注册表中没有项目";
|
|
54
|
+
readonly "tracking.no-projects-hint": "追踪只读取统计数据库见过的项目文件夹。";
|
|
55
|
+
readonly "tracking.read-only": "仪表盘只读取这些文件,绝不写入追踪。";
|
|
56
|
+
readonly "tracking.directory": "目录";
|
|
57
|
+
readonly "tracking.updated": "更新时间";
|
|
58
|
+
readonly "tracking.none": "无";
|
|
59
|
+
readonly "tracking.no-documents": "没有追踪文档";
|
|
60
|
+
readonly "tracking.no-documents-hint": "追踪是可选功能。运行 /tracking on,或在 /settings → tools → Project Tracking(tracking.enabled)中启用,然后执行 /tracking start。";
|
|
61
|
+
readonly "tracking.status": "状态";
|
|
62
|
+
readonly "tracking.index": "索引";
|
|
63
|
+
readonly "tracking.actions": "操作";
|
|
64
|
+
readonly "tracking.sessions": "会话";
|
|
65
|
+
readonly "tracking.phase": "阶段";
|
|
66
|
+
readonly "tracking.progress": "进度";
|
|
67
|
+
readonly "tracking.blockers": "阻塞";
|
|
68
|
+
readonly "tracking.decisions": "决策";
|
|
69
|
+
readonly "tracking.stage": "当前阶段";
|
|
70
|
+
readonly "tracking.phases": "待办阶段";
|
|
71
|
+
readonly "tracking.last-updated": "最近更新";
|
|
72
|
+
readonly "tracking.last-session": "最近会话";
|
|
73
|
+
readonly "tracking.missing": "缺失";
|
|
74
|
+
readonly "tracking.partial": "不完整";
|
|
75
|
+
readonly "tracking.corrupt": "损坏";
|
|
76
|
+
readonly "tracking.error": "错误";
|
|
77
|
+
readonly "tracking.truncated": "读取已截断";
|
|
78
|
+
readonly "tracking.status-missing": "status.json 缺失";
|
|
79
|
+
readonly "tracking.status-corrupt": "status.json 不是有效 JSON";
|
|
80
|
+
readonly "tracking.status-error": "无法读取 status.json";
|
|
81
|
+
readonly "tracking.index-missing": "INDEX.md 缺失";
|
|
82
|
+
readonly "tracking.actions-missing": "还没有操作日志";
|
|
83
|
+
readonly "tracking.sessions-missing": "还没有 sessions 目录";
|
|
84
|
+
readonly "tracking.sessions-empty": "没有会话文档";
|
|
85
|
+
readonly "tracking.invalid-rows": "已跳过 {count} 行格式错误的操作记录";
|
|
86
|
+
readonly "tracking.actions-empty": "操作日志没有可读记录";
|
|
87
|
+
readonly "tracking.document-empty": "该文档为空";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
@@ -9,5 +9,5 @@ export declare const zhCNMessages: Partial<Record<MessageKey, string>>;
|
|
|
9
9
|
/** The Simplified Chinese locale pack. */
|
|
10
10
|
export declare const zhCNLocale: {
|
|
11
11
|
readonly id: "zh-CN";
|
|
12
|
-
readonly messages: Partial<Record<"common.aborted" | "common.average" | "common.cache-read" | "common.cache-write" | "common.cancel" | "common.close" | "common.copied" | "common.copy" | "common.cost" | "common.duration" | "common.entry-id" | "common.error" | "common.error-rate" | "common.failed" | "common.filter" | "common.input" | "common.model" | "common.models" | "common.no-data-in-range" | "common.nothing-here-yet" | "common.other-n" | "common.output" | "common.output-message" | "common.output-tokens-per-second" | "common.pages" | "common.premium" | "common.premium-requests" | "common.project" | "common.provider" | "common.providers" | "common.range-1h" | "common.range-24h" | "common.range-30d" | "common.range-7d" | "common.range-90d" | "common.range-all" | "common.request" | "common.request-id" | "common.requests" | "common.root" | "common.session-entry" | "common.share" | "common.show-more" | "common.started" | "common.time-range" | "common.tokens" | "common.tokens-per-second" | "common.total" | "common.unknown" | "common.window-1h" | "common.window-24h" | "common.window-30d" | "common.window-7d" | "common.window-90d" | "common.window-all" | "costs.active-days-n" | "costs.active-days-one" | "costs.all-priced" | "costs.api-equivalent-estimate" | "costs.api-estimate-title" | "costs.average-per-day" | "costs.average-per-day-title" | "costs.by-component" | "costs.by-model" | "costs.by-model-description" | "costs.daily-by-component" | "costs.daily-by-model" | "costs.daily-estimate" | "costs.description" | "costs.empty-hint" | "costs.estimate" | "costs.estimate-by-component" | "costs.estimate-title" | "costs.no-priced-usage" | "costs.no-usage-in-range" | "costs.nothing-priced-yet" | "costs.per-priced-request" | "costs.per-priced-request-title" | "costs.per-request" | "costs.per-request-title" | "costs.priced-n" | "costs.requests-n" | "costs.split" | "costs.split-by" | "costs.split-title" | "costs.title" | "costs.top-model" | "costs.top-model-hint" | "costs.unpriced" | "costs.unpriced-column-title" | "costs.unpriced-hint" | "costs.unpriced-note-n" | "costs.unpriced-note-one" | "costs.unpriced-requests" | "costs.unpriced-title" | "costs.where-it-went" | "errors.affected-models" | "errors.by-model" | "errors.by-model-description" | "errors.cost-hint" | "errors.description" | "errors.empty-all-succeeded" | "errors.empty-no-affected-models" | "errors.empty-no-failures" | "errors.error-signatures" | "errors.failures" | "errors.filtered-of-total" | "errors.footer" | "errors.group-meta" | "errors.hint-in-window" | "errors.hint-latest-loaded" | "errors.last-failure" | "errors.last-seen" | "errors.load-latest" | "errors.loading" | "errors.loading-failures" | "errors.more-models" | "errors.no-match" | "errors.no-match-hint" | "errors.none-in-window" | "errors.open-latest" | "errors.search-placeholder" | "errors.signature" | "errors.signatures" | "errors.signatures-card-description" | "errors.signatures-hint" | "errors.signatures-top" | "errors.title" | "errors.unknown-error" | "errors.when" | "frustration.all-classes" | "frustration.all-judged" | "frustration.angry" | "frustration.angry-title" | "frustration.annoyed" | "frustration.annoyed-title" | "frustration.at-assistant" | "frustration.at-assistant-title" | "frustration.by-model" | "frustration.by-model-description" | "frustration.cancel-run" | "frustration.cancelled" | "frustration.cancelling" | "frustration.classify" | "frustration.column-judged" | "frustration.column-mean" | "frustration.column-messages" | "frustration.column-model-ids" | "frustration.column-session" | "frustration.column-tool-errors" | "frustration.column-turns" | "frustration.cost-so-far" | "frustration.coverage-hint" | "frustration.coverage-unscored" | "frustration.description" | "frustration.done" | "frustration.elapsed" | "frustration.estimate-note" | "frustration.estimated-cost" | "frustration.estimating" | "frustration.every-model-class" | "frustration.failed" | "frustration.failed-n" | "frustration.failed-suffix" | "frustration.hatch-title" | "frustration.hide-regex-title" | "frustration.in-flight" | "frustration.in-time" | "frustration.include-small" | "frustration.input-tokens" | "frustration.judge-coverage" | "frustration.judge-coverage-title" | "frustration.judge-description" | "frustration.judge-model" | "frustration.judge-panel" | "frustration.judge-running" | "frustration.judge-with" | "frustration.last-run-cancelled" | "frustration.last-run-done" | "frustration.last-run-failed" | "frustration.legend-angry" | "frustration.legend-annoyed-any" | "frustration.legend-assistant" | "frustration.legend-hatched" | "frustration.legend-hatched-run" | "frustration.legend-hue" | "frustration.legend-other" | "frustration.legend-trend" | "frustration.messages-n" | "frustration.messages-progress" | "frustration.model-breakdown" | "frustration.model-breakdown-title" | "frustration.model-by-model" | "frustration.model-by-model-description" | "frustration.model-class" | "frustration.model-hedge" | "frustration.model-hedge-title" | "frustration.model-hint-mean" | "frustration.model-legend-breakdown" | "frustration.model-mean" | "frustration.model-mean-title" | "frustration.model-no-turns" | "frustration.model-over-time" | "frustration.model-over-time-description" | "frustration.model-rambling" | "frustration.model-rambling-title" | "frustration.model-restatement" | "frustration.model-restatement-title" | "frustration.model-self-blame" | "frustration.model-self-blame-title" | "frustration.model-sessions" | "frustration.model-sessions-description" | "frustration.model-side-description" | "frustration.model-side-title" | "frustration.model-spiral" | "frustration.model-spiral-title" | "frustration.model-table-description" | "frustration.model-table-title" | "frustration.model-try-longer-range" | "frustration.model-turns" | "frustration.model-turns-title" | "frustration.model-unscored-line" | "frustration.model-versions" | "frustration.mostly-regex" | "frustration.no-messages" | "frustration.no-model-match" | "frustration.no-run-yet" | "frustration.not-run-yet" | "frustration.proceed" | "frustration.prose-chars" | "frustration.quote-title" | "frustration.regex-badge" | "frustration.regex-only" | "frustration.row-mostly-regex" | "frustration.run-cancelled-after" | "frustration.run-cancelled-line" | "frustration.run-done-line" | "frustration.run-failed-after" | "frustration.run-failed-line" | "frustration.run-judged" | "frustration.running" | "frustration.small-models-title" | "frustration.stack-relation" | "frustration.starting" | "frustration.table-description" | "frustration.title" | "frustration.try-longer-range" | "frustration.turns-n" | "frustration.unclassified" | "frustration.unjudged-messages" | "frustration.unknown-error" | "frustration.unscored-line" | "frustration.user-messages" | "frustration.user-messages-title" | "gain.all-projects" | "gain.by-source" | "gain.by-source-description" | "gain.cumulative" | "gain.description" | "gain.description-scoped" | "gain.empty-hint-all" | "gain.empty-hint-longer-range" | "gain.empty-title" | "gain.empty-title-scoped" | "gain.hits" | "gain.reduction" | "gain.reduction-title" | "gain.reduction-unknown" | "gain.saved-bytes" | "gain.saved-per-day" | "gain.saved-per-hit" | "gain.saved-tokens" | "gain.savings-over-time" | "gain.savings-over-time-description" | "gain.source" | "gain.title" | "models.across-providers" | "models.across-providers-one" | "models.all-models" | "models.api-cost" | "models.api-cost-title" | "models.avg-duration" | "models.avg-ttft" | "models.bucket-5m" | "models.bucket-day" | "models.bucket-hour" | "models.cache-rate" | "models.cache-savings" | "models.cache-title" | "models.cost-title" | "models.count-desc" | "models.efficiency" | "models.empty-hint" | "models.empty-title" | "models.errors" | "models.failed-n" | "models.first-last-seen" | "models.latency" | "models.most-used" | "models.most-used-hint" | "models.no-samples-hint" | "models.no-samples-title" | "models.performance-per-bucket" | "models.request-share" | "models.share-desc" | "models.share-mode-aria" | "models.subtitle" | "models.table-desc" | "models.tok-per-second" | "models.tokens-title" | "models.tps-title" | "models.trend" | "models.trend-title" | "models.ttft" | "models.ttft-title" | "models.uncached-input" | "models.unpriced-n" | "models.used" | "nav.activity" | "nav.breadcrumb-stats" | "nav.costs" | "nav.dashboard" | "nav.errors" | "nav.frustration" | "nav.gain" | "nav.insights" | "nav.models" | "nav.open-navigation" | "nav.overview" | "nav.pages" | "nav.projects" | "nav.providers" | "nav.requests" | "nav.spotlight" | "nav.tools" | "nav.traces" | "nav.usage" | "overview.activity" | "overview.advisor" | "overview.all-requests" | "overview.api-cost-title" | "overview.api-equivalent" | "overview.api-equivalent-cost" | "overview.avg-latency" | "overview.avg-ttft" | "overview.by-agent" | "overview.cache-rate" | "overview.cache-rate-title" | "overview.cache-saved" | "overview.conversation-tokens" | "overview.description" | "overview.failed-n" | "overview.latest-requests" | "overview.latest-requests-description" | "overview.main-agent" | "overview.ok" | "overview.output-n" | "overview.per-5m" | "overview.per-day" | "overview.per-hour" | "overview.requests-short" | "overview.status" | "overview.subagents" | "overview.succeeded" | "overview.succeeded-n" | "overview.title" | "overview.token-mix" | "overview.token-mix-description" | "overview.tokens-title" | "overview.uncached-input" | "overview.unpriced-n" | "overview.when" | "projects.api-equivalent-cost" | "projects.api-equivalent-cost-hint" | "projects.api-equivalent-cost-rates" | "projects.avg-duration" | "projects.cache-rate" | "projects.cache-rate-hint" | "projects.cache-rate-hint-all" | "projects.cache-savings" | "projects.cache-savings-hint" | "projects.conversation-tokens" | "projects.conversation-tokens-hint" | "projects.description" | "projects.empty-no-folders" | "projects.empty-no-match" | "projects.empty-only-temporary" | "projects.errors" | "projects.failed-n" | "projects.filter-placeholder" | "projects.folder" | "projects.folders" | "projects.folders-n" | "projects.folders-of-n" | "projects.hide-temporary" | "projects.hide-temporary-hint" | "projects.hint-longer-range" | "projects.hint-temporary-hidden" | "projects.last-active" | "projects.share-of-cost" | "projects.share-of-requests" | "projects.temp" | "projects.temporary-n" | "projects.title" | "projects.top-by-cost" | "projects.top-by-cost-description" | "projects.top-by-requests" | "projects.top-by-requests-description" | "projects.unpriced-n" | "providers.account" | "providers.accounts" | "providers.accounts-needed" | "providers.accounts-needed-title" | "providers.accounts-title" | "providers.all-providers" | "providers.api-cost-title" | "providers.api-equivalent-cost" | "providers.bucket-5m" | "providers.bucket-day" | "providers.bucket-hour" | "providers.burn" | "providers.burn-description" | "providers.burn-estimate-description" | "providers.cost-title" | "providers.description" | "providers.exhausted" | "providers.exhausted-n" | "providers.exhaustions" | "providers.exhaustions-title" | "providers.failed-n" | "providers.high" | "providers.hours-description" | "providers.ideal-accounts" | "providers.latest-used" | "providers.models-title" | "providers.most-tokens" | "providers.no-activity-in-range" | "providers.no-provider-activity" | "providers.no-reading" | "providers.no-requests-in-range" | "providers.no-snapshots-in-range" | "providers.no-utilization-readings" | "providers.peak-burn-hours" | "providers.peak-hours-description" | "providers.peak-in-range" | "providers.peak-utilization" | "providers.peak-utilization-title" | "providers.premium-title" | "providers.recorded" | "providers.resets" | "providers.resets-title" | "providers.share-title" | "providers.snapshot-hint" | "providers.snapshots" | "providers.status" | "providers.subscription-windows" | "providers.subscription-windows-description" | "providers.succeeded-n" | "providers.tokens-peak-hour" | "providers.tokens-per-window" | "providers.tokens-per-window-title" | "providers.tokens-title" | "providers.too-little-consumed" | "providers.totals" | "providers.totals-description" | "providers.totals-description-unpriced-n" | "providers.totals-description-unpriced-one" | "providers.tps-title" | "providers.unpriced-n" | "providers.utilization" | "providers.utilization-description" | "providers.utilization-description-plain" | "providers.window" | "providers.windows-burned" | "providers.windows-burned-title" | "requests.api-equivalent-cost" | "requests.cache-read-title" | "requests.cache-write" | "requests.cost-estimate" | "requests.cost-hint" | "requests.description" | "requests.empty-in-window" | "requests.empty-no-match" | "requests.empty-no-match-hint" | "requests.failed-hint" | "requests.footer" | "requests.load-latest" | "requests.loading" | "requests.log-count-in-window" | "requests.log-count-latest" | "requests.log-loading" | "requests.log-title" | "requests.median-duration" | "requests.median-ttft" | "requests.none-in-window" | "requests.p95" | "requests.search-placeholder" | "requests.since" | "requests.status" | "requests.status-all" | "requests.tokens-hint" | "requests.ttft" | "requests.ttft-hint" | "requests.uncached-input" | "requests.unpriced-n" | "requests.when" | "shell.building-rollups" | "shell.dark-theme" | "shell.indexing" | "shell.ingesting" | "shell.jump-hint" | "shell.just-now" | "shell.language" | "shell.light-theme" | "shell.live" | "shell.lost-connection" | "shell.range-suffix" | "shell.reconnecting" | "shell.switch-language" | "shell.sync-failed" | "shell.sync-now" | "shell.syncing" | "shell.system-theme" | "tools.all-tools" | "tools.api-equivalent" | "tools.args" | "tools.args-chars-title" | "tools.attr-cost" | "tools.attr-tokens" | "tools.attributed-cost" | "tools.attributed-tokens" | "tools.attribution-estimate" | "tools.attribution-note" | "tools.avg-args-per-call" | "tools.avg-result-per-call" | "tools.bucket-5m" | "tools.bucket-day" | "tools.bucket-hour" | "tools.by-tool" | "tools.by-tool-and-model" | "tools.by-tool-and-model-description" | "tools.by-tool-description" | "tools.call-arguments" | "tools.calls" | "tools.calls-over-time" | "tools.chars" | "tools.chart-description" | "tools.clear-tool-filter" | "tools.description" | "tools.distinct-tools" | "tools.error-rate-title" | "tools.errors" | "tools.errors-over-time" | "tools.errors-title" | "tools.failed-n" | "tools.filter-by-tool" | "tools.last-used" | "tools.most-used" | "tools.no-calls-to-tool" | "tools.no-tool-calls" | "tools.no-tool-errors" | "tools.result" | "tools.result-chars-title" | "tools.result-per-call" | "tools.result-per-call-title" | "tools.result-text" | "tools.share-of-calls" | "tools.share-of-cost" | "tools.share-of-tokens" | "tools.succeeded-n" | "tools.title" | "tools.tokens-output" | "tools.tool" | "tools.tool-calls" | "tools.trend" | "tools.trend-title" | "tools.unpriced-requests-n" | "trace.agent" | "trace.agents" | "trace.args" | "trace.avg" | "trace.axis-mode" | "trace.background" | "trace.bg" | "trace.calls" | "trace.canvas-aria" | "trace.collapse-all" | "trace.collapse-track" | "trace.compress-idle" | "trace.copy-json" | "trace.description" | "trace.empty-hint" | "trace.empty-title" | "trace.error-message" | "trace.errors" | "trace.expand-all" | "trace.expand-track" | "trace.failed-n" | "trace.filter-placeholder" | "trace.idle" | "trace.io-cached" | "trace.load-failed" | "trace.max" | "trace.minimap-aria" | "trace.mode-calls-title" | "trace.mode-time-title" | "trace.mode-turns-title" | "trace.model-time" | "trace.most-recent" | "trace.most-recent-filtered" | "trace.next-match" | "trace.no-matching-events" | "trace.no-matching-hint" | "trace.no-matching-title" | "trace.of-wall" | "trace.open-child-track" | "trace.previous-match" | "trace.raw-entry" | "trace.refresh" | "trace.search-placeholder" | "trace.session" | "trace.sessions" | "trace.start" | "trace.stop-reason" | "trace.task" | "trace.text" | "trace.thinking" | "trace.timeline" | "trace.timeline-hint" | "trace.title" | "trace.tok" | "trace.tool" | "trace.tool-aggregates" | "trace.tool-aggregates-desc" | "trace.tool-calls-n" | "trace.tool-time" | "trace.tools" | "trace.track" | "trace.transcript" | "trace.transcript-description" | "trace.ttft" | "trace.turns" | "trace.unterminated" | "trace.wall-time" | "ui.api" | "ui.delta-new" | "ui.json" | "ui.open-trace" | "ui.retry" | "ui.section-cost" | "ui.section-identity" | "ui.section-timing" | "ui.session-file" | "ui.show-fewer" | "ui.stats-row" | "ui.status-ok" | "ui.stop-reason" | "ui.table-shown-of" | "ui.time-to-first-token" | "ui.trace" | "ui.uncached-input", string>>;
|
|
12
|
+
readonly messages: Partial<Record<"common.aborted" | "common.average" | "common.cache-read" | "common.cache-write" | "common.cancel" | "common.close" | "common.copied" | "common.copy" | "common.cost" | "common.duration" | "common.entry-id" | "common.error" | "common.error-rate" | "common.failed" | "common.filter" | "common.input" | "common.model" | "common.models" | "common.no-data-in-range" | "common.nothing-here-yet" | "common.other-n" | "common.output" | "common.output-message" | "common.output-tokens-per-second" | "common.pages" | "common.premium" | "common.premium-requests" | "common.project" | "common.provider" | "common.providers" | "common.range-1h" | "common.range-24h" | "common.range-30d" | "common.range-7d" | "common.range-90d" | "common.range-all" | "common.request" | "common.request-id" | "common.requests" | "common.root" | "common.session-entry" | "common.share" | "common.show-more" | "common.started" | "common.time-range" | "common.tokens" | "common.tokens-per-second" | "common.total" | "common.unknown" | "common.window-1h" | "common.window-24h" | "common.window-30d" | "common.window-7d" | "common.window-90d" | "common.window-all" | "costs.active-days-n" | "costs.active-days-one" | "costs.all-priced" | "costs.api-equivalent-estimate" | "costs.api-estimate-title" | "costs.average-per-day" | "costs.average-per-day-title" | "costs.by-component" | "costs.by-model" | "costs.by-model-description" | "costs.daily-by-component" | "costs.daily-by-model" | "costs.daily-estimate" | "costs.description" | "costs.empty-hint" | "costs.estimate" | "costs.estimate-by-component" | "costs.estimate-title" | "costs.no-priced-usage" | "costs.no-usage-in-range" | "costs.nothing-priced-yet" | "costs.per-priced-request" | "costs.per-priced-request-title" | "costs.per-request" | "costs.per-request-title" | "costs.priced-n" | "costs.requests-n" | "costs.split" | "costs.split-by" | "costs.split-title" | "costs.title" | "costs.top-model" | "costs.top-model-hint" | "costs.unpriced" | "costs.unpriced-column-title" | "costs.unpriced-hint" | "costs.unpriced-note-n" | "costs.unpriced-note-one" | "costs.unpriced-requests" | "costs.unpriced-title" | "costs.where-it-went" | "errors.affected-models" | "errors.by-model" | "errors.by-model-description" | "errors.cost-hint" | "errors.description" | "errors.empty-all-succeeded" | "errors.empty-no-affected-models" | "errors.empty-no-failures" | "errors.error-signatures" | "errors.failures" | "errors.filtered-of-total" | "errors.footer" | "errors.group-meta" | "errors.hint-in-window" | "errors.hint-latest-loaded" | "errors.last-failure" | "errors.last-seen" | "errors.load-latest" | "errors.loading" | "errors.loading-failures" | "errors.more-models" | "errors.no-match" | "errors.no-match-hint" | "errors.none-in-window" | "errors.open-latest" | "errors.search-placeholder" | "errors.signature" | "errors.signatures" | "errors.signatures-card-description" | "errors.signatures-hint" | "errors.signatures-top" | "errors.title" | "errors.unknown-error" | "errors.when" | "frustration.all-classes" | "frustration.all-judged" | "frustration.angry" | "frustration.angry-title" | "frustration.annoyed" | "frustration.annoyed-title" | "frustration.at-assistant" | "frustration.at-assistant-title" | "frustration.by-model" | "frustration.by-model-description" | "frustration.cancel-run" | "frustration.cancelled" | "frustration.cancelling" | "frustration.classify" | "frustration.column-judged" | "frustration.column-mean" | "frustration.column-messages" | "frustration.column-model-ids" | "frustration.column-session" | "frustration.column-tool-errors" | "frustration.column-turns" | "frustration.cost-so-far" | "frustration.coverage-hint" | "frustration.coverage-unscored" | "frustration.description" | "frustration.done" | "frustration.elapsed" | "frustration.estimate-note" | "frustration.estimated-cost" | "frustration.estimating" | "frustration.every-model-class" | "frustration.failed" | "frustration.failed-n" | "frustration.failed-suffix" | "frustration.hatch-title" | "frustration.hide-regex-title" | "frustration.in-flight" | "frustration.in-time" | "frustration.include-small" | "frustration.input-tokens" | "frustration.judge-coverage" | "frustration.judge-coverage-title" | "frustration.judge-description" | "frustration.judge-model" | "frustration.judge-panel" | "frustration.judge-running" | "frustration.judge-with" | "frustration.last-run-cancelled" | "frustration.last-run-done" | "frustration.last-run-failed" | "frustration.legend-angry" | "frustration.legend-annoyed-any" | "frustration.legend-assistant" | "frustration.legend-hatched" | "frustration.legend-hatched-run" | "frustration.legend-hue" | "frustration.legend-other" | "frustration.legend-trend" | "frustration.messages-n" | "frustration.messages-progress" | "frustration.model-breakdown" | "frustration.model-breakdown-title" | "frustration.model-by-model" | "frustration.model-by-model-description" | "frustration.model-class" | "frustration.model-hedge" | "frustration.model-hedge-title" | "frustration.model-hint-mean" | "frustration.model-legend-breakdown" | "frustration.model-mean" | "frustration.model-mean-title" | "frustration.model-no-turns" | "frustration.model-over-time" | "frustration.model-over-time-description" | "frustration.model-rambling" | "frustration.model-rambling-title" | "frustration.model-restatement" | "frustration.model-restatement-title" | "frustration.model-self-blame" | "frustration.model-self-blame-title" | "frustration.model-sessions" | "frustration.model-sessions-description" | "frustration.model-side-description" | "frustration.model-side-title" | "frustration.model-spiral" | "frustration.model-spiral-title" | "frustration.model-table-description" | "frustration.model-table-title" | "frustration.model-try-longer-range" | "frustration.model-turns" | "frustration.model-turns-title" | "frustration.model-unscored-line" | "frustration.model-versions" | "frustration.mostly-regex" | "frustration.no-messages" | "frustration.no-model-match" | "frustration.no-run-yet" | "frustration.not-run-yet" | "frustration.proceed" | "frustration.prose-chars" | "frustration.quote-title" | "frustration.regex-badge" | "frustration.regex-only" | "frustration.row-mostly-regex" | "frustration.run-cancelled-after" | "frustration.run-cancelled-line" | "frustration.run-done-line" | "frustration.run-failed-after" | "frustration.run-failed-line" | "frustration.run-judged" | "frustration.running" | "frustration.small-models-title" | "frustration.stack-relation" | "frustration.starting" | "frustration.table-description" | "frustration.title" | "frustration.try-longer-range" | "frustration.turns-n" | "frustration.unclassified" | "frustration.unjudged-messages" | "frustration.unknown-error" | "frustration.unscored-line" | "frustration.user-messages" | "frustration.user-messages-title" | "gain.all-projects" | "gain.by-source" | "gain.by-source-description" | "gain.cumulative" | "gain.description" | "gain.description-scoped" | "gain.empty-hint-all" | "gain.empty-hint-longer-range" | "gain.empty-title" | "gain.empty-title-scoped" | "gain.hits" | "gain.reduction" | "gain.reduction-title" | "gain.reduction-unknown" | "gain.saved-bytes" | "gain.saved-per-day" | "gain.saved-per-hit" | "gain.saved-tokens" | "gain.savings-over-time" | "gain.savings-over-time-description" | "gain.source" | "gain.title" | "models.across-providers" | "models.across-providers-one" | "models.all-models" | "models.api-cost" | "models.api-cost-title" | "models.avg-duration" | "models.avg-ttft" | "models.bucket-5m" | "models.bucket-day" | "models.bucket-hour" | "models.cache-rate" | "models.cache-savings" | "models.cache-title" | "models.cost-title" | "models.count-desc" | "models.efficiency" | "models.empty-hint" | "models.empty-title" | "models.errors" | "models.failed-n" | "models.first-last-seen" | "models.latency" | "models.most-used" | "models.most-used-hint" | "models.no-samples-hint" | "models.no-samples-title" | "models.performance-per-bucket" | "models.request-share" | "models.share-desc" | "models.share-mode-aria" | "models.subtitle" | "models.table-desc" | "models.tok-per-second" | "models.tokens-title" | "models.tps-title" | "models.trend" | "models.trend-title" | "models.ttft" | "models.ttft-title" | "models.uncached-input" | "models.unpriced-n" | "models.used" | "nav.activity" | "nav.breadcrumb-stats" | "nav.costs" | "nav.dashboard" | "nav.errors" | "nav.frustration" | "nav.gain" | "nav.insights" | "nav.models" | "nav.open-navigation" | "nav.overview" | "nav.pages" | "nav.projects" | "nav.providers" | "nav.requests" | "nav.spotlight" | "nav.tools" | "nav.traces" | "nav.tracking" | "nav.usage" | "overview.activity" | "overview.advisor" | "overview.all-requests" | "overview.api-cost-title" | "overview.api-equivalent" | "overview.api-equivalent-cost" | "overview.avg-latency" | "overview.avg-ttft" | "overview.by-agent" | "overview.cache-rate" | "overview.cache-rate-title" | "overview.cache-saved" | "overview.conversation-tokens" | "overview.description" | "overview.failed-n" | "overview.latest-requests" | "overview.latest-requests-description" | "overview.main-agent" | "overview.ok" | "overview.output-n" | "overview.per-5m" | "overview.per-day" | "overview.per-hour" | "overview.requests-short" | "overview.status" | "overview.subagents" | "overview.succeeded" | "overview.succeeded-n" | "overview.title" | "overview.token-mix" | "overview.token-mix-description" | "overview.tokens-title" | "overview.uncached-input" | "overview.unpriced-n" | "overview.when" | "projects.api-equivalent-cost" | "projects.api-equivalent-cost-hint" | "projects.api-equivalent-cost-rates" | "projects.avg-duration" | "projects.cache-rate" | "projects.cache-rate-hint" | "projects.cache-rate-hint-all" | "projects.cache-savings" | "projects.cache-savings-hint" | "projects.conversation-tokens" | "projects.conversation-tokens-hint" | "projects.description" | "projects.empty-no-folders" | "projects.empty-no-match" | "projects.empty-only-temporary" | "projects.errors" | "projects.failed-n" | "projects.filter-placeholder" | "projects.folder" | "projects.folders" | "projects.folders-n" | "projects.folders-of-n" | "projects.hide-temporary" | "projects.hide-temporary-hint" | "projects.hint-longer-range" | "projects.hint-temporary-hidden" | "projects.last-active" | "projects.share-of-cost" | "projects.share-of-requests" | "projects.temp" | "projects.temporary-n" | "projects.title" | "projects.top-by-cost" | "projects.top-by-cost-description" | "projects.top-by-requests" | "projects.top-by-requests-description" | "projects.unpriced-n" | "providers.account" | "providers.accounts" | "providers.accounts-needed" | "providers.accounts-needed-title" | "providers.accounts-title" | "providers.all-providers" | "providers.api-cost-title" | "providers.api-equivalent-cost" | "providers.bucket-5m" | "providers.bucket-day" | "providers.bucket-hour" | "providers.burn" | "providers.burn-description" | "providers.burn-estimate-description" | "providers.cost-title" | "providers.description" | "providers.exhausted" | "providers.exhausted-n" | "providers.exhaustions" | "providers.exhaustions-title" | "providers.failed-n" | "providers.high" | "providers.hours-description" | "providers.ideal-accounts" | "providers.latest-used" | "providers.models-title" | "providers.most-tokens" | "providers.no-activity-in-range" | "providers.no-provider-activity" | "providers.no-reading" | "providers.no-requests-in-range" | "providers.no-snapshots-in-range" | "providers.no-utilization-readings" | "providers.peak-burn-hours" | "providers.peak-hours-description" | "providers.peak-in-range" | "providers.peak-utilization" | "providers.peak-utilization-title" | "providers.premium-title" | "providers.recorded" | "providers.resets" | "providers.resets-title" | "providers.share-title" | "providers.snapshot-hint" | "providers.snapshots" | "providers.status" | "providers.subscription-windows" | "providers.subscription-windows-description" | "providers.succeeded-n" | "providers.tokens-peak-hour" | "providers.tokens-per-window" | "providers.tokens-per-window-title" | "providers.tokens-title" | "providers.too-little-consumed" | "providers.totals" | "providers.totals-description" | "providers.totals-description-unpriced-n" | "providers.totals-description-unpriced-one" | "providers.tps-title" | "providers.unpriced-n" | "providers.utilization" | "providers.utilization-description" | "providers.utilization-description-plain" | "providers.window" | "providers.windows-burned" | "providers.windows-burned-title" | "requests.api-equivalent-cost" | "requests.cache-read-title" | "requests.cache-write" | "requests.cost-estimate" | "requests.cost-hint" | "requests.description" | "requests.empty-in-window" | "requests.empty-no-match" | "requests.empty-no-match-hint" | "requests.failed-hint" | "requests.footer" | "requests.load-latest" | "requests.loading" | "requests.log-count-in-window" | "requests.log-count-latest" | "requests.log-loading" | "requests.log-title" | "requests.median-duration" | "requests.median-ttft" | "requests.none-in-window" | "requests.p95" | "requests.search-placeholder" | "requests.since" | "requests.status" | "requests.status-all" | "requests.tokens-hint" | "requests.ttft" | "requests.ttft-hint" | "requests.uncached-input" | "requests.unpriced-n" | "requests.when" | "shell.building-rollups" | "shell.dark-theme" | "shell.indexing" | "shell.ingesting" | "shell.jump-hint" | "shell.just-now" | "shell.language" | "shell.light-theme" | "shell.live" | "shell.lost-connection" | "shell.range-suffix" | "shell.reconnecting" | "shell.switch-language" | "shell.sync-failed" | "shell.sync-now" | "shell.syncing" | "shell.system-theme" | "tools.all-tools" | "tools.api-equivalent" | "tools.args" | "tools.args-chars-title" | "tools.attr-cost" | "tools.attr-tokens" | "tools.attributed-cost" | "tools.attributed-tokens" | "tools.attribution-estimate" | "tools.attribution-note" | "tools.avg-args-per-call" | "tools.avg-result-per-call" | "tools.bucket-5m" | "tools.bucket-day" | "tools.bucket-hour" | "tools.by-tool" | "tools.by-tool-and-model" | "tools.by-tool-and-model-description" | "tools.by-tool-description" | "tools.call-arguments" | "tools.calls" | "tools.calls-over-time" | "tools.chars" | "tools.chart-description" | "tools.clear-tool-filter" | "tools.description" | "tools.distinct-tools" | "tools.error-rate-title" | "tools.errors" | "tools.errors-over-time" | "tools.errors-title" | "tools.failed-n" | "tools.filter-by-tool" | "tools.last-used" | "tools.most-used" | "tools.no-calls-to-tool" | "tools.no-tool-calls" | "tools.no-tool-errors" | "tools.result" | "tools.result-chars-title" | "tools.result-per-call" | "tools.result-per-call-title" | "tools.result-text" | "tools.share-of-calls" | "tools.share-of-cost" | "tools.share-of-tokens" | "tools.succeeded-n" | "tools.title" | "tools.tokens-output" | "tools.tool" | "tools.tool-calls" | "tools.trend" | "tools.trend-title" | "tools.unpriced-requests-n" | "trace.agent" | "trace.agents" | "trace.args" | "trace.avg" | "trace.axis-mode" | "trace.background" | "trace.bg" | "trace.calls" | "trace.canvas-aria" | "trace.collapse-all" | "trace.collapse-track" | "trace.compress-idle" | "trace.copy-json" | "trace.description" | "trace.empty-hint" | "trace.empty-title" | "trace.error-message" | "trace.errors" | "trace.expand-all" | "trace.expand-track" | "trace.failed-n" | "trace.filter-placeholder" | "trace.idle" | "trace.io-cached" | "trace.load-failed" | "trace.max" | "trace.minimap-aria" | "trace.mode-calls-title" | "trace.mode-time-title" | "trace.mode-turns-title" | "trace.model-time" | "trace.most-recent" | "trace.most-recent-filtered" | "trace.next-match" | "trace.no-matching-events" | "trace.no-matching-hint" | "trace.no-matching-title" | "trace.of-wall" | "trace.open-child-track" | "trace.previous-match" | "trace.raw-entry" | "trace.refresh" | "trace.search-placeholder" | "trace.session" | "trace.sessions" | "trace.start" | "trace.stop-reason" | "trace.task" | "trace.text" | "trace.thinking" | "trace.timeline" | "trace.timeline-hint" | "trace.title" | "trace.tok" | "trace.tool" | "trace.tool-aggregates" | "trace.tool-aggregates-desc" | "trace.tool-calls-n" | "trace.tool-time" | "trace.tools" | "trace.track" | "trace.transcript" | "trace.transcript-description" | "trace.ttft" | "trace.turns" | "trace.unterminated" | "trace.wall-time" | "tracking.actions" | "tracking.actions-empty" | "tracking.actions-missing" | "tracking.blockers" | "tracking.corrupt" | "tracking.decisions" | "tracking.description" | "tracking.directory" | "tracking.document-empty" | "tracking.error" | "tracking.index" | "tracking.index-missing" | "tracking.invalid-rows" | "tracking.last-session" | "tracking.last-updated" | "tracking.missing" | "tracking.no-documents" | "tracking.no-documents-hint" | "tracking.no-projects" | "tracking.no-projects-hint" | "tracking.none" | "tracking.partial" | "tracking.phase" | "tracking.phases" | "tracking.progress" | "tracking.project" | "tracking.read-only" | "tracking.select-project" | "tracking.sessions" | "tracking.sessions-empty" | "tracking.sessions-missing" | "tracking.stage" | "tracking.status" | "tracking.status-corrupt" | "tracking.status-error" | "tracking.status-missing" | "tracking.title" | "tracking.truncated" | "tracking.updated" | "ui.api" | "ui.delta-new" | "ui.json" | "ui.open-trace" | "ui.retry" | "ui.section-cost" | "ui.section-identity" | "ui.section-timing" | "ui.session-file" | "ui.show-fewer" | "ui.stats-row" | "ui.status-ok" | "ui.stop-reason" | "ui.table-shown-of" | "ui.time-to-first-token" | "ui.trace" | "ui.uncached-input", string>>;
|
|
13
13
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./tracking.css";
|
|
2
|
+
export interface TrackingRouteProps {
|
|
3
|
+
active: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Read-only Tracking page: one project from the stats registry at a time, with
|
|
7
|
+
* the same files the agent's `tracking_update` tool writes. Missing/corrupt
|
|
8
|
+
* inputs render as those states rather than as an empty or healthy project.
|
|
9
|
+
*/
|
|
10
|
+
export declare function TrackingRoute({ active }: TrackingRouteProps): import("react").JSX.Element;
|
package/dist/types/db.d.ts
CHANGED
|
@@ -138,6 +138,26 @@ export declare function getUsageHistory(now?: number, days?: number): Promise<Us
|
|
|
138
138
|
* Settle every full-session backfill after a successful sync pass.
|
|
139
139
|
*/
|
|
140
140
|
export declare function markSessionBackfillsComplete(): void;
|
|
141
|
+
export interface PruneOrphanResult {
|
|
142
|
+
/** Distinct session files whose rows were removed. */
|
|
143
|
+
prunedFiles: number;
|
|
144
|
+
/** Total rows removed across all session-keyed tables. */
|
|
145
|
+
deletedRows: number;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Delete every row whose `session_file` no longer exists on disk. Deleted
|
|
149
|
+
* projects (wiped transcripts, throwaway test suites) otherwise keep surfacing
|
|
150
|
+
* in the feed and every aggregate, and a re-created transcript under a new
|
|
151
|
+
* path would double-count the usage its predecessor recorded. Runs in one
|
|
152
|
+
* transaction; the existing-file set is collected by the caller before any
|
|
153
|
+
* DELETE so the comparison is a single in-memory set probe per stored path.
|
|
154
|
+
*/
|
|
155
|
+
export declare function pruneOrphanSessionsInDb(database: Database, existingFiles: readonly string[]): PruneOrphanResult;
|
|
156
|
+
/**
|
|
157
|
+
* {@link pruneOrphanSessionsInDb} against the module DB handle. No-op when
|
|
158
|
+
* {@link initDb} has not run.
|
|
159
|
+
*/
|
|
160
|
+
export declare function pruneOrphanSessions(existingFiles: readonly string[]): PruneOrphanResult;
|
|
141
161
|
/**
|
|
142
162
|
* Insert user-message stats. Idempotent via UNIQUE(session_file, entry_id).
|
|
143
163
|
* The fork guard matches {@link insertMessageStats}: forks copy user entries
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { StatsJudge, StatsJudgeProvider } from "./frustration.js";
|
|
|
6
6
|
export { getGainDashboardStats } from "./gain-aggregator.js";
|
|
7
7
|
export { formatStatsDashboardUrl, type StartServerOptions, setStatsCloseHandler, startServer } from "./server.js";
|
|
8
8
|
export type { GainDashboardStats, GainSource, GainSourceTotals, GainTimeSeriesPoint, SpotlightAgentScope, SpotlightDashboardStats, SpotlightSessionContext, } from "./shared-types.js";
|
|
9
|
-
export { getSpotlightDashboardStats, getSpotlightSessionContext } from "./spotlight-aggregator.js";
|
|
9
|
+
export { getSpotlightDashboardStats, getSpotlightSessionContext, smokeTestSpotlightWorker, } from "./spotlight-aggregator.js";
|
|
10
10
|
export type { AggregatedStats, DashboardStats, FolderStats, MessageStats, ModelPerformancePoint, ModelStats, ModelTimeSeriesPoint, TimeSeriesPoint, ToolDashboardStats, ToolModelStats, ToolTimeSeriesPoint, ToolUsageStats, } from "./types.js";
|
|
11
11
|
/**
|
|
12
12
|
* Print the dashboard summary to the console. Shared by `zetacode stats --summary`
|
package/dist/types/parser.d.ts
CHANGED
|
@@ -50,7 +50,6 @@ export declare function parseAllSessionEntries(bytes: Uint8Array): SessionEntry[
|
|
|
50
50
|
export interface SessionParserState {
|
|
51
51
|
version: 1;
|
|
52
52
|
offset: number;
|
|
53
|
-
dev: number;
|
|
54
53
|
ino: number;
|
|
55
54
|
birthtimeMs: number;
|
|
56
55
|
size: number;
|
|
@@ -59,6 +58,8 @@ export interface SessionParserState {
|
|
|
59
58
|
serviceTier: ServiceTierByFamily | null;
|
|
60
59
|
/** Absent in cursors persisted before the Spotlight tables; such a tail parse starts from an empty state. */
|
|
61
60
|
spotlight?: SpotlightParserState;
|
|
61
|
+
/** Absent in cursors persisted before replies were tracked; such a cursor is rebuilt from the transcript prefix. */
|
|
62
|
+
pendingReplies?: Record<string, string>;
|
|
62
63
|
}
|
|
63
64
|
export interface ParseSessionResult {
|
|
64
65
|
stats: MessageStatsInput[];
|
|
@@ -72,6 +73,11 @@ export interface ParseSessionResult {
|
|
|
72
73
|
parserState?: SessionParserState;
|
|
73
74
|
reset?: boolean;
|
|
74
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Whether `info` is still the file a cursor was taken from. The device number is deliberately not part of
|
|
78
|
+
* this: ZFS and others renumber it across mounts and reboots while the transcript stays intact; `ino` +
|
|
79
|
+
* `birthtimeMs` (plus size/mtime at call sites) identify the file.
|
|
80
|
+
*/
|
|
75
81
|
export declare function matchesSessionFile(state: SessionParserState, info: nodeFs.Stats): boolean;
|
|
76
82
|
/** Offset-only callers reconstruct service-tier state once; persisted cursors read only the appended tail. */
|
|
77
83
|
export declare function parseSessionFile(sessionPath: string, fromOffset?: number, state?: SessionParserState, replay?: boolean): Promise<ParseSessionResult>;
|
package/dist/types/rollup.d.ts
CHANGED
|
@@ -68,6 +68,10 @@ export declare function getOverallStats(cutoff?: number | null): AggregatedStats
|
|
|
68
68
|
export declare function getStatsByModel(cutoff?: number | null): ModelStats[];
|
|
69
69
|
/** Aggregates per project folder, busiest first; at most `limit` folders. */
|
|
70
70
|
export declare function getStatsByFolder(cutoff?: number | null, limit?: number): FolderStats[];
|
|
71
|
+
/** Distinct project folders the stats registry knows, most recently active first. */
|
|
72
|
+
export declare function getProjectFolders(limit?: number): string[];
|
|
73
|
+
/** Newest session file registered for a project folder, used to resolve its real cwd. */
|
|
74
|
+
export declare function getProjectSessionFile(folder: string): string | null;
|
|
71
75
|
/** Token usage per agent type (main, subagent, advisor). */
|
|
72
76
|
export declare function getStatsByAgentType(cutoff?: number | null): AgentTypeStats[];
|
|
73
77
|
/** Requests, errors, tokens and cost per bucket. */
|