import type { FabricKernel } from "../runtime/kernel.js"; import type { FabricAssessmentTraceV1 } from "./assessment.js"; import { type FabricExecutionTraceV1 } from "./trace-schema.js"; export declare const FABRIC_EXECUTION_DETAILS_MAX_BYTES: number; export interface FabricPersistedExecutionDetailsV1 { success: boolean; kernel?: FabricKernel; trace: FabricExecutionTraceV1; /** Opt-in (`trace.assessment`) timings and usage, separate from the deterministic trace. */ assessment?: FabricAssessmentTraceV1; /** Rich render audits persisted verbatim (minus in-memory media) so a resumed transcript re-renders — and expands — exactly like the live one. */ audits: FabricLegacyRenderAudit[]; phases: string[]; error?: string; outputFormat?: "yaml" | "json"; outputFormatStartLine?: number; outputFormatLines?: number; /** Audits the size bound dropped; the resumed card still counts them. */ omittedCalls?: FabricOmittedCalls; } /** * The audit fields that cross into the session record; read back by * {@link legacyAudit}. In-memory-only payloads (image blocks, media notes) * never persist. */ export interface FabricPersistableAuditInput { ref: string; nestedToolCallId?: string; tool?: string; provider?: string; success?: boolean; error?: string; args?: Record; result?: unknown; resultTruncated?: boolean; preview?: unknown; startedAt?: number; endedAt?: number; } export interface FabricLegacyRenderAudit { ref: string; /** The call's opaque id; a proxied `tool_result` carries the same value as its `toolCallId`. Absent in older transcripts and trace-derived audits. */ nestedToolCallId?: string; tool?: string; provider?: string; success?: boolean; error?: string; args?: Record; result?: unknown; resultTruncated?: boolean; preview?: unknown; /** Set only when reconstructed from the durable trace: args are privacy-projected and results/previews are not retained. */ fromTrace?: boolean; startedAt?: number; endedAt?: number; } export interface FabricExecutionRenderDetails { success?: boolean; kernel?: FabricKernel; error?: string; progress?: string; outputFormat?: "yaml" | "json"; outputFormatStartLine?: number; outputFormatLines?: number; phases: string[]; audits: FabricLegacyRenderAudit[]; /** Calls a progress update left out to stay bounded; the live card still counts them. */ omittedCalls?: FabricOmittedCalls; } export interface FabricOmittedCalls { count: number; /** How many of the omitted calls had finished. */ done: number; /** How many omitted calls failed (absent in older records). */ failed?: number; /** Successful internal plumbing among these raw omitted calls; excluded only by UI projections. */ internal?: number; } /** * Creates the only object stored in final fabric_exec details. The * privacy-projected trace stays the functional record for compaction and tool * ownership; rich call audits persist verbatim (minus in-memory media) so a * resumed transcript re-renders and expands exactly like the live one — the * collapsed display, not the session record, is the visual boundary. The * aggregate object, not each member independently, is bound; display-only * audits trim before the functional trace. */ export declare const createFabricPersistedExecutionDetails: (input: { success: boolean; kernel?: FabricKernel; trace: FabricExecutionTraceV1; assessment?: FabricAssessmentTraceV1; audits?: readonly FabricPersistableAuditInput[]; phases?: readonly string[]; error?: string; outputFormat?: "yaml" | "json"; outputFormatStartLine?: number; outputFormatLines?: number; }) => FabricPersistedExecutionDetailsV1; /** * Adapts both old audit-bearing session details and current trace-only details * for rendering. Legacy audits win when present so old transcripts retain * their historical rich previews. */ export declare const readFabricExecutionRenderDetails: (value: unknown) => FabricExecutionRenderDetails; /** Byte budget for the call audits in one fabric_exec progress update. */ export declare const FABRIC_PARTIAL_AUDITS_MAX_BYTES: number; /** Complete onUpdate envelope, including the second copy of progress in content. */ export declare const FABRIC_PARTIAL_UPDATE_MAX_BYTES: number; export interface FabricPartialExecutionDetails { progress?: string; deadlineAt?: number; phases: string[]; audits: FabricLegacyRenderAudit[]; omittedCalls?: FabricOmittedCalls; } /** * Builds the details of one fabric_exec progress update. Each update replaces * the previous one, so it must stand alone, yet its size must not grow with * the number of nested calls: hundreds of calls with full arguments and * results once made a single update line megabytes long. The final result is * built separately and keeps every audit. */ export declare const createFabricPartialExecutionDetails: (input: { audits: readonly FabricPersistableAuditInput[]; phases: readonly string[]; progress?: string | undefined; deadlineAt?: number | undefined; }) => FabricPartialExecutionDetails; //# sourceMappingURL=details.d.ts.map