import { S as Scenario, M as MutableSurface, b as DispatchContext, a as JudgeConfig, I as ImprovementDriver, G as Gate } from '../types-BgrxOJSf.js';
export { g as CampaignAggregates, h as CampaignArtifactWriter, i as CampaignCellResult, j as CampaignCostMeter, k as CampaignResult, l as CampaignTraceWriter, C as CodeSurface, D as Dispatch, m as GateContext, n as GateDecision, o as GateResult, p as GenerationCandidate, q as GenerationRecord, s as JudgeDimension, J as JudgeScore, u as Mutator, O as OptimizerConfig, w as SessionScript } from '../types-BgrxOJSf.js';
import { C as CampaignStorage, e as RunImprovementLoopResult } from '../run-improvement-loop-BhfdjrMY.js';
export { D as DefaultProductionGateOptions, E as EvolutionaryDriverOptions, a as GepaDriverOptions, H as HeldOutGateOptions, R as RunCampaignOptions, c as RunEvalOptions, d as RunImprovementLoopOptions, h as composeGate, j as defaultProductionGate, k as evolutionaryDriver, m as fsCampaignStorage, n as gepaDriver, o as heldOutGate, p as inMemoryCampaignStorage, r as runCampaign, s as runEval, t as runImprovementLoop } from '../run-improvement-loop-BhfdjrMY.js';
export { D as DeploymentOutcome, F as FileSystemOutcomeStore, b as FileSystemOutcomeStoreOptions, I as InMemoryOutcomeStore, O as OutcomeStore } from '../outcome-store-D6KWmYvj.js';
import { a as HostedTenant, I as InsightReport, T as TraceSpanEvent } from '../index-D2nT6_KT.js';
export { F as FailureClusterInsight, b as InterRaterInsight, J as JudgeInsight, L as LiftInsight, O as OutcomeCorrelationInsight, R as Recommendation, c as ReleaseSummary, S as ScalarDistribution } from '../index-D2nT6_KT.js';
import { A as AnalystRegistry } from '../registry-BSWy0rvH.js';
import { a as DatasetScenario } from '../dataset-BlwAtYYf.js';
import { R as RunRecord, a as RunSplitTag } from '../run-record-etiCMsUq.js';
import '../llm-client-BXVRUZyX.js';
import '../errors-mje_cKOs.js';
import '../raw-provider-sink-C46HDghv.js';
import '../red-team-CrC5MZYd.js';
import '../store-CKUAgsJz.js';
import '../schema-m0gsnbt3.js';
import '../summary-report-DLxh4yWk.js';
import '../failure-cluster-CL7IVgkJ.js';
import '../judge-calibration-DilmB3Ml.js';
import '../store-CJbzDxZ2.js';
import '../types-DhqpAi_z.js';
import '@tangle-network/tcloud';

/**
 * # `selfImprove()` — the LAND-tier one-shot.
 *
 * The cheapest possible call site to run a real closed-loop self-
 * improvement over your agent. Wraps `runImprovementLoop` with smart
 * defaults and a budget-shaped options API; every escape hatch the
 * substrate exposes is reachable from here without losing the
 * one-function feel.
 *
 * Defaults picked to match the LAND-tier story:
 *   - In-memory storage (no filesystem touch).
 *   - `gepaDriver` reflective mutation with copywriting-flavored primitives
 *     (override `driver` or `mutationPrimitives` for any domain).
 *   - `defaultProductionGate` with `deltaThreshold: 0.05`.
 *   - Held-out split = 25% of scenarios, deterministic by id hash.
 *   - 3 generations × population 2 (raise via `budget` for more search).
 *   - `autoOnPromote: 'none'` (we don't open PRs unless you ask).
 *
 * Want one-click? Provide `agent` + `scenarios` + `judge`. Done.
 * Want distributed? Pass `cellPlacement` + an `httpDispatch`-backed
 * agent. Want a code-tier surface? Pass a `MutableSurface` + your own
 * `driver`. Same function.
 */

