import { Mt as TelemetryAttributes, Nt as TelemetryMetricRecord, Pt as TelemetrySpanEventRecord, jt as TelemetryArtifactAttachment } from "./ItemsInputNormalizer-C2gLv7d9.js"; //#region src/domain/telemetry/TelemetryContracts.d.ts type TelemetrySpanStatus = "running" | "completed" | "failed"; type TelemetrySpanKind = "internal" | "client"; interface TelemetryTraceContext { readonly runId: string; readonly workflowId: string; readonly traceId: string; readonly rootSpanId: string; readonly serviceName?: string; readonly createdAt: string; readonly expiresAt?: string; } interface TelemetrySpanRecord { readonly traceId: string; readonly spanId: string; readonly parentSpanId?: string; readonly runId: string; readonly workflowId: string; readonly nodeId?: string; readonly activationId?: string; readonly connectionInvocationId?: string; readonly name: string; readonly kind: TelemetrySpanKind; readonly status?: TelemetrySpanStatus; readonly statusMessage?: string; readonly startTime?: string; readonly endTime?: string; readonly workflowFolder?: string; readonly nodeType?: string; readonly nodeRole?: string; readonly modelName?: string; readonly attributes?: TelemetryAttributes; readonly events?: ReadonlyArray; readonly retentionExpiresAt?: string; readonly iterationId?: string; readonly itemIndex?: number; readonly parentInvocationId?: string; } interface TelemetrySpanUpsert { readonly traceId: string; readonly spanId: string; readonly parentSpanId?: string; readonly runId: string; readonly workflowId: string; readonly nodeId?: string; readonly activationId?: string; readonly connectionInvocationId?: string; readonly name?: string; readonly kind?: TelemetrySpanKind; readonly status?: TelemetrySpanStatus; readonly statusMessage?: string; readonly startTime?: string; readonly endTime?: string; readonly workflowFolder?: string; readonly nodeType?: string; readonly nodeRole?: string; readonly modelName?: string; readonly attributes?: TelemetryAttributes; readonly events?: ReadonlyArray; readonly retentionExpiresAt?: string; readonly iterationId?: string; readonly itemIndex?: number; readonly parentInvocationId?: string; } interface TelemetryArtifactRecord { readonly artifactId: string; readonly traceId: string; readonly spanId: string; readonly runId: string; readonly workflowId: string; readonly nodeId?: string; readonly activationId?: string; readonly kind: string; readonly contentType: string; readonly previewText?: string; readonly previewJson?: unknown; readonly payloadText?: string; readonly payloadJson?: unknown; readonly payloadStorageKey?: string; readonly bytes?: number; readonly truncated?: boolean; readonly createdAt: string; readonly expiresAt?: string; readonly retentionExpiresAt?: string; } interface TelemetryArtifactWrite extends TelemetryArtifactAttachment { readonly traceId: string; readonly spanId: string; readonly runId: string; readonly workflowId: string; readonly nodeId?: string; readonly activationId?: string; readonly retentionExpiresAt?: string; } interface TelemetryMetricPointRecord { readonly metricPointId: string; readonly traceId?: string; readonly spanId?: string; readonly runId?: string; readonly workflowId: string; readonly nodeId?: string; readonly activationId?: string; readonly metricName: string; readonly value: number; readonly unit?: string; readonly observedAt: string; readonly workflowFolder?: string; readonly nodeType?: string; readonly nodeRole?: string; readonly modelName?: string; readonly dimensions?: TelemetryAttributes; readonly retentionExpiresAt?: string; readonly iterationId?: string; readonly itemIndex?: number; readonly parentInvocationId?: string; } interface TelemetryMetricPointWrite extends TelemetryMetricRecord { readonly traceId?: string; readonly spanId?: string; readonly runId?: string; readonly workflowId: string; readonly nodeId?: string; readonly activationId?: string; readonly observedAt: string; readonly workflowFolder?: string; readonly nodeType?: string; readonly nodeRole?: string; readonly modelName?: string; readonly retentionExpiresAt?: string; readonly iterationId?: string; readonly itemIndex?: number; readonly parentInvocationId?: string; } interface TelemetrySpanListQuery { readonly traceId?: string; readonly runId?: string; readonly runIds?: ReadonlyArray; readonly workflowId?: string; readonly workflowIds?: ReadonlyArray; readonly statuses?: ReadonlyArray; readonly names?: ReadonlyArray; readonly modelNames?: ReadonlyArray; readonly startTimeGte?: string; readonly endTimeLte?: string; readonly limit?: number; } interface TelemetryMetricPointListQuery { readonly traceId?: string; readonly runId?: string; readonly runIds?: ReadonlyArray; readonly workflowId?: string; readonly workflowIds?: ReadonlyArray; readonly nodeId?: string; readonly metricNames?: ReadonlyArray; readonly modelNames?: ReadonlyArray; readonly observedAtGte?: string; readonly observedAtLte?: string; readonly limit?: number; } interface TelemetryPruneArgs { readonly nowIso: string; readonly limit?: number; } interface RunTraceContextRepository { load(runId: string): Promise; getOrCreate(args: Readonly<{ runId: string; workflowId: string; serviceName?: string; }>): Promise; upsertExpiry(args: Readonly<{ runId: string; expiresAt?: string; }>): Promise; } interface TelemetrySpanStore { upsert(record: TelemetrySpanUpsert): Promise; list(args?: TelemetrySpanListQuery): Promise>; listByTraceId(traceId: string): Promise>; pruneExpired(args: TelemetryPruneArgs): Promise; } interface TelemetryArtifactStore { save(record: TelemetryArtifactWrite): Promise; listByTraceId(traceId: string): Promise>; pruneExpired(args: TelemetryPruneArgs): Promise<{ count: number; storageKeys: ReadonlyArray; }>; } interface TelemetryMetricPointStore { save(record: TelemetryMetricPointWrite): Promise; list(args?: TelemetryMetricPointListQuery): Promise>; pruneExpired(args: TelemetryPruneArgs): Promise; } interface TelemetryExporter { exportSpans(spans: ReadonlyArray): Promise; } //#endregion export { TelemetrySpanStatus as a, TelemetryMetricPointStore as i, TelemetryArtifactStore as n, TelemetrySpanStore as o, TelemetryExporter as r, TelemetrySpanUpsert as s, RunTraceContextRepository as t }; //# sourceMappingURL=TelemetryContracts-CfeVZRFL.d.ts.map