export declare const TELEMETRY_ENVELOPE_SCHEMA_VERSION: "telemetry.envelope.v1";
export declare const TELEMETRY_EVENT_SEVERITIES: readonly ["debug", "info", "warn", "error"];
export type TelemetryEventSeverity = (typeof TELEMETRY_EVENT_SEVERITIES)[number];
export declare const TELEMETRY_EVENT_DECISIONS: readonly ["pass", "observe", "warn", "block", "fail", "skip"];
export type TelemetryEventDecision = (typeof TELEMETRY_EVENT_DECISIONS)[number];
export declare const TELEMETRY_EVENT_ORIGINS: readonly ["runtime", "daemon", "task", "project_map", "permission", "fitness", "admin", "unknown"];
export type TelemetryEventOrigin = (typeof TELEMETRY_EVENT_ORIGINS)[number];
export declare const TELEMETRY_ENVELOPE_REQUIRED_FIELDS: readonly ["schemaVersion", "eventType", "surface", "subject", "origin", "severity", "observedAt", "decision", "reasonCode"];
export interface TelemetryEventEnvelope {
    schemaVersion: typeof TELEMETRY_ENVELOPE_SCHEMA_VERSION;
    eventType: string;
    surface: string;
    subject: string;
    origin: TelemetryEventOrigin;
    severity: TelemetryEventSeverity;
    observedAt: string;
    decision: TelemetryEventDecision;
    reasonCode: string;
    evidenceRef?: string;
    attributes?: Record<string, unknown>;
}
export interface BuildTelemetryEventEnvelopeInput {
    eventType: string;
    surface: string;
    subject: string;
    origin: TelemetryEventOrigin;
    severity: TelemetryEventSeverity;
    decision: TelemetryEventDecision;
    reasonCode: string;
    observedAt?: Date | string | number;
    evidenceRef?: string;
    attributes?: Record<string, unknown>;
}
export declare function buildTelemetryEventEnvelope(input: BuildTelemetryEventEnvelopeInput): TelemetryEventEnvelope;
/**
 * Off switch for the unified envelope sink. Default ON; set
 * OWLCODA_TELEMETRY_EVENTS=0 to silence envelope persistence without touching
 * any other telemetry. Mirrors the repo's FALSY-set flag idiom.
 */
export declare function isTelemetryEnvelopeSinkEnabled(env?: NodeJS.ProcessEnv): boolean;
/**
 * Persist a telemetry envelope to the unified events ledger
 * (~/.owlcoda/telemetry/events-YYYY-MM-DD.jsonl). This is the envelope's sink —
 * the shared-spine counterpart to gate-telemetry's recordGateEvent. Synchronous
 * and fire-and-forget: every I/O error is swallowed so telemetry can never
 * affect the calling code path.
 */
export declare function recordTelemetryEnvelope(envelope: TelemetryEventEnvelope, env?: NodeJS.ProcessEnv): void;
