import { type GenuiStats } from '../genui-telemetry.js'; import type { ActorSpendRow, AgentGovernanceQueries, GovernanceRange, GovernanceThreadDetail, ListRunsFilter, ListRunsResult, ModelSpendRow, PendingApprovalRow, PendingApprovalsFilter, PerToolStatRow, RunDetail, RunReliability, ThreadActivityRow, ToolCallActivityRow, ToolStatsRange, UsageTrendPoint } from '../index.js'; import type { InMemoryAgentStore } from './in-memory-store.js'; /** The current per-1M token prices for one model; cache rates fall back to the input rate. */ export interface InMemoryModelPrice { inputPricePer1m: number; outputPricePer1m: number; cacheWritePricePer1m?: number | null; cacheReadPricePer1m?: number | null; } /** * A fully in-memory {@link AgentGovernanceQueries} for unit tests and the offline demo. Aggregates * the usage/tool-call/thread rows recorded on an {@link InMemoryAgentStore}. Pricing is an optional * map keyed by `modelId`; omit it (default empty) for a zero-cost read-model that still reports * token usage. Mirrors the SQL adapters' cost formula and inclusive-day semantics. */ export declare class InMemoryGovernanceQueries implements AgentGovernanceQueries { private readonly store; private readonly pricing; constructor(store: InMemoryAgentStore, pricing?: ReadonlyMap); private inRange; /** Provider-reported cost wins per row; otherwise the cache-aware token estimate. */ private rowCost; spendByModel(range: GovernanceRange): Promise; spendByActor(range: GovernanceRange): Promise; usageTrend(range: GovernanceRange): Promise; recentToolCalls(limit: number): Promise; recentThreads(limit: number): Promise; listRuns(filter?: ListRunsFilter): Promise; runDetail(runId: string): Promise; pendingApprovals(filter?: PendingApprovalsFilter): Promise; genuiStats(range: GovernanceRange): Promise; perToolStats(range?: ToolStatsRange): Promise; runReliability(range?: ToolStatsRange): Promise; /** * The thread governance drill-down (behavioral twin of `LucidGovernanceQueries.threadDetail`): * metadata + a LIFETIME usage rollup + the most recent runs/messages. `null` when unknown. The * in-memory store never returns a soft-deleted thread from `governanceThreads()` at all, so * `deleted` is always `false` here — mirroring the store's own delete semantics. */ threadDetail(threadId: string): Promise; } //# sourceMappingURL=in-memory-governance-queries.d.ts.map