/**
 * Standalone Gemma adapter (F-NEW-GEMMA-ADAPTER, Tier 4.5).
 *
 * Gemma is Google's open-weight family. Unlike Gemini (proprietary, Google-
 * hosted only), Gemma can be served from multiple deployment targets:
 *
 *   - `vertex-ai`           — Google Cloud Vertex AI Model Garden. Inherits
 *                             Vertex BAA. Same auth as Gemini-on-Vertex.
 *   - `generative-language` — Google AI Studio public endpoint. NO BAA.
 *   - `huggingface`         — HuggingFace Inference API. Open-weight pull.
 *                             BAA only if customer holds one with HF.
 *   - `self-hosted-ollama`  — Customer-owned host (Ollama, vLLM, TGI, etc.).
 *                             BAA is moot (customer owns the runtime).
 *
 * This adapter is a thin facade. It centralises the open-weight provenance
 * fact + the deployment-target-aware BAA flag + the model-ID registry so
 * the capability bundle + audit chain entry + dashboard surface all read
 * Gemma usage from one source of truth instead of inferring it from
 * `getGoogleModelFamily()` in twelve places.
 *
 * Wiring downstream:
 *   - `vertex-ai` + `generative-language` requests delegate to
 *     `src/llm-adapters/google.ts` (the Google adapter knows both targets).
 *   - `huggingface` delegates to `src/llm-adapters/huggingface.ts`.
 *   - `self-hosted-ollama` delegates to `src/llm-adapters/ollama.ts`.
 *   The downstream wiring is the customer's existing adapter call —
 *   `gemma.ts` itself does NOT make HTTP. It is metadata + validation.
 *
 * @connexum/ai-governance
 */
export type GemmaDeploymentTarget = 'vertex-ai' | 'generative-language' | 'huggingface' | 'self-hosted-ollama';
export interface GemmaMetadata {
    /** Always `'gemma'` — kept for shape-parity with other adapter metadata. */
    family: 'gemma';
    /** Always `true` for Gemma. Auditors care that the model is open-weight. */
    isOpenWeight: true;
    /**
     * Whether the deployment target's BAA covers Gemma usage:
     *   - vertex-ai            → true (Vertex BAA covers Model Garden models)
     *   - generative-language  → false (Google AI Studio has no BAA)
     *   - huggingface          → false (BAA is a separate HF contract)
     *   - self-hosted-ollama   → false (BAA is customer-side; we cannot assert)
     * If the customer holds a BAA with the host directly, they set the
     * `baaOverride: true` flag on their capability-bundle entry — that path
     * is NOT in this metadata function.
     */
    baaInherits: boolean;
    /**
     * Audit-chain display name combining modelId + deployment target so two
     * audit entries for `gemma-2-9b-it` served from Vertex and HuggingFace
     * are distinguishable in compliance reports.
     */
    displayName: string;
    /** Echo of the input deployment target so consumers can pass-through. */
    deploymentTarget: GemmaDeploymentTarget;
    /**
     * F-NEW-GEMMA-FINETUNE 2026-05-13: present when the customer is invoking
     * a custom-finetuned Gemma variant. Adapter does NOT run finetuning; this
     * struct records the customer-supplied provenance so the audit chain,
     * capability bundle, and BAA enforcement all see one source of truth for
     * "what was actually called". Absent for base-model calls.
     */
    finetune?: GemmaFinetuneProvenance;
}
/**
 * F-NEW-GEMMA-FINETUNE 2026-05-13.
 *
 * Provenance bundle for a customer-finetuned Gemma model. We recognise
 * three common finetune model-ID conventions in the wild:
 *
 *   1. HuggingFace org-namespaced:     `acme-health/gemma-2-9b-it-ft`
 *   2. Vertex AI custom-suffix:        `gemma-2-9b-it@acme-2026-04-12`
 *   3. Self-hosted custom slug:        `gemma-2-9b-it-customer-xyz`
 *
 * The adapter validates the SHAPE (must derive from a known base) but the
 * customer attests the rest: training-data hash, finetune timestamp, host.
 * `datasetHash` and `finetunedAt` are RECOMMENDED but optional — for
 * SOC 2 / HIPAA workloads they're effectively required and the pack
 * validators surface a HIGH severity when absent.
 */
export interface GemmaFinetuneProvenance {
    /** Base Gemma model the finetune was derived from. Must validate. */
    baseModelId: string;
    /**
     * Customer-supplied stable identifier for this finetune run. Used as
     * the audit-chain join key when the same finetune is invoked from
     * multiple SDK callsites or replays across testbed/prod.
     */
    finetuneId: string;
    /**
     * Where the finetuned weights live. Same enum as the base-model
     * deployment target; finetune-on-Vertex-served-via-HuggingFace is
     * disallowed because the BAA story collapses.
     */
    finetuneHost: GemmaDeploymentTarget;
    /**
     * Optional but recommended. SHA-256 of the training-dataset manifest
     * (file list + per-file hashes). Surfaces in compliance reports as
     * "training data provenance" — auditors can correlate against the
     * customer's dataset retention pipeline.
     */
    datasetHash?: string;
    /** ISO-8601 timestamp the finetune completed. */
    finetunedAt?: string;
    /**
     * Whether the customer holds an executed BAA with the finetune host
     * separate from the base-model deployment-target BAA story. When set,
     * `baaInherits` on the parent metadata is OR'd with this flag.
     */
    baaOverride?: boolean;
}
/**
 * Frozen re-export of the Gemma model IDs the platform recognises out of
 * the box. The list lives in `google.ts` because that's where the actual
 * Vertex / Generative-Language wire-handling sits. Re-exposed here so
 * customers / dashboards / catalog endpoints only need to depend on
 * `@connexum/ai-governance/adapters/gemma`, not the Google adapter.
 */
