/**
 * HALO Trace Exporter
 *
 * Emits agent/LLM/tool execution as JSONL spans in the OTLP / OpenInference
 * shape that the HALO engine (https://github.com/context-labs/HALO) ingests
 * for systemic harness-failure analysis. One JSON object per line.
 *
 * Opt-in and zero-overhead when disabled: every emit path short-circuits on
 * `isHaloTracingEnabled()` before doing any work. Enable with:
 *
 *   UAP_HALO_TRACE=1                       # turn on
 *   UAP_HALO_TRACE_PATH=/path/traces.jsonl # output file (default .uap/halo/traces.jsonl)
 *   UAP_HALO_PROJECT_ID=uap                # inference.project_id (default "uap")
 *
 * Then feed the file to HALO:  halo <traces>.jsonl -p "systemic failure modes?"
 *
 * Failures here never throw into the caller — tracing must not break execution.
 */
/** HALO `inference.observation_kind` / `openinference.span.kind` values. */
export type HaloObservationKind = 'AGENT' | 'LLM' | 'TOOL' | 'CHAIN' | 'GUARDRAIL' | 'SPAN';
/** Schema version HALO expects in `inference.export.schema_version`. */
export declare const HALO_SCHEMA_VERSION = 1;
export interface HaloSpanInput {
    kind: HaloObservationKind;
    /** Span name, e.g. "tool.github.create_issue" or "agent.security-auditor". */
    name: string;
    startTimeMs: number;
    endTimeMs: number;
    /** true → STATUS_CODE_OK, false → STATUS_CODE_ERROR. */
    ok: boolean;
    traceId?: string;
    spanId?: string;
    parentSpanId?: string;
    /** Kind-specific attributes merged into the span's attribute map. */
    attributes?: Record<string, unknown>;
    serviceName?: string;
    projectId?: string;
    scopeVersion?: string;
}
/** The serialized span object written as one JSONL line. */
export interface HaloSpan {
    trace_id: string;
    span_id: string;
    parent_span_id?: string;
    name: string;
    kind: string;
    start_time: string;
    end_time: string;
    status: {
        code: 'STATUS_CODE_OK' | 'STATUS_CODE_ERROR';
    };
    resource: {
        attributes: Record<string, unknown>;
    };
    scope: {
        name: string;
        version: string;
    };
    attributes: Record<string, unknown>;
}
export declare function isHaloTracingEnabled(): boolean;
export declare function haloTracePath(): string;
/** 32-hex-char OTLP trace id. */
export declare function newTraceId(): string;
/** 16-hex-char OTLP span id. */
export declare function newSpanId(): string;
/** Stable 16-hex span id derived from a seed (e.g. an agent id) for linkage. */
export declare function deterministicSpanId(seed: string): string;
/**
 * ISO-8601 timestamp with nanosecond precision and trailing `Z`, as HALO's
 * verifier requires. JS clocks are millisecond-resolution, so the sub-ms
 * nanosecond digits are zero-padded.
 */
export declare function isoNanos(ms: number): string;
export declare function sessionTraceId(): string;
/** Reset module state. Test-only. */
export declare function _resetHaloSession(): void;
/** Build the serialized span object without performing any I/O (pure). */
export declare function buildHaloSpan(input: HaloSpanInput): HaloSpan;
/** Append a span to the trace file. No-op when tracing is disabled. */
export declare function recordHaloSpan(input: HaloSpanInput): void;
/** Convenience: record a TOOL span. */
export declare function recordToolSpan(toolPath: string, startTimeMs: number, endTimeMs: number, ok: boolean, extra?: Record<string, unknown>): void;
/** Convenience: record an AGENT span, linking to a parent agent id when present. */
export declare function recordAgentSpan(agentId: string, agentName: string, startTimeMs: number, endTimeMs: number, ok: boolean, parentAgentId?: string | null, extra?: Record<string, unknown>): void;
//# sourceMappingURL=halo-exporter.d.ts.map