@@ -2,21 +2,21 @@ import { z } from "zod"
22
33// ── Enums ──────────────────────────────────────────────────────────────────
44
5- /** LLM API 호출의 최종 상태 */
5+ /** Final status of an LLM API call */
66export const UsageEventStatus = z . enum ( [ "completed" , "failed" , "cancelled" ] )
77export type UsageEventStatus = z . infer < typeof UsageEventStatus >
88
9- /** 토큰 사용량 값의 출처 */
9+ /** Source of a token usage value */
1010export const UsageValueSource = z . enum ( [ "provider" , "estimated" , "backfilled" ] )
1111export type UsageValueSource = z . infer < typeof UsageValueSource >
1212
13- /** 토큰 중복 계산 여부 (예: cacheRead이 inputTokens에 포함되어 있는지 ) */
13+ /** Whether a token field is double-counted (e.g. cacheRead included in inputTokens ) */
1414export const InclusionRule = z . enum ( [ "included" , "excluded" , "unknown" ] )
1515export type InclusionRule = z . infer < typeof InclusionRule >
1616
1717// ── SourcedNumber ──────────────────────────────────────────────────────────
1818
19- /** 값과 그 출처를 함께 표현 */
19+ /** A numeric value paired with its source */
2020export const SourcedNumber = z . object ( {
2121 value : z . number ( ) ,
2222 source : UsageValueSource ,
@@ -26,11 +26,11 @@ export type SourcedNumber = z.infer<typeof SourcedNumber>
2626// ── UsageEventV1 ────────────────────────────────────────────────────────────
2727
2828/**
29- * 단일 LLM API 호출의 사용량 이벤트 .
30- * schemaVersion 1 — 향후 스키마 변경 시 버전을 올립니다 .
29+ * A usage event for a single LLM API call .
30+ * schemaVersion 1 — bump when the schema changes .
3131 *
32- * 보안 : prompt 본문 , response 본문 , API key, workspace path는
33- * 이 스키마에 절대 포함하지 않습니다 .
32+ * Security : prompt bodies , response bodies , API keys, and workspace paths
33+ * must never be included in this schema .
3434 */
3535export const UsageEventV1 = z . object ( {
3636 schemaVersion : z . literal ( 1 ) ,
@@ -65,7 +65,7 @@ export type UsageEventV1 = z.infer<typeof UsageEventV1>
6565
6666// ── StatsQuery ──────────────────────────────────────────────────────────────
6767
68- /** 통계 조회 쿼리 */
68+ /** Statistics query */
6969export const StatsQuery = z . object ( {
7070 from : z . string ( ) . optional ( ) , // ISO 8601
7171 to : z . string ( ) . optional ( ) ,
@@ -78,7 +78,7 @@ export type StatsQuery = z.infer<typeof StatsQuery>
7878
7979// ── StatsBucket ──────────────────────────────────────────────────────────────
8080
81- /** 그룹화된 통계 버킷 */
81+ /** Grouped statistics bucket */
8282export const StatsBucket = z . object ( {
8383 key : z . record ( z . string ( ) ) ,
8484 events : z . number ( ) ,
@@ -98,7 +98,7 @@ export type StatsBucket = z.infer<typeof StatsBucket>
9898
9999// ── StatsSnapshot ────────────────────────────────────────────────────────────
100100
101- /** 통계 조회 결과 스냅샷 */
101+ /** Statistics query result snapshot */
102102export const StatsSnapshot = z . object ( {
103103 query : StatsQuery ,
104104 generatedAt : z . string ( ) ,
0 commit comments