Documentation
¶
Overview ¶
Package history reads the sofia call log and surfaces invocation history. Three views are supported:
- recent (default): chronological list of last N calls.
- --stats: per-tool aggregates (count, errors, duration percentiles, output bytes/tokens, top inputs).
- --histogram=hour|day: distribution of calls by time bucket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶
NewCommand returns the `sf history` Cobra command.
Types ¶
type AdoptionRow ¶
type AdoptionRow struct {
Tag string `json:"tag"`
Source string `json:"source"`
Calls int `json:"calls"`
Sessions int `json:"sessions"` // distinct non-empty session ids
Errors int `json:"errors"`
FailedPct float64 `json:"failed_pct"`
Tokens int64 `json:"out_tokens"`
}
AdoptionRow aggregates one project×source cell: how much that project's agent/manual traffic actually exercises sf, and how reliably.
type Aggregate ¶
type Aggregate struct {
Tool string `json:"tool"`
Calls int `json:"calls"`
Errors int `json:"errors"`
TotalMs int64 `json:"total_ms"`
MeanMs int64 `json:"mean_ms"`
P50Ms int64 `json:"p50_ms"`
P95Ms int64 `json:"p95_ms"`
MaxMs int64 `json:"max_ms"`
TotalBytes int64 `json:"total_out_bytes"`
TotalTokens int64 `json:"total_out_tokens"`
First string `json:"first"`
Last string `json:"last"`
}
Aggregate is one row of the per-tool stats view.
type HistogramBucket ¶
type HistogramBucket int
HistogramBucket identifies how entries are grouped.
const ( HistogramHour HistogramBucket = iota HistogramDay )
type HistogramRow ¶
type HistogramRow struct {
Bucket string `json:"bucket"`
Count int `json:"count"`
TotalMs int64 `json:"total_ms"`
TotalBytes int64 `json:"total_out_bytes"`
TotalTokens int64 `json:"total_out_tokens"`
}
HistogramRow is one bucket: a label plus the totals for the entries that fell into it.
type InputCount ¶
Click to show internal directories.
Click to hide internal directories.