- Model orchestration activities with typed payloads - Drop obsolete provider runtime event mappings - Improve context window snapshot derivation
23 lines
998 B
TypeScript
23 lines
998 B
TypeScript
import { Schema } from "effect";
|
|
|
|
import { NonNegativeInt, PositiveInt } from "./baseSchemas";
|
|
|
|
export const ThreadTokenUsageSnapshot = Schema.Struct({
|
|
usedTokens: NonNegativeInt,
|
|
totalProcessedTokens: Schema.optional(NonNegativeInt),
|
|
maxTokens: Schema.optional(PositiveInt),
|
|
inputTokens: Schema.optional(NonNegativeInt),
|
|
cachedInputTokens: Schema.optional(NonNegativeInt),
|
|
outputTokens: Schema.optional(NonNegativeInt),
|
|
reasoningOutputTokens: Schema.optional(NonNegativeInt),
|
|
lastUsedTokens: Schema.optional(NonNegativeInt),
|
|
lastInputTokens: Schema.optional(NonNegativeInt),
|
|
lastCachedInputTokens: Schema.optional(NonNegativeInt),
|
|
lastOutputTokens: Schema.optional(NonNegativeInt),
|
|
lastReasoningOutputTokens: Schema.optional(NonNegativeInt),
|
|
toolUses: Schema.optional(NonNegativeInt),
|
|
durationMs: Schema.optional(NonNegativeInt),
|
|
compactsAutomatically: Schema.optional(Schema.Boolean),
|
|
});
|
|
export type ThreadTokenUsageSnapshot = typeof ThreadTokenUsageSnapshot.Type;
|