//#region src/adapters/types.d.ts type LocaleFileFormat = 'json' | 'php-array'; //#endregion //#region src/config/types.d.ts /** * A single locale definition as detected from the framework config. */ interface LocaleDefinition { /** Locale code used in URLs and as identifier (e.g., 'de', 'en', 'en-us') */ code: string; /** BCP-47 language tag (e.g., 'de-DE', 'en-GB') */ language: string; /** Locale filename (e.g., 'de-DE.json'). Optional for directory-per-locale layouts (Laravel). */ file?: string; /** Human-readable name (e.g., 'Deutsch') */ name?: string; } /** * A locale directory discovered from a Nuxt layer. */ interface LocaleDir { /** Absolute path to the locale directory */ path: string; /** Layer name (e.g., 'root', 'app-admin', 'app-shop') */ layer: string; /** Absolute path to the layer's root directory */ layerRootDir: string; /** If this dir is a symlink/alias to another layer's dir (e.g., app-outlook -> app-shop) */ aliasOf?: string; } interface AppInfo { /** App name (e.g., 'app-admin', 'root') */ name: string; /** Absolute path to the app's root directory */ rootDir: string; /** Layer names this app consumes (from _layers) */ layers: string[]; } /** * Project-specific configuration from `.i18n-mcp.json`. * All fields are optional — the server passes them to the agent as-is. */ interface ProjectConfig { /** Framework hint to bypass auto-detection (e.g., 'nuxt', 'laravel') */ framework?: string; /** Free-form project background for the agent */ context?: string; /** Rules for deciding which layer a key belongs to */ layerRules?: Array<{ layer: string; description: string; when: string; }>; /** Term dictionary for consistent translations */ glossary?: Record; /** System prompt for translation requests */ translationPrompt?: string; /** Per-locale context (formal register, regional differences, etc.) */ localeNotes?: Record; /** * Few-shot translation examples. `key` is required — the prompt names it, so * an entry without one reaches the provider as the word "undefined" (#367). * Every other property is a locale code mapped to its translated value. */ examples?: Array<{ key: string; note?: string; } & Record>; /** Per-layer scan directories and ignore patterns for orphan key detection. Keys are layer names. */ orphanScan?: Record; /** * Where diagnostic reports are written: `true` for '.i18n-reports/', or a * relative path. There is no `false` — omitting the key is how you say no, * and accepting both spellings of "off" would be two ways to mean one thing. */ reportOutput?: string | true; /** Locale directories for the generic adapter. Each entry is a path string (layer="default") or { path, layer } object. */ localeDirs?: Array; /** Default locale code (required for generic adapter activation). */ defaultLocale?: string; /** Explicit list of locale codes. If set, overrides framework auto-detection (all adapters). Auto-discovered when absent. */ locales?: string[]; /** * Human-maintained locales excluded from automatic translation. * Entries may be any locale ref (code, language tag, or file name); * entries that do not match a known locale are ignored with a warning. * Explicitly naming a protected locale in targetLocales overrides the * protection (with a warning). */ protectedLocales?: string[]; /** Override the auto-detected locale file format. E.g., "json" or "php-array". Useful when both formats exist or auto-detection picks wrong. */ localeFileFormat?: LocaleFileFormat; /** * Base URL for the LLM provider — gateways, self-hosted model servers and * corporate proxies that speak the provider's own protocol. Overrides the * endpoint only, not the request shape or auth header. Overridden by the * I18N_BASE_URL env var and by --baseUrl. Not supported by "google". */ providerBaseUrl?: string; } /** * The fully resolved i18n configuration for a project. */ interface I18nConfig { /** Detected framework name (e.g., 'nuxt', 'laravel'). Set by the detector. */ framework?: string; /** Absolute path to the project root */ rootDir: string; /** Default locale code */ defaultLocale: string; /** Fallback locale chain (e.g., { 'de-formal': ['de'], 'default': ['en'] }) */ fallbackLocale: Record; /** All locale definitions */ locales: LocaleDefinition[]; /** All discovered locale directories, per layer */ localeDirs: LocaleDir[]; /** Root directories of all framework layers/roots. Used for source code scanning. */ layerRootDirs: string[]; /** Optional project-specific config from .i18n-mcp.json */ projectConfig?: ProjectConfig; /** Locale file format used by this project (default: 'json') */ localeFileFormat?: LocaleFileFormat; /** Discovered apps and their layer dependencies. Used for orphan scan scope. */ apps: AppInfo[]; } //# sourceMappingURL=types.d.ts.map //#endregion //#region src/define-config.d.ts /** * Everything `.i18n-mcp.json` accepts, minus the JSON-only `$schema` key — * a TypeScript config is checked by the editor rather than by a schema URL. */ type I18nKitConfig = ProjectConfig; /** * Identity at runtime; the point is the type. Returning the argument unchanged * keeps the config file's inferred type exact, so `defaultLocale` autocompletes * and a misspelled `protectedLocals` is a red squiggle rather than a key that * silently protects nothing. */ declare function defineI18nKitConfig(config: I18nKitConfig): I18nKitConfig; //#endregion export { LocaleDir as a, LocaleDefinition as i, defineI18nKitConfig as n, ProjectConfig as o, I18nConfig as r, LocaleFileFormat as s, I18nKitConfig as t }; //# sourceMappingURL=define-config-BaZ1dZph.d.ts.map