export interface RuntimeTraceSpan { traceId: string; spanId: string; parentSpanId: string | null; workflow: 'native' | 'classic'; change: string; runId: string; kind: 'workflow' | 'action' | 'wait' | 'evidence' | 'command' | 'check' | 'retrieval'; name: string; status: 'pending' | 'running' | 'waiting' | 'succeeded' | 'failed' | 'cancelled' | 'unknown'; startedAt: string | null; endedAt: string | null; updatedAt: string; revision: number; attempt?: number; summary?: string; attributes?: Record; } /** 只关联已经由调用方验证的 Run 身份,不读取工作流状态或创建观测文件。 */ export declare function bindRuntimeTrace(binding: { workflow: 'native' | 'classic'; change: string; runId: string; }): void; /** SQLite 中只保存有界的观测副本;同一节点的旧版本不能覆盖较新结果。 */ export declare function recordRuntimeTraceSpans(projectRoot: string, spans: RuntimeTraceSpan[]): Promise; export declare function readRuntimeTraceSpans(projectRoot: string, options?: { traceId?: string; limit?: number; }): Promise<{ spans: RuntimeTraceSpan[]; truncated: boolean; days: number; limit: number; }>; /** 同一工作区的嵌套命令和检查共享 trace;保存失败不改变原操作的结果或异常。 */ export declare function observeRuntimeSpan(options: { projectRoot: () => string | Promise; workflow: 'native' | 'classic'; kind: 'command' | 'check' | 'retrieval'; name: string; change?: string; runId?: string; status?: (value: T) => RuntimeTraceSpan['status']; }, operation: () => Promise): Promise; /** 只有已建立 Change 归属的执行上下文才采集插件子节点。 */ export declare function observeRuntimeChildSpan(name: string, operation: () => Promise, status?: (value: T) => RuntimeTraceSpan['status']): Promise; //# sourceMappingURL=runtime-trace.d.ts.map