interface SelfImproveBudget {
    /** Hard $ ceiling across all cells in baseline + every generation. Cells
     *  beyond the ceiling are skipped (cost-aware, not aborted). */
    dollars?: number;
    /** How many improvement generations to explore. Default 3. Set 0 to
     *  skip improvement entirely (selfImprove becomes a baseline-only run). */
    generations?: number;
    /** Candidates the driver proposes per generation. Default 2. */
    populationSize?: number;
    /** Max concurrent cells across the loop. Default 2. */
    maxConcurrency?: number;
    /** Fraction of `scenarios` held out from training, used for the gate.
     *  Default 0.25. Ignored when `holdoutScenarios` is set explicitly. */
    holdoutFraction?: number;
    /** Explicit held-out scenarios; overrides `holdoutFraction`. */
    holdoutScenarios?: Scenario[];
}
interface SelfImproveLlm {
    /** Endpoint base URL. Default Tangle Router. */
    baseUrl?: string;
    /** Bearer token. Default `process.env.OPENAI_API_KEY`. */
    apiKey?: string;
    /** Model id used by `gepaDriver` reflection. Default
     *  `anthropic/claude-sonnet-4.6`. */
    model?: string;
}
type SelfImproveProgressEvent = {
    kind: 'baseline.started';
    scenarios: number;
} | {
    kind: 'baseline.completed';
    compositeMean: number;
    durationMs: number;
} | {
    kind: 'generation.started';
    index: number;
    populationSize: number;
} | {
    kind: 'generation.completed';
    index: number;
    bestComposite: number;
    durationMs: number;
} | {
    kind: 'gate.decided';
    decision: string;
    lift: number;
};
interface SelfImproveOptions<TScenario extends Scenario, TArtifact> {
    /**
     * Your agent — a function that takes the current `MutableSurface`
     * (typically a system prompt the loop is optimizing) plus the
     * scenario + cell ctx, and returns the artifact your judge scores.
     *
     * Same shape as `RunOptimizationOptions.dispatchWithSurface`. Wrap a
     * plain `Dispatch` if you don't have a surface seam:
     *
     *   agent: (_surface, scenario, ctx) => yourPlainDispatch(scenario, ctx)
     *
     * That mode evaluates without mutating any surface — useful as a
     * baseline-only run (set `budget.generations = 0`).
     */
    agent: (surface: MutableSurface, scenario: TScenario, ctx: DispatchContext) => Promise<TArtifact>;
    /** Scenarios to evaluate against. Train/holdout split is computed from
     *  these unless `budget.holdoutScenarios` is set explicitly. */
    scenarios: TScenario[];
    /** Judge that scores artifacts. Bring your own; use `langchainJudge`
     *  from `/adapters/langchain` for a Runnable-shaped one. */
    judge: JudgeConfig<TArtifact, TScenario>;
    /** Starting surface — system prompt, JSON config, anything `MutableSurface`
     *  accepts. The driver mutates this each generation. */
    baselineSurface: MutableSurface;
    /** Budget + loop shape. All fields optional; defaults pick the LAND-tier
     *  story. */
    budget?: SelfImproveBudget;
    /** Custom driver. Default is `gepaDriver` configured from `llm` +
     *  `mutationPrimitives`. */
    driver?: ImprovementDriver;
    /** Default-driver overrides — used when `driver` is unset. */
    mutationPrimitives?: string[];
    driverTarget?: string;
    /** Custom gate. Default is `defaultProductionGate` with
     *  `deltaThreshold: 0.05` on the held-out split. */
    gate?: Gate<TArtifact, TScenario>;
    /** LLM config consumed by the default `gepaDriver`. Ignored if you pass
     *  your own `driver`. */
    llm?: SelfImproveLlm;
    /** Storage backend. Default `inMemoryCampaignStorage()` — nothing
     *  persists past the call. Pass `fsCampaignStorage()` to write to disk. */
    storage?: CampaignStorage;
    /** Run directory (logical for in-memory storage, real path for fs).
     *  Default `mem://selfImprove-<timestamp>`. */
    runDir?: string;
    /** Distributed-driver seam — same as `RunCampaignOptions.cellPlacement`.
     *  Returns an opaque placement key the substrate forwards to your agent
     *  as `ctx.placement`. Combined with `httpDispatch` from
     *  `/adapters/http`, fans cells across regions. */
    cellPlacement?: (input: {
        scenario: TScenario;
        rep: number;
        generation?: number;
    }) => string | undefined;
    /** Streaming hook — fires on baseline + each generation + gate decision.
     *  Consumer routes events wherever (UI, dashboard, logs). */
    onProgress?: (event: SelfImproveProgressEvent) => void;
    /** Auto-promotion behavior on a ship decision. Default `'none'` — we
     *  return the winner; you ship it however you ship. `'pr'` opens a
     *  GitHub PR via `openAutoPr`; requires `ghOwner` + `ghRepo`. */
    autoOnPromote?: 'pr' | 'none';
    ghOwner?: string;
    ghRepo?: string;
    /**
     * Opt-in: ship eval-run events to a hosted orchestrator (ours, your
     * self-hosted one, or any compatible implementation of the
     * `docs/hosted-ingest-spec.md` wire format). When set, the substrate
     * POSTs the final `EvalRunEvent` to `${endpoint}/v1/ingest/eval-runs`
     * after the loop completes. Failures are logged but do not fail the
     * loop — local result is always returned.
     *
     * For our orchestrator: `{ endpoint: 'https://orchestrator.tangle.tools/v1', apiKey, tenantId }`.
     *
     * For your self-hosted: any URL serving the wire format. See
     * `examples/hosted-ingest-server/` for the reference receiver.
     */
    hostedTenant?: HostedTenant;
    /** Free-form labels attached to the hosted event (env, branch, model id,
     *  etc.). Ignored when `hostedTenant` is unset. */
    hostedLabels?: Record<string, string>;
}
interface SelfImproveResult<TScenario extends Scenario, TArtifact> {
    /** Composite mean across all scenarios, baseline run. */
    baseline: {
        compositeMean: number;
        perScenario: Record<string, number>;
    };
    /** Composite mean on the held-out set, winner run. */
    winner: {
        compositeMean: number;
        perScenario: Record<string, number>;
        surface: MutableSurface;
    };
    /** `winner.compositeMean - baselineOnHoldout.compositeMean`. Positive
     *  means the gate observed improvement. */
    lift: number;
    /** `defaultProductionGate.decide()` result. */
    gateDecision: 'ship' | 'hold' | 'need_more_work' | 'model_ceiling' | 'arch_ceiling';
    /** Number of generations actually explored (may be less than the
     *  budget if the driver gave up early). */
    generationsExplored: number;
    /** Wall-clock total. */
    durationMs: number;
    /** Total cost across baseline + every generation. */
    totalCostUsd: number;
    /**
     * Rigor packet: distributional summary, paired-bootstrap lift CI,
     * judge stats, contamination check, recommendations. Wired through
     * `analyzeRuns()` on the baseline + winner cells of the campaign.
     * Hosted-tier dashboards render this as the v3-vs-v4 decision view.
     */
    insight: InsightReport;
    /**
     * Raw substrate result for advanced inspection — full per-generation
     * candidates, full campaign artifacts, all judge scores. Useful for
     * debugging or reporting beyond the summary.
     */
    raw: RunImprovementLoopResult<TArtifact, TScenario>;
}
/**
 * One-shot self-improvement loop. See module docstring for defaults +
 * extension points.
 *
 * @example Minimum (LAND tier):
 *
 *   const result = await selfImprove({
 *     agent: (surface, scenario, ctx) => myAgent(surface, scenario, ctx.signal),
 *     scenarios,
 *     judge,
 *     baselineSurface: DEFAULT_PROMPT,
 *   })
 *   console.log(`lift: ${result.lift.toFixed(3)} (${result.gateDecision})`)
 *
 * @example Distributed (workers in three regions):
 *
 *   await selfImprove({
 *     agent: httpDispatch({ resolveUrl: ({ placement }) => REGION_URLS[placement!] }),
 *     scenarios,
 *     judge,
 *     baselineSurface: DEFAULT_PROMPT,
 *     cellPlacement: ({ scenario }) => scenario.region,
 *     budget: { maxConcurrency: 12 },
 *   })
 */
