/**
 * Run classification, ownership, executor, and environment metadata.
 *
 * These fields extend `RunContext` to capture run *intent*, *attribution*,
 * and *reproducibility* — orthogonal to the *mechanism* captured by
 * `RunTrigger`. A scheduled run can be experimental; a manual run can be
 * official; a PR-triggered run is executed by GH Actions but attributable
 * to the PR author.
 *
 * @see docs/decisions/D0037-run-classification-and-ownership-taxonomy.md
 * @see docs/design-docs/run-classification-and-ownership.md
 */
/**
 * How a run should be treated for reporting and trend tracking.
 *
 * Orthogonal to `RunTrigger` (mechanism). Defaults to `"adhoc"` when
 * unannotated so pre-taxonomy runs never leak into the canonical series.
 */
export type RunClassification = "official" | "adhoc" | "experimental" | "test" | "external";
export declare const RUN_CLASSIFICATIONS: readonly RunClassification[];
export declare function isRunClassification(value: unknown): value is RunClassification;
/**
 * Normalize a free-form classification value to a canonical
 * {@link RunClassification}.
 *
 * - Trims and lowercases.
 * - Maps the legacy `ad-hoc` spelling onto canonical `adhoc`.
 * - Defaults empty / unknown input to `adhoc` — D0037's documented
 *   default bucket, biased away from the canonical `official` series.
 *
 * Pure and deterministic — reused by the detector (`W-report-validity-detector`)
 * and the backfill (`W-backfill-report-validity`).
 *
 * @see docs/decisions/D0059-report-validity-axis-and-trustworthiness-gate.md
 */
export declare function normalizeRunClassification(value: string | undefined | null): RunClassification;
/**
 * Collapse a free-form executor name onto its canonical identity slug.
 *
 * - Trims and lowercases.
 * - Maps known spellings (above) to one identity.
 * - Passes unknown names through (trimmed + lowercased).
 * - Returns `undefined` for empty / nullish input.
 *
 * Pure and deterministic — used by the validity detector
 * (`W-report-validity-detector`) to recognize a known human before the
 * generated-id heuristic runs, and by the backfill to de-drift
 * `provenance.executor.name`.
 *
 * @see docs/decisions/D0059-report-validity-axis-and-trustworthiness-gate.md
 */
export declare function canonicalizeExecutorIdentity(name: string | undefined | null): string | undefined;
/** Whether an executor name collapses to a recognized human identity. */
export declare function isKnownExecutorIdentity(name: string | undefined | null): boolean;
/**
 * Heuristic: does an executor name look like a *generated* handle/id rather
 * than a human name? (D0059 §Context flagged ids like `gDVzuuHam`,
 * `gL78msEDh` in the report store.)
 *
 * Deterministic and deliberately conservative — it judges *shape* only:
 * a single token (no whitespace) of length 7–12, alphanumeric, mixing
 * upper- and lower-case, and either containing a digit or showing ≥4
 * upper/lower transitions. The transition floor is calibrated against the
 * observed sample so two-word PascalCase names ("JohnSmith" — 3
 * transitions) are NOT flagged; the generated ids (≥4 transitions or a
 * digit) are. Known identities are excluded by the caller
 * ({@link isKnownExecutorIdentity}) before this runs, so collapsed
 * spellings like `GabeStah` never reach it as a positive.
 *
 * False positives are tolerable: the detector only uses this to propose an
 * `experimental` classification, which is reversible (label-and-exclude,
 * never delete) and surfaced for human review during the backfill.
 */
export declare function looksLikeGeneratedExecutorId(name: string | undefined | null): boolean;
/**
 * Attribution — which team and (optionally) individual the run *belongs to*.
 *
 * `team` is a free-form slug, not a closed enum: external teams name
 * themselves and internal names drift. A soft-normalization layer under
 * `config/owners.ts` maps aliases to canonical slugs (warn-only).
 */
export interface RunOwner {
    team: string;
    individual?: string;
}
/**
 * Who or what actually invoked the run.
 *
 * Separate from `RunOwner` because they diverge for automated surfaces:
 * a PR gate is *executed by* GH Actions but *attributable to* the PR
 * author. Both variants expose a `name` field so consumers can format
 * them with one template.
 *
 * Every detectable identity field is optional — a misconfigured shell,
 * a container without `git`, or a CI provider that doesn't expose actor
 * metadata can all still produce a valid run with thin provenance.
 */
export type RunExecutor = RunExecutorUser | RunExecutorSystem;
export interface RunExecutorUser {
    type: "user";
    /** Detected from `git config user.name`, `os.userInfo().username`, or GH actor. */
    name?: string;
    /** From `git config user.email`. Subject to the `AILF_CAPTURE_EMAIL` opt-out. */
    email?: string;
    /** Where the invocation originated. Always knowable. */
    surface: RunExecutorSurface;
    /** GH actor when the user invoked via a GH surface (PR, manual dispatch). */
    githubActor?: string;
}
export interface RunExecutorSystem {
    type: "system";
    /** e.g. `"github-actions"`, `"vercel-cron"`, `"sanity-webhook"`. */
    name: string;
    workflow?: string;
    runId?: string;
}
export type RunExecutorSurface = "cli" | "studio" | "api";
export declare const RUN_EXECUTOR_SURFACES: readonly RunExecutorSurface[];
/**
 * Links to related runs. Fills the gap where the Studio report schema
 * already carried these fields but `RunContext` did not.
 */
export interface RunLineage {
    /** Prior `RunId` this run re-executes. */
    rerunOf?: string;
    /** Sibling `RunId` this run is intentionally compared against. */
    comparedAgainst?: string;
    /** API-gateway job ID that dispatched this run. */
    parentJobId?: string;
}
/**
 * Reproducibility metadata — which AILF/Node ran the eval.
 *
 * Required on every new run so cross-version trend comparisons can
 * isolate framework changes from doc changes.
 */
export interface RunTool {
    ailfVersion: string;
    nodeVersion: string;
}
/**
 * Platform + CI-provider metadata for debugging flakes. Hostname is
 * intentionally excluded — it leaks machine/user identity without
 * filtering benefit.
 */
export interface RunHost {
    /** `os.platform()` — `"darwin"` | `"linux"` | `"win32"`. */
    platform: string;
    /** `os.arch()` — `"x64"` | `"arm64"`. */
    arch: string;
    /** CI provider when running under one, e.g. `"github-actions"`. */
    ci?: string;
}
