import { type PromotedEval, type PromotedEvalSpec } from "../../eval/from-trace.js"; import type { EvalDataset } from "../types.js"; /** Cap on run events loaded for one promotion. One past this is a refusal. */ export declare const PROMOTE_RUN_EVENT_LIMIT = 10000; export declare const PROMOTE_TRACE_EVAL_BODY_LIMIT = 24000; export interface PromoteTraceEvalArgs { runId: string; reviewedPrompt?: string; reviewedHistory?: Array<{ role: "user" | "assistant"; text: string; }>; mustContain?: string; datasetName?: string; } export interface PromoteTraceEvalResult { sourceRunId: string; dataset: PromotedEval["dataset"]; eval: PromotedEvalSpec; } export interface LoadedTraceEvalPromotion { promotion: PromoteTraceEvalResult; /** True when this owner already has a dataset for the source run. */ alreadyStored: boolean; } /** * Map a caller-scoped run to an eval dataset without inserting. * `alreadyStored` means a previous promotion was found. Callers that write a * fixture must finish that write before `persistPromotedEvalDataset`. * Does not write `*.eval.ts`. */ export declare function loadTraceEvalPromotion(args: PromoteTraceEvalArgs, opts?: { userId?: string; }): Promise; /** Persist a mapped promotion. Repeat calls return the existing row. */ export declare function persistPromotedEvalDataset(dataset: EvalDataset): Promise; /** * Load a caller-scoped run and persist one EvalDataset. Shared by the * `promote-trace-eval` action and the observability HTTP route. * Does not write `*.eval.ts`. Idempotent per owner and source run. * Event history past {@link PROMOTE_RUN_EVENT_LIMIT} fails with * `events_truncated` instead of promoting a partial trace. */ export declare function promoteTraceEvalFromStore(args: PromoteTraceEvalArgs, opts?: { userId?: string; }): Promise; /** * Turn a completed production agent run into a CI eval case (dataset row plus * defineEval JSON). Use after a failing or surprising trace. Does not write * *.eval.ts; use the eval CLI --write for that. * * Mounted through mergeCoreSharingActions. Grouped under `labs` rather than a * new `observability` frameworkTools member — that union is filtered at * thirteen agent-chat composition sites; a dedicated group is a follow-up. */ declare const _default: import("../../action.js").ActionDefinition<{ runId: string; mustContain?: string | undefined; reviewedPrompt?: string | undefined; reviewedHistory?: { role: "assistant" | "user"; text: string; }[] | undefined; datasetName?: string | undefined; }, PromoteTraceEvalResult>; export default _default;