declare function selfImprove<TScenario extends Scenario, TArtifact>(opts: SelfImproveOptions<TScenario, TArtifact>): Promise<SelfImproveResult<TScenario, TArtifact>>;

/**
 * # `analyzeRuns()` — turn a set of agent runs into an actionable decision packet.
 *
 * Wires the substrate's statistical, calibration, clustering, Pareto, and
 * release-confidence primitives into one `InsightReport`. Two top-level
 * entry points use this function:
 *
 *   - `selfImprove()` calls it on the campaign output to attach a packet
 *     to every run.
 *   - Consumers with observed `RunRecord[]` (production traces, gold
 *     corpora, approve/reject tables) call it directly via `analyzeRuns()`
 *     for analysis without a closed loop.
 *
 * Every section is opt-in based on what the input data supports — the
 * function never invents signal. If runs carry no judge scores, `judges`
 * is empty. If there's no baseline/candidate split, `lift` is undefined.
 * If no `analyst` is wired, `failureClusters` is undefined.
 *
 * The `recommendations` array is the human-readable layer; everything
 * else is the evidence backing each recommendation.
 */

interface AnalyzeRunsOptions {
    /** The runs to analyze. */
    runs: RunRecord[];
    /** Which split to score against when reading composite from RunOutcome.
     *  Default: holdout when ANY run has a `holdoutScore`, else search. */
    split?: 'search' | 'holdout' | 'auto';
    /** Pairwise analysis configuration. When both `baselineCandidateId` and
     *  `candidateCandidateId` are present, lift is computed on paired
     *  (experimentId, seed) tuples shared between the two sides. */
    baselineCandidateId?: string;
    candidateCandidateId?: string;
    /** Canary scenarios — checked against every run's raw output for
     *  holdout contamination. */
    canaryScenarios?: DatasetScenario[];
    /** Analyst registry for failure clustering. When omitted, the
     *  `failureClusters` section is left undefined. */
    analyst?: AnalystRegistry;
    /** Downstream outcome metric per run (e.g. engagement rate, approval
     *  rate, downstream pass rate). When present, the report includes
     *  `outcomeCorrelation` + a simple linear reward model fit. */
    outcomeSignal?: {
        metric: string;
        valueByRunId: Record<string, number>;
    };
    /** Multi-rater feedback for inter-rater agreement. Each entry is one
     *  rater's score for one run. Two or more raters → kappa + disagreement
     *  triage list. */
    raterScores?: Array<{
        runId: string;
        rater: string;
        score: number;
    }>;
    /** Number of histogram bins for distributional summaries. Default 12. */
    histogramBins?: number;
    /** Decision threshold — the smallest composite lift the caller cares
     *  about. Used by the recommendations engine to call ship vs hold.
     *  Default 0.02. */
    decisionThreshold?: number;
    /** Optional prior-period runs. When set, the report includes
     *  `priorPeriodComparison` with per-metric Welch-CI deltas and
     *  recommendations fire on statistically significant regressions.
     *  The two windows do NOT have to share scenarios — the comparison
     *  is two-sample unpaired (the substrate's `lift` field uses paired
     *  bootstrap on shared (experimentId, seed) tuples; this is the
     *  shape for "this week vs last week" rather than "candidate vs
     *  baseline within a campaign"). */
    baselineRuns?: RunRecord[];
    /** Human-readable label for the baseline window, e.g. "vs prior 7
     *  days", "vs v3.1 release". Surfaces in recommendations + UI. */
    baselineLabel?: string;
}
declare function analyzeRuns(opts: AnalyzeRunsOptions): Promise<InsightReport>;

