@cchistory/lite 0.8.1 → 0.8.3
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/INSTALL.md +1 -1
- package/apps/lite-cli/dist/agent-contract.d.ts.map +1 -1
- package/apps/lite-cli/dist/agent-contract.js +60 -21
- package/apps/lite-cli/dist/agent-contract.js.map +1 -1
- package/apps/lite-cli/dist/help.d.ts +7 -0
- package/apps/lite-cli/dist/help.d.ts.map +1 -0
- package/apps/lite-cli/dist/help.js +77 -0
- package/apps/lite-cli/dist/help.js.map +1 -0
- package/apps/lite-cli/dist/index.d.ts.map +1 -1
- package/apps/lite-cli/dist/index.js +483 -201
- package/apps/lite-cli/dist/index.js.map +1 -1
- package/apps/lite-cli/dist/index.test.js +39 -76
- package/apps/lite-cli/dist/index.test.js.map +1 -1
- package/apps/lite-cli/dist/json-v2.d.ts.map +1 -1
- package/apps/lite-cli/dist/json-v2.js +43 -1
- package/apps/lite-cli/dist/json-v2.js.map +1 -1
- package/apps/lite-cli/dist/query.d.ts +24 -2
- package/apps/lite-cli/dist/query.d.ts.map +1 -1
- package/apps/lite-cli/dist/query.js +204 -7
- package/apps/lite-cli/dist/query.js.map +1 -1
- package/apps/lite-cli/dist/shell.js +24 -1
- package/apps/lite-cli/dist/shell.js.map +1 -1
- package/apps/lite-cli/dist/stats-command.d.ts +7 -1
- package/apps/lite-cli/dist/stats-command.d.ts.map +1 -1
- package/apps/lite-cli/dist/stats-command.js +95 -17
- package/apps/lite-cli/dist/stats-command.js.map +1 -1
- package/apps/lite-cli/dist/stats-command.test.js +33 -3
- package/apps/lite-cli/dist/stats-command.test.js.map +1 -1
- package/apps/lite-cli/dist/stats-diagnostics-render.d.ts +21 -0
- package/apps/lite-cli/dist/stats-diagnostics-render.d.ts.map +1 -0
- package/apps/lite-cli/dist/stats-diagnostics-render.js +245 -0
- package/apps/lite-cli/dist/stats-diagnostics-render.js.map +1 -0
- package/apps/lite-cli/dist/stats-render.d.ts +11 -3
- package/apps/lite-cli/dist/stats-render.d.ts.map +1 -1
- package/apps/lite-cli/dist/stats-render.js +344 -79
- package/apps/lite-cli/dist/stats-render.js.map +1 -1
- package/apps/lite-cli/dist/stats-visuals.d.ts +49 -0
- package/apps/lite-cli/dist/stats-visuals.d.ts.map +1 -0
- package/apps/lite-cli/dist/stats-visuals.js +333 -0
- package/apps/lite-cli/dist/stats-visuals.js.map +1 -0
- package/apps/lite-cli/dist/trace-command.d.ts +28 -0
- package/apps/lite-cli/dist/trace-command.d.ts.map +1 -0
- package/apps/lite-cli/dist/trace-command.js +394 -0
- package/apps/lite-cli/dist/trace-command.js.map +1 -0
- package/apps/lite-cli/dist/trace-command.test.d.ts +2 -0
- package/apps/lite-cli/dist/trace-command.test.d.ts.map +1 -0
- package/apps/lite-cli/dist/trace-command.test.js +374 -0
- package/apps/lite-cli/dist/trace-command.test.js.map +1 -0
- package/apps/lite-cli/dist/usability.test.d.ts +2 -0
- package/apps/lite-cli/dist/usability.test.d.ts.map +1 -0
- package/apps/lite-cli/dist/usability.test.js +170 -0
- package/apps/lite-cli/dist/usability.test.js.map +1 -0
- package/apps/lite-cli/dist/version.d.ts +1 -1
- package/apps/lite-cli/dist/version.js +1 -1
- package/apps/lite-tui/dist/clipboard.d.ts +18 -0
- package/apps/lite-tui/dist/clipboard.d.ts.map +1 -0
- package/apps/lite-tui/dist/clipboard.js +85 -0
- package/apps/lite-tui/dist/clipboard.js.map +1 -0
- package/apps/lite-tui/dist/index.d.ts +2 -0
- package/apps/lite-tui/dist/index.d.ts.map +1 -1
- package/apps/lite-tui/dist/index.js +282 -7
- package/apps/lite-tui/dist/index.js.map +1 -1
- package/apps/lite-tui/dist/input.d.ts +11 -0
- package/apps/lite-tui/dist/input.d.ts.map +1 -1
- package/apps/lite-tui/dist/input.js +68 -3
- package/apps/lite-tui/dist/input.js.map +1 -1
- package/apps/lite-tui/dist/model.d.ts +17 -1
- package/apps/lite-tui/dist/model.d.ts.map +1 -1
- package/apps/lite-tui/dist/model.js +97 -8
- package/apps/lite-tui/dist/model.js.map +1 -1
- package/apps/lite-tui/dist/render.d.ts +1 -1
- package/apps/lite-tui/dist/render.d.ts.map +1 -1
- package/apps/lite-tui/dist/render.js +31 -9
- package/apps/lite-tui/dist/render.js.map +1 -1
- package/apps/lite-tui/dist/state.d.ts +15 -1
- package/apps/lite-tui/dist/state.d.ts.map +1 -1
- package/apps/lite-tui/dist/state.js +141 -5
- package/apps/lite-tui/dist/state.js.map +1 -1
- package/apps/lite-tui/dist/stats-anomalies-render.d.ts +11 -0
- package/apps/lite-tui/dist/stats-anomalies-render.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-anomalies-render.js +231 -0
- package/apps/lite-tui/dist/stats-anomalies-render.js.map +1 -0
- package/apps/lite-tui/dist/stats-dashboard.test.js +183 -2
- package/apps/lite-tui/dist/stats-dashboard.test.js.map +1 -1
- package/apps/lite-tui/dist/stats-matrix-render.d.ts +9 -0
- package/apps/lite-tui/dist/stats-matrix-render.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-matrix-render.js +239 -0
- package/apps/lite-tui/dist/stats-matrix-render.js.map +1 -0
- package/apps/lite-tui/dist/stats-query.d.ts +4 -3
- package/apps/lite-tui/dist/stats-query.d.ts.map +1 -1
- package/apps/lite-tui/dist/stats-query.js +40 -3
- package/apps/lite-tui/dist/stats-query.js.map +1 -1
- package/apps/lite-tui/dist/stats-render.d.ts.map +1 -1
- package/apps/lite-tui/dist/stats-render.js +149 -104
- package/apps/lite-tui/dist/stats-render.js.map +1 -1
- package/apps/lite-tui/dist/stats-state.d.ts +48 -4
- package/apps/lite-tui/dist/stats-state.d.ts.map +1 -1
- package/apps/lite-tui/dist/stats-state.js +129 -3
- package/apps/lite-tui/dist/stats-state.js.map +1 -1
- package/apps/lite-tui/dist/stats-trace-render.d.ts +9 -0
- package/apps/lite-tui/dist/stats-trace-render.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-trace-render.js +213 -0
- package/apps/lite-tui/dist/stats-trace-render.js.map +1 -0
- package/apps/lite-tui/dist/stats-visuals.d.ts +29 -0
- package/apps/lite-tui/dist/stats-visuals.d.ts.map +1 -0
- package/apps/lite-tui/dist/stats-visuals.js +289 -0
- package/apps/lite-tui/dist/stats-visuals.js.map +1 -0
- package/apps/lite-tui/dist/usability.test.d.ts +2 -0
- package/apps/lite-tui/dist/usability.test.d.ts.map +1 -0
- package/apps/lite-tui/dist/usability.test.js +269 -0
- package/apps/lite-tui/dist/usability.test.js.map +1 -0
- package/apps/lite-tui/dist/version.d.ts +1 -1
- package/apps/lite-tui/dist/version.js +1 -1
- package/docs/guide/for-agents.md +17 -8
- package/docs/guide/lite.md +99 -34
- package/docs/guide/queries/anomaly-calls.sql +18 -0
- package/docs/guide/query.md +9 -4
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.d.ts +1 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.js +6 -0
- package/node_modules/@cchistory/canonical/dist/conversation-evidence.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.d.ts +5 -1
- package/node_modules/@cchistory/canonical/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/index.js +5 -1
- package/node_modules/@cchistory/canonical/dist/index.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.d.ts +2 -2
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.js +4 -4
- package/node_modules/@cchistory/canonical/dist/model-pricing-catalog.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/query.d.ts +4 -1
- package/node_modules/@cchistory/canonical/dist/query.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/query.js +130 -1
- package/node_modules/@cchistory/canonical/dist/query.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-interpreter.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js +21 -13
- package/node_modules/@cchistory/canonical/dist/session-interpreter.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.d.ts +32 -0
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.js +499 -0
- package/node_modules/@cchistory/canonical/dist/tool-call-summary.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.d.ts +27 -0
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.js +383 -0
- package/node_modules/@cchistory/canonical/dist/usage-anomalies.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-breakdown.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-breakdown.js +113 -20
- package/node_modules/@cchistory/canonical/dist/usage-breakdown.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.d.ts +41 -0
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.js +330 -0
- package/node_modules/@cchistory/canonical/dist/usage-call-evaluation.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.d.ts +47 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.js +424 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.test.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.test.js +325 -0
- package/node_modules/@cchistory/canonical/dist/usage-diagnostics.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-pricing.js +21 -2
- package/node_modules/@cchistory/canonical/dist/usage-pricing.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-pricing.test.js +112 -0
- package/node_modules/@cchistory/canonical/dist/usage-pricing.test.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-time.d.ts +25 -1
- package/node_modules/@cchistory/canonical/dist/usage-time.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-time.js +82 -1
- package/node_modules/@cchistory/canonical/dist/usage-time.js.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage-tool-patterns.d.ts +14 -0
- package/node_modules/@cchistory/canonical/dist/usage-tool-patterns.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-tool-patterns.js +243 -0
- package/node_modules/@cchistory/canonical/dist/usage-tool-patterns.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.d.ts +18 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.js +405 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.d.ts +2 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.d.ts.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.js +346 -0
- package/node_modules/@cchistory/canonical/dist/usage-trace.test.js.map +1 -0
- package/node_modules/@cchistory/canonical/dist/usage.d.ts +18 -1
- package/node_modules/@cchistory/canonical/dist/usage.d.ts.map +1 -1
- package/node_modules/@cchistory/canonical/dist/usage.js +77 -5
- package/node_modules/@cchistory/canonical/dist/usage.js.map +1 -1
- package/node_modules/@cchistory/canonical/package.json +1 -1
- package/node_modules/@cchistory/domain/dist/index.d.ts +18 -1
- package/node_modules/@cchistory/domain/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/index.js +1 -0
- package/node_modules/@cchistory/domain/dist/index.js.map +1 -1
- package/node_modules/@cchistory/domain/dist/query.d.ts +1 -1
- package/node_modules/@cchistory/domain/dist/query.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/usage-pricing.d.ts +83 -1
- package/node_modules/@cchistory/domain/dist/usage-pricing.d.ts.map +1 -1
- package/node_modules/@cchistory/domain/dist/usage-trace.d.ts +245 -0
- package/node_modules/@cchistory/domain/dist/usage-trace.d.ts.map +1 -0
- package/node_modules/@cchistory/domain/dist/usage-trace.js +8 -0
- package/node_modules/@cchistory/domain/dist/usage-trace.js.map +1 -0
- package/node_modules/@cchistory/domain/package.json +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts +12 -4
- package/node_modules/@cchistory/live-runtime/dist/index.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.js +81 -3
- package/node_modules/@cchistory/live-runtime/dist/index.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/index.test.js +8 -6
- package/node_modules/@cchistory/live-runtime/dist/index.test.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/sql-query.d.ts.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/sql-query.js +3 -2
- package/node_modules/@cchistory/live-runtime/dist/sql-query.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/dist/sql-query.test.js +46 -2
- package/node_modules/@cchistory/live-runtime/dist/sql-query.test.js.map +1 -1
- package/node_modules/@cchistory/live-runtime/package.json +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js +3 -2
- package/node_modules/@cchistory/source-adapters/dist/core/parser.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/sqlite.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/sqlite.js +21 -7
- package/node_modules/@cchistory/source-adapters/dist/platforms/antigravity/sqlite.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.js +18 -2
- package/node_modules/@cchistory/source-adapters/dist/platforms/claude-code/runtime.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.js +22 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/codex/runtime.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.d.ts.map +1 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js +12 -1
- package/node_modules/@cchistory/source-adapters/dist/platforms/generic/runtime.js.map +1 -1
- package/node_modules/@cchistory/source-adapters/package.json +1 -1
- package/package.json +5 -5
- package/schemas/cchistory-lite-agent-v1.schema.json +2 -1
- package/schemas/cchistory-lite-query-result-v2.schema.json +3 -1
- package/schemas/cchistory-lite-query-v2.schema.json +41 -1
- package/schemas/cchistory-lite-v2.schema.json +1 -1
- package/skills/using-cchistory-lite/SKILL.md +26 -4
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role: Pure domain contracts for per-call usage telemetry, causal tool summaries,
|
|
3
|
+
* cache-hit distributions, family/subagent rollups, tool/command loop clusters,
|
|
4
|
+
* usage anomalies, and single-session call waterfall traces.
|
|
5
|
+
* Excludes aggregation, anomaly detection, and CLI/TUI rendering (owned by canonical and surfaces).
|
|
6
|
+
*/
|
|
7
|
+
import type { SourcePlatform } from "./index.js";
|
|
8
|
+
import type { AssistantStopReason } from "./parsed-session.js";
|
|
9
|
+
export type UsageGranularity = "call" | "turn" | "session" | "unavailable";
|
|
10
|
+
export type UsageToolStatus = "success" | "error" | "pending";
|
|
11
|
+
export type CacheHitBucketKey = "healthy" | "degraded" | "cold_or_miss";
|
|
12
|
+
export type CallCacheStatus = "cold_start" | "hit" | "degraded" | "miss" | "no_input";
|
|
13
|
+
export type CacheMissCause = "idle_ttl_gap" | "model_switch" | "compaction" | "prefix_invalidation" | "cold_start";
|
|
14
|
+
export type UsageAnomalyKind = "cache_miss_cliff" | "polling_loop" | "context_bloat" | "subagent_fanout" | "high_context_cliff" | "tool_error_loop";
|
|
15
|
+
export type UsageAnomalySeverity = "high" | "medium" | "low";
|
|
16
|
+
export interface UsageToolSummary {
|
|
17
|
+
tool_name: string;
|
|
18
|
+
/** Masked, normalized target/command signature (<= 80 chars) for loop & pattern grouping. */
|
|
19
|
+
target_signature?: string;
|
|
20
|
+
/** Short masked sample of the actual target/command (<= 80 chars). */
|
|
21
|
+
sample?: string;
|
|
22
|
+
status: UsageToolStatus;
|
|
23
|
+
duration_ms?: number;
|
|
24
|
+
input_bytes?: number;
|
|
25
|
+
output_bytes?: number;
|
|
26
|
+
call_id?: string;
|
|
27
|
+
subagent_ref?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CacheHitBucketSummary {
|
|
30
|
+
bucket: CacheHitBucketKey;
|
|
31
|
+
label: string;
|
|
32
|
+
call_count: number;
|
|
33
|
+
/** Calls inside this bucket with cache_read === 0 (only populated for cold_or_miss). */
|
|
34
|
+
zero_hit_call_count?: number;
|
|
35
|
+
call_share: number;
|
|
36
|
+
total_tokens: number;
|
|
37
|
+
adjusted_cost_usd: number;
|
|
38
|
+
cost_share: number;
|
|
39
|
+
}
|
|
40
|
+
export interface CacheHitDistribution {
|
|
41
|
+
evaluated_call_count: number;
|
|
42
|
+
buckets: CacheHitBucketSummary[];
|
|
43
|
+
}
|
|
44
|
+
export interface UsageRoleStats {
|
|
45
|
+
session_count: number;
|
|
46
|
+
call_count: number;
|
|
47
|
+
total_tokens: number;
|
|
48
|
+
adjusted_cost_usd: number;
|
|
49
|
+
cost_share: number;
|
|
50
|
+
cache_hit_ratio: number | null;
|
|
51
|
+
}
|
|
52
|
+
export interface UsageRoleSplit {
|
|
53
|
+
main: UsageRoleStats;
|
|
54
|
+
subagents: UsageRoleStats;
|
|
55
|
+
}
|
|
56
|
+
export interface UsageAnomaly {
|
|
57
|
+
id: string;
|
|
58
|
+
kind: UsageAnomalyKind;
|
|
59
|
+
severity: UsageAnomalySeverity;
|
|
60
|
+
session_id: string;
|
|
61
|
+
session_title?: string;
|
|
62
|
+
parent_session_id?: string;
|
|
63
|
+
subagent_key?: string;
|
|
64
|
+
turn_id?: string | null;
|
|
65
|
+
call_seq?: number;
|
|
66
|
+
call_seq_end?: number;
|
|
67
|
+
timestamp?: string;
|
|
68
|
+
/** Estimated extra or attributed USD impact for ranking. */
|
|
69
|
+
impact_usd?: number;
|
|
70
|
+
/** Token impact (e.g. uncached/rebuilt input, loop tokens, or context delta). */
|
|
71
|
+
impact_tokens?: number;
|
|
72
|
+
summary: string;
|
|
73
|
+
evidence: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
export interface ToolPatternRow {
|
|
76
|
+
key: string;
|
|
77
|
+
tool_name: string;
|
|
78
|
+
target_signature: string;
|
|
79
|
+
sample?: string;
|
|
80
|
+
exec_count: number;
|
|
81
|
+
error_count: number;
|
|
82
|
+
pending_count: number;
|
|
83
|
+
first_at?: string;
|
|
84
|
+
last_at?: string;
|
|
85
|
+
/** Wall-clock span between first and last observed execution in ms. */
|
|
86
|
+
span_ms: number;
|
|
87
|
+
/** Sum of known individual tool execution durations in ms. */
|
|
88
|
+
total_duration_ms: number;
|
|
89
|
+
/** Deduplicated model calls associated with executing or consuming this tool pattern. */
|
|
90
|
+
attributed_call_count: number;
|
|
91
|
+
attributed_tokens: number;
|
|
92
|
+
attributed_cost_usd: number;
|
|
93
|
+
avg_cache_hit_ratio: number | null;
|
|
94
|
+
min_cache_hit_ratio: number | null;
|
|
95
|
+
total_output_bytes: number;
|
|
96
|
+
max_output_bytes: number;
|
|
97
|
+
is_loop: boolean;
|
|
98
|
+
loop_cluster_count: number;
|
|
99
|
+
session_ids: string[];
|
|
100
|
+
}
|
|
101
|
+
export interface ToolLoopCluster {
|
|
102
|
+
id: string;
|
|
103
|
+
session_id: string;
|
|
104
|
+
session_title?: string;
|
|
105
|
+
turn_id: string | null;
|
|
106
|
+
subagent_key?: string;
|
|
107
|
+
tool_name: string;
|
|
108
|
+
target_signature: string;
|
|
109
|
+
sample?: string;
|
|
110
|
+
exec_count: number;
|
|
111
|
+
error_count: number;
|
|
112
|
+
first_at: string;
|
|
113
|
+
last_at: string;
|
|
114
|
+
duration_ms: number;
|
|
115
|
+
first_call_seq?: number;
|
|
116
|
+
last_call_seq?: number;
|
|
117
|
+
attributed_call_count: number;
|
|
118
|
+
attributed_tokens: number;
|
|
119
|
+
attributed_cost_usd: number;
|
|
120
|
+
avg_cache_hit_ratio: number | null;
|
|
121
|
+
min_cache_hit_ratio: number | null;
|
|
122
|
+
}
|
|
123
|
+
export interface FamilyUsageRow {
|
|
124
|
+
parent_session_id: string;
|
|
125
|
+
title: string;
|
|
126
|
+
project_label: string;
|
|
127
|
+
source_label: string;
|
|
128
|
+
subagent_count: number;
|
|
129
|
+
self_calls: number;
|
|
130
|
+
self_tokens: number;
|
|
131
|
+
self_cost_usd: number;
|
|
132
|
+
self_cache_hit_ratio: number | null;
|
|
133
|
+
subagent_calls: number;
|
|
134
|
+
subagent_tokens: number;
|
|
135
|
+
subagent_cost_usd: number;
|
|
136
|
+
subagent_cache_hit_ratio: number | null;
|
|
137
|
+
total_calls: number;
|
|
138
|
+
total_tokens: number;
|
|
139
|
+
total_cost_usd: number;
|
|
140
|
+
combined_cache_hit_ratio: number | null;
|
|
141
|
+
signals: string[];
|
|
142
|
+
anomaly_count: number;
|
|
143
|
+
last_activity_at?: string;
|
|
144
|
+
}
|
|
145
|
+
export interface UsageDiagnosticsReport {
|
|
146
|
+
generated_at: string;
|
|
147
|
+
cache_distribution: CacheHitDistribution;
|
|
148
|
+
role_split: UsageRoleSplit;
|
|
149
|
+
families: FamilyUsageRow[];
|
|
150
|
+
tool_patterns: ToolPatternRow[];
|
|
151
|
+
loops: ToolLoopCluster[];
|
|
152
|
+
anomalies: UsageAnomaly[];
|
|
153
|
+
}
|
|
154
|
+
export interface SessionTraceFamilyMember {
|
|
155
|
+
role: "main" | "subagent";
|
|
156
|
+
session_id: string;
|
|
157
|
+
subagent_key?: string;
|
|
158
|
+
agent_key?: string;
|
|
159
|
+
title: string;
|
|
160
|
+
model?: string;
|
|
161
|
+
calls: number;
|
|
162
|
+
duration_ms: number;
|
|
163
|
+
total_tokens: number;
|
|
164
|
+
adjusted_cost_usd: number;
|
|
165
|
+
cache_hit_ratio: number | null;
|
|
166
|
+
min_cache_hit_ratio: number | null;
|
|
167
|
+
anomaly_count: number;
|
|
168
|
+
}
|
|
169
|
+
export interface SessionTraceTurnRow {
|
|
170
|
+
turn_id: string | null;
|
|
171
|
+
turn_index: number | null;
|
|
172
|
+
created_at: string;
|
|
173
|
+
prompt_preview: string;
|
|
174
|
+
calls: number;
|
|
175
|
+
tool_call_count: number;
|
|
176
|
+
tool_error_count: number;
|
|
177
|
+
peak_context_tokens: number;
|
|
178
|
+
total_tokens: number;
|
|
179
|
+
input_tokens: number;
|
|
180
|
+
cache_read_tokens: number;
|
|
181
|
+
cache_write_tokens: number;
|
|
182
|
+
output_tokens: number;
|
|
183
|
+
adjusted_cost_usd: number;
|
|
184
|
+
avg_cache_hit_ratio: number | null;
|
|
185
|
+
min_cache_hit_ratio: number | null;
|
|
186
|
+
anomaly_count: number;
|
|
187
|
+
}
|
|
188
|
+
export interface CallTraceRow {
|
|
189
|
+
seq: number;
|
|
190
|
+
event_id: string;
|
|
191
|
+
session_id: string;
|
|
192
|
+
subagent_key?: string;
|
|
193
|
+
turn_id: string | null;
|
|
194
|
+
turn_label: string;
|
|
195
|
+
created_at: string;
|
|
196
|
+
gap_ms: number | null;
|
|
197
|
+
model: string;
|
|
198
|
+
stop_reason?: AssistantStopReason;
|
|
199
|
+
context_input_tokens: number;
|
|
200
|
+
context_delta_tokens: number | null;
|
|
201
|
+
input_tokens: number;
|
|
202
|
+
cache_read_tokens: number;
|
|
203
|
+
cache_write_tokens: number;
|
|
204
|
+
output_tokens: number;
|
|
205
|
+
reasoning_tokens: number;
|
|
206
|
+
total_tokens: number;
|
|
207
|
+
cache_hit_ratio: number | null;
|
|
208
|
+
list_cost_usd: number;
|
|
209
|
+
adjusted_cost_usd: number;
|
|
210
|
+
high_context_tier: boolean;
|
|
211
|
+
cache_status: CallCacheStatus;
|
|
212
|
+
miss_cause?: CacheMissCause;
|
|
213
|
+
compaction_before?: boolean;
|
|
214
|
+
preceding_tools: UsageToolSummary[];
|
|
215
|
+
emitted_tools: UsageToolSummary[];
|
|
216
|
+
spawned_subagent_refs?: string[];
|
|
217
|
+
anomaly_kinds: UsageAnomalyKind[];
|
|
218
|
+
}
|
|
219
|
+
export interface SessionTraceReport {
|
|
220
|
+
generated_at: string;
|
|
221
|
+
session_id: string;
|
|
222
|
+
parent_session_id?: string;
|
|
223
|
+
title: string;
|
|
224
|
+
source_platform: SourcePlatform;
|
|
225
|
+
source_label: string;
|
|
226
|
+
project_label: string;
|
|
227
|
+
usage_granularity: UsageGranularity;
|
|
228
|
+
total_calls: number;
|
|
229
|
+
shown_calls: number;
|
|
230
|
+
offset: number;
|
|
231
|
+
limit: number;
|
|
232
|
+
total_tokens: number;
|
|
233
|
+
list_cost_usd: number;
|
|
234
|
+
adjusted_cost_usd: number;
|
|
235
|
+
cache_hit_ratio: number | null;
|
|
236
|
+
min_cache_hit_ratio: number | null;
|
|
237
|
+
cache_distribution: CacheHitDistribution;
|
|
238
|
+
family: SessionTraceFamilyMember[];
|
|
239
|
+
turns: SessionTraceTurnRow[];
|
|
240
|
+
tool_patterns: ToolPatternRow[];
|
|
241
|
+
loops: ToolLoopCluster[];
|
|
242
|
+
anomalies: UsageAnomaly[];
|
|
243
|
+
calls: CallTraceRow[];
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=usage-trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-trace.d.ts","sourceRoot":"","sources":["../src/usage-trace.ts"],"names":[],"mapp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;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,kBAAkB,EAAE,oBAAoB,CAAC;IACzC,MAAM,EAAE,wBAAwB,EAAE,CAAC;IACnC,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,aAAa,EAAE,cAAc,EAAE,CAAC;IAChC,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Role: Pure domain contracts for per-call usage telemetry, causal tool summaries,
|
|
3
|
+
* cache-hit distributions, family/subagent rollups, tool/command loop clusters,
|
|
4
|
+
* usage anomalies, and single-session call waterfall traces.
|
|
5
|
+
* Excludes aggregation, anomaly detection, and CLI/TUI rendering (owned by canonical and surfaces).
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=usage-trace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage-trace.js","sourceRoot":"","sources":["../src/usage-trace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ConversationEvidence, type EvidenceReadOptions, type LogicalQuery, type AskUserQuestionTurn, type DerivedCandidate, type Host, type LossAuditRecord, type ProjectIdentity, type SessionProjection, type SessionRelatedWorkProjection, type SessionContributionProjection, type DelegatedChildProjection, type SessionFamilyProjection, type SourceFragment, type SourceDefinition, type SourceStatus, type SourceSyncPayload, type TurnContextProjection, type SessionSearchResult, type TurnSearchResult, type UsageBreakdownSnapshot, type UsageMatrixResult, type UsageMatrixSort, type UsageStatsDimension, type UsageStatsOverview, type UsageStatsRollup, type UsageTimeBucket, type UserTurnProjection } from "@cchistory/domain";
|
|
2
|
-
import { type ProjectionAuditIssue, type SessionUsageProjection, type TurnUsageProjection, type UsageFilters } from "@cchistory/canonical";
|
|
1
|
+
import { type ConversationEvidence, type EvidenceReadOptions, type LogicalQuery, type AskUserQuestionTurn, type DerivedCandidate, type Host, type LossAuditRecord, type ProjectIdentity, type SessionProjection, type SessionRelatedWorkProjection, type SessionContributionProjection, type DelegatedChildProjection, type SessionFamilyProjection, type SessionTraceReport, type SourceFragment, type SourceDefinition, type SourceStatus, type SourceSyncPayload, type TurnContextProjection, type SessionSearchResult, type TurnSearchResult, type UsageBreakdownSnapshot, type UsageDiagnosticsReport, type UsageMatrixResult, type UsageMatrixSort, type UsageStatsDimension, type UsageStatsOverview, type UsageStatsRollup, type UsageTimeBucket, type UserTurnProjection } from "@cchistory/domain";
|
|
2
|
+
import { type ProjectionAuditIssue, type SessionTraceOptions, type SessionUsageProjection, type TurnUsageProjection, type UsageFilters } from "@cchistory/canonical";
|
|
3
3
|
import { type SourceReadBudget, type SourceProbeProgressEvent } from "@cchistory/source-adapters";
|
|
4
4
|
import { type LiveQueryRead } from "./selective-query.js";
|
|
5
5
|
import type { ReadDiagnosticSink } from "./diagnostics.js";
|
|
@@ -194,6 +194,7 @@ export declare class LiveHistorySnapshot {
|
|
|
194
194
|
offset?: number;
|
|
195
195
|
max_chars?: number;
|
|
196
196
|
projectId?: string;
|
|
197
|
+
sourceIds?: readonly string[];
|
|
197
198
|
directoryScope?: string;
|
|
198
199
|
group_by?: "session" | "message";
|
|
199
200
|
}): {
|
|
@@ -274,6 +275,13 @@ export declare class LiveHistorySnapshot {
|
|
|
274
275
|
matrix_dimensions?: readonly UsageStatsDimension[];
|
|
275
276
|
sort_by?: UsageMatrixSort;
|
|
276
277
|
}): UsageBreakdownSnapshot;
|
|
278
|
+
getUsageDiagnostics(filters?: UsageFilters): UsageDiagnosticsReport;
|
|
279
|
+
getSessionTrace(options: Omit<SessionTraceOptions, "sessionId"> & {
|
|
280
|
+
sessionId?: string;
|
|
281
|
+
sessionRef?: string;
|
|
282
|
+
turnRef?: string;
|
|
283
|
+
}): SessionTraceReport | undefined;
|
|
284
|
+
expandSessionFamilyIds(sessionId: string): string[];
|
|
277
285
|
}
|
|
278
286
|
export declare function scanLiteHistory(options?: ScanLiteHistoryOptions): Promise<LiveHistorySnapshot>;
|
|
279
287
|
/** Query-only selective reads never escape as a reusable full snapshot. */
|
|
@@ -292,6 +300,6 @@ export type { LiveQueryRead, QueryReadWork } from "./selective-query.js";
|
|
|
292
300
|
export { BoundedCache } from "./bounded-cache.js";
|
|
293
301
|
export type { ReadDiagnostic, ReadDiagnosticSink } from "./diagnostics.js";
|
|
294
302
|
export { LiveHistoryReader } from "./history-reader.js";
|
|
295
|
-
export { EvidenceCursorError, validateEvidenceBudget, DEFAULT_EVIDENCE_CHARS, MAX_EVIDENCE_CHARS, UNASSIGNED_PROJECT_KEY, BUILTIN_MODEL_PRICING_CATALOG, DEFAULT_MODEL_ALIASES, MODEL_PRICING_CATALOG_SNAPSHOT_DATE, buildPricingConfigTemplate, mergeUsagePricingConfigs, parseUsagePricingInput, resolveEffectiveQuotaLimitUsd, resolveModelPricing, normalizeMultipliers, parseDateEnd, parseDateOrRelativeStart, resolveTimeWindowBounds, resolveUsageTimezone, resolveWeekBucket, } from "@cchistory/canonical";
|
|
296
|
-
export type { UsageFilters, ResolvedModelPricing, UsageTimeOptions, } from "@cchistory/canonical";
|
|
303
|
+
export { EvidenceCursorError, validateEvidenceBudget, DEFAULT_EVIDENCE_CHARS, MAX_EVIDENCE_CHARS, UNASSIGNED_PROJECT_KEY, BUILTIN_MODEL_PRICING_CATALOG, DEFAULT_MODEL_ALIASES, MODEL_PRICING_CATALOG_SNAPSHOT_DATE, buildPricingConfigTemplate, mergeUsagePricingConfigs, parseUsagePricingInput, resolveEffectiveQuotaLimitUsd, resolveModelPricing, normalizeMultipliers, parseDateEnd, parseDateOrRelativeStart, resolveDefaultTimeBucket, resolveQuotaPeriodWindow, resolveTimeWindowBounds, resolveUsageTimezone, resolveWeekBucket, buildDenseTimeSeries, buildSessionTraceReport, computeUsageDiagnosticsReport, computeUsageEfficiency, computeQuotaPace, densifyHourOfDayRollupRows, densifyShortHourlyRollupRows, } from "@cchistory/canonical";
|
|
304
|
+
export type { DenseTimePoint, SessionTraceOptions, UsageFilters, ResolvedModelPricing, UsageTimeOptions, } from "@cchistory/canonical";
|
|
297
305
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EAIjB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,IAAI,EACT,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EA2CL,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EAExB,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAiC,KAAK,gBAAgB,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B,EAAE,MAAM,gBAAgB,CAAC;AAEnF,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,mCAAmC,EACnC,0BAA0B,EAC1B,wBAAwB,EACxB,sBAAsB,EACtB,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,6BAA6B,EAC7B,sBAAsB,EACtB,gBAAgB,EAChB,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import os from "node:os";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import { deriveHostId, deriveSourceInstanceId, normalizeLocalPathIdentity, } from "@cchistory/domain";
|
|
7
|
-
import { buildConversationEvidence, prepareConversationEvidence, searchConversationEvidence, summarizeReadStatus, executeCanonicalQuery, collectionQueryTemplate, hasSessionFamilyLinkTool, auditProjectionConsistency, interpretSessionEvidence, buildSessionLastMessageIndex, buildDirectoryScopedProjectTreeProjection, buildFallbackProjectObservationCandidates, buildProjectDisplayList, buildSessionRelatedWorkIndex, compareTurnsByChronology, compareTurnsByRecency, computeUsageBreakdown, computeUsageMatrix, computeUsageOverview, computeUsageRollup, deriveProjectLinkSnapshot, extractUnfilteredUsageRows, filterProjectsByDirectoryScope, selectSampleSessions, summarizeDirectoryScope, filterSessionsByDirectoryScope, filterTopLevelSessions, filterTurnsByDirectoryScope, buildSessionFamilyInventory, FAMILY_IO_PREVIEW_CHARS, listDelegatedRelationsForFamilyChildren, listSessionFamilies, mergeSessionFamilyInventories, installRuntimeWarningFilter, orderSessionsByLastMessage, pathMatchesDirectoryScope, resolveLatestTurnActivityAt, resolveUsageTimezone, searchSessionsInMemory, searchTurnsInMemory, resolveTurnUsage, summarizeSessionUsage, } from "@cchistory/canonical";
|
|
7
|
+
import { buildConversationEvidence, prepareConversationEvidence, searchConversationEvidence, summarizeReadStatus, executeCanonicalQuery, collectionQueryTemplate, hasSessionFamilyLinkTool, auditProjectionConsistency, interpretSessionEvidence, buildSessionLastMessageIndex, buildDirectoryScopedProjectTreeProjection, buildFallbackProjectObservationCandidates, buildProjectDisplayList, buildSessionRelatedWorkIndex, buildSessionTraceReport, compareTurnsByChronology, compareTurnsByRecency, computeUsageBreakdown, computeUsageDiagnosticsReport, computeUsageMatrix, computeUsageOverview, computeUsageRollup, deriveProjectLinkSnapshot, extractUnfilteredUsageRows, filterUsageRows, filterProjectsByDirectoryScope, selectSampleSessions, summarizeDirectoryScope, filterSessionsByDirectoryScope, filterTopLevelSessions, filterTurnsByDirectoryScope, buildSessionFamilyInventory, FAMILY_IO_PREVIEW_CHARS, listDelegatedRelationsForFamilyChildren, listSessionFamilies, mergeSessionFamilyInventories, installRuntimeWarningFilter, orderSessionsByLastMessage, pathMatchesDirectoryScope, resolveLatestTurnActivityAt, resolveUsageTimezone, searchSessionsInMemory, searchTurnsInMemory, resolveTurnUsage, summarizeSessionUsage, } from "@cchistory/canonical";
|
|
8
8
|
import { SourceReadBudgetExceededError, applyMaskTemplates } from "@cchistory/source-adapters";
|
|
9
9
|
import { SAMPLE_RANK_CONCURRENCY, mapPool } from "./async-pool.js";
|
|
10
10
|
import { isSelectiveLatestQuery, newQueryReadWork } from "./selective-query.js";
|
|
@@ -168,7 +168,10 @@ export class LiveHistorySnapshot {
|
|
|
168
168
|
}));
|
|
169
169
|
}
|
|
170
170
|
executeCollectionQuery(query, options = {}) {
|
|
171
|
-
|
|
171
|
+
const data = query.collection === "calls"
|
|
172
|
+
? { ...this.data, families: this.listSessionFamilies() }
|
|
173
|
+
: this.data;
|
|
174
|
+
return executeCanonicalQuery(data, query, options.directoryScope);
|
|
172
175
|
}
|
|
173
176
|
selectCollectionTemplate(kind, limit = 20, offset = 0, options = {}) {
|
|
174
177
|
return this.executeCollectionQuery(collectionQueryTemplate(kind, limit, offset), options);
|
|
@@ -437,6 +440,9 @@ export class LiveHistorySnapshot {
|
|
|
437
440
|
listResolvedSessions: () => this.data.sessions,
|
|
438
441
|
listSources: () => this.data.sources,
|
|
439
442
|
listProjects: () => this.data.projects,
|
|
443
|
+
listSessionContributions: () => this.data.session_contributions,
|
|
444
|
+
listSessionFamilies: () => this.families,
|
|
445
|
+
listRelatedWork: () => this.data.related_work,
|
|
440
446
|
});
|
|
441
447
|
}
|
|
442
448
|
getCachedUsageBaseRows(filters = {}) {
|
|
@@ -491,8 +497,80 @@ export class LiveHistorySnapshot {
|
|
|
491
497
|
listResolvedSessions: () => this.data.sessions,
|
|
492
498
|
listSources: () => this.data.sources,
|
|
493
499
|
listProjects: () => this.data.projects,
|
|
500
|
+
listSessionContributions: () => this.data.session_contributions,
|
|
501
|
+
listSessionFamilies: () => this.families,
|
|
502
|
+
listRelatedWork: () => this.data.related_work,
|
|
494
503
|
});
|
|
495
504
|
}
|
|
505
|
+
getUsageDiagnostics(filters = {}) {
|
|
506
|
+
const baseRows = this.getCachedUsageBaseRows(filters);
|
|
507
|
+
const filteredRows = filterUsageRows(baseRows, filters, this.sessionsById);
|
|
508
|
+
return computeUsageDiagnosticsReport({
|
|
509
|
+
rows: filteredRows,
|
|
510
|
+
filters,
|
|
511
|
+
sourceData: {
|
|
512
|
+
listResolvedTurns: () => this.data.turns,
|
|
513
|
+
listResolvedSessions: () => this.data.sessions,
|
|
514
|
+
listSources: () => this.data.sources,
|
|
515
|
+
listProjects: () => this.data.projects,
|
|
516
|
+
listSessionContributions: () => this.data.session_contributions,
|
|
517
|
+
listSessionFamilies: () => this.families,
|
|
518
|
+
listRelatedWork: () => this.data.related_work,
|
|
519
|
+
},
|
|
520
|
+
}).report;
|
|
521
|
+
}
|
|
522
|
+
getSessionTrace(options) {
|
|
523
|
+
let resolvedSessionId = options.sessionId;
|
|
524
|
+
let resolvedTurnId = options.turnId;
|
|
525
|
+
if (!resolvedTurnId && options.turnRef) {
|
|
526
|
+
const turn = this.getTurn(options.turnRef);
|
|
527
|
+
if (!turn)
|
|
528
|
+
return undefined;
|
|
529
|
+
resolvedTurnId = turn.id;
|
|
530
|
+
resolvedSessionId ??= turn.session_id;
|
|
531
|
+
}
|
|
532
|
+
if (!resolvedSessionId && options.sessionRef) {
|
|
533
|
+
const session = this.getSession(options.sessionRef);
|
|
534
|
+
if (!session)
|
|
535
|
+
return undefined;
|
|
536
|
+
resolvedSessionId = session.id;
|
|
537
|
+
}
|
|
538
|
+
if (!resolvedSessionId)
|
|
539
|
+
return undefined;
|
|
540
|
+
return buildSessionTraceReport({
|
|
541
|
+
listResolvedTurns: () => this.data.turns,
|
|
542
|
+
listResolvedSessions: () => this.data.sessions,
|
|
543
|
+
listSources: () => this.data.sources,
|
|
544
|
+
listProjects: () => this.data.projects,
|
|
545
|
+
listSessionContributions: () => this.data.session_contributions,
|
|
546
|
+
listSessionFamilies: () => this.families,
|
|
547
|
+
listRelatedWork: () => this.data.related_work,
|
|
548
|
+
}, {
|
|
549
|
+
sessionId: resolvedSessionId,
|
|
550
|
+
turnId: resolvedTurnId,
|
|
551
|
+
includeSubagents: options.includeSubagents,
|
|
552
|
+
onlyAnomalies: options.onlyAnomalies,
|
|
553
|
+
limit: options.limit,
|
|
554
|
+
offset: options.offset,
|
|
555
|
+
filters: options.filters,
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
expandSessionFamilyIds(sessionId) {
|
|
559
|
+
const ids = new Set([sessionId]);
|
|
560
|
+
const family = this.familiesByParentId.get(sessionId);
|
|
561
|
+
if (family) {
|
|
562
|
+
for (const child of family.children) {
|
|
563
|
+
if (child.child_session_ref)
|
|
564
|
+
ids.add(child.child_session_ref);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
for (const rel of this.data.related_work) {
|
|
568
|
+
if (rel.relation_kind === "delegated_session" && rel.parent_session_ref === sessionId && rel.child_session_ref) {
|
|
569
|
+
ids.add(rel.child_session_ref);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
return [...ids];
|
|
573
|
+
}
|
|
496
574
|
}
|
|
497
575
|
export async function scanLiteHistory(options = {}) {
|
|
498
576
|
return withPreparedScan(options, (sources, scanGuard, getPlan, tracedOptions) => scanResolvedSources(scanGuard.guardedOptions(tracedOptions), sources, scanGuard, getPlan));
|
|
@@ -1707,5 +1785,5 @@ function normalizeJsonShapeForJsonOutputMutating(value) {
|
|
|
1707
1785
|
export { compileSql, compileSqlRequest, parseSqlRequest, QueryValidationError, SQL_REQUEST_SCHEMA, SQL_RESULT_SCHEMA, MAX_SQL_BYTES, MAX_QUERY_REQUEST_BYTES } from "./sql-query.js";
|
|
1708
1786
|
export { BoundedCache } from "./bounded-cache.js";
|
|
1709
1787
|
export { LiveHistoryReader } from "./history-reader.js";
|
|
1710
|
-
export { EvidenceCursorError, validateEvidenceBudget, DEFAULT_EVIDENCE_CHARS, MAX_EVIDENCE_CHARS, UNASSIGNED_PROJECT_KEY, BUILTIN_MODEL_PRICING_CATALOG, DEFAULT_MODEL_ALIASES, MODEL_PRICING_CATALOG_SNAPSHOT_DATE, buildPricingConfigTemplate, mergeUsagePricingConfigs, parseUsagePricingInput, resolveEffectiveQuotaLimitUsd, resolveModelPricing, normalizeMultipliers, parseDateEnd, parseDateOrRelativeStart, resolveTimeWindowBounds, resolveUsageTimezone, resolveWeekBucket, } from "@cchistory/canonical";
|
|
1788
|
+
export { EvidenceCursorError, validateEvidenceBudget, DEFAULT_EVIDENCE_CHARS, MAX_EVIDENCE_CHARS, UNASSIGNED_PROJECT_KEY, BUILTIN_MODEL_PRICING_CATALOG, DEFAULT_MODEL_ALIASES, MODEL_PRICING_CATALOG_SNAPSHOT_DATE, buildPricingConfigTemplate, mergeUsagePricingConfigs, parseUsagePricingInput, resolveEffectiveQuotaLimitUsd, resolveModelPricing, normalizeMultipliers, parseDateEnd, parseDateOrRelativeStart, resolveDefaultTimeBucket, resolveQuotaPeriodWindow, resolveTimeWindowBounds, resolveUsageTimezone, resolveWeekBucket, buildDenseTimeSeries, buildSessionTraceReport, computeUsageDiagnosticsReport, computeUsageEfficiency, computeQuotaPace, densifyHourOfDayRollupRows, densifyShortHourlyRollupRows, } from "@cchistory/canonical";
|
|
1711
1789
|
//# sourceMappingURL=index.js.map
|