import { z } from "zod"; import type { LogQuerySpecV2 } from "./spec-v2.js"; export declare const logAttributeSourceSchema: z.ZodEnum<{ log: "log"; resource: "resource"; scope: "scope"; }>; export type LogAttributeSource = z.infer; /** * A value inside the JSON log body (`otel_body`), addressed by object path: * `["metadata", "durationMs"]` reads `otel_body.metadata.durationMs`. Most * numeric facts live here rather than in the attribute map. */ export declare const bodyJsonFieldSchema: z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>; export type BodyJsonField = z.infer; export declare const logFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"service">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"severity_number">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>], "kind">; export type LogField = z.infer; export declare const logPredicateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodEnum<{ contains: "contains"; eq: "eq"; neq: "neq"; }>; value: z.ZodString; }, z.core.$strict>, z.ZodObject<{ field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodLiteral<"in">; values: z.ZodArray; }, z.core.$strict>, z.ZodObject<{ field: z.ZodUnion; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodLiteral<"exists">; }, z.core.$strict>, z.ZodObject<{ field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodEnum<{ gt: "gt"; gte: "gte"; lt: "lt"; lte: "lte"; }>; value: z.ZodNumber; }, z.core.$strict>], "operator">; export type LogPredicate = z.infer; /** * The longest relative window a query may name: the raw `logs` retention * (`log_volume_per_minute` keeps the same 90 days). Absolute windows are the * caller's own; a window older than what storage holds answers with partial * coverage, never a refusal. */ export declare const MAX_LOG_QUERY_LOOKBACK_SECONDS: number; export declare const DEFAULT_LOG_QUERY_LOOKBACK_SECONDS: number; export declare const logTimeRangeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"absolute">; from: z.ZodISODateTime; to: z.ZodISODateTime; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"relative">; lookbackSeconds: z.ZodNumber; }, z.core.$strict>], "kind">; export type LogTimeRange = z.infer; export declare const logMeasureSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<"count">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodEnum<{ avg: "avg"; max: "max"; min: "min"; p50: "p50"; p95: "p95"; p99: "p99"; sum: "sum"; }>; field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; }, z.core.$strict>], "operation">; export type LogMeasure = z.infer; /** * Rows a `details` result may return: the executor's `max_result_rows` guard, * which is the only row cap the engine enforces. */ export declare const MAX_LOG_QUERY_DETAILS_LIMIT = 10000; export declare const MAX_LOG_QUERY_GROUP_BY_FIELDS = 5; /** * A v1 query. Every field but `version` has a default, so `{}` is a valid * query: the newest 50 customer rows of the last hour. `pattern` is optional: * with it, the query is anchored to the pattern ids the text resolves to and * reads the pattern index; without it, the query reads the raw `logs` table * by its filters alone, under the same execution guards. */ export declare const logQuerySpecV1Schema: z.ZodObject<{ version: z.ZodDefault>; pattern: z.ZodOptional>; timeRange: z.ZodDefault; from: z.ZodISODateTime; to: z.ZodISODateTime; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"relative">; lookbackSeconds: z.ZodNumber; }, z.core.$strict>], "kind">>; filters: z.ZodDefault; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodEnum<{ contains: "contains"; eq: "eq"; neq: "neq"; }>; value: z.ZodString; }, z.core.$strict>, z.ZodObject<{ field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodLiteral<"in">; values: z.ZodArray; }, z.core.$strict>, z.ZodObject<{ field: z.ZodUnion; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodLiteral<"exists">; }, z.core.$strict>, z.ZodObject<{ field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; operator: z.ZodEnum<{ gt: "gt"; gte: "gte"; lt: "lt"; lte: "lte"; }>; value: z.ZodNumber; }, z.core.$strict>], "operator">>>; result: z.ZodDefault; limit: z.ZodDefault; order: z.ZodDefault>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"patterns">; limit: z.ZodDefault; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"aggregate">; measure: z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<"count">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodEnum<{ avg: "avg"; max: "max"; min: "min"; p50: "p50"; p95: "p95"; p99: "p99"; sum: "sum"; }>; field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; }, z.core.$strict>], "operation">; groupBy: z.ZodDefault; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"severity_number">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>], "kind">>>; limit: z.ZodDefault; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"timeseries">; bucket: z.ZodEnum<{ day: "day"; hour: "hour"; minute: "minute"; }>; measure: z.ZodDiscriminatedUnion<[z.ZodObject<{ operation: z.ZodLiteral<"count">; }, z.core.$strict>, z.ZodObject<{ operation: z.ZodEnum<{ avg: "avg"; max: "max"; min: "min"; p50: "p50"; p95: "p95"; p99: "p99"; sum: "sum"; }>; field: z.ZodUnion; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>]>; }, z.core.$strict>], "operation">; groupBy: z.ZodDefault; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"severity_number">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"attribute">; source: z.ZodDefault>; key: z.ZodString; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"body_json">; path: z.ZodArray; }, z.core.$strict>], "kind">>>; limit: z.ZodDefault; }, z.core.$strict>], "kind">>; }, z.core.$strict>; export type LogQuerySpecV1 = z.infer; export type LogQuerySpec = LogQuerySpecV1; export type LogQuerySpecAny = LogQuerySpecV1 | LogQuerySpecV2; /** * Execution snapshot produced by pattern retrieval. Field names are part of * the published `AskLogsOutputSchema` contract and therefore stay as they * were under the retired Drain catalog: * - `familyIds` carries the `pattern_id`s the anchor resolved to (registry * key ids — a family anchor expands to its member keys). * - `catalogRevision` carries the pattern index revision as a decimal string. */ export declare const logQueryResolutionV1Schema: z.ZodObject<{ version: z.ZodLiteral<1>; definitionHash: z.ZodString; catalogRevision: z.ZodString; /** Empty for an unanchored query (no `pattern`): the read is not bounded by pattern ids. */ familyIds: z.ZodArray; resolvedAt: z.ZodISODateTime; }, z.core.$strict>; export type LogQueryResolutionV1 = z.infer; export interface ResolvedTimeRange { from: string; to: string; }