/** Skill segmentation and ResultEntry projection for loaded traces. */
import type { ResultEntry, ToolCallInfo, TurnInfo } from '../types/index.js';
import type { CcSession } from './trace-source.js';
export interface SkillSegment {
    skillName: string;
    attribution?: {
        source: 'skill-tool' | 'command-name' | 'business-action' | 'read-skill-md' | 'skill-script' | 'general';
        confidence: number;
        rawSkillRef?: string;
        pluginName?: string;
        commandName?: string;
    };
    sessionId: string;
    traceSessionId?: string;
    sourceTrace?: string;
    sourceKind?: 'claude' | 'openclaw' | 'markdown_log' | 'unknown';
    traceRole?: 'standalone' | 'main' | 'subagent';
    traceLabel?: string;
    segmentIndex: number;
    startRecordIndex?: number;
    endRecordIndex?: number;
    startTimestamp: string;
    endTimestamp: string;
    cwd?: string;
    turns: TurnInfo[];
    toolCalls: ToolCallInfo[];
    metrics: {
        durationMs: number;
        inputTokens: number;
        outputTokens: number;
        cacheReadTokens: number;
        cacheCreationTokens: number;
        numTurns: number;
        numToolCalls: number;
        numToolFailures: number;
    };
}
/**
 * 扫描 session records, 按 skill 信号把 tool calls 切成多段。
 * 一个 session 可能产生 1-N 个 SkillSegment。
 */
export declare function segmentBySkill(session: CcSession): SkillSegment[];
/**
 * SkillSegment[] → ResultEntry[] (omk 内部分析路径的标准输入)。
 *
 * 映射规则(详见 docs/skill-health-spec.md):
 *   - 每 segment 一个 ResultEntry
 *   - sample_id = `${sessionId}:${segmentIndex}`
 *   - variant key = skill 名(复用 omk 的 variant 维度作为 skill 分组维度)
 */
export declare function segmentsToResultEntries(segments: SkillSegment[]): ResultEntry[];
//# sourceMappingURL=trace-segmenter.d.ts.map