export declare const KNOWN_GEMMA_MODEL_IDS: readonly string[];
/**
 * Returns true if `modelId` is a recognised Gemma model ID. Recognition is
 * either (a) exact match against `KNOWN_GEMMA_MODEL_IDS`, or (b) lowercase
 * `gemma-` / `paligemma-` prefix. Future Gemma 3 / 4 IDs validate via the
 * prefix path without requiring this file to change every release.
 *
 * Case-sensitive — "Gemma-2-9b-it" with a capital G is rejected. Defends
 * against typo / copy-paste from marketing material that uses Title Case.
 */
export declare function validateGemmaModelId(modelId: string): boolean;
/**
 * Produce the metadata bundle for a Gemma call. Throws on unknown
 * deployment target so a typo at the call site fails loudly instead of
 * silently fabricating a BAA flag.
 */
export declare function getGemmaMetadata(modelId: string, deploymentTarget: GemmaDeploymentTarget): GemmaMetadata;
/**
 * Returns true if the model is multimodal (image+text in). Passthrough to
 * `google.ts isGemmaMultimodal()` to keep one source of truth. Returns
 * false for non-Gemma IDs.
 */
export declare function isGemmaMultimodal(modelId: string): boolean;
/**
 * Returns 'gemma' if the modelId belongs to the Gemma family per the
 * shared Google adapter classifier, or null otherwise. Useful when a
 * caller has an arbitrary modelId and wants to route to the standalone
 * Gemma adapter only on a definite match.
 */
export declare function gemmaSubfamilyOf(modelId: string): 'gemma' | null;
/**
 * Validate a `GemmaFinetuneProvenance` payload. Returns `null` on success
 * or a string error message describing the first problem. Validates:
 *
 *   - `baseModelId` is a recognised Gemma model ID per validateGemmaModelId
 *   - `finetuneId` matches FINETUNE_ID_PATTERN (3-128 alphanumeric/._-)
 *   - `finetuneHost` is an allowed deployment target
 *   - `datasetHash` (when supplied) is a hex SHA-256 (64 chars)
 *   - `finetunedAt` (when supplied) parses to a Date
 *   - `baaOverride` is boolean when present
 *
 * Customers SHOULD supply `datasetHash` + `finetunedAt`; absence is
 * surfaced by the pack validators downstream (HIGH severity), not here.
 */
export declare function validateGemmaFinetuneProvenance(p: GemmaFinetuneProvenance): string | null;
/**
 * Construct the metadata bundle for a finetuned Gemma call. The
 * `effectiveModelId` is what the customer's runtime ACTUALLY invokes
 * (could be a custom slug like `acme-health/gemma-2-9b-it-ft`); the
 * `provenance.baseModelId` is the underlying recognised Gemma the
 * finetune derived from.
 *
 * BAA semantics: the base-model deployment target sets `baaInherits`;
 * the finetune host independently sets `provenance.baaOverride`. The
 * returned metadata's `baaInherits` is the OR of both — auditors care
 * about coverage, not which leg of the deployment provided it.
 *
 * Throws on invalid provenance via validateGemmaFinetuneProvenance —
 * adapter callers MUST handle this (do not silently fabricate finetune
 * metadata, which would let an unprovenanced finetune slip into the
 * audit chain tagged as "compliant").
 */
export declare function getGemmaFinetuneMetadata(effectiveModelId: string, baseDeploymentTarget: GemmaDeploymentTarget, provenance: GemmaFinetuneProvenance): GemmaMetadata;
/**
 * Heuristic detector — returns true when `modelId` looks like a Gemma
 * finetune (i.e. carries a customer suffix or org namespace beyond the
 * base model ID). Used by callers that want to route a request to the
 * finetune-aware path without needing the customer to flag it explicitly.
 *
 * Rules:
 *   - HuggingFace `<org>/<base>-<anything>` where <base> validates
 *   - Vertex `<base>@<custom>` per Vertex finetune-suffix convention
 *   - Self-hosted `<base>-<3+chars>` where the trailing slug is NOT in
 *     the recognised KNOWN_GEMMA_MODEL_IDS list (excludes things like
 *     `gemma-2-9b` → `gemma-2-9b-it` which are base variants, not
 *     finetunes).
 *
 * Returns false on non-Gemma inputs, on bare base-model IDs, and on
 * anything outside the three recognised conventions.
 */
export declare function isGemmaFinetuneIdShape(modelId: string): boolean;
//# sourceMappingURL=gemma.d.ts.map