/**
 * `fromAgentTrace` — provenance correlation from Cursor's Agent Trace spec
 * (https://github.com/cursor/agent-trace, RFC v0.1.0).
 *
 * Agent Trace is NOT a run/quality trace — it carries no outcome, score, or
 * cost. It records *code authorship*: for a VCS revision, which AI model /
 * conversation authored which file ranges. It explicitly disclaims quality
 * assessment — which is exactly what `analyzeRuns` adds.
 *
 * The two layers join on a key the substrate already has: a `RunRecord`
 * carries `commitSha`, and an Agent Trace record is keyed by
 * `vcs.revision`. So this adapter does not produce `RunRecord`s — it builds a
 * provenance index by commit and partitions existing runs by their authoring
 * model. Feed each cohort to `analyzeRuns` (or pass one as `baselineRuns`) to
 * answer the question no run-only trace can: *which authoring agent's code
 * fails / regresses / costs more.*
 *
 * Granularity is commit-level (the SHA join). Per-file/per-line correlation
 * would require runs to record which files they exercised — out of scope.
 */

type AgentTraceContributorType = 'human' | 'ai' | 'mixed' | 'unknown';
interface AgentTraceContributor {
    type: AgentTraceContributorType;
    /** models.dev id, e.g. `anthropic/claude-opus-4-5-20251101`. */
    model_id?: string;
}
interface AgentTraceRange {
    start_line: number;
    end_line: number;
    content_hash?: string;
    /** Per-range contributor override (agent handoffs). Wins over the
     *  conversation-level contributor for these lines. */
    contributor?: AgentTraceContributor;
}
interface AgentTraceConversation {
    url?: string;
    contributor?: AgentTraceContributor;
    ranges: AgentTraceRange[];
}
interface AgentTraceFile {
    path: string;
    conversations: AgentTraceConversation[];
}
interface AgentTraceRecord {
    version: string;
    id: string;
    timestamp: string;
    vcs?: {
        type: string;
        revision: string;
    };
    tool?: {
        name?: string;
        version?: string;
    };
    files: AgentTraceFile[];
}
/** Authorship provenance for one VCS revision, aggregated across the record's
 *  files/conversations/ranges. */
