@i18nprune/core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/dist/adapters-gp1lXp0T.d.ts +12 -0
  4. package/dist/capabilities-x74cD2Hu.d.ts +48 -0
  5. package/dist/cleanup.d.ts +64 -0
  6. package/dist/cleanup.js +3999 -0
  7. package/dist/config.d.ts +201 -0
  8. package/dist/config.js +2865 -0
  9. package/dist/coreContext-DMaWLvmB.d.ts +388 -0
  10. package/dist/fs-BUYD8ZhA.d.ts +20 -0
  11. package/dist/generate.d.ts +487 -0
  12. package/dist/generate.js +9389 -0
  13. package/dist/humanEmit-ygNlYX-S.d.ts +79 -0
  14. package/dist/index-BQuLEQ9b.d.ts +7 -0
  15. package/dist/index-B_ow_Xvr.d.ts +97 -0
  16. package/dist/index-BgG01AKL.d.ts +287 -0
  17. package/dist/index-CIzZl4W8.d.ts +124 -0
  18. package/dist/index-Csm1w7XD.d.ts +58 -0
  19. package/dist/index-DLwTogCo.d.ts +43 -0
  20. package/dist/index-DVT26v11.d.ts +61 -0
  21. package/dist/index-DdjljwMj.d.ts +39 -0
  22. package/dist/index-DeIw-cZd.d.ts +52 -0
  23. package/dist/index-X50E1FIX.d.ts +50 -0
  24. package/dist/index.d.ts +9180 -0
  25. package/dist/index.js +21888 -0
  26. package/dist/init.d.ts +86 -0
  27. package/dist/init.js +848 -0
  28. package/dist/listWindow-XEFxQZi1.d.ts +30 -0
  29. package/dist/localeTargetCodes-BBIQjauw.d.ts +11 -0
  30. package/dist/locales.d.ts +39 -0
  31. package/dist/locales.js +2288 -0
  32. package/dist/missing-BVCvgUC8.d.ts +10 -0
  33. package/dist/missing.d.ts +85 -0
  34. package/dist/missing.js +5892 -0
  35. package/dist/modeResolve-cGVaY5Hh.d.ts +25 -0
  36. package/dist/path-Bfn3SAts.d.ts +11 -0
  37. package/dist/profile-BwOP9WKh.d.ts +9 -0
  38. package/dist/providers-0uMEfT6q.d.ts +82 -0
  39. package/dist/prune-c6hKZCv_.d.ts +33 -0
  40. package/dist/quality.d.ts +36 -0
  41. package/dist/quality.js +3868 -0
  42. package/dist/report-D5-6bVFj.d.ts +8 -0
  43. package/dist/report-schema.d.ts +102 -0
  44. package/dist/report-schema.js +42 -0
  45. package/dist/resumeCandidates-xR13eEwt.d.ts +200 -0
  46. package/dist/root-2-kCaBvQ.d.ts +1110 -0
  47. package/dist/runtime/edge.d.ts +21 -0
  48. package/dist/runtime/edge.js +87 -0
  49. package/dist/runtime/helpers/sync.d.ts +16 -0
  50. package/dist/runtime/helpers/sync.js +117 -0
  51. package/dist/runtime/node.d.ts +24 -0
  52. package/dist/runtime/node.js +204 -0
  53. package/dist/runtime/web.d.ts +21 -0
  54. package/dist/runtime/web.js +84 -0
  55. package/dist/shared.d.ts +1177 -0
  56. package/dist/shared.js +4897 -0
  57. package/dist/sourceContext-1LQg3HiQ.d.ts +36 -0
  58. package/dist/sourceSurface-mDtwGo1E.d.ts +122 -0
  59. package/dist/sync.d.ts +86 -0
  60. package/dist/sync.js +4971 -0
  61. package/dist/syncSegment-Bx6He2Mu.d.ts +149 -0
  62. package/dist/targets-EmtKyr6F.d.ts +23 -0
  63. package/dist/template-CGM-_WLT.d.ts +139 -0
  64. package/dist/translate-CIHYp7wi.d.ts +77 -0
  65. package/dist/types/shared.d.ts +21 -0
  66. package/dist/types/shared.js +1 -0
  67. package/dist/types.d.ts +1345 -0
  68. package/dist/types.js +1 -0
  69. package/dist/validate.d.ts +126 -0
  70. package/dist/validate.js +3717 -0
  71. package/package.json +128 -0
