import type { CodaliContextPack, CodaliEvidenceItem, CodaliGatewayRequest, CodaliGatewayTraceEvent } from "./CodaliGatewayTypes.js"; import { type CodaliGatewayRunTrace, type CodaliGatewayStore, type CodaliGatewayStoredArtifact, type CodaliGatewayStoredModelCall, type CodaliGatewayStoredTask, type CodaliGatewayStoredToolCall } from "./CodaliGatewayStore.js"; export declare const CODALI_GATEWAY_TRACE_SCHEMA_VERSION: 1; export declare const CODALI_GATEWAY_REPLAY_FIXTURE_SCHEMA_VERSION: 1; export declare const CODALI_GATEWAY_TRACE_EVENT_NAMES: { readonly RUN_CREATED: "codali.gateway.run.created"; readonly RUN_STATUS: "codali.gateway.run.status"; readonly TASK_STATUS: "codali.gateway.task.status"; readonly TOOL_CALL: "codali.gateway.tool.call"; readonly MODEL_CALL: "codali.gateway.model.call"; readonly EVIDENCE_RECORDED: "codali.gateway.evidence.recorded"; readonly CONTEXT_PACK_BUILT: "codali.gateway.context_pack.built"; readonly ARTIFACT_CREATED: "codali.gateway.artifact.created"; readonly FINAL_SYNTHESIS: "codali.gateway.final_synthesis"; }; export interface CodaliGatewayDebugSummary { runId: string; status: string; mode?: string; product?: string; tenantId?: string; tenantSlug?: string; conversationId?: string; taskCount: number; evidenceCount: number; toolCallCount: number; modelCallCount: number; artifactCount: number; sourceCount: number; calledTools: string[]; failedTools: string[]; modelRoles: string[]; finalModel?: { role: string; agentSlug?: string; model?: string; provider?: string; status: string; }; warnings: string[]; errors: string[]; } export interface CodaliGatewayTraceReadResult { schemaVersion: typeof CODALI_GATEWAY_TRACE_SCHEMA_VERSION; runId: string; status: string; run: CodaliGatewayRunTrace["run"]; tasks: CodaliGatewayStoredTask[]; evidence: CodaliEvidenceItem[]; toolCalls: CodaliGatewayStoredToolCall[]; modelCalls: CodaliGatewayStoredModelCall[]; contextPack?: CodaliContextPack; artifacts: CodaliGatewayStoredArtifact[]; finalAnswer?: string; debugSummary: CodaliGatewayDebugSummary; events: CodaliGatewayTraceEvent[]; } export interface CodaliGatewayTraceReadInput { store: CodaliGatewayStore; runId: string; } export interface CodaliGatewayReplayFixtureToolCall { id: string; taskId?: string; tool: string; status: string; args?: unknown; result?: unknown; errorCode?: string; errorMessage?: string; latencyMs?: number; } export interface CodaliGatewayReplayFixtureModelCall { id: string; taskId?: string; role: string; status: string; agentSlug?: string; model?: string; provider?: string; input?: unknown; output?: unknown; errorCode?: string; errorMessage?: string; latencyMs?: number; } export interface CodaliGatewayReplayFixture { schemaVersion: typeof CODALI_GATEWAY_REPLAY_FIXTURE_SCHEMA_VERSION; fixtureId: string; runId: string; exportedAt: string; request?: CodaliGatewayRequest | Record; planner: { classifierOutput?: unknown; plannerOutput?: unknown; }; contextPack?: CodaliContextPack; evidence: CodaliEvidenceItem[]; toolFixtures: CodaliGatewayReplayFixtureToolCall[]; modelFixtures: CodaliGatewayReplayFixtureModelCall[]; finalAnswer?: string; debugSummary: CodaliGatewayDebugSummary; events: CodaliGatewayTraceEvent[]; } export interface CodaliGatewayReplayFixtureOptions { fixtureId?: string; includeModelInputs?: boolean; includeModelOutputs?: boolean; includeToolResults?: boolean; } export interface CodaliGatewayReplayFixtureInput { store: CodaliGatewayStore; runId: string; options?: CodaliGatewayReplayFixtureOptions; } export declare const summarizeCodaliGatewayTrace: (trace: CodaliGatewayRunTrace) => CodaliGatewayDebugSummary; export declare const buildCodaliGatewayTraceEvents: (trace: CodaliGatewayRunTrace | undefined) => CodaliGatewayTraceEvent[]; export declare const readCodaliGatewayTrace: ({ store, runId, }: CodaliGatewayTraceReadInput) => Promise; export declare const exportCodaliGatewayReplayFixture: ({ store, runId, options, }: CodaliGatewayReplayFixtureInput) => Promise; //# sourceMappingURL=GatewayTraceReplay.d.ts.map