#!/usr/bin/env node import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { type ResourceFile } from './i18nFs'; import { type FlatResourceMap } from './resourceUtils'; import { type StructurePreference, type InsertOrderStrategy } from './config'; type PresenceResult = Record>; type UpsertOutcome = 'created' | 'updated' | 'unchanged' | 'error'; type ResourceState = { resource: ResourceFile; locale: string; localeFile: string; filePath: string; writeStructure: 'flat' | 'nested'; json?: Record; flatMap?: FlatResourceMap; initialFlat: FlatResourceMap; createdKeys: string[]; changed: boolean; }; type StructureSummary = { dryRun: boolean; changedFiles: string[]; summary: { created: number; updated: number; unchanged: number; errors: number; }; results: Array<{ localeFile: string; locale: string; key: string; result: UpsertOutcome; before?: string | null; after?: string | null; error?: string; }>; }; type RenameSummary = { dryRun: boolean; changedFiles: string[]; summary: { renamed: number; skipped: number; errors: number; }; results: Array<{ localeFile: string; locale: string; from: string; to: string; result: 'renamed' | 'skipped' | 'error'; before?: string | null; after?: string | null; error?: string; }>; }; type NamespaceMoveSummary = { dryRun: boolean; changedFiles: string[]; summary: { moved: number; skipped: number; errors: number; }; results: Array<{ localeFile: string; locale: string; from: string; to: string; movedKeys: string[]; result: 'moved' | 'skipped' | 'error'; error?: string; }>; }; type KeyLocaleMatch = { locale: string; localeFile: string; valuePreview?: string; }; type SearchMatch = { key: string; locales: KeyLocaleMatch[]; }; type NamespaceEntry = { key: string; presentLocales: string[]; missingLocales: string[]; values?: Record; }; type MissingTranslation = { key: string; missingLocales: string[]; presentLocales: string[]; references?: Array<{ filePath: string; line: number; column: number; }>; }; type PlaceholderMismatch = { key: string; locale: string; missing: string[]; extra: string[]; }; type UnusedKey = { key: string; locales: string[]; }; export declare function normalizeLocaleTag(input: string): string; export declare function describeLocale(tag: string): string | undefined; export declare function extractPlaceholders(value: string | undefined): Set; export declare function relativeToWorkspace(filePath: string, workspaceDir?: string): string; export declare function createResourceState(resource: ResourceFile, preference: StructurePreference, workspaceDir?: string): ResourceState; export declare function getValueFromState(state: ResourceState, key: string): string | undefined; export declare function applyValueToState(state: ResourceState, key: string, value: string): void; export declare function deleteKeyFromState(state: ResourceState, key: string): boolean; export declare function listKeysFromState(state: ResourceState): string[]; export declare function createResourceManager(resources: ResourceFile[], preference: StructurePreference, insertOrder: InsertOrderStrategy, workspaceDir?: string): { preference: StructurePreference; localeMap: Map; states: Map; getState: (locale: string) => ResourceState | undefined; changedFiles: () => string[]; commit: (dryRun: boolean) => string[]; }; export declare function collectWorkspaceKeys(excludePaths: Set, workspaceDir?: string): Promise>; export declare function ensureResources(workspaceDir?: string): Promise; export declare function toolProjectInfo(args?: { workspaceDir?: string; }): Promise<{ workspaceRoot: string; config: { resourceGlob: string; codeGlob: string; ignoreGlobs: string[]; structurePreference: StructurePreference; insertOrderStrategy: InsertOrderStrategy; codeRegex: string; }; totals: { localeCount: number; uniqueKeyCount: number; resourceKeyCount: number; }; locales: { locale: string; localeFile: string; isNested: boolean; keyCount: number; }[]; }>; export declare function toolSearchKeys(args: { query?: string; keyPrefix?: string; searchIn?: 'keys' | 'values' | 'both'; locales?: string[]; caseSensitive?: boolean; includeValues?: boolean; maxValueChars?: number; limit?: number; workspaceDir?: string; }): Promise<{ query: string; keyPrefix: string; searchIn: "keys" | "values" | "both"; locales: string[]; missingRequestedLocales: string[]; totalMatches: number; limit: number; truncated: boolean; matches: SearchMatch[]; }>; export declare function toolGetNamespace(args: { prefix: string; locales?: string[]; includeValues?: boolean; maxValueChars?: number; limit?: number; workspaceDir?: string; }): Promise<{ prefix: string; locales: string[]; missingRequestedLocales: string[]; totalKeys: number; limit: number; truncated: boolean; keys: NamespaceEntry[]; }>; export declare function toolUnusedKeys(args?: { locales?: string[]; limit?: number; workspaceDir?: string; }): Promise<{ locales: string[]; missingRequestedLocales: string[]; totalUnused: number; limit: number; truncated: boolean; unused: UnusedKey[]; }>; export declare function toolAudit(args?: { baseLocale?: string; locales?: string[]; limit?: number; workspaceDir?: string; }): Promise<{ baseLocale: string; locales: string[]; missingRequestedLocales: string[]; summary: { localeCount: number; missingAgainstBase: number; placeholderMismatches: number; codeMissingKeys: number; unusedKeys: number; }; limit: number; truncated: boolean; missingAgainstBase: MissingTranslation[]; placeholderMismatches: PlaceholderMismatch[]; codeMissingKeys: MissingTranslation[]; unusedKeys: UnusedKey[]; }>; export declare function toolFormatResources(args?: { locales?: string[]; sortKeys?: boolean; dryRun?: boolean; workspaceDir?: string; }): Promise<{ dryRun: boolean; sortKeys: boolean; changedFiles: string[]; missingRequestedLocales: string[]; summary: { checked: number; changed: number; unchanged: number; errors: number; }; results: { locale: string; localeFile: string; changed: boolean; error?: string; }[]; }>; export declare function toolCheckKeys(args: { keys?: string[]; workspaceDir?: string; }): Promise; export declare function toolUntranslatedKeysOnPage(args: { filePath: string; workspaceDir?: string; }): Promise; export declare function toolUpsertTranslations(args: { entries?: Array<{ key: string; values: Record; }>; dryRun?: boolean; workspaceDir?: string; }): Promise; export declare function toolDeleteKey(args: { key: string; locales?: string[]; dryRun?: boolean; workspaceDir?: string; }): Promise<{ dryRun: boolean; changedFiles: string[]; deletedFrom: string[]; }>; export declare function toolListLocales(args?: { workspaceDir?: string; }): Promise<{ languages: string[]; locales: { locale: string; localeFile: string; description: string | undefined; isNested: boolean; keyCount: number; }[]; }>; export declare function toolGetTranslations(args: { keys?: string[]; locales?: string[]; workspaceDir?: string; }): Promise<{ locales: string[]; missingRequestedLocales: string[]; translations: { key: string; values: Record; }[]; }>; export declare function toolDiffLocales(args: { base: string; compare: string[]; limit?: number; workspaceDir?: string; }): Promise<{ base: string; limit: number; comparisons: { locale: string; missing: string[]; extra: string[]; placeholderMismatches: { key: string; missing: string[]; extra: string[]; }[]; totals: { missing: number; extra: number; placeholderMismatches: number; }; truncated: boolean; }[]; }>; export declare function toolScanWorkspaceMissing(args?: { limit?: number; includeReferences?: boolean; workspaceDir?: string; }): Promise<{ totalMissing: number; limit: number; truncated: boolean; missing: MissingTranslation[]; }>; export declare function toolRenameKey(args: { from: string; to: string; locales?: string[]; dryRun?: boolean; workspaceDir?: string; }): Promise; export declare function toolMoveNamespace(args: { from: string; to: string; locales?: string[]; dryRun?: boolean; workspaceDir?: string; }): Promise; export declare function toolValidatePlaceholders(args: { keys?: string[]; locales?: string[]; baseLocale?: string; limit?: number; workspaceDir?: string; }): Promise<{ baseLocale: string; locales: string[]; keysChecked: number; limit: number; totalMismatches: number; totalMissingTranslations: number; truncated: boolean; mismatches: PlaceholderMismatch[]; missingTranslations: { key: string; locale: string; }[]; }>; export declare function toolKeyReferences(args: { keys?: string[]; limit?: number; workspaceDir?: string; }): Promise>; export declare function createI18nMcpServer(version?: string): McpServer; export declare function startServer(version?: string): Promise; export {}; //# sourceMappingURL=server.d.ts.map