feat(core): record title and compaction usage in session totals (#37441)

This commit is contained in:
Aiden Cline 2026-07-17 00:10:30 -05:00 committed by GitHub
commit 73567f3570
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 234 additions and 74 deletions

View file

@ -803,6 +803,16 @@ export type SessionRevertCommitted = {
data: { sessionID: string; to: string }
}
export type SessionUsageRecorded = {
id: string
created: number
metadata?: { [x: string]: any }
type: "session.usage.recorded"
durable: { aggregateID: string; seq: number; version: 1 }
location?: LocationRef
data: { sessionID: string; source: "title" | "compaction"; cost: MoneyUSD; tokens: TokenUsageInfo }
}
export type ModelsDevRefreshed = {
id: string
created: number
@ -2216,6 +2226,7 @@ export type SessionEventDurable =
| SessionRevertStaged
| SessionRevertCleared
| SessionRevertCommitted
| SessionUsageRecorded
export type SessionMessagesResponse = {
data: Array<SessionMessageInfo>