import type { BuiltinRunCommandManifestRow } from "../../contracts/builtin-run-command-manifest.js";
export type GuidanceScopeCondition = {
    kind: "always";
} | {
    kind: "commandName";
    match: "exact" | "prefix";
    value: string;
} | {
    kind: "commandArgEquals";
    path: string;
    value: string | number | boolean | null;
} | {
    kind: "phaseKey";
    value: string;
} | {
    kind: "taskIdPattern";
    pattern: string;
} | {
    kind: "taskTag";
    match?: "any" | "all";
    values: string[];
};
export type GuidanceScopeDraft = {
    preset: "always";
} | {
    preset: "workflow";
    workflowName: string;
} | {
    preset: "completingTask";
    phaseKey?: string;
    taskId?: string;
    taskIdPattern?: string;
} | {
    preset: "phase";
    phaseKey: string;
} | {
    preset: "task";
    taskId?: string;
    taskIdPattern?: string;
} | {
    preset: "taskTag";
    values: string[];
    match?: "any" | "all";
} | {
    preset: "advancedCommand";
    commandName: string;
    commandNameMatch?: "exact" | "prefix";
    commandArgPath?: string;
    commandArgValue?: string | number | boolean | null;
} | {
    preset: "compound";
    conditions: GuidanceScopeCondition[];
};
export type NormalizeScopeConditionsResult = {
    ok: true;
    conditions: GuidanceScopeCondition[];
} | {
    ok: false;
    errors: {
        code: string;
        message: string;
    }[];
};
export type GuidanceScopeBuildOptions = {
    knownWorkflowNames?: string[];
};
export type GuidanceScopeBuildResult = {
    schemaVersion: 1;
    ok: boolean;
    preset: GuidanceScopeDraft["preset"] | "compound" | "unknown";
    scope: {
        conditions: GuidanceScopeCondition[];
    } | null;
    summary: string;
    warnings: {
        code: string;
        message: string;
    }[];
    errors: {
        code: string;
        message: string;
    }[];
};
export type GuidanceScopePresetDescriptor = {
    preset: GuidanceScopeDraft["preset"];
    label: string;
    description: string;
    broad?: boolean;
};
export declare const GUIDANCE_SCOPE_PRESETS: GuidanceScopePresetDescriptor[];
export declare function summaryFromActivationScopeConditions(conditions: GuidanceScopeCondition[]): string;
export declare function normalizeActivationScopeConditions(raw: unknown[]): NormalizeScopeConditionsResult;
export declare function buildGuidanceScopeDraft(draft: unknown, options?: GuidanceScopeBuildOptions): GuidanceScopeBuildResult;
export declare function guidanceScopeWorkflowNames(manifest: BuiltinRunCommandManifestRow[]): string[];
export declare function guidanceScopeWorkflowChoices(manifest: BuiltinRunCommandManifestRow[]): Record<string, unknown>[];
/** Flat JSON objects validated by `#/$defs/scopeCondition` on `schemas/cae/activation-definition.schema.json`. */
export declare function serializeGuidanceScopeForActivation(conditions: GuidanceScopeCondition[]): Record<string, unknown>[];