@@ -0,0 +1,1177 @@
1
+ import { P as PathSegment, C as CliErrorCode, S as SourceScanResult, M as MaskedText, R as ReadFlatLocaleJsonSurfaceResult, h as ReadLocaleBundleResult, l as WriteFlatLocaleJsonDocumentResult, H as HOSTED_PROJECT_SNAPSHOT_SCHEMA_VERSION, m as PROJECT_UPLOAD_MAX_FILES, n as PROJECT_UPLOAD_MAX_TEXT_BYTES, o as PROJECT_UPLOAD_MAX_ZIP_BYTES, p as PROJECT_UPLOAD_ZIP_LIMITS, W as WalkedJsonSegment, a as ListLocaleSegmentsResult, L as ListLocaleCodesResult, c as LocaleSegmentRef, d as LocaleSegmentTarget, i as ResolveLocaleSegmentTargetsInput, g as LocaleSegmentWriteTarget, e as LocaleSegmentWritePlan, b as LocaleLeafProjection, k as SyncSegmentSourcePlan } from './syncSegment-Bx6He2Mu.js';
2
+ import { M as MergeToTemplateOptions, P as PruneToTemplateOptions, a as applyPreserveFromSource, m as mergeToTemplateShape, p as pruneToTemplateShape } from './prune-c6hKZCv_.js';
3
+ import { I as Issue, C as CliJsonEnvelope } from './index-X50E1FIX.js';
4
+ import { P as ProjectFilesystemRuntime } from './capabilities-x74cD2Hu.js';
5
+ import { h as ListSourceFilesOptions, M as LocalesLayoutStructure, T as TranslationSurfaceLeaf, R as ResolvedLocalesLayout, C as CoreContext, K as LocalesLayoutMode, L as LocaleReadDiagnostic, H as LocaleReadCache, N as RunOptions, o as CacheDispatchReason, V as ENV_TRANSLATE_DEEPL_API_KEY, W as ENV_TRANSLATE_LIBRE_URL, X as ENV_TRANSLATE_LLM_API_KEY, Y as ENV_TRANSLATE_LLM_BASE_URL, Z as ENV_TRANSLATE_LLM_MODEL, _ as ENV_TRANSLATE_MAX_WORKERS, $ as ENV_TRANSLATE_PROVIDER, a0 as TRANSLATE_WORKERS_CAP, a as TranslatorEnv } from './coreContext-DMaWLvmB.js';
6
+ import { G as ScanExcludeConfig, c as LocaleLeafPathApi, F as LocaleSegmentSource, b as LocalesFilesystemConfig, L as LocalesFilesystemConfig$1 } from './root-2-kCaBvQ.js';
7
+ import { T as TranslationResult, c as Translator, A as ApplyLocaleMetadataModeInput, R as ResolveLocaleLeafModeInput, b as TranslateTargetLanguage } from './index-B_ow_Xvr.js';
8
+ import { T as TranslationProviderId } from './providers-0uMEfT6q.js';
9
+ import { L as LocaleMetadataReport } from './index-DLwTogCo.js';
10
+ import { a as applyLocaleLeafNormalization, m as metadataModeEnabledFromConfig, r as resolveLocaleLeafMode } from './modeResolve-cGVaY5Hh.js';
11
+ import { R as RuntimeFsPort } from './fs-BUYD8ZhA.js';
12
+ export { L as LocalePlaceholderLeaf, S as SourcePlaceholderLeaf, d as detectLocalePlaceholderLeaves, a as detectSourcePlaceholderLeaves, f as formatSourcePlaceholderMessage, b as formatSyncSourcePlaceholderMessage, c as formatTargetPlaceholderMessage, i as issuesFromSourcePlaceholderLeaves, e as issuesFromTargetPlaceholderLeaves, s as sourcePlaceholderValues, g as sourcePlaceholders } from './index-DeIw-cZd.js';
13
+ import { a as LIST_WINDOW_DEFAULT_TOP, b as LIST_WINDOW_HARD_CAP, c as ListWindowInput, L as ListWindowResolved, R as ResolveListWindowOptions, d as applyListWindow, r as resolveListWindow } from './listWindow-XEFxQZi1.js';
14
+ import { R as RunEmitter, O as OperationId, a as RunEvent, v as RunMessageLevel, t as RunMessageChannel, k as GenerateProgressEvent, S as SyncProgressEvent, N as ValidateProgressEvent } from './index-BgG01AKL.js';
15
+ import { C as CacheProfileId, a as CacheProfileDefaults } from './profile-BwOP9WKh.js';
16
+ import { D as DEFAULT_MISSING_LEAF_PLACEHOLDER, M as MAX_MISSING_TARGET_SUGGESTIONS } from './missing-BVCvgUC8.js';
17
+ import { P as PROJECT_REPORT_KIND, a as PROJECT_REPORT_SCHEMA_VERSION, R as REPORT_INLINE_PAYLOAD_PLACEHOLDER } from './report-D5-6bVFj.js';
18
+ import './path-Bfn3SAts.js';
19
+ import './adapters-gp1lXp0T.js';
20
+ import 'zod';
21
+ import './index-BQuLEQ9b.js';
22
+
23
+ /** Split a path like `a.b[0].c` into segments. */
24
+ declare function splitPath(pathStr: string): PathSegment[];
25
+ declare function getAtPath(root: unknown, pathStr: string): unknown;
26
+ declare function setAtPath(root: unknown, pathStr: string, value: unknown): unknown;
27
+ declare function deleteAtPath(root: unknown, pathStr: string): unknown;
28
+
29
+ declare function deepClone<T>(x: T): T;
30
+
31
+ declare class I18nPruneError extends Error {
32
+ readonly code: CliErrorCode;
33
+ readonly issueCode?: string;
34
+ constructor(message: string, code: CliErrorCode, options?: {
35
+ cause?: unknown;
36
+ issueCode?: string;
37
+ });
38
+ }
39
+
40
+ declare function rethrowAsI18n(err: unknown, message: string): never;
41
+
42
+ declare function isErrnoCode(error: unknown, code: string): boolean;
43
+ declare function normalizeUnknownError(error: unknown, input: {
44
+ when: string;
45
+ defaultCode: CliErrorCode;
46
+ issueCode?: string;
47
+ }): I18nPruneError;
48
+ declare function issueFromI18nPruneError(error: I18nPruneError, input: {
49
+ codeByErrorCode?: Partial<Record<CliErrorCode, string>>;
50
+ fallbackCode: string;
51
+ path?: string;
52
+ }): Issue;
53
+
54
+ type index$e_I18nPruneError = I18nPruneError;
55
+ declare const index$e_I18nPruneError: typeof I18nPruneError;
56
+ declare const index$e_isErrnoCode: typeof isErrnoCode;
57
+ declare const index$e_issueFromI18nPruneError: typeof issueFromI18nPruneError;
58
+ declare const index$e_normalizeUnknownError: typeof normalizeUnknownError;
59
+ declare const index$e_rethrowAsI18n: typeof rethrowAsI18n;
60
+ declare namespace index$e {
61
+ export { index$e_I18nPruneError as I18nPruneError, index$e_isErrnoCode as isErrnoCode, index$e_issueFromI18nPruneError as issueFromI18nPruneError, index$e_normalizeUnknownError as normalizeUnknownError, index$e_rethrowAsI18n as rethrowAsI18n };
62
+ }
63
+
64
+ type JsonParseLocation = {
65
+ line?: number;
66
+ column?: number;
67
+ offset?: number;
68
+ };
69
+ type ParseJsonTextOptions = {
70
+ filePath?: string;
71
+ code?: CliErrorCode;
72
+ issueCode?: string;
73
+ };
74
+ declare class I18nPruneJsonParseError extends I18nPruneError {
75
+ readonly filePath: string | undefined;
76
+ readonly line: number | undefined;
77
+ readonly column: number | undefined;
78
+ readonly offset: number | undefined;
79
+ constructor(input: {
80
+ message: string;
81
+ code: CliErrorCode;
82
+ cause: unknown;
83
+ issueCode?: string;
84
+ filePath?: string;
85
+ location: JsonParseLocation;
86
+ });
87
+ }
88
+ declare function getJsonParseLocation(error: unknown, text: string): JsonParseLocation;
89
+ declare function parseJsonText<T = unknown>(text: string, options?: ParseJsonTextOptions): T;
90
+ type TryParseJsonTextResult<T> = {
91
+ ok: true;
92
+ data: T;
93
+ } | {
94
+ ok: false;
95
+ error: I18nPruneJsonParseError;
96
+ };
97
+ declare function tryParseJsonText<T = unknown>(text: string, options?: ParseJsonTextOptions): TryParseJsonTextResult<T>;
98
+
99
+ /** True when every source string path exists in `targetRaw`. */
100
+ declare function targetLocaleCoversAllSourcePaths(sourceRaw: unknown, targetRaw: unknown): boolean;
101
+
102
+ type index$d_I18nPruneJsonParseError = I18nPruneJsonParseError;
103
+ declare const index$d_I18nPruneJsonParseError: typeof I18nPruneJsonParseError;
104
+ type index$d_JsonParseLocation = JsonParseLocation;
105
+ declare const index$d_MergeToTemplateOptions: typeof MergeToTemplateOptions;
106
+ type index$d_ParseJsonTextOptions = ParseJsonTextOptions;
107
+ declare const index$d_PathSegment: typeof PathSegment;
108
+ declare const index$d_PruneToTemplateOptions: typeof PruneToTemplateOptions;
109
+ type index$d_TryParseJsonTextResult<T> = TryParseJsonTextResult<T>;
110
+ declare const index$d_applyPreserveFromSource: typeof applyPreserveFromSource;
111
+ declare const index$d_deepClone: typeof deepClone;
112
+ declare const index$d_deleteAtPath: typeof deleteAtPath;
113
+ declare const index$d_getAtPath: typeof getAtPath;
114
+ declare const index$d_getJsonParseLocation: typeof getJsonParseLocation;
115
+ declare const index$d_mergeToTemplateShape: typeof mergeToTemplateShape;
116
+ declare const index$d_parseJsonText: typeof parseJsonText;
117
+ declare const index$d_pruneToTemplateShape: typeof pruneToTemplateShape;
118
+ declare const index$d_setAtPath: typeof setAtPath;
119
+ declare const index$d_splitPath: typeof splitPath;
120
+ declare const index$d_targetLocaleCoversAllSourcePaths: typeof targetLocaleCoversAllSourcePaths;
121
+ declare const index$d_tryParseJsonText: typeof tryParseJsonText;
122
+ declare namespace index$d {
123
+ export { index$d_I18nPruneJsonParseError as I18nPruneJsonParseError, type index$d_JsonParseLocation as JsonParseLocation, index$d_MergeToTemplateOptions as MergeToTemplateOptions, type index$d_ParseJsonTextOptions as ParseJsonTextOptions, index$d_PathSegment as PathSegment, index$d_PruneToTemplateOptions as PruneToTemplateOptions, type index$d_TryParseJsonTextResult as TryParseJsonTextResult, index$d_applyPreserveFromSource as applyPreserveFromSource, index$d_deepClone as deepClone, index$d_deleteAtPath as deleteAtPath, index$d_getAtPath as getAtPath, index$d_getJsonParseLocation as getJsonParseLocation, index$d_mergeToTemplateShape as mergeToTemplateShape, index$d_parseJsonText as parseJsonText, index$d_pruneToTemplateShape as pruneToTemplateShape, index$d_setAtPath as setAtPath, index$d_splitPath as splitPath, index$d_targetLocaleCoversAllSourcePaths as targetLocaleCoversAllSourcePaths, index$d_tryParseJsonText as tryParseJsonText };
124
+ }
125
+
126
+ /** Read concatenated source text from all scanned files under `srcRoot`. */
127
+ declare function scanSources(runtime: ProjectFilesystemRuntime, srcRoot: string, exclude?: ScanExcludeConfig, scanOpts?: ListSourceFilesOptions): SourceScanResult;
128
+
129
+ declare const index$c_scanSources: typeof scanSources;
130
+ declare namespace index$c {
131
+ export { index$c_scanSources as scanSources };
132
+ }
133
+
134
+ /** Replace `{{...}}` with sentinels before MT. */
135
+ declare function mask(input: string): MaskedText;
136
+ /** Restore sentinels after MT. */
137
+ declare function restore(masked: string, originals: string[]): string;
138
+ /** @throws if sentinels remain or placeholder multiset differs. */
139
+ declare function validateRestored(source: string, restored: string, originals: string[]): void;
140
+
141
+ declare const index$b_mask: typeof mask;
142
+ declare const index$b_restore: typeof restore;
143
+ declare const index$b_validateRestored: typeof validateRestored;
144
+ declare namespace index$b {
145
+ export { index$b_mask as mask, index$b_restore as restore, index$b_validateRestored as validateRestored };
146
+ }
147
+
148
+ /** When **`persistStructuredMetadata`** is false, only the translated string is stored. */
149
+ declare function localeJsonValueFromTranslation(persistStructuredMetadata: boolean, tr: TranslationResult): unknown;
150
+ /**
151
+ * Shared post-provider validation: every backend must yield a **string** suitable for JSON string leaves.
152
+ * Provider-specific checks (e.g. AI JSON shape) happen **before** this or in a wrapper `Translator`.
153
+ */
154
+ declare function validateLeafTranslationString(value: unknown, context?: string): string;
155
+
156
+ /**
157
+ * Placeholder-safe translate: mask → provider → restore → validate; merges **leaf metadata**
158
+ * (provider-native + shared heuristic). Callers decide whether to **persist** structured JSON.
159
+ */
160
+ declare function translateLeaf(provider: Translator, sourceText: string, sourceLang: string, targetLang: string, options?: {
161
+ onTranslated?: (sourceText: string, translatedText: string) => Promise<void> | void;
162
+ /** Used for heuristic `source` tagging and tuning when the backend returns no scores. */
163
+ providerId?: TranslationProviderId;
164
+ }): Promise<TranslationResult>;
165
+
166
+ declare const index$a_localeJsonValueFromTranslation: typeof localeJsonValueFromTranslation;
167
+ declare const index$a_translateLeaf: typeof translateLeaf;
168
+ declare const index$a_validateLeafTranslationString: typeof validateLeafTranslationString;
169
+ declare namespace index$a {
170
+ export { index$a_localeJsonValueFromTranslation as localeJsonValueFromTranslation, index$a_translateLeaf as translateLeaf, index$a_validateLeafTranslationString as validateLeafTranslationString };
171
+ }
172
+
173
+ declare function applyLocaleLeafMode(input: ApplyLocaleMetadataModeInput): {
174
+ next: unknown;
175
+ report: LocaleMetadataReport;
176
+ };
177
+
178
+ declare function localeSegmentSourceForFile(input: {
179
+ path: LocaleLeafPathApi;
180
+ absoluteFile: string;
181
+ localesDir: string;
182
+ structure: LocalesLayoutStructure;
183
+ }): LocaleSegmentSource | null;
184
+
185
+ declare function isStructuredLocaleLeafNode(x: unknown): x is Record<string, unknown>;
186
+ declare function isCompleteStructuredLocaleLeafMeta(node: unknown): boolean;
187
+ declare function collectTranslationSurfaceLeaves(root: unknown, prefix?: string, out?: TranslationSurfaceLeaf[], fileOrigin?: LocaleSegmentSource): TranslationSurfaceLeaf[];
188
+
189
+ declare const index$9_ApplyLocaleMetadataModeInput: typeof ApplyLocaleMetadataModeInput;
190
+ declare const index$9_ResolveLocaleLeafModeInput: typeof ResolveLocaleLeafModeInput;
191
+ declare const index$9_applyLocaleLeafMode: typeof applyLocaleLeafMode;
192
+ declare const index$9_applyLocaleLeafNormalization: typeof applyLocaleLeafNormalization;
193
+ declare const index$9_collectTranslationSurfaceLeaves: typeof collectTranslationSurfaceLeaves;
194
+ declare const index$9_isCompleteStructuredLocaleLeafMeta: typeof isCompleteStructuredLocaleLeafMeta;
195
+ declare const index$9_isStructuredLocaleLeafNode: typeof isStructuredLocaleLeafNode;
196
+ declare const index$9_localeSegmentSourceForFile: typeof localeSegmentSourceForFile;
197
+ declare const index$9_metadataModeEnabledFromConfig: typeof metadataModeEnabledFromConfig;
198
+ declare const index$9_resolveLocaleLeafMode: typeof resolveLocaleLeafMode;
199
+ declare namespace index$9 {
200
+ export { index$9_ApplyLocaleMetadataModeInput as ApplyLocaleMetadataModeInput, index$9_ResolveLocaleLeafModeInput as ResolveLocaleLeafModeInput, index$9_applyLocaleLeafMode as applyLocaleLeafMode, index$9_applyLocaleLeafNormalization as applyLocaleLeafNormalization, index$9_collectTranslationSurfaceLeaves as collectTranslationSurfaceLeaves, index$9_isCompleteStructuredLocaleLeafMeta as isCompleteStructuredLocaleLeafMeta, index$9_isStructuredLocaleLeafNode as isStructuredLocaleLeafNode, index$9_localeSegmentSourceForFile as localeSegmentSourceForFile, index$9_metadataModeEnabledFromConfig as metadataModeEnabledFromConfig, index$9_resolveLocaleLeafMode as resolveLocaleLeafMode };
201
+ }
202
+
203
+ declare function resolveLocalesLayout(config: LocalesFilesystemConfig, directoryAbsolute: string): ResolvedLocalesLayout;
204
+ declare function resolveLocalesLayoutFromContext(ctx: CoreContext): ResolvedLocalesLayout;
205
+ declare function isLocalesLayoutReadSupported(layout: ResolvedLocalesLayout): boolean;
206
+ declare function isLocalesLayoutWriteSupported(layout: ResolvedLocalesLayout): boolean;
207
+
208
+ /**
209
+ * Locale code for the configured source file using layout rules (not only the JSON basename).
210
+ *
211
+ * For `messages/en/app.json` under `locale_per_dir`, returns `en` — not `app`.
212
+ */
213
+ declare function sourceLocaleCodeForLayout(input: {
214
+ layout: ResolvedLocalesLayout;
215
+ path: LocaleLeafPathApi;
216
+ sourceLocaleAbsolute: string;
217
+ }): string;
218
+
219
+ declare const index$8_LocalesLayoutMode: typeof LocalesLayoutMode;
220
+ declare const index$8_LocalesLayoutStructure: typeof LocalesLayoutStructure;
221
+ declare const index$8_ResolvedLocalesLayout: typeof ResolvedLocalesLayout;
222
+ declare const index$8_isLocalesLayoutReadSupported: typeof isLocalesLayoutReadSupported;
223
+ declare const index$8_isLocalesLayoutWriteSupported: typeof isLocalesLayoutWriteSupported;
224
+ declare const index$8_resolveLocalesLayout: typeof resolveLocalesLayout;
225
+ declare const index$8_resolveLocalesLayoutFromContext: typeof resolveLocalesLayoutFromContext;
226
+ declare const index$8_sourceLocaleCodeForLayout: typeof sourceLocaleCodeForLayout;
227
+ declare namespace index$8 {
228
+ export { index$8_LocalesLayoutMode as LocalesLayoutMode, index$8_LocalesLayoutStructure as LocalesLayoutStructure, index$8_ResolvedLocalesLayout as ResolvedLocalesLayout, index$8_isLocalesLayoutReadSupported as isLocalesLayoutReadSupported, index$8_isLocalesLayoutWriteSupported as isLocalesLayoutWriteSupported, index$8_resolveLocalesLayout as resolveLocalesLayout, index$8_resolveLocalesLayoutFromContext as resolveLocalesLayoutFromContext, index$8_sourceLocaleCodeForLayout as sourceLocaleCodeForLayout };
229
+ }
230
+
231
+ declare function readFlatLocaleJsonSurface(input: {
232
+ fs: RuntimeFsPort;
233
+ path: LocaleLeafPathApi;
234
+ absoluteFile: string;
235
+ localesDir: string;
236
+ structure: LocalesLayoutStructure;
237
+ onDiagnostic?: (d: LocaleReadDiagnostic) => void;
238
+ }): ReadFlatLocaleJsonSurfaceResult;
239
+
240
+ declare function readLocaleBundle(input: {
241
+ layout: ResolvedLocalesLayout;
242
+ fs: RuntimeFsPort;
243
+ path: LocaleLeafPathApi;
244
+ absoluteFile: string;
245
+ onDiagnostic?: (d: LocaleReadDiagnostic) => void;
246
+ }): ReadLocaleBundleResult;
247
+
248
+ /** Read one locale segment file through the shared per-run {@link CoreContext.localeRead} cache. */
249
+ declare function readLocaleSegmentFromContext(ctx: CoreContext, absoluteFile: string, onDiagnostic?: (d: LocaleReadDiagnostic) => void): ReadFlatLocaleJsonSurfaceResult;
250
+ /** Read merged translation-surface leaves for one locale code (flat or multi-segment layout). */
251
+ declare function readLocaleCodeSurfaceFromContext(ctx: CoreContext, localeCode: string, onDiagnostic?: (d: LocaleReadDiagnostic) => void): ReadFlatLocaleJsonSurfaceResult;
252
+ /** Read one locale segment JSON via {@link readLocaleSegmentFromContext} (throws on I/O failure). */
253
+ declare function readLocaleJsonFromContextSync(ctx: CoreContext, absoluteFile: string): unknown;
254
+
255
+ declare function createLocaleReadCache(): LocaleReadCache;
256
+ declare function invalidateLocaleReadCacheForAbsolutePath(ctx: CoreContext, absolutePath: string): void;
257
+ /** Drop cached segment reads and merged locale-code view for one catalog code. */
258
+ declare function invalidateLocaleReadCacheForLocaleCode(ctx: CoreContext, localeCode: string): void;
259
+
260
+ /**
261
+ * Read and merge all JSON segments for one locale code (`locale_per_dir` or `feature_bundle`).
262
+ */
263
+ declare function readLocalePerDirLocaleSurface(input: {
264
+ layout: ResolvedLocalesLayout;
265
+ fs: RuntimeFsPort;
266
+ path: LocaleLeafPathApi;
267
+ localeCode: string;
268
+ onDiagnostic?: (d: LocaleReadDiagnostic) => void;
269
+ }): ReadFlatLocaleJsonSurfaceResult;
270
+
271
+ declare const index$7_ReadFlatLocaleJsonSurfaceResult: typeof ReadFlatLocaleJsonSurfaceResult;
272
+ declare const index$7_ReadLocaleBundleResult: typeof ReadLocaleBundleResult;
273
+ declare const index$7_createLocaleReadCache: typeof createLocaleReadCache;
274
+ declare const index$7_invalidateLocaleReadCacheForAbsolutePath: typeof invalidateLocaleReadCacheForAbsolutePath;
275
+ declare const index$7_invalidateLocaleReadCacheForLocaleCode: typeof invalidateLocaleReadCacheForLocaleCode;
276
+ declare const index$7_readFlatLocaleJsonSurface: typeof readFlatLocaleJsonSurface;
277
+ declare const index$7_readLocaleBundle: typeof readLocaleBundle;
278
+ declare const index$7_readLocaleCodeSurfaceFromContext: typeof readLocaleCodeSurfaceFromContext;
279
+ declare const index$7_readLocaleJsonFromContextSync: typeof readLocaleJsonFromContextSync;
280
+ declare const index$7_readLocalePerDirLocaleSurface: typeof readLocalePerDirLocaleSurface;
281
+ declare const index$7_readLocaleSegmentFromContext: typeof readLocaleSegmentFromContext;
282
+ declare namespace index$7 {
283
+ export { index$7_ReadFlatLocaleJsonSurfaceResult as ReadFlatLocaleJsonSurfaceResult, index$7_ReadLocaleBundleResult as ReadLocaleBundleResult, index$7_createLocaleReadCache as createLocaleReadCache, index$7_invalidateLocaleReadCacheForAbsolutePath as invalidateLocaleReadCacheForAbsolutePath, index$7_invalidateLocaleReadCacheForLocaleCode as invalidateLocaleReadCacheForLocaleCode, index$7_readFlatLocaleJsonSurface as readFlatLocaleJsonSurface, index$7_readLocaleBundle as readLocaleBundle, index$7_readLocaleCodeSurfaceFromContext as readLocaleCodeSurfaceFromContext, index$7_readLocaleJsonFromContextSync as readLocaleJsonFromContextSync, index$7_readLocalePerDirLocaleSurface as readLocalePerDirLocaleSurface, index$7_readLocaleSegmentFromContext as readLocaleSegmentFromContext };
284
+ }
285
+
286
+ /**
287
+ * Persist a locale JSON document for the flat `*.json` per-locale layout (pretty-printed, trailing newline).
288
+ *
289
+ * @remarks Uses host `fs.mkdirp` then `fs.writeText`. Non-throwing: failures become {@link LocaleReadDiagnostic}
290
+ * rows (same transport type as reads for host logging symmetry).
291
+ */
292
+ declare function writeFlatLocaleJsonDocument(input: {
293
+ fs: RuntimeFsPort;
294
+ path: LocaleLeafPathApi;
295
+ absoluteFile: string;
296
+ data: unknown;
297
+ /** JSON indent spaces (default 2). */
298
+ indent?: number;
299
+ onDiagnostic?: (d: LocaleReadDiagnostic) => void;
300
+ }): WriteFlatLocaleJsonDocumentResult;
301
+
302
+ /**
303
+ * Persist one locale segment file using {@link ResolvedLocalesLayout}.
304
+ *
305
+ * @remarks Delegates to {@link writeFlatLocaleJsonDocument} after layout path validation.
306
+ */
307
+ declare function writeLocaleBundle(input: {
308
+ layout: ResolvedLocalesLayout;
309
+ fs: RuntimeFsPort;
310
+ path: LocaleLeafPathApi;
311
+ absoluteFile: string;
312
+ data: unknown;
313
+ indent?: number;
314
+ onDiagnostic?: (d: LocaleReadDiagnostic) => void;
315
+ }): WriteFlatLocaleJsonDocumentResult;
316
+ /** Persist one locale JSON file via {@link writeLocaleBundle} and {@link CoreContext} layout. */
317
+ declare function writeLocaleJsonFromContextSync(ctx: CoreContext, absoluteFile: string, data: unknown): void;
318
+
319
+ declare const index$6_WriteFlatLocaleJsonDocumentResult: typeof WriteFlatLocaleJsonDocumentResult;
320
+ declare const index$6_writeFlatLocaleJsonDocument: typeof writeFlatLocaleJsonDocument;
321
+ declare const index$6_writeLocaleBundle: typeof writeLocaleBundle;
322
+ declare const index$6_writeLocaleJsonFromContextSync: typeof writeLocaleJsonFromContextSync;
323
+ declare namespace index$6 {
324
+ export { index$6_WriteFlatLocaleJsonDocumentResult as WriteFlatLocaleJsonDocumentResult, index$6_writeFlatLocaleJsonDocument as writeFlatLocaleJsonDocument, index$6_writeLocaleBundle as writeLocaleBundle, index$6_writeLocaleJsonFromContextSync as writeLocaleJsonFromContextSync };
325
+ }
326
+
327
+ /** Path → translated string value by walking locale JSON (prefer cached leaves when available). */
328
+ declare function translationSurfacePathValueMap(localeJson: unknown): Map<string, string>;
329
+
330
+ declare const index$5_translationSurfacePathValueMap: typeof translationSurfacePathValueMap;
331
+ declare namespace index$5 {
332
+ export { index$5_translationSurfacePathValueMap as translationSurfacePathValueMap };
333
+ }
334
+
335
+ /**
336
+ * True when `keyPath` is exactly `prefix` or nested under it (dot or bracket segments).
337
+ * Used for uncertain key prefixes from template partials / dynamic `resolvedPrefix`.
338
+ */
339
+ declare function pathUnderUncertainPrefix(keyPath: string, prefix: string): boolean;
340
+ declare function pathUnderAnyUncertainPrefix(keyPath: string, prefixes: readonly string[]): boolean;
341
+
342
+ declare const paths_pathUnderAnyUncertainPrefix: typeof pathUnderAnyUncertainPrefix;
343
+ declare const paths_pathUnderUncertainPrefix: typeof pathUnderUncertainPrefix;
344
+ declare namespace paths {
345
+ export { paths_pathUnderAnyUncertainPrefix as pathUnderAnyUncertainPrefix, paths_pathUnderUncertainPrefix as pathUnderUncertainPrefix };
346
+ }
347
+
348
+ declare function resetRunOptions(): void;
349
+ declare function setRunOptions(partial: Partial<RunOptions>): void;
350
+ declare function getRunOptions(): RunOptions;
351
+
352
+ declare const index$4_LIST_WINDOW_DEFAULT_TOP: typeof LIST_WINDOW_DEFAULT_TOP;
353
+ declare const index$4_LIST_WINDOW_HARD_CAP: typeof LIST_WINDOW_HARD_CAP;
354
+ declare const index$4_ListWindowInput: typeof ListWindowInput;
355
+ declare const index$4_ListWindowResolved: typeof ListWindowResolved;
356
+ declare const index$4_ResolveListWindowOptions: typeof ResolveListWindowOptions;
357
+ declare const index$4_applyListWindow: typeof applyListWindow;
358
+ declare const index$4_getRunOptions: typeof getRunOptions;
359
+ declare const index$4_resetRunOptions: typeof resetRunOptions;
360
+ declare const index$4_resolveListWindow: typeof resolveListWindow;
361
+ declare const index$4_setRunOptions: typeof setRunOptions;
362
+ declare namespace index$4 {
363
+ export { index$4_LIST_WINDOW_DEFAULT_TOP as LIST_WINDOW_DEFAULT_TOP, index$4_LIST_WINDOW_HARD_CAP as LIST_WINDOW_HARD_CAP, index$4_ListWindowInput as ListWindowInput, index$4_ListWindowResolved as ListWindowResolved, index$4_ResolveListWindowOptions as ResolveListWindowOptions, index$4_applyListWindow as applyListWindow, index$4_getRunOptions as getRunOptions, index$4_resetRunOptions as resetRunOptions, index$4_resolveListWindow as resolveListWindow, index$4_setRunOptions as setRunOptions };
364
+ }
365
+
366
+ declare const noopRunEmitter: RunEmitter;
367
+ /** Emit a `run.*` event (guarded; never throws). */
368
+ declare function emitRunEvent(emit: RunEmitter | undefined, event: RunEvent): void;
369
+ declare function emitRunMessage(emit: RunEmitter | undefined, input: {
370
+ op: OperationId;
371
+ runId?: string;
372
+ level: RunMessageLevel;
373
+ channel?: RunMessageChannel;
374
+ message: string;
375
+ target?: string;
376
+ path?: string;
377
+ data?: Record<string, string | number | boolean | null>;
378
+ at?: number;
379
+ }): void;
380
+ declare function nowMs(): number;
381
+ /** Narrow a run event to any `run.progress.*` variant. */
382
+ declare function isProgressEvent(event: RunEvent): event is GenerateProgressEvent | SyncProgressEvent | ValidateProgressEvent;
383
+ /** Emit `run.error` events for a list of structured issues. */
384
+ declare function emitIssuesAsRunErrors(emit: RunEmitter | undefined, input: {
385
+ op: OperationId;
386
+ runId?: string;
387
+ issues: readonly Issue[];
388
+ at?: number;
389
+ recoverable: boolean;
390
+ }): void;
391
+ /** Emit one synthetic `run.error` issue from an unknown thrown value. */
392
+ declare function emitRunErrorFromUnknown(emit: RunEmitter | undefined, input: {
393
+ op: OperationId;
394
+ runId?: string;
395
+ err: unknown;
396
+ code: string;
397
+ at?: number;
398
+ recoverable: boolean;
399
+ }): void;
400
+
401
+ declare const index$3_RunEmitter: typeof RunEmitter;
402
+ declare const index$3_RunEvent: typeof RunEvent;
403
+ declare const index$3_emitIssuesAsRunErrors: typeof emitIssuesAsRunErrors;
404
+ declare const index$3_emitRunErrorFromUnknown: typeof emitRunErrorFromUnknown;
405
+ declare const index$3_emitRunEvent: typeof emitRunEvent;
406
+ declare const index$3_emitRunMessage: typeof emitRunMessage;
407
+ declare const index$3_isProgressEvent: typeof isProgressEvent;
408
+ declare const index$3_noopRunEmitter: typeof noopRunEmitter;
409
+ declare const index$3_nowMs: typeof nowMs;
410
+ declare namespace index$3 {
411
+ export { index$3_RunEmitter as RunEmitter, index$3_RunEvent as RunEvent, index$3_emitIssuesAsRunErrors as emitIssuesAsRunErrors, index$3_emitRunErrorFromUnknown as emitRunErrorFromUnknown, index$3_emitRunEvent as emitRunEvent, index$3_emitRunMessage as emitRunMessage, index$3_isProgressEvent as isProgressEvent, index$3_noopRunEmitter as noopRunEmitter, index$3_nowMs as nowMs };
412
+ }
413
+
414
+ declare function buildCliJsonEnvelope<K extends string, D>(kind: K, data: D, options: {
415
+ ok: boolean;
416
+ issues?: Issue[];
417
+ cwd?: string;
418
+ schemaVersion?: string;
419
+ }): CliJsonEnvelope<K, D>;
420
+ /**
421
+ * Serialize structured CLI stdout for an operation in `--json` mode (function name is historical).
422
+ * Always emits the envelope `{ ok, kind, data, issues, meta }`.
423
+ */
424
+ declare function stringifyCliCommandJson(input: {
425
+ kind: string;
426
+ data: unknown;
427
+ ok: boolean;
428
+ issues?: Issue[];
429
+ /** Working directory for `meta.cwd` — host supplies (CLI: `ctx.adapters.system.cwd()` or `process.cwd()`). */
430
+ cwd?: string;
431
+ /** Pretty-print with indentation. Defaults to current runtime `jsonPretty` (true when unset). */
432
+ pretty?: boolean;
433
+ }): string;
434
+ /** Serialize a pre-built envelope (same bytes as {@link stringifyCliCommandJson}). */
435
+ declare function stringifyEnvelope<K extends string, D>(envelope: CliJsonEnvelope<K, D>, pretty?: boolean): string;
436
+
437
+ /** With site: `…/commands/{slug}` (no `/README`). Without site: GitHub `…/README.md` for that path. */
438
+ declare function docsCommandUrl(command: string): string;
439
+ /**
440
+ * Published site URL under {@link DOCS_SITE_BASE}. When `DOCS_SITE_BASE` is empty, falls back to
441
+ * GitHub blob URLs. Normalizes `.md` / `README` / trailing slashes; hash fragments are preserved.
442
+ */
443
+ declare function getDocsUrl(path?: string): string;
444
+
445
+ /**
446
+ * Resolved paths for docs links and envelopes.
447
+ *
448
+ * **Anchor:** known `i18nprune.<parent>.…` with a topic page → VitePress-style slug of the tail after `<parent>.`;
449
+ * otherwise slug of the full code (dots folded for stability).
450
+ */
451
+ type IssueCodeDocLinkParts = {
452
+ readonly parent: string | null;
453
+ readonly anchor: string;
454
+ /** Published site path with leading slash, e.g. `/issues/translate` or `/issues`. */
455
+ readonly sitePagePath: string;
456
+ /** Repo-relative fragment without `docs/` prefix, e.g. `issues/translate`. */
457
+ readonly repoDocPath: string;
458
+ };
459
+ /**
460
+ * Resolved docs link for an issue `code`: site path, repo `docPath` fragment, and URL hash slug.
461
+ * Use {@link issueCodeDocHref} when you only need the full URL.
462
+ */
463
+ declare function resolveIssueCodeDocLink(code: string): IssueCodeDocLinkParts;
464
+ /**
465
+ * Repo-relative **`docPath`** fragment (no `docs/` prefix) for envelopes, e.g. `issues/translate`.
466
+ * Falls back to `issues` when the parent has no topic file yet.
467
+ */
468
+ declare function issueCodeRepoDocPathForIssueCode(code: string): string;
469
+ /** Full docs site URL for this issue code (topic page + anchor). */
470
+ declare function issueCodeDocHref(code: string): string;
471
+
472
+ /**
473
+ * Normalize legacy `docPath` values to repo-root form under **`docs/`** for envelopes and integrators
474
+ * (e.g. `commands/validate/README` → `docs/commands/validate/README` on disk).
475
+ */
476
+ declare function normalizeRepoDocPath(docPath: string): string;
477
+
478
+ /** Canonical GitHub owner for this project. */
479
+ declare const GITHUB_OWNER: "zamdevio";
480
+ /** Canonical GitHub repository name for this project. */
481
+ declare const GITHUB_REPO: "i18nprune";
482
+ /** Canonical GitHub repository URL. */
483
+ declare const GITHUB_REPO_URL: "https://github.com/zamdevio/i18nprune";
484
+ /** Canonical license URL in the repository. */
485
+ declare const LICENSE_URL: "https://github.com/zamdevio/i18nprune/blob/main/LICENSE";
486
+ /** Canonical docs site base URL. Set to `""` to force GitHub docs URLs only. */
487
+ declare const DOCS_SITE_BASE: "https://docs.i18nprune.dev";
488
+ /** GitHub metadata worker origin (Worker + custom domain). */
489
+ /** Public meta worker (GitHub + npm cached read models). */
490
+ declare const META_WORKER_URL: "https://meta.i18nprune.dev";
491
+ /** Default project/report storage worker (`apps/workers/i18nprune`). Hosts pass an explicit origin or fall back here. */
492
+ declare const DEFAULT_WORKER_API_URL: "https://worker.i18nprune.dev";
493
+ /** Public report UI URL. */
494
+ declare const DEMO_REPORT_URL: "https://report.i18nprune.dev";
495
+ /** Public web workspace (hosted project share viewer). */
496
+ declare const DEMO_WEB_APP_BASE: "https://web.i18nprune.dev";
497
+ /** Installable npm package name. */
498
+ declare const NPM_PACKAGE_NAME: "i18nprune";
499
+ /** Public npm package page URL. */
500
+ declare const NPM_PACKAGE_URL: "https://www.npmjs.com/package/i18nprune";
501
+
502
+ /** Same as `GITHUB_REPO_URL`; alias for docs/GitHub URL builders. */
503
+ declare const GITHUB_BASE: "https://github.com/zamdevio/i18nprune";
504
+ declare const GITHUB_DOCS_BASE: "https://github.com/zamdevio/i18nprune/blob/main/docs";
505
+ declare const GITHUB_DOCS_TREE_BASE: "https://github.com/zamdevio/i18nprune/tree/main/docs";
506
+ /**
507
+ * Public docs site origin (no trailing path). Aligned with {@link DOCS_SITE_BASE} in `links.ts`
508
+ * (single source; kept for name clarity in link builders).
509
+ */
510
+ declare const DOCS_SITE_ORIGIN: typeof DOCS_SITE_BASE;
511
+ /**
512
+ * Path segment (leading slash) for the on-site **`issues[]`** reference (index + topic pages),
513
+ * relative to {@link DOCS_SITE_BASE} (VitePress: `docs/issues/README.md` and `docs/issues/*.md`).
514
+ */
515
+ declare const DOCS_ISSUES_PAGE_PATH: "/issues";
516
+
517
+ /** Attach `docHref` for machine codes under `i18nprune.*` (idempotent). Normalizes **`docPath`** with {@link normalizeRepoDocPath}. */
518
+ declare function enrichIssuesWithDocHrefs(issues: Issue[]): Issue[];
519
+
520
+ declare const index$2_DOCS_SITE_ORIGIN: typeof DOCS_SITE_ORIGIN;
521
+ type index$2_IssueCodeDocLinkParts = IssueCodeDocLinkParts;
522
+ declare const index$2_buildCliJsonEnvelope: typeof buildCliJsonEnvelope;
523
+ declare const index$2_enrichIssuesWithDocHrefs: typeof enrichIssuesWithDocHrefs;
524
+ declare const index$2_issueCodeDocHref: typeof issueCodeDocHref;
525
+ declare const index$2_normalizeRepoDocPath: typeof normalizeRepoDocPath;
526
+ declare const index$2_resolveIssueCodeDocLink: typeof resolveIssueCodeDocLink;
527
+ declare const index$2_stringifyCliCommandJson: typeof stringifyCliCommandJson;
528
+ declare const index$2_stringifyEnvelope: typeof stringifyEnvelope;
529
+ declare namespace index$2 {
530
+ export { index$2_DOCS_SITE_ORIGIN as DOCS_SITE_ORIGIN, type index$2_IssueCodeDocLinkParts as IssueCodeDocLinkParts, index$2_buildCliJsonEnvelope as buildCliJsonEnvelope, index$2_enrichIssuesWithDocHrefs as enrichIssuesWithDocHrefs, index$2_issueCodeDocHref as issueCodeDocHref, index$2_normalizeRepoDocPath as normalizeRepoDocPath, index$2_resolveIssueCodeDocLink as resolveIssueCodeDocLink, index$2_stringifyCliCommandJson as stringifyCliCommandJson, index$2_stringifyEnvelope as stringifyEnvelope };
531
+ }
532
+
533
+ /**
534
+ * Browser-safe catalog barrel.
535
+ * Node-only generation/bootstrap helpers are intentionally excluded from this file.
536
+ */
537
+ declare const generatedLanguageCatalog: TranslateTargetLanguage[];
538
+ declare function buildLanguageCatalog(raw: readonly TranslateTargetLanguage[]): readonly TranslateTargetLanguage[];
539
+ /** Case-insensitive substring match on code, English, or native name. */
540
+ declare function filterLanguageCatalog(catalog: readonly TranslateTargetLanguage[], filter: string | undefined): TranslateTargetLanguage[];
541
+ declare function getLanguageByCodeFromCatalog(catalog: readonly TranslateTargetLanguage[], code: string): TranslateTargetLanguage | undefined;
542
+ /**
543
+ * Suggest catalog codes for an unknown input: substring match, then
544
+ * codes sharing the first two characters, then alphabetical fill.
545
+ */
546
+ declare function suggestCatalogCodesForInvalidInputFromCatalog(catalog: readonly TranslateTargetLanguage[], code: string, maxCodesInCatalogHint?: number): string[];
547
+
548
+ declare const index$1_buildLanguageCatalog: typeof buildLanguageCatalog;
549
+ declare const index$1_filterLanguageCatalog: typeof filterLanguageCatalog;
550
+ declare const index$1_generatedLanguageCatalog: typeof generatedLanguageCatalog;
551
+ declare const index$1_getLanguageByCodeFromCatalog: typeof getLanguageByCodeFromCatalog;
552
+ declare const index$1_suggestCatalogCodesForInvalidInputFromCatalog: typeof suggestCatalogCodesForInvalidInputFromCatalog;
553
+ declare namespace index$1 {
554
+ export { index$1_buildLanguageCatalog as buildLanguageCatalog, index$1_filterLanguageCatalog as filterLanguageCatalog, index$1_generatedLanguageCatalog as generatedLanguageCatalog, index$1_getLanguageByCodeFromCatalog as getLanguageByCodeFromCatalog, index$1_suggestCatalogCodesForInvalidInputFromCatalog as suggestCatalogCodesForInvalidInputFromCatalog };
555
+ }
556
+
557
+ /** Config filename base without extension (`i18nprune.config`). */
558
+ declare const I18NPRUNE_CONFIG_BASENAME: "i18nprune.config";
559
+ /** TS/JS config basenames (init / CLI discovery — no `.json`). */
560
+ declare const I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES: readonly ["i18nprune.config.ts", "i18nprune.config.mts", "i18nprune.config.cts", "i18nprune.config.js", "i18nprune.config.mjs", "i18nprune.config.cjs"];
561
+ declare const I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES_SET: Set<string>;
562
+ /** JSON-only config basename (parsed without a TS loader). */
563
+ declare const I18NPRUNE_CONFIG_JSON_FILE_NAME: "i18nprune.config.json";
564
+ /** Config basenames collected in share snapshots and zip parse (scripts + JSON). */
565
+ declare const I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES: readonly ["i18nprune.config.ts", "i18nprune.config.mts", "i18nprune.config.cts", "i18nprune.config.js", "i18nprune.config.mjs", "i18nprune.config.cjs", "i18nprune.config.json"];
566
+ declare const I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES_SET: Set<string>;
567
+
568
+ /** Default max rows for bounded human / JSON list output when `--top` is omitted. */
569
+ declare const DEFAULT_LIST_TOP = 3;
570
+ /** Suffix for truncated CLI / human list output (global `--top` / `--full`). */
571
+ declare const LIST_MORE_HINT = "(use --full or --top <n>)";
572
+ /** `… 6 more (use --full or --top <n>)` */
573
+ declare function formatListOmittedSuffix(omitted: number): string;
574
+ /** `· 3 locales shown + … 2 more (use --full or --top <n>)` */
575
+ declare function formatListShownOmitted(prefix: string, omitted: number): string;
576
+
577
+ /** npm package name for the i18nprune SDK (`packages/core`). */
578
+ declare const SDK_PACKAGE_NAME: "@i18nprune/core";
579
+ /** Semantic version of the SDK. Keep in sync with `packages/core/package.json`. */
580
+ declare const SDK_VERSION: "0.1.0";
581
+
582
+ /** Envelope version stamped into every on-disk cache JSON file. */
583
+ declare const CACHE_SCHEMA_VERSION: 1;
584
+ /** Default `cache.profile` when omitted (balanced). */
585
+ declare const DEFAULT_CACHE_PROFILE_ID: CacheProfileId;
586
+ /** Locked profile bundles — keep in sync with docs/cli/cache.md. */
587
+ declare const CACHE_PROFILE_DEFAULTS: Record<CacheProfileId, CacheProfileDefaults>;
588
+ /** On-disk project scan cache (`analysis.json`). */
589
+ declare const ANALYSIS_BASENAME = "analysis.json";
590
+ /** Per-target translation cache directory (`translations/<code>.json`). */
591
+ declare const TRANSLATIONS_DIR = "translations";
592
+ /** Size guard for the global `meta.json` projects index. */
593
+ declare const MAX_PROJECTS_INDEX_BYTES: number;
594
+ /** Size guard for a project's `files.json` file-record map. */
595
+ declare const MAX_PROJECT_FILES_BYTES: number;
596
+ /** Size guard for a project's `analysis.json` run envelope. */
597
+ declare const MAX_ANALYSIS_BYTES: number;
598
+ /** Size guard for a project's per-locale `translations/<code>.json` file. */
599
+ declare const MAX_TRANSLATIONS_CACHE_BYTES: number;
600
+ /** How many runs between automatic self-heal sweeps of the meta index. */
601
+ declare const DEFAULT_HEAL_EVERY_RUNS = 20;
602
+
603
+ /**
604
+ * Stable issue code identifiers shared across CLI and other hosts.
605
+ * @see docs/issues/README.md
606
+ */
607
+ /** Discovery produced warnings (non-fatal); surfaced in `issues[]` for automation. */
608
+ declare const ISSUE_CONTEXT_DISCOVERY_WARNING: "i18nprune.context.discovery_warning";
609
+ /** Workspace context could not be resolved (fatal for the current command). */
610
+ declare const ISSUE_CONTEXT_RESOLUTION_FAILED: "i18nprune.context.resolution_failed";
611
+ /** Validate: literal keys present in source but missing from the source locale JSON. */
612
+ declare const ISSUE_VALIDATE_MISSING_LITERAL_KEYS: "i18nprune.validate.missing_literal_keys";
613
+ /** Validate: non-literal translation key sites (dynamic keys) detected in the scan. */
614
+ declare const ISSUE_VALIDATE_DYNAMIC_KEY_SITES: "i18nprune.validate.dynamic_key_sites";
615
+ /** Validate: configured source locale file could not be read or parsed as expected. */
616
+ declare const ISSUE_VALIDATE_SOURCE_LOCALE_READ_FAILED: "i18nprune.validate.source_locale_unreadable";
617
+ /** Shared workspace preflight: no `i18nprune.config.*` on disk — merged config is defaults + env/discovery/CLI only. */
618
+ declare const ISSUE_PROJECT_CONFIG_FILE_MISSING: "i18nprune.project.config_file_missing";
619
+ /** Shared workspace preflight: source locale path missing, wrong type, unreadable, or not a JSON object when required. */
620
+ declare const ISSUE_PROJECT_SOURCE_LOCALE_UNAVAILABLE: "i18nprune.project.source_locale_unavailable";
621
+ /** Shared workspace preflight: locales directory missing or not usable. */
622
+ declare const ISSUE_PROJECT_LOCALES_DIR_UNAVAILABLE: "i18nprune.project.locales_dir_unavailable";
623
+ /** Shared workspace preflight: configured `src` root missing or not a directory. */
624
+ declare const ISSUE_PROJECT_SRC_ROOT_UNAVAILABLE: "i18nprune.project.src_root_unavailable";
625
+ /** `locales.mode` is `locale_directory` but `locales.structure` is missing (required — no implicit guess). */
626
+ declare const ISSUE_PROJECT_LOCALES_STRUCTURE_REQUIRED: "i18nprune.project.locales_structure_required";
627
+ /** `locales.source` is a file path or `*.json` basename — must be a language code (e.g. en). */
628
+ declare const ISSUE_PROJECT_LOCALES_SOURCE_NOT_LANGUAGE_CODE: "i18nprune.project.locales_source_not_language_code";
629
+ /** `locales.source` is a valid catalog code but no locale segments exist for it under `locales.directory`. */
630
+ declare const ISSUE_PROJECT_LOCALES_SOURCE_NOT_IN_BUNDLE: "i18nprune.project.locales_source_not_in_bundle";
631
+ /** Source locale code exists but is missing JSON segment slot(s) other locales have (`locale_per_dir` / `feature_bundle`). */
632
+ declare const ISSUE_PROJECT_SOURCE_LOCALE_MISSING_SEGMENTS: "i18nprune.project.source_locale_missing_segments";
633
+ /** Scan / report pipeline: dynamic (non-literal) key sites counted for reporting. */
634
+ declare const ISSUE_SCAN_DYNAMIC_KEY_SITES: "i18nprune.scan.dynamic_key_sites";
635
+ /** Missing op: requested paths are not covered by the current scan surface. */
636
+ declare const ISSUE_MISSING_PATHS_NOT_IN_SCAN: "i18nprune.missing.paths_not_in_current_scan";
637
+ /** Sync: expected locale JSON file not found on disk. */
638
+ declare const ISSUE_SYNC_LOCALE_FILE_NOT_FOUND: "i18nprune.sync.locale_file_not_found";
639
+ /** Sync: incompatible combination of `--metadata` / `--strip-metadata` (or related flags). */
640
+ declare const ISSUE_SYNC_METADATA_FLAG_CONFLICT: "i18nprune.sync.metadata_flag_conflict";
641
+ /** Locale read: source JSON contains placeholder-only leaves where real copy is expected. */
642
+ declare const ISSUE_LOCALE_SOURCE_PLACEHOLDER_LEAVES: "i18nprune.locale.source_placeholder_leaves";
643
+ /** Locale read: target JSON still has placeholder leaves (e.g. untranslated stubs). */
644
+ declare const ISSUE_LOCALE_TARGET_PLACEHOLDER_LEAVES: "i18nprune.locale.target_placeholder_leaves";
645
+ /** Cleanup: paths skipped because classification was uncertain (safety). */
646
+ declare const ISSUE_CLEANUP_UNCERTAIN_PATHS_EXCLUDED: "i18nprune.cleanup.uncertain_paths_excluded";
647
+ /** Cleanup: ripgrep (`rg`) not available where required for the cleanup strategy. */
648
+ declare const ISSUE_CLEANUP_RIPGREP_UNAVAILABLE: "i18nprune.cleanup.ripgrep_unavailable";
649
+ /** Quality: English source and target literal strings are identical (possible copy drift). */
650
+ declare const ISSUE_QUALITY_ENGLISH_IDENTICAL_LEAVES: "i18nprune.quality.english_identical_leaves";
651
+ /** Languages list: filter produced an empty result set. */
652
+ declare const ISSUE_LANGUAGES_EMPTY_FILTER: "i18nprune.languages.empty_filter";
653
+ /** Languages: requested code is not in the supported catalog / normalization failed. */
654
+ declare const ISSUE_LANGUAGES_UNSUPPORTED_LANGUAGE_CODE: "i18nprune.languages.unsupported_language_code";
655
+ /** Config: expected config file path has no file. */
656
+ declare const ISSUE_CONFIG_MISSING: "i18nprune.config.missing";
657
+ /** Config: file exists but failed schema or semantic validation. */
658
+ declare const ISSUE_CONFIG_INVALID: "i18nprune.config.invalid";
659
+ /** Config: IO or parse failure while loading config. */
660
+ declare const ISSUE_CONFIG_LOAD_FAILED: "i18nprune.config.load_failed";
661
+ /** Locales command usage / invocation error. */
662
+ declare const ISSUE_LOCALES_USAGE: "i18nprune.locales.usage";
663
+ /** Locales: requested target locale tag has no backing files. */
664
+ declare const ISSUE_LOCALE_TARGET_NOT_FOUND: "i18nprune.locale.target_not_found";
665
+ /** Filesystem read failed for a path the engine needed. */
666
+ declare const ISSUE_IO_READ_FAILED: "i18nprune.io.read_failed";
667
+ /** Translate: repeated identity / echo-like translations exceeded warning threshold. */
668
+ declare const ISSUE_TRANSLATE_IDENTITY_STREAK_WARNING: "i18nprune.translate.identity_streak_warning";
669
+ /** Translate: identity streak exceeded abort threshold; run stopped. */
670
+ declare const ISSUE_TRANSLATE_IDENTITY_STREAK_ABORT: "i18nprune.translate.identity_streak_abort";
671
+ /** Translate: provider id from config/env is unknown to the engine. */
672
+ declare const ISSUE_TRANSLATE_UNKNOWN_TRANSLATION_PROVIDER: "i18nprune.translate.unknown_translation_provider";
673
+ /** Translate: provider is recognized but not implemented in this build. */
674
+ declare const ISSUE_TRANSLATE_PROVIDER_NOT_IMPLEMENTED_YET: "i18nprune.translate.provider_not_implemented_yet";
675
+ /** Translate: required API key or credential missing for the selected provider. */
676
+ declare const ISSUE_TRANSLATE_MISSING_CREDENTIALS: "i18nprune.translate.missing_credentials";
677
+ /** Translate: defaults were applied because config omitted provider details (informational). */
678
+ declare const ISSUE_TRANSLATE_CONFIG_DEFAULT_APPLIED: "i18nprune.translate.config_default_applied";
679
+ /** Translate: handoff mode had no eligible provider after filtering. */
680
+ declare const ISSUE_TRANSLATE_HANDOFF_NO_ELIGIBLE_PROVIDER: "i18nprune.translate.handoff_no_eligible_provider";
681
+ /** Generate: CLI usage / flags invalid for this invocation. */
682
+ declare const ISSUE_GENERATE_USAGE: "i18nprune.generate.usage";
683
+ /** Generate: source locale contains empty string leaves where values are required. */
684
+ declare const ISSUE_GENERATE_SOURCE_EMPTY_STRING_LEAVES: "i18nprune.generate.source_empty_string_leaves";
685
+ /** Generate: translation backend rate-limited (HTTP 429, etc.). */
686
+ declare const ISSUE_GENERATE_TRANSLATE_RATE_LIMITED: "i18nprune.generate.translate_rate_limited";
687
+ /** Generate: translation network / transport failure. */
688
+ declare const ISSUE_GENERATE_TRANSLATE_NETWORK_ERROR: "i18nprune.generate.translate_network_error";
689
+ /** Report: output format or embedded payload does not match the project report contract. */
690
+ declare const ISSUE_REPORT_INVALID_FORMAT: "i18nprune.report.invalid_format";
691
+ /** CLI: `--json` pretty-print requested in a context where it is not supported. */
692
+ declare const ISSUE_CLI_INVALID_JSON_PRETTY: "i18nprune.cli.invalid_json_pretty";
693
+ /** `share.json` was invalid or manually edited — core repaired it automatically. */
694
+ declare const ISSUE_SHARE_JSON_REPAIRED: "i18nprune.share.json_repaired";
695
+ /** `share delete` / `--project` / `--report`: no matching row in local `share.json` (worker DELETE may still run). */
696
+ declare const ISSUE_SHARE_CACHE_ENTRY_NOT_FOUND: "i18nprune.share.cache_entry_not_found";
697
+ /** Stale `share.json` row removed after worker 404 during upload skip probe (fresh upload follows). */
698
+ declare const ISSUE_SHARE_STALE_CACHE_ROW_REMOVED: "i18nprune.share.stale_cache_row_removed";
699
+ /** No rows in local `share.json` (view/delete/list without `--project` / `--report` / `--all`). */
700
+ declare const ISSUE_SHARE_CACHE_EMPTY: "i18nprune.share.cache_empty";
701
+ /** Failed to persist repaired or updated `share.json`. */
702
+ declare const ISSUE_SHARE_JSON_WRITE_FAILED: "i18nprune.share.json_write_failed";
703
+ /** Worker returned 404 for a project id (unknown or evicted after idle TTL). */
704
+ declare const ISSUE_SHARE_REMOTE_PROJECT_NOT_FOUND: "i18nprune.share.remote_project_not_found";
705
+ /** Worker returned 404 for a report id (unknown or evicted). */
706
+ declare const ISSUE_SHARE_REMOTE_REPORT_NOT_FOUND: "i18nprune.share.remote_report_not_found";
707
+ /** Prepared zip or upload exceeded worker limits. */
708
+ declare const ISSUE_SHARE_REMOTE_PAYLOAD_TOO_LARGE: "i18nprune.share.remote_payload_too_large";
709
+ /** Report JSON rejected by worker (size or schema). */
710
+ declare const ISSUE_SHARE_REMOTE_REPORT_REJECTED: "i18nprune.share.remote_report_rejected";
711
+ /** Other worker upload / processing rejection. */
712
+ declare const ISSUE_SHARE_REMOTE_UPLOAD_REJECTED: "i18nprune.share.remote_upload_rejected";
713
+ /** Worker unavailable (5xx, network, timeout). */
714
+ declare const ISSUE_SHARE_REMOTE_UNAVAILABLE: "i18nprune.share.remote_unavailable";
715
+ /** Unmapped worker / HTTP error. */
716
+ declare const ISSUE_SHARE_REMOTE_ERROR: "i18nprune.share.remote_error";
717
+ /** Prepared project snapshot had no eligible files after excludes (empty zip). */
718
+ declare const ISSUE_SHARE_SNAPSHOT_EMPTY: "i18nprune.share.snapshot_empty";
719
+ /** Local zip build failed (e.g. `fflate` error). */
720
+ declare const ISSUE_SHARE_ZIP_FAILED: "i18nprune.share.zip_failed";
721
+ /** Patching: config payload size looks anomalous vs expectations. */
722
+ declare const ISSUE_PATCHING_CONFIG_SIZE_ANOMALY: "i18nprune.patching.config_size_anomaly";
723
+ /** Patching: config payload exceeds hard size cap. */
724
+ declare const ISSUE_PATCHING_CONFIG_TOO_LARGE: "i18nprune.patching.config_too_large";
725
+ /** Patching: config JSON does not match the patching config schema. */
726
+ declare const ISSUE_PATCHING_CONFIG_INVALID_SCHEMA: "i18nprune.patching.config_invalid_schema";
727
+ /** Patching: config JSON exists but failed to parse. */
728
+ declare const ISSUE_PATCHING_CONFIG_PARSE_FAILED: "i18nprune.patching.config_parse_failed";
729
+ /** Patching: config references a locale file path that does not exist. */
730
+ declare const ISSUE_PATCHING_CONFIG_LOCALE_MISSING_FILE: "i18nprune.patching.config_locale_missing_file";
731
+ /** Patching: locale file on disk is not covered by patching config (orphan / mismatch). */
732
+ declare const ISSUE_PATCHING_FILE_LOCALE_MISSING_CONFIG: "i18nprune.patching.file_locale_missing_config";
733
+ /** Patching: language catalog English name does not match config/catalog expectation. */
734
+ declare const ISSUE_PATCHING_CATALOG_MISMATCH_ENGLISH: "i18nprune.patching.catalog_mismatch_english_name";
735
+ /** Patching: language catalog native name does not match config/catalog expectation. */
736
+ declare const ISSUE_PATCHING_CATALOG_MISMATCH_NATIVE: "i18nprune.patching.catalog_mismatch_native_name";
737
+ /** Patching: language catalog text direction does not match config/catalog expectation. */
738
+ declare const ISSUE_PATCHING_CATALOG_MISMATCH_DIRECTION: "i18nprune.patching.catalog_mismatch_direction";
739
+ /** Patching: `patching` config section present but incomplete (missing required fields). */
740
+ declare const ISSUE_PATCHING_CONFIG_SECTION_INCOMPLETE: "i18nprune.patching.config_section_incomplete";
741
+ /** Doctor: Node.js version is below the supported minimum for this toolchain. */
742
+ declare const ISSUE_DOCTOR_RUNTIME_UNSUPPORTED_NODE: "i18nprune.doctor.runtime_unsupported_node";
743
+ /** Doctor: `rg` (ripgrep) not found on `PATH` when expected. */
744
+ declare const ISSUE_DOCTOR_TOOLS_RG_NOT_ON_PATH: "i18nprune.doctor.tools_rg_not_on_path";
745
+ /** Doctor: configured i18nprune config file path is missing. */
746
+ declare const ISSUE_DOCTOR_CONFIG_MISSING_FILE: "i18nprune.doctor.config_missing_file";
747
+ /** Doctor: source locale file missing or unreadable at resolved path. */
748
+ declare const ISSUE_DOCTOR_PATHS_SOURCE_LOCALE_MISSING: "i18nprune.doctor.paths_source_locale_missing";
749
+ /** Doctor: required project directories (e.g. `src`, locales root) missing. */
750
+ declare const ISSUE_DOCTOR_PATHS_DIRECTORIES_MISSING: "i18nprune.doctor.paths_directories_missing";
751
+ /** Locale or project path segment uses a Windows reserved device name (CON, NUL, COM1, …). */
752
+ declare const ISSUE_PATHS_WINDOWS_RESERVED_NAME: "i18nprune.paths.windows_reserved_name";
753
+ /** Absolute path may exceed legacy Win32 `MAX_PATH` without extended-length prefix. */
754
+ declare const ISSUE_PATHS_WINDOWS_LONG_PATH: "i18nprune.paths.windows_long_path";
755
+ /** Project root or locale tree is on a UNC network share. */
756
+ declare const ISSUE_PATHS_NETWORK_DRIVE: "i18nprune.paths.network_drive";
757
+ /** Hosted `POST /v1/projects` JSON ingest body failed validation. */
758
+ declare const ISSUE_PROJECT_HOSTED_SNAPSHOT_INVALID: "i18nprune.project.hosted_snapshot_invalid";
759
+ /** Hosted project ingest `schemaVersion` mismatch. */
760
+ declare const ISSUE_PROJECT_HOSTED_SNAPSHOT_SCHEMA_VERSION: "i18nprune.project.hosted_snapshot_schema_version";
761
+ /** Archive prepare: invalid `configJson` override on upload. */
762
+ declare const ISSUE_PROJECT_UPLOAD_CONFIG_JSON_INVALID: "i18nprune.project.upload_config_json_invalid";
763
+ /** Archive prepare: normalized config missing required fields. */
764
+ declare const ISSUE_PROJECT_UPLOAD_CONFIG_REQUIRED: "i18nprune.project.upload_config_required";
765
+ /** Archive prepare: source locale file missing from zip / snapshot paths. */
766
+ declare const ISSUE_PROJECT_SOURCE_LOCALE_NOT_FOUND: "i18nprune.project.source_locale_not_found";
767
+ /** Archive prepare: source locale file is not valid JSON. */
768
+ declare const ISSUE_PROJECT_SOURCE_LOCALE_INVALID_JSON: "i18nprune.project.source_locale_invalid_json";
769
+ /** Archive prepare: source locale JSON root is not an object. */
770
+ declare const ISSUE_PROJECT_SOURCE_LOCALE_INVALID_SHAPE: "i18nprune.project.source_locale_invalid_shape";
771
+ /** Hosted `POST /v1/reports` JSON ingest body failed validation. */
772
+ declare const ISSUE_REPORT_HOSTED_REPORT_INVALID: "i18nprune.report.hosted_report_invalid";
773
+ /** Combined share prepare: neither project nor report requested. */
774
+ declare const ISSUE_SHARE_PREPARE_NOTHING_REQUESTED: "i18nprune.share.prepare_nothing_requested";
775
+ /** Combined share prepare: `reportHost` required when preparing a report. */
776
+ declare const ISSUE_SHARE_PREPARE_REPORT_HOST_REQUIRED: "i18nprune.share.prepare_report_host_required";
777
+ /** Share prepare: failed applying cached analysis to project snapshot. */
778
+ declare const ISSUE_SHARE_PREPARE_ANALYSIS_FAILED: "i18nprune.share.prepare_analysis_failed";
779
+ /** Report prepare from project zip archive failed after snapshot extraction. */
780
+ declare const ISSUE_SHARE_PREPARE_REPORT_FROM_ARCHIVE_FAILED: "i18nprune.share.prepare_report_from_archive_failed";
781
+
782
+ /**
783
+ * Version of the structured JSON envelope contract (`ok`, `kind`, `data`, `issues`, `meta`).
784
+ * Bump when envelope semantics change (independent of npm package version).
785
+ */
786
+ declare const RESULT_API_VERSION = "1";
787
+
788
+ /** On-disk share cache filename beside `files.json` / `analysis.json`. */
789
+ declare const SHARE_JSON_BASENAME: "share.json";
790
+ /** Subdirectory under the project cache dir for raw `share.json` backups (keeps the cache root tidy). */
791
+ declare const SHARE_BAK_DIRNAME: "share.bak";
792
+ /** Default max UTF-8 bytes for `share.json` reads (entries are small). */
793
+ declare const DEFAULT_MAX_SHARE_JSON_BYTES: number;
794
+ /** Max UTF-8 bytes for a stored shared report document (`POST /v1/reports`). */
795
+ declare const REPORT_SHARE_MAX_BYTES: number;
796
+ /**
797
+ * Max UTF-8 bytes for hosted **project** prepared JSON (`POST /v1/projects`).
798
+ * Same cap as zip upload (`PROJECT_UPLOAD_ZIP_LIMITS.maxZipBytes`) — **not** the report limit.
799
+ */
800
+ declare const PROJECT_SHARE_PREPARED_MAX_BYTES: number;
801
+ type ShareCacheReasonCode = CacheDispatchReason | 'archive_ingest_no_project_cache';
802
+ /** Human-facing copy for known cache analysis reasons in share CLI/view output. */
803
+ declare const SHARE_CACHE_REASON_MESSAGES: Partial<Record<ShareCacheReasonCode, string>>;
804
+
805
+ /** Worker ingest query key for dedup override on upload/archive routes. */
806
+ declare const WORKER_INGEST_FORCE_QUERY: "force";
807
+ /** Idle-retention TTL for hosted worker metadata rows (7 days). */
808
+ declare const WORKER_IDLE_RETENTION_MS: number;
809
+
810
+ declare const index_ANALYSIS_BASENAME: typeof ANALYSIS_BASENAME;
811
+ declare const index_CACHE_PROFILE_DEFAULTS: typeof CACHE_PROFILE_DEFAULTS;
812
+ declare const index_CACHE_SCHEMA_VERSION: typeof CACHE_SCHEMA_VERSION;
813
+ declare const index_DEFAULT_CACHE_PROFILE_ID: typeof DEFAULT_CACHE_PROFILE_ID;
814
+ declare const index_DEFAULT_HEAL_EVERY_RUNS: typeof DEFAULT_HEAL_EVERY_RUNS;
815
+ declare const index_DEFAULT_LIST_TOP: typeof DEFAULT_LIST_TOP;
816
+ declare const index_DEFAULT_MAX_SHARE_JSON_BYTES: typeof DEFAULT_MAX_SHARE_JSON_BYTES;
817
+ declare const index_DEFAULT_MISSING_LEAF_PLACEHOLDER: typeof DEFAULT_MISSING_LEAF_PLACEHOLDER;
818
+ declare const index_DEFAULT_WORKER_API_URL: typeof DEFAULT_WORKER_API_URL;
819
+ declare const index_DEMO_REPORT_URL: typeof DEMO_REPORT_URL;
820
+ declare const index_DEMO_WEB_APP_BASE: typeof DEMO_WEB_APP_BASE;
821
+ declare const index_DOCS_ISSUES_PAGE_PATH: typeof DOCS_ISSUES_PAGE_PATH;
822
+ declare const index_DOCS_SITE_BASE: typeof DOCS_SITE_BASE;
823
+ declare const index_DOCS_SITE_ORIGIN: typeof DOCS_SITE_ORIGIN;
824
+ declare const index_ENV_TRANSLATE_DEEPL_API_KEY: typeof ENV_TRANSLATE_DEEPL_API_KEY;
825
+ declare const index_ENV_TRANSLATE_LIBRE_URL: typeof ENV_TRANSLATE_LIBRE_URL;
826
+ declare const index_ENV_TRANSLATE_LLM_API_KEY: typeof ENV_TRANSLATE_LLM_API_KEY;
827
+ declare const index_ENV_TRANSLATE_LLM_BASE_URL: typeof ENV_TRANSLATE_LLM_BASE_URL;
828
+ declare const index_ENV_TRANSLATE_LLM_MODEL: typeof ENV_TRANSLATE_LLM_MODEL;
829
+ declare const index_ENV_TRANSLATE_MAX_WORKERS: typeof ENV_TRANSLATE_MAX_WORKERS;
830
+ declare const index_ENV_TRANSLATE_PROVIDER: typeof ENV_TRANSLATE_PROVIDER;
831
+ declare const index_GITHUB_BASE: typeof GITHUB_BASE;
832
+ declare const index_GITHUB_DOCS_BASE: typeof GITHUB_DOCS_BASE;
833
+ declare const index_GITHUB_DOCS_TREE_BASE: typeof GITHUB_DOCS_TREE_BASE;
834
+ declare const index_GITHUB_OWNER: typeof GITHUB_OWNER;
835
+ declare const index_GITHUB_REPO: typeof GITHUB_REPO;
836
+ declare const index_GITHUB_REPO_URL: typeof GITHUB_REPO_URL;
837
+ declare const index_HOSTED_PROJECT_SNAPSHOT_SCHEMA_VERSION: typeof HOSTED_PROJECT_SNAPSHOT_SCHEMA_VERSION;
838
+ declare const index_I18NPRUNE_CONFIG_BASENAME: typeof I18NPRUNE_CONFIG_BASENAME;
839
+ declare const index_I18NPRUNE_CONFIG_JSON_FILE_NAME: typeof I18NPRUNE_CONFIG_JSON_FILE_NAME;
840
+ declare const index_I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES: typeof I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES;
841
+ declare const index_I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES_SET: typeof I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES_SET;
842
+ declare const index_I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES: typeof I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES;
843
+ declare const index_I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES_SET: typeof I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES_SET;
844
+ declare const index_ISSUE_CLEANUP_RIPGREP_UNAVAILABLE: typeof ISSUE_CLEANUP_RIPGREP_UNAVAILABLE;
845
+ declare const index_ISSUE_CLEANUP_UNCERTAIN_PATHS_EXCLUDED: typeof ISSUE_CLEANUP_UNCERTAIN_PATHS_EXCLUDED;
846
+ declare const index_ISSUE_CLI_INVALID_JSON_PRETTY: typeof ISSUE_CLI_INVALID_JSON_PRETTY;
847
+ declare const index_ISSUE_CONFIG_INVALID: typeof ISSUE_CONFIG_INVALID;
848
+ declare const index_ISSUE_CONFIG_LOAD_FAILED: typeof ISSUE_CONFIG_LOAD_FAILED;
849
+ declare const index_ISSUE_CONFIG_MISSING: typeof ISSUE_CONFIG_MISSING;
850
+ declare const index_ISSUE_CONTEXT_DISCOVERY_WARNING: typeof ISSUE_CONTEXT_DISCOVERY_WARNING;
851
+ declare const index_ISSUE_CONTEXT_RESOLUTION_FAILED: typeof ISSUE_CONTEXT_RESOLUTION_FAILED;
852
+ declare const index_ISSUE_DOCTOR_CONFIG_MISSING_FILE: typeof ISSUE_DOCTOR_CONFIG_MISSING_FILE;
853
+ declare const index_ISSUE_DOCTOR_PATHS_DIRECTORIES_MISSING: typeof ISSUE_DOCTOR_PATHS_DIRECTORIES_MISSING;
854
+ declare const index_ISSUE_DOCTOR_PATHS_SOURCE_LOCALE_MISSING: typeof ISSUE_DOCTOR_PATHS_SOURCE_LOCALE_MISSING;
855
+ declare const index_ISSUE_DOCTOR_RUNTIME_UNSUPPORTED_NODE: typeof ISSUE_DOCTOR_RUNTIME_UNSUPPORTED_NODE;
856
+ declare const index_ISSUE_DOCTOR_TOOLS_RG_NOT_ON_PATH: typeof ISSUE_DOCTOR_TOOLS_RG_NOT_ON_PATH;
857
+ declare const index_ISSUE_GENERATE_SOURCE_EMPTY_STRING_LEAVES: typeof ISSUE_GENERATE_SOURCE_EMPTY_STRING_LEAVES;
858
+ declare const index_ISSUE_GENERATE_TRANSLATE_NETWORK_ERROR: typeof ISSUE_GENERATE_TRANSLATE_NETWORK_ERROR;
859
+ declare const index_ISSUE_GENERATE_TRANSLATE_RATE_LIMITED: typeof ISSUE_GENERATE_TRANSLATE_RATE_LIMITED;
860
+ declare const index_ISSUE_GENERATE_USAGE: typeof ISSUE_GENERATE_USAGE;
861
+ declare const index_ISSUE_IO_READ_FAILED: typeof ISSUE_IO_READ_FAILED;
862
+ declare const index_ISSUE_LANGUAGES_EMPTY_FILTER: typeof ISSUE_LANGUAGES_EMPTY_FILTER;
863
+ declare const index_ISSUE_LANGUAGES_UNSUPPORTED_LANGUAGE_CODE: typeof ISSUE_LANGUAGES_UNSUPPORTED_LANGUAGE_CODE;
864
+ declare const index_ISSUE_LOCALES_USAGE: typeof ISSUE_LOCALES_USAGE;
865
+ declare const index_ISSUE_LOCALE_SOURCE_PLACEHOLDER_LEAVES: typeof ISSUE_LOCALE_SOURCE_PLACEHOLDER_LEAVES;
866
+ declare const index_ISSUE_LOCALE_TARGET_NOT_FOUND: typeof ISSUE_LOCALE_TARGET_NOT_FOUND;
867
+ declare const index_ISSUE_LOCALE_TARGET_PLACEHOLDER_LEAVES: typeof ISSUE_LOCALE_TARGET_PLACEHOLDER_LEAVES;
868
+ declare const index_ISSUE_MISSING_PATHS_NOT_IN_SCAN: typeof ISSUE_MISSING_PATHS_NOT_IN_SCAN;
869
+ declare const index_ISSUE_PATCHING_CATALOG_MISMATCH_DIRECTION: typeof ISSUE_PATCHING_CATALOG_MISMATCH_DIRECTION;
870
+ declare const index_ISSUE_PATCHING_CATALOG_MISMATCH_ENGLISH: typeof ISSUE_PATCHING_CATALOG_MISMATCH_ENGLISH;
871
+ declare const index_ISSUE_PATCHING_CATALOG_MISMATCH_NATIVE: typeof ISSUE_PATCHING_CATALOG_MISMATCH_NATIVE;
872
+ declare const index_ISSUE_PATCHING_CONFIG_INVALID_SCHEMA: typeof ISSUE_PATCHING_CONFIG_INVALID_SCHEMA;
873
+ declare const index_ISSUE_PATCHING_CONFIG_LOCALE_MISSING_FILE: typeof ISSUE_PATCHING_CONFIG_LOCALE_MISSING_FILE;
874
+ declare const index_ISSUE_PATCHING_CONFIG_PARSE_FAILED: typeof ISSUE_PATCHING_CONFIG_PARSE_FAILED;
875
+ declare const index_ISSUE_PATCHING_CONFIG_SECTION_INCOMPLETE: typeof ISSUE_PATCHING_CONFIG_SECTION_INCOMPLETE;
876
+ declare const index_ISSUE_PATCHING_CONFIG_SIZE_ANOMALY: typeof ISSUE_PATCHING_CONFIG_SIZE_ANOMALY;
877
+ declare const index_ISSUE_PATCHING_CONFIG_TOO_LARGE: typeof ISSUE_PATCHING_CONFIG_TOO_LARGE;
878
+ declare const index_ISSUE_PATCHING_FILE_LOCALE_MISSING_CONFIG: typeof ISSUE_PATCHING_FILE_LOCALE_MISSING_CONFIG;
879
+ declare const index_ISSUE_PATHS_NETWORK_DRIVE: typeof ISSUE_PATHS_NETWORK_DRIVE;
880
+ declare const index_ISSUE_PATHS_WINDOWS_LONG_PATH: typeof ISSUE_PATHS_WINDOWS_LONG_PATH;
881
+ declare const index_ISSUE_PATHS_WINDOWS_RESERVED_NAME: typeof ISSUE_PATHS_WINDOWS_RESERVED_NAME;
882
+ declare const index_ISSUE_PROJECT_CONFIG_FILE_MISSING: typeof ISSUE_PROJECT_CONFIG_FILE_MISSING;
883
+ declare const index_ISSUE_PROJECT_HOSTED_SNAPSHOT_INVALID: typeof ISSUE_PROJECT_HOSTED_SNAPSHOT_INVALID;
884
+ declare const index_ISSUE_PROJECT_HOSTED_SNAPSHOT_SCHEMA_VERSION: typeof ISSUE_PROJECT_HOSTED_SNAPSHOT_SCHEMA_VERSION;
885
+ declare const index_ISSUE_PROJECT_LOCALES_DIR_UNAVAILABLE: typeof ISSUE_PROJECT_LOCALES_DIR_UNAVAILABLE;
886
+ declare const index_ISSUE_PROJECT_LOCALES_SOURCE_NOT_IN_BUNDLE: typeof ISSUE_PROJECT_LOCALES_SOURCE_NOT_IN_BUNDLE;
887
+ declare const index_ISSUE_PROJECT_LOCALES_SOURCE_NOT_LANGUAGE_CODE: typeof ISSUE_PROJECT_LOCALES_SOURCE_NOT_LANGUAGE_CODE;
888
+ declare const index_ISSUE_PROJECT_LOCALES_STRUCTURE_REQUIRED: typeof ISSUE_PROJECT_LOCALES_STRUCTURE_REQUIRED;
889
+ declare const index_ISSUE_PROJECT_SOURCE_LOCALE_INVALID_JSON: typeof ISSUE_PROJECT_SOURCE_LOCALE_INVALID_JSON;
890
+ declare const index_ISSUE_PROJECT_SOURCE_LOCALE_INVALID_SHAPE: typeof ISSUE_PROJECT_SOURCE_LOCALE_INVALID_SHAPE;
891
+ declare const index_ISSUE_PROJECT_SOURCE_LOCALE_MISSING_SEGMENTS: typeof ISSUE_PROJECT_SOURCE_LOCALE_MISSING_SEGMENTS;
892
+ declare const index_ISSUE_PROJECT_SOURCE_LOCALE_NOT_FOUND: typeof ISSUE_PROJECT_SOURCE_LOCALE_NOT_FOUND;
893
+ declare const index_ISSUE_PROJECT_SOURCE_LOCALE_UNAVAILABLE: typeof ISSUE_PROJECT_SOURCE_LOCALE_UNAVAILABLE;
894
+ declare const index_ISSUE_PROJECT_SRC_ROOT_UNAVAILABLE: typeof ISSUE_PROJECT_SRC_ROOT_UNAVAILABLE;
895
+ declare const index_ISSUE_PROJECT_UPLOAD_CONFIG_JSON_INVALID: typeof ISSUE_PROJECT_UPLOAD_CONFIG_JSON_INVALID;
896
+ declare const index_ISSUE_PROJECT_UPLOAD_CONFIG_REQUIRED: typeof ISSUE_PROJECT_UPLOAD_CONFIG_REQUIRED;
897
+ declare const index_ISSUE_QUALITY_ENGLISH_IDENTICAL_LEAVES: typeof ISSUE_QUALITY_ENGLISH_IDENTICAL_LEAVES;
898
+ declare const index_ISSUE_REPORT_HOSTED_REPORT_INVALID: typeof ISSUE_REPORT_HOSTED_REPORT_INVALID;
899
+ declare const index_ISSUE_REPORT_INVALID_FORMAT: typeof ISSUE_REPORT_INVALID_FORMAT;
900
+ declare const index_ISSUE_SCAN_DYNAMIC_KEY_SITES: typeof ISSUE_SCAN_DYNAMIC_KEY_SITES;
901
+ declare const index_ISSUE_SHARE_CACHE_EMPTY: typeof ISSUE_SHARE_CACHE_EMPTY;
902
+ declare const index_ISSUE_SHARE_CACHE_ENTRY_NOT_FOUND: typeof ISSUE_SHARE_CACHE_ENTRY_NOT_FOUND;
903
+ declare const index_ISSUE_SHARE_JSON_REPAIRED: typeof ISSUE_SHARE_JSON_REPAIRED;
904
+ declare const index_ISSUE_SHARE_JSON_WRITE_FAILED: typeof ISSUE_SHARE_JSON_WRITE_FAILED;
905
+ declare const index_ISSUE_SHARE_PREPARE_ANALYSIS_FAILED: typeof ISSUE_SHARE_PREPARE_ANALYSIS_FAILED;
906
+ declare const index_ISSUE_SHARE_PREPARE_NOTHING_REQUESTED: typeof ISSUE_SHARE_PREPARE_NOTHING_REQUESTED;
907
+ declare const index_ISSUE_SHARE_PREPARE_REPORT_FROM_ARCHIVE_FAILED: typeof ISSUE_SHARE_PREPARE_REPORT_FROM_ARCHIVE_FAILED;
908
+ declare const index_ISSUE_SHARE_PREPARE_REPORT_HOST_REQUIRED: typeof ISSUE_SHARE_PREPARE_REPORT_HOST_REQUIRED;
909
+ declare const index_ISSUE_SHARE_REMOTE_ERROR: typeof ISSUE_SHARE_REMOTE_ERROR;
910
+ declare const index_ISSUE_SHARE_REMOTE_PAYLOAD_TOO_LARGE: typeof ISSUE_SHARE_REMOTE_PAYLOAD_TOO_LARGE;
911
+ declare const index_ISSUE_SHARE_REMOTE_PROJECT_NOT_FOUND: typeof ISSUE_SHARE_REMOTE_PROJECT_NOT_FOUND;
912
+ declare const index_ISSUE_SHARE_REMOTE_REPORT_NOT_FOUND: typeof ISSUE_SHARE_REMOTE_REPORT_NOT_FOUND;
913
+ declare const index_ISSUE_SHARE_REMOTE_REPORT_REJECTED: typeof ISSUE_SHARE_REMOTE_REPORT_REJECTED;
914
+ declare const index_ISSUE_SHARE_REMOTE_UNAVAILABLE: typeof ISSUE_SHARE_REMOTE_UNAVAILABLE;
915
+ declare const index_ISSUE_SHARE_REMOTE_UPLOAD_REJECTED: typeof ISSUE_SHARE_REMOTE_UPLOAD_REJECTED;
916
+ declare const index_ISSUE_SHARE_SNAPSHOT_EMPTY: typeof ISSUE_SHARE_SNAPSHOT_EMPTY;
917
+ declare const index_ISSUE_SHARE_STALE_CACHE_ROW_REMOVED: typeof ISSUE_SHARE_STALE_CACHE_ROW_REMOVED;
918
+ declare const index_ISSUE_SHARE_ZIP_FAILED: typeof ISSUE_SHARE_ZIP_FAILED;
919
+ declare const index_ISSUE_SYNC_LOCALE_FILE_NOT_FOUND: typeof ISSUE_SYNC_LOCALE_FILE_NOT_FOUND;
920
+ declare const index_ISSUE_SYNC_METADATA_FLAG_CONFLICT: typeof ISSUE_SYNC_METADATA_FLAG_CONFLICT;
921
+ declare const index_ISSUE_TRANSLATE_CONFIG_DEFAULT_APPLIED: typeof ISSUE_TRANSLATE_CONFIG_DEFAULT_APPLIED;
922
+ declare const index_ISSUE_TRANSLATE_HANDOFF_NO_ELIGIBLE_PROVIDER: typeof ISSUE_TRANSLATE_HANDOFF_NO_ELIGIBLE_PROVIDER;
923
+ declare const index_ISSUE_TRANSLATE_IDENTITY_STREAK_ABORT: typeof ISSUE_TRANSLATE_IDENTITY_STREAK_ABORT;
924
+ declare const index_ISSUE_TRANSLATE_IDENTITY_STREAK_WARNING: typeof ISSUE_TRANSLATE_IDENTITY_STREAK_WARNING;
925
+ declare const index_ISSUE_TRANSLATE_MISSING_CREDENTIALS: typeof ISSUE_TRANSLATE_MISSING_CREDENTIALS;
926
+ declare const index_ISSUE_TRANSLATE_PROVIDER_NOT_IMPLEMENTED_YET: typeof ISSUE_TRANSLATE_PROVIDER_NOT_IMPLEMENTED_YET;
927
+ declare const index_ISSUE_TRANSLATE_UNKNOWN_TRANSLATION_PROVIDER: typeof ISSUE_TRANSLATE_UNKNOWN_TRANSLATION_PROVIDER;
928
+ declare const index_ISSUE_VALIDATE_DYNAMIC_KEY_SITES: typeof ISSUE_VALIDATE_DYNAMIC_KEY_SITES;
929
+ declare const index_ISSUE_VALIDATE_MISSING_LITERAL_KEYS: typeof ISSUE_VALIDATE_MISSING_LITERAL_KEYS;
930
+ declare const index_ISSUE_VALIDATE_SOURCE_LOCALE_READ_FAILED: typeof ISSUE_VALIDATE_SOURCE_LOCALE_READ_FAILED;
931
+ declare const index_LICENSE_URL: typeof LICENSE_URL;
932
+ declare const index_LIST_MORE_HINT: typeof LIST_MORE_HINT;
933
+ declare const index_MAX_ANALYSIS_BYTES: typeof MAX_ANALYSIS_BYTES;
934
+ declare const index_MAX_MISSING_TARGET_SUGGESTIONS: typeof MAX_MISSING_TARGET_SUGGESTIONS;
935
+ declare const index_MAX_PROJECTS_INDEX_BYTES: typeof MAX_PROJECTS_INDEX_BYTES;
936
+ declare const index_MAX_PROJECT_FILES_BYTES: typeof MAX_PROJECT_FILES_BYTES;
937
+ declare const index_MAX_TRANSLATIONS_CACHE_BYTES: typeof MAX_TRANSLATIONS_CACHE_BYTES;
938
+ declare const index_META_WORKER_URL: typeof META_WORKER_URL;
939
+ declare const index_NPM_PACKAGE_NAME: typeof NPM_PACKAGE_NAME;
940
+ declare const index_NPM_PACKAGE_URL: typeof NPM_PACKAGE_URL;
941
+ declare const index_PROJECT_REPORT_KIND: typeof PROJECT_REPORT_KIND;
942
+ declare const index_PROJECT_REPORT_SCHEMA_VERSION: typeof PROJECT_REPORT_SCHEMA_VERSION;
943
+ declare const index_PROJECT_SHARE_PREPARED_MAX_BYTES: typeof PROJECT_SHARE_PREPARED_MAX_BYTES;
944
+ declare const index_PROJECT_UPLOAD_MAX_FILES: typeof PROJECT_UPLOAD_MAX_FILES;
945
+ declare const index_PROJECT_UPLOAD_MAX_TEXT_BYTES: typeof PROJECT_UPLOAD_MAX_TEXT_BYTES;
946
+ declare const index_PROJECT_UPLOAD_MAX_ZIP_BYTES: typeof PROJECT_UPLOAD_MAX_ZIP_BYTES;
947
+ declare const index_PROJECT_UPLOAD_ZIP_LIMITS: typeof PROJECT_UPLOAD_ZIP_LIMITS;
948
+ declare const index_REPORT_INLINE_PAYLOAD_PLACEHOLDER: typeof REPORT_INLINE_PAYLOAD_PLACEHOLDER;
949
+ declare const index_REPORT_SHARE_MAX_BYTES: typeof REPORT_SHARE_MAX_BYTES;
950
+ declare const index_RESULT_API_VERSION: typeof RESULT_API_VERSION;
951
+ declare const index_SDK_PACKAGE_NAME: typeof SDK_PACKAGE_NAME;
952
+ declare const index_SDK_VERSION: typeof SDK_VERSION;
953
+ declare const index_SHARE_BAK_DIRNAME: typeof SHARE_BAK_DIRNAME;
954
+ declare const index_SHARE_CACHE_REASON_MESSAGES: typeof SHARE_CACHE_REASON_MESSAGES;
955
+ declare const index_SHARE_JSON_BASENAME: typeof SHARE_JSON_BASENAME;
956
+ type index_ShareCacheReasonCode = ShareCacheReasonCode;
957
+ declare const index_TRANSLATE_WORKERS_CAP: typeof TRANSLATE_WORKERS_CAP;
958
+ declare const index_TRANSLATIONS_DIR: typeof TRANSLATIONS_DIR;
959
+ declare const index_TranslatorEnv: typeof TranslatorEnv;
960
+ declare const index_WORKER_IDLE_RETENTION_MS: typeof WORKER_IDLE_RETENTION_MS;
961
+ declare const index_WORKER_INGEST_FORCE_QUERY: typeof WORKER_INGEST_FORCE_QUERY;
962
+ declare const index_formatListOmittedSuffix: typeof formatListOmittedSuffix;
963
+ declare const index_formatListShownOmitted: typeof formatListShownOmitted;
964
+ declare namespace index {
965
+ export { index_ANALYSIS_BASENAME as ANALYSIS_BASENAME, index_CACHE_PROFILE_DEFAULTS as CACHE_PROFILE_DEFAULTS, index_CACHE_SCHEMA_VERSION as CACHE_SCHEMA_VERSION, index_DEFAULT_CACHE_PROFILE_ID as DEFAULT_CACHE_PROFILE_ID, index_DEFAULT_HEAL_EVERY_RUNS as DEFAULT_HEAL_EVERY_RUNS, index_DEFAULT_LIST_TOP as DEFAULT_LIST_TOP, index_DEFAULT_MAX_SHARE_JSON_BYTES as DEFAULT_MAX_SHARE_JSON_BYTES, index_DEFAULT_MISSING_LEAF_PLACEHOLDER as DEFAULT_MISSING_LEAF_PLACEHOLDER, index_DEFAULT_WORKER_API_URL as DEFAULT_WORKER_API_URL, index_DEMO_REPORT_URL as DEMO_REPORT_URL, index_DEMO_WEB_APP_BASE as DEMO_WEB_APP_BASE, index_DOCS_ISSUES_PAGE_PATH as DOCS_ISSUES_PAGE_PATH, index_DOCS_SITE_BASE as DOCS_SITE_BASE, index_DOCS_SITE_ORIGIN as DOCS_SITE_ORIGIN, index_ENV_TRANSLATE_DEEPL_API_KEY as ENV_TRANSLATE_DEEPL_API_KEY, index_ENV_TRANSLATE_LIBRE_URL as ENV_TRANSLATE_LIBRE_URL, index_ENV_TRANSLATE_LLM_API_KEY as ENV_TRANSLATE_LLM_API_KEY, index_ENV_TRANSLATE_LLM_BASE_URL as ENV_TRANSLATE_LLM_BASE_URL, index_ENV_TRANSLATE_LLM_MODEL as ENV_TRANSLATE_LLM_MODEL, index_ENV_TRANSLATE_MAX_WORKERS as ENV_TRANSLATE_MAX_WORKERS, index_ENV_TRANSLATE_PROVIDER as ENV_TRANSLATE_PROVIDER, index_GITHUB_BASE as GITHUB_BASE, index_GITHUB_DOCS_BASE as GITHUB_DOCS_BASE, index_GITHUB_DOCS_TREE_BASE as GITHUB_DOCS_TREE_BASE, index_GITHUB_OWNER as GITHUB_OWNER, index_GITHUB_REPO as GITHUB_REPO, index_GITHUB_REPO_URL as GITHUB_REPO_URL, index_HOSTED_PROJECT_SNAPSHOT_SCHEMA_VERSION as HOSTED_PROJECT_SNAPSHOT_SCHEMA_VERSION, index_I18NPRUNE_CONFIG_BASENAME as I18NPRUNE_CONFIG_BASENAME, index_I18NPRUNE_CONFIG_JSON_FILE_NAME as I18NPRUNE_CONFIG_JSON_FILE_NAME, index_I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES as I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES, index_I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES_SET as I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES_SET, index_I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES as I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES, index_I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES_SET as I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES_SET, index_ISSUE_CLEANUP_RIPGREP_UNAVAILABLE as ISSUE_CLEANUP_RIPGREP_UNAVAILABLE, index_ISSUE_CLEANUP_UNCERTAIN_PATHS_EXCLUDED as ISSUE_CLEANUP_UNCERTAIN_PATHS_EXCLUDED, index_ISSUE_CLI_INVALID_JSON_PRETTY as ISSUE_CLI_INVALID_JSON_PRETTY, index_ISSUE_CONFIG_INVALID as ISSUE_CONFIG_INVALID, index_ISSUE_CONFIG_LOAD_FAILED as ISSUE_CONFIG_LOAD_FAILED, index_ISSUE_CONFIG_MISSING as ISSUE_CONFIG_MISSING, index_ISSUE_CONTEXT_DISCOVERY_WARNING as ISSUE_CONTEXT_DISCOVERY_WARNING, index_ISSUE_CONTEXT_RESOLUTION_FAILED as ISSUE_CONTEXT_RESOLUTION_FAILED, index_ISSUE_DOCTOR_CONFIG_MISSING_FILE as ISSUE_DOCTOR_CONFIG_MISSING_FILE, index_ISSUE_DOCTOR_PATHS_DIRECTORIES_MISSING as ISSUE_DOCTOR_PATHS_DIRECTORIES_MISSING, index_ISSUE_DOCTOR_PATHS_SOURCE_LOCALE_MISSING as ISSUE_DOCTOR_PATHS_SOURCE_LOCALE_MISSING, index_ISSUE_DOCTOR_RUNTIME_UNSUPPORTED_NODE as ISSUE_DOCTOR_RUNTIME_UNSUPPORTED_NODE, index_ISSUE_DOCTOR_TOOLS_RG_NOT_ON_PATH as ISSUE_DOCTOR_TOOLS_RG_NOT_ON_PATH, index_ISSUE_GENERATE_SOURCE_EMPTY_STRING_LEAVES as ISSUE_GENERATE_SOURCE_EMPTY_STRING_LEAVES, index_ISSUE_GENERATE_TRANSLATE_NETWORK_ERROR as ISSUE_GENERATE_TRANSLATE_NETWORK_ERROR, index_ISSUE_GENERATE_TRANSLATE_RATE_LIMITED as ISSUE_GENERATE_TRANSLATE_RATE_LIMITED, index_ISSUE_GENERATE_USAGE as ISSUE_GENERATE_USAGE, index_ISSUE_IO_READ_FAILED as ISSUE_IO_READ_FAILED, index_ISSUE_LANGUAGES_EMPTY_FILTER as ISSUE_LANGUAGES_EMPTY_FILTER, index_ISSUE_LANGUAGES_UNSUPPORTED_LANGUAGE_CODE as ISSUE_LANGUAGES_UNSUPPORTED_LANGUAGE_CODE, index_ISSUE_LOCALES_USAGE as ISSUE_LOCALES_USAGE, index_ISSUE_LOCALE_SOURCE_PLACEHOLDER_LEAVES as ISSUE_LOCALE_SOURCE_PLACEHOLDER_LEAVES, index_ISSUE_LOCALE_TARGET_NOT_FOUND as ISSUE_LOCALE_TARGET_NOT_FOUND, index_ISSUE_LOCALE_TARGET_PLACEHOLDER_LEAVES as ISSUE_LOCALE_TARGET_PLACEHOLDER_LEAVES, index_ISSUE_MISSING_PATHS_NOT_IN_SCAN as ISSUE_MISSING_PATHS_NOT_IN_SCAN, index_ISSUE_PATCHING_CATALOG_MISMATCH_DIRECTION as ISSUE_PATCHING_CATALOG_MISMATCH_DIRECTION, index_ISSUE_PATCHING_CATALOG_MISMATCH_ENGLISH as ISSUE_PATCHING_CATALOG_MISMATCH_ENGLISH, index_ISSUE_PATCHING_CATALOG_MISMATCH_NATIVE as ISSUE_PATCHING_CATALOG_MISMATCH_NATIVE, index_ISSUE_PATCHING_CONFIG_INVALID_SCHEMA as ISSUE_PATCHING_CONFIG_INVALID_SCHEMA, index_ISSUE_PATCHING_CONFIG_LOCALE_MISSING_FILE as ISSUE_PATCHING_CONFIG_LOCALE_MISSING_FILE, index_ISSUE_PATCHING_CONFIG_PARSE_FAILED as ISSUE_PATCHING_CONFIG_PARSE_FAILED, index_ISSUE_PATCHING_CONFIG_SECTION_INCOMPLETE as ISSUE_PATCHING_CONFIG_SECTION_INCOMPLETE, index_ISSUE_PATCHING_CONFIG_SIZE_ANOMALY as ISSUE_PATCHING_CONFIG_SIZE_ANOMALY, index_ISSUE_PATCHING_CONFIG_TOO_LARGE as ISSUE_PATCHING_CONFIG_TOO_LARGE, index_ISSUE_PATCHING_FILE_LOCALE_MISSING_CONFIG as ISSUE_PATCHING_FILE_LOCALE_MISSING_CONFIG, index_ISSUE_PATHS_NETWORK_DRIVE as ISSUE_PATHS_NETWORK_DRIVE, index_ISSUE_PATHS_WINDOWS_LONG_PATH as ISSUE_PATHS_WINDOWS_LONG_PATH, index_ISSUE_PATHS_WINDOWS_RESERVED_NAME as ISSUE_PATHS_WINDOWS_RESERVED_NAME, index_ISSUE_PROJECT_CONFIG_FILE_MISSING as ISSUE_PROJECT_CONFIG_FILE_MISSING, index_ISSUE_PROJECT_HOSTED_SNAPSHOT_INVALID as ISSUE_PROJECT_HOSTED_SNAPSHOT_INVALID, index_ISSUE_PROJECT_HOSTED_SNAPSHOT_SCHEMA_VERSION as ISSUE_PROJECT_HOSTED_SNAPSHOT_SCHEMA_VERSION, index_ISSUE_PROJECT_LOCALES_DIR_UNAVAILABLE as ISSUE_PROJECT_LOCALES_DIR_UNAVAILABLE, index_ISSUE_PROJECT_LOCALES_SOURCE_NOT_IN_BUNDLE as ISSUE_PROJECT_LOCALES_SOURCE_NOT_IN_BUNDLE, index_ISSUE_PROJECT_LOCALES_SOURCE_NOT_LANGUAGE_CODE as ISSUE_PROJECT_LOCALES_SOURCE_NOT_LANGUAGE_CODE, index_ISSUE_PROJECT_LOCALES_STRUCTURE_REQUIRED as ISSUE_PROJECT_LOCALES_STRUCTURE_REQUIRED, index_ISSUE_PROJECT_SOURCE_LOCALE_INVALID_JSON as ISSUE_PROJECT_SOURCE_LOCALE_INVALID_JSON, index_ISSUE_PROJECT_SOURCE_LOCALE_INVALID_SHAPE as ISSUE_PROJECT_SOURCE_LOCALE_INVALID_SHAPE, index_ISSUE_PROJECT_SOURCE_LOCALE_MISSING_SEGMENTS as ISSUE_PROJECT_SOURCE_LOCALE_MISSING_SEGMENTS, index_ISSUE_PROJECT_SOURCE_LOCALE_NOT_FOUND as ISSUE_PROJECT_SOURCE_LOCALE_NOT_FOUND, index_ISSUE_PROJECT_SOURCE_LOCALE_UNAVAILABLE as ISSUE_PROJECT_SOURCE_LOCALE_UNAVAILABLE, index_ISSUE_PROJECT_SRC_ROOT_UNAVAILABLE as ISSUE_PROJECT_SRC_ROOT_UNAVAILABLE, index_ISSUE_PROJECT_UPLOAD_CONFIG_JSON_INVALID as ISSUE_PROJECT_UPLOAD_CONFIG_JSON_INVALID, index_ISSUE_PROJECT_UPLOAD_CONFIG_REQUIRED as ISSUE_PROJECT_UPLOAD_CONFIG_REQUIRED, index_ISSUE_QUALITY_ENGLISH_IDENTICAL_LEAVES as ISSUE_QUALITY_ENGLISH_IDENTICAL_LEAVES, index_ISSUE_REPORT_HOSTED_REPORT_INVALID as ISSUE_REPORT_HOSTED_REPORT_INVALID, index_ISSUE_REPORT_INVALID_FORMAT as ISSUE_REPORT_INVALID_FORMAT, index_ISSUE_SCAN_DYNAMIC_KEY_SITES as ISSUE_SCAN_DYNAMIC_KEY_SITES, index_ISSUE_SHARE_CACHE_EMPTY as ISSUE_SHARE_CACHE_EMPTY, index_ISSUE_SHARE_CACHE_ENTRY_NOT_FOUND as ISSUE_SHARE_CACHE_ENTRY_NOT_FOUND, index_ISSUE_SHARE_JSON_REPAIRED as ISSUE_SHARE_JSON_REPAIRED, index_ISSUE_SHARE_JSON_WRITE_FAILED as ISSUE_SHARE_JSON_WRITE_FAILED, index_ISSUE_SHARE_PREPARE_ANALYSIS_FAILED as ISSUE_SHARE_PREPARE_ANALYSIS_FAILED, index_ISSUE_SHARE_PREPARE_NOTHING_REQUESTED as ISSUE_SHARE_PREPARE_NOTHING_REQUESTED, index_ISSUE_SHARE_PREPARE_REPORT_FROM_ARCHIVE_FAILED as ISSUE_SHARE_PREPARE_REPORT_FROM_ARCHIVE_FAILED, index_ISSUE_SHARE_PREPARE_REPORT_HOST_REQUIRED as ISSUE_SHARE_PREPARE_REPORT_HOST_REQUIRED, index_ISSUE_SHARE_REMOTE_ERROR as ISSUE_SHARE_REMOTE_ERROR, index_ISSUE_SHARE_REMOTE_PAYLOAD_TOO_LARGE as ISSUE_SHARE_REMOTE_PAYLOAD_TOO_LARGE, index_ISSUE_SHARE_REMOTE_PROJECT_NOT_FOUND as ISSUE_SHARE_REMOTE_PROJECT_NOT_FOUND, index_ISSUE_SHARE_REMOTE_REPORT_NOT_FOUND as ISSUE_SHARE_REMOTE_REPORT_NOT_FOUND, index_ISSUE_SHARE_REMOTE_REPORT_REJECTED as ISSUE_SHARE_REMOTE_REPORT_REJECTED, index_ISSUE_SHARE_REMOTE_UNAVAILABLE as ISSUE_SHARE_REMOTE_UNAVAILABLE, index_ISSUE_SHARE_REMOTE_UPLOAD_REJECTED as ISSUE_SHARE_REMOTE_UPLOAD_REJECTED, index_ISSUE_SHARE_SNAPSHOT_EMPTY as ISSUE_SHARE_SNAPSHOT_EMPTY, index_ISSUE_SHARE_STALE_CACHE_ROW_REMOVED as ISSUE_SHARE_STALE_CACHE_ROW_REMOVED, index_ISSUE_SHARE_ZIP_FAILED as ISSUE_SHARE_ZIP_FAILED, index_ISSUE_SYNC_LOCALE_FILE_NOT_FOUND as ISSUE_SYNC_LOCALE_FILE_NOT_FOUND, index_ISSUE_SYNC_METADATA_FLAG_CONFLICT as ISSUE_SYNC_METADATA_FLAG_CONFLICT, index_ISSUE_TRANSLATE_CONFIG_DEFAULT_APPLIED as ISSUE_TRANSLATE_CONFIG_DEFAULT_APPLIED, index_ISSUE_TRANSLATE_HANDOFF_NO_ELIGIBLE_PROVIDER as ISSUE_TRANSLATE_HANDOFF_NO_ELIGIBLE_PROVIDER, index_ISSUE_TRANSLATE_IDENTITY_STREAK_ABORT as ISSUE_TRANSLATE_IDENTITY_STREAK_ABORT, index_ISSUE_TRANSLATE_IDENTITY_STREAK_WARNING as ISSUE_TRANSLATE_IDENTITY_STREAK_WARNING, index_ISSUE_TRANSLATE_MISSING_CREDENTIALS as ISSUE_TRANSLATE_MISSING_CREDENTIALS, index_ISSUE_TRANSLATE_PROVIDER_NOT_IMPLEMENTED_YET as ISSUE_TRANSLATE_PROVIDER_NOT_IMPLEMENTED_YET, index_ISSUE_TRANSLATE_UNKNOWN_TRANSLATION_PROVIDER as ISSUE_TRANSLATE_UNKNOWN_TRANSLATION_PROVIDER, index_ISSUE_VALIDATE_DYNAMIC_KEY_SITES as ISSUE_VALIDATE_DYNAMIC_KEY_SITES, index_ISSUE_VALIDATE_MISSING_LITERAL_KEYS as ISSUE_VALIDATE_MISSING_LITERAL_KEYS, index_ISSUE_VALIDATE_SOURCE_LOCALE_READ_FAILED as ISSUE_VALIDATE_SOURCE_LOCALE_READ_FAILED, index_LICENSE_URL as LICENSE_URL, index_LIST_MORE_HINT as LIST_MORE_HINT, index_MAX_ANALYSIS_BYTES as MAX_ANALYSIS_BYTES, index_MAX_MISSING_TARGET_SUGGESTIONS as MAX_MISSING_TARGET_SUGGESTIONS, index_MAX_PROJECTS_INDEX_BYTES as MAX_PROJECTS_INDEX_BYTES, index_MAX_PROJECT_FILES_BYTES as MAX_PROJECT_FILES_BYTES, index_MAX_TRANSLATIONS_CACHE_BYTES as MAX_TRANSLATIONS_CACHE_BYTES, index_META_WORKER_URL as META_WORKER_URL, index_NPM_PACKAGE_NAME as NPM_PACKAGE_NAME, index_NPM_PACKAGE_URL as NPM_PACKAGE_URL, index_PROJECT_REPORT_KIND as PROJECT_REPORT_KIND, index_PROJECT_REPORT_SCHEMA_VERSION as PROJECT_REPORT_SCHEMA_VERSION, index_PROJECT_SHARE_PREPARED_MAX_BYTES as PROJECT_SHARE_PREPARED_MAX_BYTES, index_PROJECT_UPLOAD_MAX_FILES as PROJECT_UPLOAD_MAX_FILES, index_PROJECT_UPLOAD_MAX_TEXT_BYTES as PROJECT_UPLOAD_MAX_TEXT_BYTES, index_PROJECT_UPLOAD_MAX_ZIP_BYTES as PROJECT_UPLOAD_MAX_ZIP_BYTES, index_PROJECT_UPLOAD_ZIP_LIMITS as PROJECT_UPLOAD_ZIP_LIMITS, index_REPORT_INLINE_PAYLOAD_PLACEHOLDER as REPORT_INLINE_PAYLOAD_PLACEHOLDER, index_REPORT_SHARE_MAX_BYTES as REPORT_SHARE_MAX_BYTES, index_RESULT_API_VERSION as RESULT_API_VERSION, index_SDK_PACKAGE_NAME as SDK_PACKAGE_NAME, index_SDK_VERSION as SDK_VERSION, index_SHARE_BAK_DIRNAME as SHARE_BAK_DIRNAME, index_SHARE_CACHE_REASON_MESSAGES as SHARE_CACHE_REASON_MESSAGES, index_SHARE_JSON_BASENAME as SHARE_JSON_BASENAME, type index_ShareCacheReasonCode as ShareCacheReasonCode, index_TRANSLATE_WORKERS_CAP as TRANSLATE_WORKERS_CAP, index_TRANSLATIONS_DIR as TRANSLATIONS_DIR, index_TranslatorEnv as TranslatorEnv, index_WORKER_IDLE_RETENTION_MS as WORKER_IDLE_RETENTION_MS, index_WORKER_INGEST_FORCE_QUERY as WORKER_INGEST_FORCE_QUERY, index_formatListOmittedSuffix as formatListOmittedSuffix, index_formatListShownOmitted as formatListShownOmitted };
966
+ }
967
+
968
+ /**
969
+ * Collect `*.json` files under `rootAbsolute` (any basename ending in `.json`).
970
+ *
971
+ * @param recursive — When false, only immediate children of `rootAbsolute` are scanned.
972
+ */
973
+ declare function walkLocaleJsonSegments(input: {
974
+ fs: RuntimeFsPort;
975
+ path: LocaleLeafPathApi;
976
+ rootAbsolute: string;
977
+ recursive: boolean;
978
+ maxDepth?: number;
979
+ }): WalkedJsonSegment[];
980
+
981
+ /**
982
+ * Infer locale code for a walked segment using {@link LocalesLayoutStructure} rules.
983
+ *
984
+ * @returns `null` when the path does not belong to this structure (e.g. root-level JSON in `locale_per_dir`).
985
+ */
986
+ declare function localeCodeForSegment(structure: LocalesLayoutStructure, path: LocaleLeafPathApi, segment: WalkedJsonSegment): string | null;
987
+
988
+ /**
989
+ * Discover locale JSON segment files for a resolved layout (read/write may still be unsupported).
990
+ */
991
+ declare function listLocaleSegments(input: {
992
+ layout: ResolvedLocalesLayout;
993
+ fs: RuntimeFsPort;
994
+ path: LocaleLeafPathApi;
995
+ }): ListLocaleSegmentsResult;
996
+
997
+ /** Unique locale codes for a layout, sorted lexicographically. */
998
+ declare function listLocaleCodes(input: {
999
+ layout: ResolvedLocalesLayout;
1000
+ fs: RuntimeFsPort;
1001
+ path: LocaleLeafPathApi;
1002
+ }): ListLocaleCodesResult;
1003
+
1004
+ /**
1005
+ * Build the absolute path for a locale segment under `layout.directoryAbsolute`.
1006
+ *
1007
+ * @param segmentRelativePath — Bundle-root–relative path (`en.json`, `en/auth.json`, `auth/en.json`).
1008
+ * When omitted, defaults to `${locale}.json` at the bundle root (`locale_file` / `feature_bundle` only).
1009
+ */
1010
+ declare function resolveLocaleSegmentAbsolutePath(input: {
1011
+ layout: ResolvedLocalesLayout;
1012
+ path: LocaleLeafPathApi;
1013
+ locale: string;
1014
+ segmentRelativePath?: string;
1015
+ }): string;
1016
+ /**
1017
+ * Map an absolute segment file path to {@link LocaleSegmentRef}, or `null` when outside the bundle or
1018
+ * not a valid segment for the layout structure.
1019
+ */
1020
+ declare function localeSegmentRefFromAbsolute(input: {
1021
+ layout: ResolvedLocalesLayout;
1022
+ path: LocaleLeafPathApi;
1023
+ absolutePath: string;
1024
+ }): LocaleSegmentRef | null;
1025
+
1026
+ declare function listLocaleSegmentsFromContext(ctx: CoreContext): ListLocaleSegmentsResult;
1027
+ declare function listLocaleCodesFromContext(ctx: CoreContext): ListLocaleCodesResult;
1028
+
1029
+ /** All locale JSON segments under the configured bundle root. */
1030
+ declare function listLocaleSegmentTargets(ctx: CoreContext): LocaleSegmentTarget[];
1031
+ /** Locale code for `ctx.paths.sourceLocale` using layout rules (not only basename). */
1032
+ declare function sourceLocaleCodeFromContext(ctx: CoreContext): string;
1033
+ /** Distinct locale codes present in the bundle (sorted). */
1034
+ declare function localeCodesFromContext(ctx: CoreContext): string[];
1035
+ /** Non-source locale codes (sorted). */
1036
+ declare function targetLocaleCodesFromContext(ctx: CoreContext): string[];
1037
+ declare function segmentsForLocaleCode(ctx: CoreContext, localeCode: string): LocaleSegmentTarget[];
1038
+ /** Primary segment for a locale (source path match, else lexicographically first). */
1039
+ declare function primarySegmentForLocale(ctx: CoreContext, localeCode: string): LocaleSegmentTarget | undefined;
1040
+ /**
1041
+ * Segment files to process for sync / quality / review style ops (one row per on-disk JSON segment).
1042
+ */
1043
+ declare function resolveLocaleSegmentTargets(ctx: CoreContext, input: ResolveLocaleSegmentTargetsInput): {
1044
+ segments: LocaleSegmentTarget[];
1045
+ missingLocaleCodes: string[];
1046
+ };
1047
+
1048
+ /**
1049
+ * Replace the locale code inside a bundle-relative segment path for the active layout structure.
1050
+ *
1051
+ * @returns `null` when the path cannot be rewritten for this structure.
1052
+ */
1053
+ declare function swapLocaleInSegmentRelativePath(input: {
1054
+ structure: LocalesLayoutStructure;
1055
+ relativePath: string;
1056
+ targetLocale: string;
1057
+ }): string | null;
1058
+ /** All on-disk segments for the configured source locale code. */
1059
+ declare function listSourceLocaleWriteTargets(ctx: CoreContext): LocaleSegmentWriteTarget[];
1060
+ /**
1061
+ * Resolve which segment file(s) generate should use for a target locale.
1062
+ *
1063
+ * @remarks One row per source segment (mirrored path shape). `flat_file` keeps a single segment.
1064
+ */
1065
+ declare function resolveTargetLocaleWritePlan(ctx: CoreContext, targetLocale: string): LocaleSegmentWritePlan;
1066
+ /** Absolute path for the primary segment file generate/resume writes for one target locale. */
1067
+ declare function resolvePrimaryTargetWritePath(ctx: CoreContext, targetLocale: string): string;
1068
+
1069
+ /** Merge translation-surface leaves into one locale JSON object (schema leaf paths). */
1070
+ declare function localeJsonFromTranslationSurfaceLeaves(leaves: readonly TranslationSurfaceLeaf[]): unknown;
1071
+ /**
1072
+ * Split one translated working locale into per-segment JSON documents for write.
1073
+ *
1074
+ * @remarks Groups schema/source leaves by source segment path; reads each source file when
1075
+ * `fileOrigin` does not match bundle-relative segment paths.
1076
+ */
1077
+ declare function materializeGenerateWorkingBySegment(input: {
1078
+ working: unknown;
1079
+ sourceLeaves: readonly TranslationSurfaceLeaf[];
1080
+ segments: readonly LocaleSegmentWriteTarget[];
1081
+ structure: ResolvedLocalesLayout['structure'];
1082
+ sourceLocaleCode: string;
1083
+ layout: ResolvedLocalesLayout;
1084
+ fs: RuntimeFsPort;
1085
+ path: LocaleLeafPathApi;
1086
+ }): {
1087
+ segment: LocaleSegmentWriteTarget;
1088
+ document: unknown;
1089
+ }[];
1090
+
1091
+ /**
1092
+ * Locale-neutral segment slot for comparing trees across locale codes.
1093
+ *
1094
+ * @remarks `locale_per_dir`: `en/auth.json` → `auth.json`; `feature_bundle`: `auth/en.json` → `auth`.
1095
+ */
1096
+ declare function localeStructuralSlot(structure: LocalesLayoutStructure, relativePath: string): string | null;
1097
+ /**
1098
+ * Warn when locale codes disagree on which segment slots exist (multi-segment layouts only).
1099
+ */
1100
+ declare function collectLocaleStructuralParityDiagnostics(input: {
1101
+ structure: LocalesLayoutStructure;
1102
+ segments: readonly LocaleSegmentRef[];
1103
+ referenceLocale?: string;
1104
+ }): LocaleReadDiagnostic[];
1105
+ /**
1106
+ * Warn when the configured source locale is missing segment slots that exist for other locales
1107
+ * (`locale_per_dir` / `feature_bundle` only).
1108
+ */
1109
+ declare function collectSourceLocaleMissingSegmentDiagnostics(input: {
1110
+ structure: LocalesLayoutStructure;
1111
+ segments: readonly LocaleSegmentRef[];
1112
+ sourceLocale: string;
1113
+ }): LocaleReadDiagnostic[];
1114
+
1115
+ /**
1116
+ * Project a locale JSON document into a canonical leaf map keyed by dotted paths.
1117
+ * This treats object keys containing `.` as path separators, but de-dupes conflicts:
1118
+ * if both `{ "a.b": "x" }` and `{ a: { b: "y" } }` exist, the nested `"y"` wins.
1119
+ */
1120
+ declare function projectLocaleLeaves(localeJson: unknown): LocaleLeafProjection;
1121
+ /** Read a string leaf value from a projection (legacy or structured). */
1122
+ declare function getProjectedLeafString(proj: LocaleLeafProjection, path: string): string | undefined;
1123
+
1124
+ /**
1125
+ * Locale codes present in the archive for the resolved layout (enumeration only; no JSON parse).
1126
+ */
1127
+ declare function listLocaleCodesFromArchive(input: {
1128
+ localesDirAbsolute: string;
1129
+ archiveRelPaths: Iterable<string>;
1130
+ resolveArchiveAbsolute: (archiveRelPath: string) => string;
1131
+ path: LocaleLeafPathApi;
1132
+ locales: LocalesFilesystemConfig$1;
1133
+ }): string[];
1134
+ /**
1135
+ * Build `localeJsonByTag` from archive-relative paths using the same segment rules as CLI enumeration.
1136
+ * When a locale has multiple segments, uses the primary segment (source path match, else lexicographically first).
1137
+ */
1138
+ declare function buildLocaleJsonByTagFromArchive(input: {
1139
+ localesDirAbsolute: string;
1140
+ sourceLocaleAbsolute?: string;
1141
+ /** Project-root-relative paths (e.g. `messages/en.json` from a zip). */
1142
+ archiveRelPaths: Iterable<string>;
1143
+ /** Resolve an archive-relative path to an absolute path on the virtual project root. */
1144
+ resolveArchiveAbsolute: (archiveRelPath: string) => string;
1145
+ path: LocaleLeafPathApi;
1146
+ locales: LocalesFilesystemConfig$1;
1147
+ readText: (archiveRelPath: string) => string | undefined;
1148
+ }): Record<string, Record<string, unknown>>;
1149
+
1150
+ /** All translation-surface leaves for one locale code (`flat_file`, `locale_per_dir`, or `feature_bundle`). */
1151
+ declare function readLocaleLeavesForCode(ctx: CoreContext, localeCode: string): TranslationSurfaceLeaf[];
1152
+ /** Merged leaves for the configured source locale (all segments when multi-file). */
1153
+ declare function readSourceLocaleLeaves(ctx: CoreContext): TranslationSurfaceLeaf[];
1154
+
1155
+ /** Read locale JSON from disk, or `{}` when the segment file does not exist yet. */
1156
+ declare function readLocaleJsonOrEmpty(ctx: CoreContext, absolutePath: string): unknown;
1157
+
1158
+ /** Map a target segment path to its paired source segment (`auth/fr.json` → `auth/en.json`). */
1159
+ declare function pairedSourceSegmentRelativePath(ctx: CoreContext, targetSegmentRelativePath: string, _targetLocaleCode: string): string | null;
1160
+ declare function resolvePairedSourceSegmentAbsolutePath(ctx: CoreContext, targetSegmentRelativePath: string, targetLocaleCode: string): string;
1161
+ /** Source segment file that owns a logical key path (existing leaf origin or feature_bundle inference). */
1162
+ declare function sourceSegmentRelativePathForKey(ctx: CoreContext, key: string, sourceLeaves: readonly TranslationSurfaceLeaf[]): string;
1163
+ /** Target segment file that should receive a logical key path for a locale code. */
1164
+ declare function targetSegmentRelativePathForKey(ctx: CoreContext, localeCode: string, key: string, sourceLeaves: readonly TranslationSurfaceLeaf[]): string;
1165
+
1166
+ /** Build a nested canonical template object from source leaves (never literal dotted keys). */
1167
+ declare function buildSegmentTemplateFromSource(_sourceRaw: unknown, leaves: readonly TranslationSurfaceLeaf[]): unknown;
1168
+ /** Per-segment source template for sync (paired source segment, schema-filtered). */
1169
+ declare function resolveSyncSegmentSourcePlan(ctx: CoreContext, input: {
1170
+ targetSegmentRelativePath: string;
1171
+ targetLocaleCode: string;
1172
+ schemaPaths: ReadonlySet<string>;
1173
+ }): SyncSegmentSourcePlan;
1174
+ /** Schema path set for sync; falls back to merged source leaves when scan is empty. */
1175
+ declare function resolveGlobalSyncSchemaPaths(ctx: CoreContext, schemaPaths: ReadonlySet<string>): ReadonlySet<string>;
1176
+
1177
+ export { ANALYSIS_BASENAME, ApplyLocaleMetadataModeInput, CACHE_PROFILE_DEFAULTS, CACHE_SCHEMA_VERSION, DEFAULT_CACHE_PROFILE_ID, DEFAULT_HEAL_EVERY_RUNS, DEFAULT_LIST_TOP, DEFAULT_MAX_SHARE_JSON_BYTES, DEFAULT_MISSING_LEAF_PLACEHOLDER, DEFAULT_WORKER_API_URL, DEMO_REPORT_URL, DEMO_WEB_APP_BASE, DOCS_ISSUES_PAGE_PATH, DOCS_SITE_BASE, DOCS_SITE_ORIGIN, ENV_TRANSLATE_DEEPL_API_KEY, ENV_TRANSLATE_LIBRE_URL, ENV_TRANSLATE_LLM_API_KEY, ENV_TRANSLATE_LLM_BASE_URL, ENV_TRANSLATE_LLM_MODEL, ENV_TRANSLATE_MAX_WORKERS, ENV_TRANSLATE_PROVIDER, GITHUB_BASE, GITHUB_DOCS_BASE, GITHUB_DOCS_TREE_BASE, GITHUB_OWNER, GITHUB_REPO, GITHUB_REPO_URL, HOSTED_PROJECT_SNAPSHOT_SCHEMA_VERSION, I18NPRUNE_CONFIG_BASENAME, I18NPRUNE_CONFIG_JSON_FILE_NAME, I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES, I18NPRUNE_CONFIG_SCRIPT_FILE_NAMES_SET, I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES, I18NPRUNE_CONFIG_SNAPSHOT_FILE_NAMES_SET, I18nPruneError, I18nPruneJsonParseError, ISSUE_CLEANUP_RIPGREP_UNAVAILABLE, ISSUE_CLEANUP_UNCERTAIN_PATHS_EXCLUDED, ISSUE_CLI_INVALID_JSON_PRETTY, ISSUE_CONFIG_INVALID, ISSUE_CONFIG_LOAD_FAILED, ISSUE_CONFIG_MISSING, ISSUE_CONTEXT_DISCOVERY_WARNING, ISSUE_CONTEXT_RESOLUTION_FAILED, ISSUE_DOCTOR_CONFIG_MISSING_FILE, ISSUE_DOCTOR_PATHS_DIRECTORIES_MISSING, ISSUE_DOCTOR_PATHS_SOURCE_LOCALE_MISSING, ISSUE_DOCTOR_RUNTIME_UNSUPPORTED_NODE, ISSUE_DOCTOR_TOOLS_RG_NOT_ON_PATH, ISSUE_GENERATE_SOURCE_EMPTY_STRING_LEAVES, ISSUE_GENERATE_TRANSLATE_NETWORK_ERROR, ISSUE_GENERATE_TRANSLATE_RATE_LIMITED, ISSUE_GENERATE_USAGE, ISSUE_IO_READ_FAILED, ISSUE_LANGUAGES_EMPTY_FILTER, ISSUE_LANGUAGES_UNSUPPORTED_LANGUAGE_CODE, ISSUE_LOCALES_USAGE, ISSUE_LOCALE_SOURCE_PLACEHOLDER_LEAVES, ISSUE_LOCALE_TARGET_NOT_FOUND, ISSUE_LOCALE_TARGET_PLACEHOLDER_LEAVES, ISSUE_MISSING_PATHS_NOT_IN_SCAN, ISSUE_PATCHING_CATALOG_MISMATCH_DIRECTION, ISSUE_PATCHING_CATALOG_MISMATCH_ENGLISH, ISSUE_PATCHING_CATALOG_MISMATCH_NATIVE, ISSUE_PATCHING_CONFIG_INVALID_SCHEMA, ISSUE_PATCHING_CONFIG_LOCALE_MISSING_FILE, ISSUE_PATCHING_CONFIG_PARSE_FAILED, ISSUE_PATCHING_CONFIG_SECTION_INCOMPLETE, ISSUE_PATCHING_CONFIG_SIZE_ANOMALY, ISSUE_PATCHING_CONFIG_TOO_LARGE, ISSUE_PATCHING_FILE_LOCALE_MISSING_CONFIG, ISSUE_PATHS_NETWORK_DRIVE, ISSUE_PATHS_WINDOWS_LONG_PATH, ISSUE_PATHS_WINDOWS_RESERVED_NAME, ISSUE_PROJECT_CONFIG_FILE_MISSING, ISSUE_PROJECT_HOSTED_SNAPSHOT_INVALID, ISSUE_PROJECT_HOSTED_SNAPSHOT_SCHEMA_VERSION, ISSUE_PROJECT_LOCALES_DIR_UNAVAILABLE, ISSUE_PROJECT_LOCALES_SOURCE_NOT_IN_BUNDLE, ISSUE_PROJECT_LOCALES_SOURCE_NOT_LANGUAGE_CODE, ISSUE_PROJECT_LOCALES_STRUCTURE_REQUIRED, ISSUE_PROJECT_SOURCE_LOCALE_INVALID_JSON, ISSUE_PROJECT_SOURCE_LOCALE_INVALID_SHAPE, ISSUE_PROJECT_SOURCE_LOCALE_MISSING_SEGMENTS, ISSUE_PROJECT_SOURCE_LOCALE_NOT_FOUND, ISSUE_PROJECT_SOURCE_LOCALE_UNAVAILABLE, ISSUE_PROJECT_SRC_ROOT_UNAVAILABLE, ISSUE_PROJECT_UPLOAD_CONFIG_JSON_INVALID, ISSUE_PROJECT_UPLOAD_CONFIG_REQUIRED, ISSUE_QUALITY_ENGLISH_IDENTICAL_LEAVES, ISSUE_REPORT_HOSTED_REPORT_INVALID, ISSUE_REPORT_INVALID_FORMAT, ISSUE_SCAN_DYNAMIC_KEY_SITES, ISSUE_SHARE_CACHE_EMPTY, ISSUE_SHARE_CACHE_ENTRY_NOT_FOUND, ISSUE_SHARE_JSON_REPAIRED, ISSUE_SHARE_JSON_WRITE_FAILED, ISSUE_SHARE_PREPARE_ANALYSIS_FAILED, ISSUE_SHARE_PREPARE_NOTHING_REQUESTED, ISSUE_SHARE_PREPARE_REPORT_FROM_ARCHIVE_FAILED, ISSUE_SHARE_PREPARE_REPORT_HOST_REQUIRED, ISSUE_SHARE_REMOTE_ERROR, ISSUE_SHARE_REMOTE_PAYLOAD_TOO_LARGE, ISSUE_SHARE_REMOTE_PROJECT_NOT_FOUND, ISSUE_SHARE_REMOTE_REPORT_NOT_FOUND, ISSUE_SHARE_REMOTE_REPORT_REJECTED, ISSUE_SHARE_REMOTE_UNAVAILABLE, ISSUE_SHARE_REMOTE_UPLOAD_REJECTED, ISSUE_SHARE_SNAPSHOT_EMPTY, ISSUE_SHARE_STALE_CACHE_ROW_REMOVED, ISSUE_SHARE_ZIP_FAILED, ISSUE_SYNC_LOCALE_FILE_NOT_FOUND, ISSUE_SYNC_METADATA_FLAG_CONFLICT, ISSUE_TRANSLATE_CONFIG_DEFAULT_APPLIED, ISSUE_TRANSLATE_HANDOFF_NO_ELIGIBLE_PROVIDER, ISSUE_TRANSLATE_IDENTITY_STREAK_ABORT, ISSUE_TRANSLATE_IDENTITY_STREAK_WARNING, ISSUE_TRANSLATE_MISSING_CREDENTIALS, ISSUE_TRANSLATE_PROVIDER_NOT_IMPLEMENTED_YET, ISSUE_TRANSLATE_UNKNOWN_TRANSLATION_PROVIDER, ISSUE_VALIDATE_DYNAMIC_KEY_SITES, ISSUE_VALIDATE_MISSING_LITERAL_KEYS, ISSUE_VALIDATE_SOURCE_LOCALE_READ_FAILED, type IssueCodeDocLinkParts, type JsonParseLocation, LICENSE_URL, LIST_MORE_HINT, LIST_WINDOW_DEFAULT_TOP, LIST_WINDOW_HARD_CAP, ListLocaleCodesResult, ListLocaleSegmentsResult, ListWindowInput, ListWindowResolved, LocaleSegmentRef, LocaleSegmentTarget, LocalesLayoutMode, LocalesLayoutStructure, MAX_ANALYSIS_BYTES, MAX_MISSING_TARGET_SUGGESTIONS, MAX_PROJECTS_INDEX_BYTES, MAX_PROJECT_FILES_BYTES, MAX_TRANSLATIONS_CACHE_BYTES, META_WORKER_URL, MergeToTemplateOptions, NPM_PACKAGE_NAME, NPM_PACKAGE_URL, PROJECT_REPORT_KIND, PROJECT_REPORT_SCHEMA_VERSION, PROJECT_SHARE_PREPARED_MAX_BYTES, PROJECT_UPLOAD_MAX_FILES, PROJECT_UPLOAD_MAX_TEXT_BYTES, PROJECT_UPLOAD_MAX_ZIP_BYTES, PROJECT_UPLOAD_ZIP_LIMITS, type ParseJsonTextOptions, PathSegment, PruneToTemplateOptions, REPORT_INLINE_PAYLOAD_PLACEHOLDER, REPORT_SHARE_MAX_BYTES, RESULT_API_VERSION, ReadFlatLocaleJsonSurfaceResult, ReadLocaleBundleResult, ResolveListWindowOptions, ResolveLocaleLeafModeInput, ResolveLocaleSegmentTargetsInput, ResolvedLocalesLayout, RunEmitter, RunEvent, SDK_PACKAGE_NAME, SDK_VERSION, SHARE_BAK_DIRNAME, SHARE_CACHE_REASON_MESSAGES, SHARE_JSON_BASENAME, type ShareCacheReasonCode, SyncSegmentSourcePlan, TRANSLATE_WORKERS_CAP, TRANSLATIONS_DIR, TranslatorEnv, type TryParseJsonTextResult, WORKER_IDLE_RETENTION_MS, WORKER_INGEST_FORCE_QUERY, WalkedJsonSegment, WriteFlatLocaleJsonDocumentResult, applyListWindow, applyLocaleLeafMode, applyLocaleLeafNormalization, applyPreserveFromSource, buildCliJsonEnvelope, buildLanguageCatalog, buildLocaleJsonByTagFromArchive, buildSegmentTemplateFromSource, collectLocaleStructuralParityDiagnostics, collectSourceLocaleMissingSegmentDiagnostics, collectTranslationSurfaceLeaves, index as constants, createLocaleReadCache, deepClone, deleteAtPath, docsCommandUrl, emitIssuesAsRunErrors, emitRunErrorFromUnknown, emitRunEvent, emitRunMessage, enrichIssuesWithDocHrefs, index$e as errors, filterLanguageCatalog, formatListOmittedSuffix, formatListShownOmitted, generatedLanguageCatalog, getAtPath, getDocsUrl, getJsonParseLocation, getLanguageByCodeFromCatalog, getProjectedLeafString, getRunOptions, invalidateLocaleReadCacheForAbsolutePath, invalidateLocaleReadCacheForLocaleCode, isCompleteStructuredLocaleLeafMeta, isErrnoCode, isLocalesLayoutReadSupported, isLocalesLayoutWriteSupported, isProgressEvent, isStructuredLocaleLeafNode, issueCodeDocHref, issueCodeRepoDocPathForIssueCode, issueFromI18nPruneError, index$d as json, index$1 as languagesCatalog, listLocaleCodes, listLocaleCodesFromArchive, listLocaleCodesFromContext, listLocaleSegmentTargets, listLocaleSegments, listLocaleSegmentsFromContext, listSourceLocaleWriteTargets, localeCodeForSegment, localeCodesFromContext, localeJsonFromTranslationSurfaceLeaves, localeJsonValueFromTranslation, index$9 as localeLeaves, localeSegmentRefFromAbsolute, localeSegmentSourceForFile, localeStructuralSlot, index$8 as localesLayout, index$7 as localesRead, index$6 as localesWrite, mask, materializeGenerateWorkingBySegment, mergeToTemplateShape, metadataModeEnabledFromConfig, noopRunEmitter, normalizeRepoDocPath, normalizeUnknownError, nowMs, index$4 as options, pairedSourceSegmentRelativePath, parseJsonText, index$b as placeholders, primarySegmentForLocale, projectLocaleLeaves, index$5 as projects, pruneToTemplateShape, readFlatLocaleJsonSurface, readLocaleBundle, readLocaleCodeSurfaceFromContext, readLocaleJsonFromContextSync, readLocaleJsonOrEmpty, readLocaleLeavesForCode, readLocalePerDirLocaleSurface, readLocaleSegmentFromContext, readSourceLocaleLeaves, paths as reference, resetRunOptions, resolveGlobalSyncSchemaPaths, resolveIssueCodeDocLink, resolveListWindow, resolveLocaleLeafMode, resolveLocaleSegmentAbsolutePath, resolveLocaleSegmentTargets, resolveLocalesLayout, resolveLocalesLayoutFromContext, resolvePairedSourceSegmentAbsolutePath, resolvePrimaryTargetWritePath, resolveSyncSegmentSourcePlan, resolveTargetLocaleWritePlan, restore, index$2 as result, rethrowAsI18n, index$3 as run, scanSources, index$c as scanner, segmentsForLocaleCode, setAtPath, setRunOptions, sourceLocaleCodeForLayout, sourceLocaleCodeFromContext, sourceSegmentRelativePathForKey, splitPath, stringifyCliCommandJson, stringifyEnvelope, suggestCatalogCodesForInvalidInputFromCatalog, swapLocaleInSegmentRelativePath, targetLocaleCodesFromContext, targetLocaleCoversAllSourcePaths, targetSegmentRelativePathForKey, translateLeaf, translationSurfacePathValueMap, index$a as translator, tryParseJsonText, validateLeafTranslationString, validateRestored, walkLocaleJsonSegments, writeFlatLocaleJsonDocument, writeLocaleBundle, writeLocaleJsonFromContextSync };