/**
* Provider capability types for multi-modality provider support.
*
* Extends the provider contract so a provider can expose typed optional
* capability adapters beyond the language-only `getModel(...)` path.
*
* Design:
* - Backward-compatible: existing providers remain valid with language-only
* implementations. The `capabilities` field is optional.
* - Future-proof: MiniMax and other multi-modality providers can declare
* all supported capabilities under a single provider ID.
* - Explicit failure: callers get a typed `UnsupportedProviderCapabilityError`
* instead of having to probe arbitrarily.
*/
import { Effect } from 'effect';
import type { ProviderDefinition } from './provider';
/**
* The provider capability modalities.
*
* Each key maps to a distinct adapter surface on a provider definition.
*/
export type ProviderCapabilityKey = 'language' | 'image' | 'video' | 'speech' | 'voice' | 'music' | 'lyrics';
/**
* Runtime array of all capability keys.
*
* Useful for iteration, validation, and display.
*/
export declare const ProviderCapabilityKeys: readonly ProviderCapabilityKey[];
declare const UnsupportedProviderCapabilityError_base: new = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
readonly _tag: "UnsupportedProviderCapabilityError";
} & Readonly;
/**
* Error thrown when a caller requests a capability the provider does not support.
*
* This is a typed, catchable error so callers can use `Effect.catchTag`
* to handle unsupported-capability paths gracefully.
*/
export declare class UnsupportedProviderCapabilityError extends UnsupportedProviderCapabilityError_base<{
readonly providerId: string;
readonly capability: string;
}> {
get message(): string;
}
/**
* Check whether a provider definition supports a given capability.
*
* If the provider definition does not declare a `capabilities` set,
* it is treated as language-only (backward-compatible default).
*
* @returns `true` if the capability is supported, `false` otherwise.
*/
export declare function hasCapability(definition: ProviderDefinition, capability: ProviderCapabilityKey): boolean;
/**
* Get a capability from a provider definition as an Effect.
*
* - Returns `Effect.succeed(definition)` when the capability is supported.
* - Returns `Effect.fail(new UnsupportedProviderCapabilityError(...))` when not.
*
* This gives callers a composable, typed failure path instead of
* requiring arbitrary probing.
*/
export declare function getCapability(definition: ProviderDefinition, capability: ProviderCapabilityKey): Effect.Effect;
export {};
//# sourceMappingURL=provider-capabilities.d.ts.map