/**
 * OTel SDK initialization for external agents.
 *
 * Phase 2 — sprint-564 hotfix
 *
 * initVaubanSDK() now instantiates a BasicTracerProvider with an OTLP HTTP
 * exporter and a BatchSpanProcessor. No host-side OTel setup is required.
 * The collectorUrl defaults to the Alloy gateway that fans out to Tempo,
 * Langfuse, and CC ingest.
 *
 * @see https://opentelemetry.io/docs/languages/js/instrumentation/
 */
import { BasicTracerProvider } from "@opentelemetry/sdk-trace-base";
export type { OtlpSpan, OtlpAttribute, OtlpAttributeValue } from "./types.js";
export interface IngestSpansResult {
    accepted: number;
    skipped?: number;
    runs?: string[];
    warnings?: string[];
}
export interface IngestSpansOptions {
    origin?: string;
}
export interface OtelClient {
    ingestSpans(spans: {
        resourceSpans: unknown[];
    }, opts?: IngestSpansOptions): Promise<IngestSpansResult>;
}
export interface OtelClientOptions {
    baseUrl: string;
    getToken: () => Promise<string>;
}
export declare function createOtelClient(opts: OtelClientOptions): OtelClient;
export interface VaubanSDKOptions {
    /** Vauban API key for the org (scope: cc:ingest). */
    apiKey: string;
    /**
     * OTLP HTTP collector endpoint.
     * Default: internal Alloy gateway that fans out to Tempo, Langfuse, CC ingest.
     */
    collectorUrl?: string;
    /** Agent identifier (e.g. "my-product/trading-agent"). */
    agentId: string;
    /** Agent version (semver). */
    agentVersion: string;
    /** Organization ID (e.g. "my-org"). */
    orgId: string;
    /** Enable console exporter for debugging (default: false). */
    debug?: boolean;
    /**
     * Command Center registry URL for auto-registration.
     * When set, initVaubanSDK() sends a POST /api/registry/agents on startup
     * so the agent appears in the dashboard /registry without manual setup.
     * Default: undefined (opt-in — no auto-registration without explicit URL).
     */
    registryUrl?: string;
    /** Human-readable agent name for the registry (default: agentId). */
    agentName?: string;
    /** Capabilities list for the registry (e.g. ["code-generation", "review"]). */
    capabilities?: string[];
    /** Repository URL for the registry card. */
    repoUrl?: string;
}
/**
 * Initialize the Vauban OTel SDK. Call once at process startup.
 *
 * Instantiates a BasicTracerProvider with an OTLP HTTP exporter on the
 * configured collector endpoint, registers process-level resource attributes,
 * and installs a shutdown hook. No host-side OTel setup is required.
 *
 * Returns the tracer provider for introspection.
 */
export declare function initVaubanSDK(opts: VaubanSDKOptions): BasicTracerProvider;
export declare function getSDKProvider(): BasicTracerProvider | null;
/**
 * Report a run start to the CC registry.
 * Called automatically by initVaubanSDK when registryUrl is set,
 * and manually by agents that want their cycles to appear in /runs.
 */
export declare function reportRunStart(opts: {
    agentId: string;
    runId?: string;
    model?: string;
    provider?: string;
}): Promise<{
    id: string;
} | null>;
/**
 * Report a run finish to the CC registry.
 */
export declare function reportRunFinish(opts: {
    runId: string;
    status: "success" | "failed" | "completed";
    inputTokens?: number;
    outputTokens?: number;
    costUsd?: number;
    errorMessage?: string;
}): Promise<void>;
//# sourceMappingURL=ingest.d.ts.map