import type { SREMathSpeechOptions } from "./tts/math-speech.js";
export type ToolPlacementLevel = "section" | "item" | "passage";
export interface ToolPolicyConfig {
    allowed?: string[];
    blocked?: string[];
}
export interface ToolPlacementConfig {
    section?: string[];
    item?: string[];
    passage?: string[];
}
export interface ToolRuntimeBackendRequest {
    path: string;
    method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
    headers?: Record<string, string>;
    query?: Record<string, string | number | boolean>;
    body?: unknown;
}
export interface ToolRuntimeProviderBridge {
    /**
     * Optional auth fetch hook for provider initialization.
     * Useful for retrieving temporary credentials from a host backend.
     */
    authFetcher?: () => Promise<Record<string, unknown>>;
    /**
     * Optional backend request bridge for rich tool interactions
     * beyond one-time auth fetching.
     */
    request?: (request: ToolRuntimeBackendRequest) => Promise<unknown>;
    /**
     * Optional host event emitter.
     */
    emit?: (eventName: string, payload?: Record<string, unknown>) => void | Promise<void>;
    /**
     * Optional host event subscription bridge.
     */
    subscribe?: (eventName: string, handler: (payload: unknown) => void) => (() => void) | undefined;
    [key: string]: unknown;
}
export interface ToolRuntimeProviderConfig {
    id?: string;
    init?: Record<string, unknown>;
    runtime?: ToolRuntimeProviderBridge;
}
export type TextToSpeechRuntimeProviderId = "polly" | "google" | "custom";
export interface ToolProviderConfig {
    enabled?: boolean;
    provider?: ToolRuntimeProviderConfig;
    settings?: Record<string, unknown>;
    [key: string]: unknown;
}
export interface TextToSpeechToolProviderSettings extends Record<string, unknown> {
    mathSpeech?: SREMathSpeechOptions;
}
export interface TextToSpeechToolProviderConfig extends Omit<ToolProviderConfig, "provider" | "settings"> {
    provider?: ToolRuntimeProviderConfig | TextToSpeechRuntimeProviderId;
    serverProvider?: TextToSpeechRuntimeProviderId;
    mathSpeech?: SREMathSpeechOptions;
    settings?: TextToSpeechToolProviderSettings;
}
export interface ToolProvidersConfig {
    textToSpeech?: TextToSpeechToolProviderConfig;
    [key: string]: ToolProviderConfig | TextToSpeechToolProviderConfig | undefined;
}
/**
 * PNP/profile enforcement mode mirrored on `runtime.tools.pnpEnforcement`
 * (M5 mirror rule). Carried alongside `policy` / `placement` /
 * `providers` so hosts can pin or opt out of PNP/profile precedence via
 * the runtime config without reaching for the toolkit prop directly.
 *
 * - `"on"` — force enforcement (engine applies PNP/profile gates).
 * - `"off"` — opt out (engine ignores PNP/profile inputs).
 * - omitted / `undefined` — auto-mode (the default). The toolkit
 *   coordinator computes the effective mode from PNP/profile policy material on the
 *   bound `AssessmentEntity` / `AssessmentItemRef`. See
 *   `resolveDefaultPnpEnforcement` in `policy/core/pnp-policy-inputs.ts`.
 */
export type ToolsPnpEnforcement = "on" | "off";
export interface CanonicalToolsConfig {
    policy: ToolPolicyConfig;
    placement: Required<ToolPlacementConfig>;
    providers: ToolProvidersConfig;
    /**
     * Optional PNP/profile enforcement override. Mirrored on
     * `runtime.tools.pnpEnforcement`; consumed by
     * `<pie-assessment-toolkit>` and `ToolkitCoordinator` as the
     * embedded path's equivalent of the standalone `pnp-enforcement`
     * attribute. See {@link ToolsPnpEnforcement} for semantics.
     */
    pnpEnforcement?: ToolsPnpEnforcement;
}
export declare function normalizeToolAlias(toolId: string): string;
export declare function normalizeToolList(toolIds: string[] | undefined | null): string[];
export declare function parseToolList(input: string | undefined | null): string[];
export declare function normalizeToolsConfig(input?: Partial<CanonicalToolsConfig> | null): CanonicalToolsConfig;