interface AuthoringProvenance {
    commitSha: string;
    /** Unique AI model ids that authored code in this commit (type ai|mixed). */
    aiModels: string[];
    /** Tools that produced the records (e.g. `cursor`). */
    tools: string[];
    conversationCount: number;
    fileCount: number;
    /** Total attributed lines (sum of range spans). */
    lineCount: number;
    /** True if any range was authored (in whole or part) by a human. */
    humanInvolved: boolean;
}
type AgentTraceIndex = Map<string, AuthoringProvenance>;
/**
 * Build a commit → provenance index from Agent Trace records. Multiple records
 * for the same revision are merged. Records without `vcs.revision` are skipped
 * (the SHA is the join key — without it there is nothing to correlate against).
 */
declare function parseAgentTrace(records: AgentTraceRecord[]): AgentTraceIndex;
interface PartitionByAuthoringModelResult {
    /** Runs grouped by each AI model that authored code in the run's commit. A
     *  run whose commit had multiple authoring models appears under EACH — the
     *  cohorts overlap by construction at commit granularity. */
    byModel: Map<string, RunRecord[]>;
    /** Runs whose `commitSha` had no Agent Trace provenance (no record, or no
     *  AI authorship). Kept separate — never silently folded into a cohort. */
    unattributed: RunRecord[];
}
/**
 * Partition runs by the AI model(s) that authored the code at each run's
 * `commitSha`. Feed `byModel.get(modelId)` to `analyzeRuns`, or compare two
 * model cohorts via `analyzeRuns({ runs: a, baselineRuns: b })` for a lift CI
 * on "model A's code vs model B's code".
 */
declare function partitionRunsByAuthoringModel(runs: RunRecord[], index: AgentTraceIndex): PartitionByAuthoringModelResult;

/**
 * # `intake/feedback-table` — multi-rater approve/reject corpus → `RunRecord[]`.
 *
 * The generic shape behind Obsidian's `#approved` / `#rejected` tags, a
 * Google Sheet, a Postgres `feedback` table, or any CSV with ratings.
 *
 * Caller supplies one row per (run, rater) tuple plus per-run metadata; the
 * adapter rolls them up into the substrate-canonical `RunRecord` shape so
 * `analyzeRuns({ runs, raterScores })` can produce inter-rater agreement,
 * disagreement triage, and downstream recommendations.
 *
 * Per-run `RunRecord.outcome.searchScore` is the rater-mean rating
 * (normalised to 0..1 when scale is supplied); `outcome.raw` carries the
 * per-rater scores keyed by rater id for downstream attribution.
 */

