import type { TelemetrySpan, InstrumentationContext } from "@agentvault/crypto";
/**
 * Get and clear the buffered spans (for batch reporting).
 */
export declare function drainSkillSpans(): TelemetrySpan[];
/**
 * Wrap a skill execution with lifecycle telemetry spans.
 *
 * Creates two spans:
 * 1. start — emitted immediately when invocation begins
 * 2. completion — emitted when execution completes (success or error)
 *
 * @param skillName — name of the skill being executed
 * @param version — semver version of the skill
 * @param fn — the async function to execute
 * @param instrument — optional InstrumentationContext for direct reporting
 * @returns The result of fn()
 */
export declare function wrapSkillExecution<T>(skillName: string, version: string | undefined, fn: () => Promise<T>, instrument?: InstrumentationContext): Promise<T>;
/**
 * Report a completed skill invocation with full metadata.
 * Used for post-hoc reporting when the caller has already collected metrics.
 */
export declare function reportSkillInvocation(opts: {
    skillName: string;
    version?: string;
    latencyMs: number;
    success: boolean;
    inputTokens?: number;
    outputTokens?: number;
    costCents?: number;
    toolsUsed?: string[];
    schemaMatch?: boolean;
    errorMessage?: string;
}): TelemetrySpan;
//# sourceMappingURL=skill-telemetry.d.ts.map