import { isRecord } from "./json-shape.js"; export { isRecord }; /** * Server-safe wire contract shared by the analytics dashboard and relay. * * This module deliberately has no platform imports. It contains only the * versioned media/schema vocabulary and the bounded read-model shapes; route, * authentication, retention, and pricing decisions belong to their owners. */ export declare const DASHBOARD_MEDIA_TYPE_BASE = "application/vnd.llm-relay.dashboard+json"; export declare const DASHBOARD_MEDIA_VERSION = 1; export declare const DASHBOARD_MEDIA_TYPE = "application/vnd.llm-relay.dashboard+json; version=1"; export declare const DASHBOARD_SNAPSHOT_SCHEMA = "dashboard.snapshot.v1"; export declare const DASHBOARD_DETAIL_SCHEMA = "dashboard.detail.v1"; export declare const DASHBOARD_COST_SCHEMA = "dashboard.cost.v1"; export declare const DASHBOARD_ERROR_SCHEMA = "dashboard.error.v1"; /** The request/query and response body bounds are intentionally explicit. */ export declare const DASHBOARD_MAX_REQUEST_BYTES: number; export declare const DASHBOARD_MAX_BODY_BYTES: number; export declare const DASHBOARD_MAX_BUCKETS = 720; export declare const DASHBOARD_MAX_DIMENSION_ROWS = 100; export declare const DASHBOARD_MAX_ERROR_ROWS = 40; export declare const DASHBOARD_MAX_RECENT_ROWS = 100; export declare const DASHBOARD_MAX_DETAIL_ATTEMPTS = 32; export declare const DASHBOARD_REQUEST_ID_MIN_LENGTH = 16; export declare const DASHBOARD_REQUEST_ID_MAX_LENGTH = 128; export declare const DASHBOARD_REQUEST_ID_PATTERN: RegExp; export declare const DASHBOARD_ATTEMPT_ID_MIN_LENGTH = 1; export declare const DASHBOARD_MAX_QUERY_BYTES: number; export declare const DASHBOARD_SAFE_ID_MAX_BYTES = 256; export declare const DASHBOARD_ATTEMPT_ID_MAX_BYTES = 256; /** Query spelling is deliberately distinct from response attribution spelling. */ export declare const DASHBOARD_QUERY_INCLUDE_REPAIR_VALUES: readonly ["0", "1"]; export type DashboardQueryIncludeRepair = (typeof DASHBOARD_QUERY_INCLUDE_REPAIR_VALUES)[number]; export declare const DASHBOARD_QUERY_ATTRIBUTION_VALUES: readonly ["relay-held", "caller-operated", "all"]; export type DashboardQueryAttribution = (typeof DASHBOARD_QUERY_ATTRIBUTION_VALUES)[number]; export declare const DASHBOARD_QUERY_PARAMETER_NAMES: readonly ["window", "includeRepair", "attribution", "provider", "model", "client", "credentialId", "outcome", "failureKind"]; export type DashboardQueryParameterName = (typeof DASHBOARD_QUERY_PARAMETER_NAMES)[number]; export declare const DASHBOARD_QUERY_FILTER_NAMES: readonly ["attribution", "provider", "model", "client", "credentialId", "outcome", "failureKind"]; export type DashboardQueryFilterName = (typeof DASHBOARD_QUERY_FILTER_NAMES)[number]; export declare const WINDOW_IDS: readonly ["1h", "24h", "7d", "30d", "today", "month", "lifetime"]; export type WindowId = (typeof WINDOW_IDS)[number]; /** * The `llm-relay cost --by` grouping axis. Closed here so the CLI's flag validation, the * roll-up projection, and the wire guard cannot drift apart. */ export declare const COST_BY_VALUES: readonly ["provider", "model", "client", "credential"]; export type CostBy = (typeof COST_BY_VALUES)[number]; export declare const QUOTA_AXES: readonly ["requests", "tokens"]; export type QuotaAxis = (typeof QUOTA_AXES)[number]; export declare const QUOTA_PERIODS: readonly ["minute", "day", "month", "unknown"]; export type QuotaPeriod = (typeof QUOTA_PERIODS)[number]; export declare const COVERAGE_STATES: readonly ["complete", "partial", "unavailable", "stale", "empty"]; export type Coverage = (typeof COVERAGE_STATES)[number]; export declare const PANEL_IDS: readonly ["summary", "request_timeline", "token_timeline", "spend", "provider", "model", "client", "credential", "latency", "commit", "errors", "recent", "quotas", "cooldowns"]; export type PanelId = (typeof PANEL_IDS)[number]; export declare const OUTCOMES: readonly ["success", "error", "cancelled", "unknown"]; export type Outcome = (typeof OUTCOMES)[number]; export declare const FAILURE_KINDS: readonly ["timeout", "provider_error", "auth_error", "rate_limit", "aborted", "protocol", "unknown"]; export type FailureKind = (typeof FAILURE_KINDS)[number]; export declare const ATTRIBUTIONS: readonly ["relay_held", "caller_operated", "unknown"]; export type Attribution = (typeof ATTRIBUTIONS)[number]; export declare const ATTRIBUTION_POLICIES: readonly ["exclude_caller_operated_from_relay_held_caps", "include_all_labeled", "unknown"]; export type AttributionPolicy = (typeof ATTRIBUTION_POLICIES)[number]; export declare const COOLDOWN_REASONS: readonly ["rate_limit", "auth_error", "provider_error", "manual", "unknown"]; export type CooldownReason = (typeof COOLDOWN_REASONS)[number]; export declare const COVERAGE_REASONS: readonly ["meter_not_implemented", "retention_pruned", "upstream_unavailable", "projection_lag", "no_matching_rows", "unknown"]; export type CoverageReason = (typeof COVERAGE_REASONS)[number]; export declare const PROVENANCE_VALUES: readonly ["provider_reported", "relay_observed", "relay_estimated", "unknown", "mixed"]; export type Provenance = (typeof PROVENANCE_VALUES)[number]; export declare const ATTEMPT_ROLES: readonly ["serve", "repair"]; export type AttemptRole = (typeof ATTEMPT_ROLES)[number]; export declare const DASHBOARD_ERROR_CODES: readonly ["malformed_query", "invalid_auth", "forbidden", "not_found", "method_not_allowed", "unsupported_version", "replay", "oversized", "unsupported_content_type", "internal"]; export type DashboardErrorCode = (typeof DASHBOARD_ERROR_CODES)[number]; export declare const DASHBOARD_ERROR_MESSAGES: readonly ["Request could not be completed.", "Dashboard session is unavailable.", "Requested dashboard data was not found."]; export type DashboardErrorMessage = (typeof DASHBOARD_ERROR_MESSAGES)[number]; export declare const TOKEN_SOURCES: readonly ["provider_reported", "relay_estimated"]; export type TokenSource = (typeof TOKEN_SOURCES)[number]; export declare const SPEND_PRICE_SOURCES: readonly ["provider_published", "reference"]; export type SpendPriceSource = (typeof SPEND_PRICE_SOURCES)[number]; export declare const TOKEN_BASES: readonly ["reported", "estimated"]; export type TokenBasis = (typeof TOKEN_BASES)[number]; export declare const SPEND_SOURCES: readonly ["provider_reported", "relay_estimated", "unknown"]; export type SpendSource = (typeof SPEND_SOURCES)[number]; export declare const LIMIT_BASES: readonly ["provider_stated", "configured", "learned", "published"]; export type LimitBasis = (typeof LIMIT_BASES)[number]; export declare const REMAINING_BASES: readonly ["provider_stated", "derived_provider_stated", "derived_configured", "derived_learned", "derived_published"]; export type RemainingBasis = (typeof REMAINING_BASES)[number]; /** `relay_counted` is a completed-request total observed by the relay, not provider reporting. */ export declare const LOCAL_USED_BASES: readonly ["reported", "estimated", "mixed", "relay_counted"]; export type LocalUsedBasis = (typeof LOCAL_USED_BASES)[number]; /** * Where a quota row's `resetsAt` came from (spec §5.2 ladder). `provider_stated` is the response's * own header/observation; `reviewed_rule` is a persisted reviewed refusal-interpretation rule * (added 2026-08-23, additive — the rung existed unfed until the fact store started persisting * reset provenance); `derived_boundary` is the UTC period boundary this relay computed. */ export declare const RESETS_AT_BASES: readonly ["provider_stated", "reviewed_rule", "derived_boundary"]; export type ResetsAtBasis = (typeof RESETS_AT_BASES)[number]; export type ResponseAttribution = Attribution | "all"; export declare const RESPONSE_ATTRIBUTIONS: readonly ["relay_held", "caller_operated", "unknown", "all"]; /** * Map a snapshot query's attribution filter onto the response attribution it selects. * * Both spellings are owned by this contract (DASHBOARD_QUERY_ATTRIBUTION_VALUES vs * ATTRIBUTIONS), so the pairing lives here too — a route validating a query and a * projection labelling its rows must not re-derive it separately and drift. */ export declare function mapDashboardQueryAttribution(value: DashboardQueryAttribution | undefined): Attribution | "all"; export interface PanelCoverageV1 { panel: PanelId; state: Coverage; reason: CoverageReason | null; provenance: Provenance[]; observedAt: string | null; } export interface ReportedTokenCell { value: number | null; source: "provider_reported"; observedAt: string | null; } export interface EstimatedTokenCell { value: number | null; source: "relay_estimated"; observedAt: string | null; method: string | null; } export interface ReportedTokenTotals { reportedInput: ReportedTokenCell; reportedOutput: ReportedTokenCell; reportedCachedInput: ReportedTokenCell; } export interface EstimatedTokenTotals { estimatedInput: EstimatedTokenCell; estimatedOutput: EstimatedTokenCell; } export interface TokenTotalsV1 { reported: ReportedTokenTotals; estimated: EstimatedTokenTotals; } export interface ProviderPublishedReported { amountMicrousd: number | null; priceSource: "provider_published"; tokenBasis: "reported"; source: "provider_reported" | "unknown"; observedAt: string | null; } export interface ProviderPublishedEstimated { amountMicrousd: number | null; priceSource: "provider_published"; tokenBasis: "estimated"; source: "relay_estimated" | "unknown"; observedAt: string | null; } export interface ReferenceReported { amountMicrousd: number | null; priceSource: "reference"; tokenBasis: "reported"; source: "provider_reported" | "unknown"; observedAt: string | null; } export interface ReferenceEstimated { amountMicrousd: number | null; priceSource: "reference"; tokenBasis: "estimated"; source: "relay_estimated" | "unknown"; observedAt: string | null; } export interface SpendTotalsV1 { providerPublishedReported: ProviderPublishedReported; providerPublishedEstimated: ProviderPublishedEstimated; referenceReported: ReferenceReported; referenceEstimated: ReferenceEstimated; /** * Requests that projected NO spend: never served, or served by a deployment that * publishes no price for either token kind. Deliberately NOT every request — a * free-model request is fully priced at $0 and must not read as a gap. */ unpricedRequests: number; /** * Requests WITH a spend figure that also carried token kinds no published price covers * (Anthropic cache creation/read, OpenAI cached input, or an unpublished output price). * Every amount above is a LOWER BOUND while this is greater than zero. */ partiallyPricedRequests: number; } /** * Why the metering subsystem stopped persisting (backlog item 19: the metering subsystem * says when it stopped metering, so "no spend since noon" cannot be mistaken for * "no traffic since noon"). * * Closed here (`as const` + a derived type, never a hand-written union) so the store * accessor, the `/telemetry` block, the `cost` footer and the `CostReportV1.writer` * validator cannot drift apart: a new member is a compile error at every total table, * not a silently unhandled state. */ export declare const WRITER_STATES: readonly ["writing", "lease_refused", "flush_failed", "schema_refused", "read_only"]; export type WriterState = (typeof WRITER_STATES)[number]; /** * One read-only snapshot of the accounting store's writer health, as returned by the * store's `writerHealth()` accessor and carried on `/telemetry` (`accounting`) and on * `llm-relay cost --json` (`writer`). Timestamps are ISO strings or `null` — never a * fabricated time, never `0` (the provenance invariant). The reason is a bounded, * metadata-only head of the failure (an error's code/message head, never user data). */ export interface WriterHealth { readonly state: WriterState; /** ISO stamp of the last committed flush; null when this store never committed one. */ readonly lastSuccessfulWriteAt: string | null; /** ISO stamp of the last failed/invalid flush; null when none ever failed. Retained after recovery: history is evidence. */ readonly lastFailureAt: string | null; /** Bounded head of the last failure; null when none ever failed. Retained after recovery. */ readonly lastFailureReason: string | null; } /** * One row of the `llm-relay cost` roll-up (open-decisions C1): a dimension value's * REQUEST-scoped spend in the four provenance-labelled cells, plus the counters the * provenance story needs. Deliberately NOT a blended total — cells are printed side by * side; a caller wanting one number must pick ONE cell (provider_published × reported) * and say so. */ export interface CostRowV1 { /** The dimension value this row aggregates: a provider, model id, client name, or credential id. */ readonly key: string; readonly requests: number; /** Requests minus {@link SpendTotalsV1.unpricedRequests}: a figure existed for the rest. */ readonly pricedRequests: number; readonly spend: SpendTotalsV1; } /** * The repair-attempt share of a cost report, present only under `--include-repair`. * * This is C1's direct answer to "what did tool-call repair cost me", and it is NOT * derivable by subtracting serve-side figures: failed serve attempts also carry * attempt-side spend, so only a direct fold of role:"repair" rows gives the true share. * Its counters are ATTEMPT-scoped (unlike SpendTotalsV1's request-scoped ones) because * that is what the persisted attempt aggregates can prove; per-attempt price coverage * is not persisted, so this shape deliberately carries no lower-bound count — the * renderer states the cache-token caveat in prose instead. */ export interface RepairShareV1 { readonly attempts: number; /** Repair attempts that produced no priced figure at all — never rendered as $0. */ readonly unpricedAttempts: number; readonly spend: Omit; } /** One window's roll-up as emitted by `llm-relay cost --json` (`dashboard.cost.v1`). */ export interface CostReportV1 { readonly schema: typeof DASHBOARD_COST_SCHEMA; readonly generatedAt: string; /** UTC start of the window; null exactly when the window has no bounded start. */ readonly from: string | null; readonly to: string; readonly window: WindowId; /** Repair attempts were folded into the totals (C1's `--include-repair`). */ readonly includeRepair: boolean; /** Which grouping produced {@link CostRowV1.key}. */ readonly by: CostBy; /** Rows sorted by descending requests; capped at DASHBOARD_MAX_DIMENSION_ROWS. */ readonly rows: readonly CostRowV1[]; /** The all-dimensions total for this same period. Root aggregates, exact under row caps. */ readonly total: CostRowV1; /** * The repair-attempt share of the SAME period, present ONLY under includeRepair. * Null also for the `lifetime` window: its month rollups mix serve and repair * attempt spend in one figure, so the split cannot be proven there. */ readonly repair: RepairShareV1 | null; /** * What this window spent on serve attempts the relay ABANDONED — a hedge loser (owner decision * D3, 2026-08-30). Same four provenance-labelled cells as {@link RepairShareV1.spend}. * * ⚠ **This is NOT included in {@link CostReportV1.total}, and that is the contract.** `total` * answers "what the answers you received cost"; `total.spend + abandoned` answers "what those * requests cost". Folding it into `total` was rejected on three measurements: an abandoned * attempt is estimated-basis with coverage `input_only`, so it would flip * {@link SpendTotalsV1.partiallyPricedRequests} — the LOWER-BOUND marker — on for essentially * every hedged request without one amount changing; winner and loser are priced from the SAME * request-level estimated input count, so a merged figure double-counts one measurement; and the * token totals beside spend would then have to follow, which reaches the quota ledger and turns * an accounting figure into a routing one. * * ⚠ It carries no counter of its own. Each cell's `known` is the number of abandoned attempts * that contributed, which is the only count the aggregates can prove. * * All-zero cells are the honest reading for a window in which nothing was hedged, and for every * shard written before this field existed. */ readonly abandoned: RepairShareV1["spend"]; /** Same coverage vocabulary as the dashboard panels; `empty` = no accounting data yet. */ readonly coverage: Coverage; readonly coverageReason: CoverageReason | null; /** * True when the store was read from disk while a relay process may still hold * unflushed in-memory deltas: the last minutes of the window can lag until flush. */ readonly recentMinutesMayLag: boolean; /** * The writer health of the store this report was read from, present only when the * producer knows it: `llm-relay cost --json` attaches its own store's `writerHealth()` * beside the roll-up (a read-only `cost` reader reports `read_only`). Absent on reports * from producers that read through a narrow reader without writer state — absence is * "not stated", never "healthy". */ readonly writer?: WriterHealth | undefined; } export interface SummaryV1 { requests: number; attempts: number; served: number; errored: number; cancelled: number; successRate: number | null; tokens: TokenTotalsV1; spend: SpendTotalsV1; avgLatencyMs: number | null; p95LatencyMs: number | null; avgCommitMs: number | null; } export interface BucketV1 { from: string; to: string; requests: number; attempts: number; served: number; errored: number; cancelled: number; successRate: number | null; tokens: TokenTotalsV1; spend: SpendTotalsV1; avgLatencyMs: number | null; p95LatencyMs: number | null; avgCommitMs: number | null; } export interface DimensionSummaryV1 { requests: number; attempts: number; served: number; errored: number; cancelled: number; successRate: number | null; tokens: TokenTotalsV1; spend: SpendTotalsV1; avgLatencyMs: number | null; avgCommitMs: number | null; coverage: Coverage; } export interface ProviderDimensionRowV1 extends DimensionSummaryV1 { dimension: "provider"; provider: string; } export interface ModelDimensionRowV1 extends DimensionSummaryV1 { dimension: "model"; provider: string; model: string; } export interface ClientDimensionRowV1 extends DimensionSummaryV1 { dimension: "client"; client: string; } export interface CredentialDimensionRowV1 extends DimensionSummaryV1 { dimension: "credential"; provider: string; credentialId: string; label: string; } export type DimensionRowV1 = ProviderDimensionRowV1 | ModelDimensionRowV1 | ClientDimensionRowV1 | CredentialDimensionRowV1; export interface ErrorDistributionRowV1 { failureKind: FailureKind; outcome: Outcome; requests: number; } export interface RequestRowV1 { requestId: string; occurredAt: string; client: string | null; attribution: Attribution; outcome: Outcome; failureKind: FailureKind | null; attemptCount: number; latencyMs: number | null; commitMs: number | null; provider: string | null; model: string | null; credentialId: string | null; tokens: TokenTotalsV1; spend: SpendTotalsV1; repairIncluded: boolean; } export interface AttemptRowV1 { attemptId: string; role: AttemptRole; startedAt: string; endedAt: string | null; status: Outcome; latencyMs: number | null; commitMs: number | null; provider: string | null; model: string | null; credentialId: string | null; failureKind: FailureKind | null; tokens: TokenTotalsV1 | null; spend: SpendTotalsV1 | null; } export interface QuotaRowV1 { credentialId: string; label: string; provider: string; deployment: string | null; axis: QuotaAxis; period: QuotaPeriod; limit: number | null; remaining: number | null; localUsed: number | null; resetsAt: string | null; observedAt: string | null; limitBasis: LimitBasis | null; remainingBasis: RemainingBasis | null; localUsedBasis: LocalUsedBasis | null; /** * Where `resetsAt` came from (spec §5.2 ladder); null when the row has no reset at all. Added * 2026-08-23, additive — the rung existed unfed until the fact store persisted reset provenance. */ resetsAtBasis: ResetsAtBasis | null; } export interface CooldownRowV1 { credentialId: string; provider: string; deployment: string | null; reason: CooldownReason; until: string | null; observedAt: string | null; } export interface SnapshotV1 { schema: typeof DASHBOARD_SNAPSHOT_SCHEMA; relayVersion: string; window: WindowId; includeRepair: boolean; attribution: Attribution | "all"; attributionPolicy: AttributionPolicy; generatedAt: string; asOf: string; from: string | null; to: string; retentionFrom: string | null; /** Reserved at null until the accounting store exposes a retention end cursor. */ retentionTo: string | null; panelCoverage: PanelCoverageV1[]; summary: SummaryV1; buckets: BucketV1[]; providers: ProviderDimensionRowV1[]; models: ModelDimensionRowV1[]; clients: ClientDimensionRowV1[]; credentials: CredentialDimensionRowV1[]; errors: ErrorDistributionRowV1[]; quotas: QuotaRowV1[]; cooldowns: CooldownRowV1[]; recentRequests: RequestRowV1[]; } export interface DetailV1 { schema: typeof DASHBOARD_DETAIL_SCHEMA; request: RequestRowV1; attempts: AttemptRowV1[]; panelCoverage: PanelCoverageV1[]; } export interface DashboardErrorV1 { schema: typeof DASHBOARD_ERROR_SCHEMA; code: DashboardErrorCode; message: DashboardErrorMessage; requestId: string | null; } export declare const isDashboardMediaType: (value: unknown) => value is typeof DASHBOARD_MEDIA_TYPE; export declare const isDashboardWindowId: (value: unknown) => value is WindowId; export declare const isDashboardQuotaAxis: (value: unknown) => value is QuotaAxis; export declare const isDashboardQuotaPeriod: (value: unknown) => value is QuotaPeriod; export declare const isDashboardCoverage: (value: unknown) => value is Coverage; export declare const isDashboardPanelId: (value: unknown) => value is PanelId; export declare const isDashboardOutcome: (value: unknown) => value is Outcome; export declare const isDashboardFailureKind: (value: unknown) => value is FailureKind; export declare const isDashboardAttribution: (value: unknown) => value is Attribution; export declare const isDashboardResponseAttribution: (value: unknown) => value is ResponseAttribution; export declare const isDashboardAttributionPolicy: (value: unknown) => value is AttributionPolicy; export declare const isDashboardCooldownReason: (value: unknown) => value is CooldownReason; export declare const isDashboardCoverageReason: (value: unknown) => value is CoverageReason; export declare const isDashboardProvenance: (value: unknown) => value is Provenance; export declare const isDashboardAttemptRole: (value: unknown) => value is AttemptRole; export declare const isDashboardTokenSource: (value: unknown) => value is TokenSource; export declare const isDashboardSpendPriceSource: (value: unknown) => value is SpendPriceSource; export declare const isDashboardTokenBasis: (value: unknown) => value is TokenBasis; export declare const isDashboardSpendSource: (value: unknown) => value is SpendSource; export declare const isDashboardLimitBasis: (value: unknown) => value is LimitBasis; export declare const isDashboardRemainingBasis: (value: unknown) => value is RemainingBasis; export declare const isDashboardLocalUsedBasis: (value: unknown) => value is LocalUsedBasis; export declare const isDashboardResetsAtBasis: (value: unknown) => value is ResetsAtBasis; export declare const isDashboardErrorCode: (value: unknown) => value is DashboardErrorCode; export declare const isDashboardErrorMessage: (value: unknown) => value is DashboardErrorMessage; export declare const isDashboardQueryIncludeRepair: (value: unknown) => value is DashboardQueryIncludeRepair; export declare const isDashboardQueryAttribution: (value: unknown) => value is DashboardQueryAttribution; export declare const isDashboardQueryParameterName: (value: unknown) => value is DashboardQueryParameterName; export declare const isDashboardQueryFilterName: (value: unknown) => value is DashboardQueryFilterName; export declare const isNonNegativeInteger: (value: unknown) => value is number; /** * UTF-8 byte length of a string, or null when it carries control characters or an * unpaired surrogate. Exported because the routes module gates the SAME query budget * with it before decoding — one implementation, so the limit's logic cannot drift. */ export declare const utf8ByteLength: (value: string) => number | null; export declare const isDashboardSafeId: (value: unknown) => value is string; export declare const isDashboardAttemptId: (value: unknown) => value is string; export declare const isDashboardQueryWithinLimit: (value: unknown) => value is string; export declare const isDashboardRequestBytesWithinLimit: (value: unknown) => value is number; export declare const DASHBOARD_REQUEST_ID_PATTERN_SOURCE: string; export declare const isDashboardRequestId: (value: unknown) => value is string; export declare const isDashboardUtcTimestamp: (value: unknown) => value is string; export declare const isReportedTokenCell: (value: unknown) => value is ReportedTokenCell; export declare const isEstimatedTokenCell: (value: unknown) => value is EstimatedTokenCell; export declare const isReportedTokenTotals: (value: unknown) => value is ReportedTokenTotals; export declare const isEstimatedTokenTotals: (value: unknown) => value is EstimatedTokenTotals; export declare const isTokenTotalsV1: (value: unknown) => value is TokenTotalsV1; export declare const isProviderPublishedReported: (value: unknown) => value is ProviderPublishedReported; export declare const isProviderPublishedEstimated: (value: unknown) => value is ProviderPublishedEstimated; export declare const isReferenceReported: (value: unknown) => value is ReferenceReported; export declare const isReferenceEstimated: (value: unknown) => value is ReferenceEstimated; export declare const isSpendTotalsV1: (value: unknown) => value is SpendTotalsV1; export declare const isCostRowV1: (value: unknown) => value is CostRowV1; /** * The four provenance-labelled cell keys, as ONE list. * * ⚠ Exported so a renderer walks these rather than hand-listing them a fifth time. The names were * already written out in the type, the projection and two validators; a runtime list hand-copied * from a closed set is this repo's most-repeated defect, so this is the list and * `Omit` is checked against it by * `isShareSpendCells`. */ export declare const SHARE_CELL_KEYS: readonly ["providerPublishedReported", "providerPublishedEstimated", "referenceReported", "referenceEstimated"]; export declare const isWriterState: (value: unknown) => value is WriterState; export declare const isWriterHealth: (value: unknown) => value is WriterHealth; export declare const isCostReportV1: (value: unknown) => value is CostReportV1; export declare const isPanelCoverageV1: (value: unknown) => value is PanelCoverageV1; export declare const isSummaryV1: (value: unknown) => value is SummaryV1; export declare const isBucketV1: (value: unknown) => value is BucketV1; export declare const isDimensionSummaryV1: (value: unknown) => value is DimensionSummaryV1; export declare const isProviderDimensionRowV1: (value: unknown) => value is ProviderDimensionRowV1; export declare const isModelDimensionRowV1: (value: unknown) => value is ModelDimensionRowV1; export declare const isClientDimensionRowV1: (value: unknown) => value is ClientDimensionRowV1; export declare const isCredentialDimensionRowV1: (value: unknown) => value is CredentialDimensionRowV1; export declare const isDimensionRowV1: (value: unknown) => value is DimensionRowV1; export declare const isErrorDistributionRowV1: (value: unknown) => value is ErrorDistributionRowV1; export declare const isRequestRowV1: (value: unknown) => value is RequestRowV1; export declare const isAttemptRowV1: (value: unknown) => value is AttemptRowV1; export declare const isQuotaRowV1: (value: unknown) => value is QuotaRowV1; export declare const isCooldownRowV1: (value: unknown) => value is CooldownRowV1; export declare const isSnapshotV1: (value: unknown) => value is SnapshotV1; export declare const isDetailV1: (value: unknown) => value is DetailV1; export declare const isDashboardErrorV1: (value: unknown) => value is DashboardErrorV1; export declare const isDashboardSnapshotV1: typeof isSnapshotV1; export declare const isDashboardDetailV1: typeof isDetailV1; export declare function assertSnapshotV1(value: unknown): asserts value is SnapshotV1; export declare function assertDetailV1(value: unknown): asserts value is DetailV1; export declare function assertCostReportV1(value: unknown): asserts value is CostReportV1; export declare function assertDashboardErrorV1(value: unknown): asserts value is DashboardErrorV1;