interface FeedbackTableRow {
    /** Stable id for this run — the unit a rater scored. Drives pairing
     *  across analysis primitives. */
    runId: string;
    /** Identifier of the rater that produced this rating. */
    rater: string;
    /** The rating itself. Accepts boolean (approve/reject), 0..1 scalar,
     *  or any numeric scale — see `scale`. */
    rating: number | boolean;
    /** Optional metadata carried through to `RunRecord.outcome.raw` and the
     *  custom-shape metadata bag. */
    metadata?: Record<string, unknown>;
}
interface FeedbackTableMeta {
    runId: string;
    /** When omitted, defaults to `'feedback-corpus'`. Used to group related
     *  runs in `analyzeRuns()` lift analysis. */
    experimentId?: string;
    /** When omitted, defaults to `runId` — each run is its own candidate. */
    candidateId?: string;
    /** Cost in USD, when available. Set to 0 when unknown — the consumer's
     *  cost analysis sections will collapse gracefully. */
    costUsd?: number;
    /** Wall-clock ms, when available. Defaults to 0. */
    wallMs?: number;
    /** Model identifier including snapshot. Default `unknown@unknown`. */
    model?: string;
    /** Optional sha256 of the prompt; default `'sha256:unknown'`. */
    promptHash?: string;
    /** Default `'sha256:unknown'`. */
    configHash?: string;
    /** Default `'unknown'`. */
    commitSha?: string;
    /** Default `'holdout'` — feedback corpora are by nature the holdout
     *  signal a closed-loop improvement aims at. */
    splitTag?: RunSplitTag;
    /** Free-form metadata available to consumers via the cast-out path on
     *  the resulting RunRecord. */
    extras?: Record<string, unknown>;
}
interface FromFeedbackTableOptions {
    /** Per-(run, rater) ratings. */
    ratings: FeedbackTableRow[];
    /** Per-run metadata. When a runId appears in `ratings` but not here, the
     *  adapter synthesises minimal metadata with defaults documented above. */
    meta?: FeedbackTableMeta[];
    /** Rating scale. Provide `{ min, max }` for non-0..1 numeric scales.
     *  Booleans are normalised: true → 1, false → 0. Default: assumes
     *  ratings are already 0..1. */
    scale?: {
        min: number;
        max: number;
    };
    /** When true, the rater scores are emitted into `raterScores` (a sibling
     *  array `analyzeRuns()` accepts) instead of being averaged into the
     *  run's `outcome.searchScore`. Default `true` — preserves rater-level
     *  signal for inter-rater analysis. */
    emitRaterScores?: boolean;
}
interface FromFeedbackTableResult {
    runs: RunRecord[];
    /** Rater-level scores ready to pass into `analyzeRuns({ raterScores })`
     *  for inter-rater agreement + disagreement triage. */
    raterScores: Array<{
        runId: string;
        rater: string;
        score: number;
    }>;
}
declare function fromFeedbackTable(opts: FromFeedbackTableOptions): FromFeedbackTableResult;

/**
 * # `intake/otel-spans` — OTel `TraceSpanEvent[]` → `RunRecord[]`.
 *
 * Turns an existing observability stream into the substrate-canonical
 * `RunRecord` shape so consumers with logs but no eval discipline can
 * call `analyzeRuns()` against their production traffic immediately.
 *
 * Pivot rule: spans are grouped by `tangle.runId` (the same attribute the
 * hosted-tier wire format uses) or, when absent, by `traceId`. One group
 * becomes one `RunRecord`. The root span (no `parentSpanId`) supplies:
 *
 *   - `runId` (the group key)
 *   - `wallMs` from `endTimeUnixNano - startTimeUnixNano`
 *   - `model` from `gen_ai.request.model` / `llm.model` / `tangle.model`
 *   - cost from `cost.usd` / `gen_ai.usage.cost_usd` / `tangle.cost.usd`
 *   - token usage from `gen_ai.usage.{input,output}_tokens`
 *   - `outcome.searchScore` from `tangle.score` / `eval.score` when
 *     present; `outcome.raw` collects every numeric attribute.
 *
 * Spans that ERRORed (`status.code === 'ERROR'`) populate `failureMode`
 * with their `name` so `analyzeRuns()`'s failure clustering sees them.
 */

interface FromOtelSpansOptions {
    spans: TraceSpanEvent[];
    /** Default split tag for synthesized records. Defaults to `'holdout'`. */
    defaultSplit?: RunSplitTag;
    /** Default `experimentId` when not present on any span. */
    experimentId?: string;
}
declare function fromOtelSpans(opts: FromOtelSpansOptions): RunRecord[];

export { type AgentTraceContributor, type AgentTraceContributorType, type AgentTraceConversation, type AgentTraceFile, type AgentTraceIndex, type AgentTraceRange, type AgentTraceRecord, type AnalyzeRunsOptions, type AuthoringProvenance, CampaignStorage, DispatchContext, type FeedbackTableMeta, type FeedbackTableRow, type FromFeedbackTableOptions, type FromFeedbackTableResult, type FromOtelSpansOptions, Gate, ImprovementDriver, InsightReport, JudgeConfig, MutableSurface, type PartitionByAuthoringModelResult, RunImprovementLoopResult, Scenario, type SelfImproveBudget, type SelfImproveLlm, type SelfImproveOptions, type SelfImproveProgressEvent, type SelfImproveResult, analyzeRuns, fromFeedbackTable, fromOtelSpans, parseAgentTrace, partitionRunsByAuthoringModel, selfImprove };
