@trazum/core 1.8.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 (223) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +163 -0
  3. package/dist/advisories.d.ts +23 -0
  4. package/dist/advisories.d.ts.map +1 -0
  5. package/dist/advisories.js +376 -0
  6. package/dist/advisories.js.map +1 -0
  7. package/dist/aws-sigv4.d.ts +88 -0
  8. package/dist/aws-sigv4.d.ts.map +1 -0
  9. package/dist/aws-sigv4.js +117 -0
  10. package/dist/aws-sigv4.js.map +1 -0
  11. package/dist/baseline.d.ts +171 -0
  12. package/dist/baseline.d.ts.map +1 -0
  13. package/dist/baseline.js +273 -0
  14. package/dist/baseline.js.map +1 -0
  15. package/dist/cache.d.ts +26 -0
  16. package/dist/cache.d.ts.map +1 -0
  17. package/dist/cache.js +28 -0
  18. package/dist/cache.js.map +1 -0
  19. package/dist/changes.d.ts +29 -0
  20. package/dist/changes.d.ts.map +1 -0
  21. package/dist/changes.js +142 -0
  22. package/dist/changes.js.map +1 -0
  23. package/dist/compare.d.ts +65 -0
  24. package/dist/compare.d.ts.map +1 -0
  25. package/dist/compare.js +58 -0
  26. package/dist/compare.js.map +1 -0
  27. package/dist/config-schema.d.ts +118 -0
  28. package/dist/config-schema.d.ts.map +1 -0
  29. package/dist/config-schema.js +315 -0
  30. package/dist/config-schema.js.map +1 -0
  31. package/dist/config.d.ts +47 -0
  32. package/dist/config.d.ts.map +1 -0
  33. package/dist/config.js +112 -0
  34. package/dist/config.js.map +1 -0
  35. package/dist/detect.d.ts +70 -0
  36. package/dist/detect.d.ts.map +1 -0
  37. package/dist/detect.js +228 -0
  38. package/dist/detect.js.map +1 -0
  39. package/dist/evaluate.d.ts +98 -0
  40. package/dist/evaluate.d.ts.map +1 -0
  41. package/dist/evaluate.js +110 -0
  42. package/dist/evaluate.js.map +1 -0
  43. package/dist/extract.d.ts +81 -0
  44. package/dist/extract.d.ts.map +1 -0
  45. package/dist/extract.js +280 -0
  46. package/dist/extract.js.map +1 -0
  47. package/dist/gcp-auth.d.ts +58 -0
  48. package/dist/gcp-auth.d.ts.map +1 -0
  49. package/dist/gcp-auth.js +113 -0
  50. package/dist/gcp-auth.js.map +1 -0
  51. package/dist/glob.d.ts +49 -0
  52. package/dist/glob.d.ts.map +1 -0
  53. package/dist/glob.js +154 -0
  54. package/dist/glob.js.map +1 -0
  55. package/dist/host.d.ts +30 -0
  56. package/dist/host.d.ts.map +1 -0
  57. package/dist/host.js +69 -0
  58. package/dist/host.js.map +1 -0
  59. package/dist/i18n/en.d.ts +4 -0
  60. package/dist/i18n/en.d.ts.map +1 -0
  61. package/dist/i18n/en.js +168 -0
  62. package/dist/i18n/en.js.map +1 -0
  63. package/dist/i18n/es.d.ts +4 -0
  64. package/dist/i18n/es.d.ts.map +1 -0
  65. package/dist/i18n/es.js +168 -0
  66. package/dist/i18n/es.js.map +1 -0
  67. package/dist/i18n/index.d.ts +36 -0
  68. package/dist/i18n/index.d.ts.map +1 -0
  69. package/dist/i18n/index.js +50 -0
  70. package/dist/i18n/index.js.map +1 -0
  71. package/dist/i18n/types.d.ts +180 -0
  72. package/dist/i18n/types.d.ts.map +1 -0
  73. package/dist/i18n/types.js +11 -0
  74. package/dist/i18n/types.js.map +1 -0
  75. package/dist/index.d.ts +66 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +69 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/llm.d.ts +226 -0
  80. package/dist/llm.d.ts.map +1 -0
  81. package/dist/llm.js +485 -0
  82. package/dist/llm.js.map +1 -0
  83. package/dist/nearest.d.ts +20 -0
  84. package/dist/nearest.d.ts.map +1 -0
  85. package/dist/nearest.js +54 -0
  86. package/dist/nearest.js.map +1 -0
  87. package/dist/net.d.ts +90 -0
  88. package/dist/net.d.ts.map +1 -0
  89. package/dist/net.js +203 -0
  90. package/dist/net.js.map +1 -0
  91. package/dist/node.d.ts +32 -0
  92. package/dist/node.d.ts.map +1 -0
  93. package/dist/node.js +33 -0
  94. package/dist/node.js.map +1 -0
  95. package/dist/openrouter.d.ts +25 -0
  96. package/dist/openrouter.d.ts.map +1 -0
  97. package/dist/openrouter.js +72 -0
  98. package/dist/openrouter.js.map +1 -0
  99. package/dist/optimize.d.ts +38 -0
  100. package/dist/optimize.d.ts.map +1 -0
  101. package/dist/optimize.js +183 -0
  102. package/dist/optimize.js.map +1 -0
  103. package/dist/otlp.d.ts +91 -0
  104. package/dist/otlp.d.ts.map +1 -0
  105. package/dist/otlp.js +102 -0
  106. package/dist/otlp.js.map +1 -0
  107. package/dist/phrases.d.ts +169 -0
  108. package/dist/phrases.d.ts.map +1 -0
  109. package/dist/phrases.js +939 -0
  110. package/dist/phrases.js.map +1 -0
  111. package/dist/pricing-overlay.d.ts +55 -0
  112. package/dist/pricing-overlay.d.ts.map +1 -0
  113. package/dist/pricing-overlay.js +241 -0
  114. package/dist/pricing-overlay.js.map +1 -0
  115. package/dist/pricing.d.ts +115 -0
  116. package/dist/pricing.d.ts.map +1 -0
  117. package/dist/pricing.js +400 -0
  118. package/dist/pricing.js.map +1 -0
  119. package/dist/profile.d.ts +71 -0
  120. package/dist/profile.d.ts.map +1 -0
  121. package/dist/profile.js +55 -0
  122. package/dist/profile.js.map +1 -0
  123. package/dist/promptfoo.d.ts +58 -0
  124. package/dist/promptfoo.d.ts.map +1 -0
  125. package/dist/promptfoo.js +149 -0
  126. package/dist/promptfoo.js.map +1 -0
  127. package/dist/prune.d.ts +91 -0
  128. package/dist/prune.d.ts.map +1 -0
  129. package/dist/prune.js +110 -0
  130. package/dist/prune.js.map +1 -0
  131. package/dist/reorder.d.ts +82 -0
  132. package/dist/reorder.d.ts.map +1 -0
  133. package/dist/reorder.js +215 -0
  134. package/dist/reorder.js.map +1 -0
  135. package/dist/review.d.ts +54 -0
  136. package/dist/review.d.ts.map +1 -0
  137. package/dist/review.js +131 -0
  138. package/dist/review.js.map +1 -0
  139. package/dist/rules.d.ts +5 -0
  140. package/dist/rules.d.ts.map +1 -0
  141. package/dist/rules.js +279 -0
  142. package/dist/rules.js.map +1 -0
  143. package/dist/savings.d.ts +36 -0
  144. package/dist/savings.d.ts.map +1 -0
  145. package/dist/savings.js +83 -0
  146. package/dist/savings.js.map +1 -0
  147. package/dist/segment.d.ts +8 -0
  148. package/dist/segment.d.ts.map +1 -0
  149. package/dist/segment.js +74 -0
  150. package/dist/segment.js.map +1 -0
  151. package/dist/shared-prefix.d.ts +63 -0
  152. package/dist/shared-prefix.d.ts.map +1 -0
  153. package/dist/shared-prefix.js +151 -0
  154. package/dist/shared-prefix.js.map +1 -0
  155. package/dist/similarity.d.ts +13 -0
  156. package/dist/similarity.d.ts.map +1 -0
  157. package/dist/similarity.js +30 -0
  158. package/dist/similarity.js.map +1 -0
  159. package/dist/structure.d.ts +144 -0
  160. package/dist/structure.d.ts.map +1 -0
  161. package/dist/structure.js +455 -0
  162. package/dist/structure.js.map +1 -0
  163. package/dist/suggest.d.ts +100 -0
  164. package/dist/suggest.d.ts.map +1 -0
  165. package/dist/suggest.js +151 -0
  166. package/dist/suggest.js.map +1 -0
  167. package/dist/tokenizer.d.ts +57 -0
  168. package/dist/tokenizer.d.ts.map +1 -0
  169. package/dist/tokenizer.js +157 -0
  170. package/dist/tokenizer.js.map +1 -0
  171. package/dist/types.d.ts +296 -0
  172. package/dist/types.d.ts.map +1 -0
  173. package/dist/types.js +3 -0
  174. package/dist/types.js.map +1 -0
  175. package/dist/walk.d.ts +40 -0
  176. package/dist/walk.d.ts.map +1 -0
  177. package/dist/walk.js +95 -0
  178. package/dist/walk.js.map +1 -0
  179. package/package.json +56 -0
  180. package/src/advisories.ts +431 -0
  181. package/src/aws-sigv4.ts +174 -0
  182. package/src/baseline.ts +390 -0
  183. package/src/cache.ts +54 -0
  184. package/src/changes.ts +158 -0
  185. package/src/compare.ts +131 -0
  186. package/src/config-schema.ts +451 -0
  187. package/src/config.ts +161 -0
  188. package/src/detect.ts +312 -0
  189. package/src/evaluate.ts +188 -0
  190. package/src/extract.ts +336 -0
  191. package/src/gcp-auth.ts +166 -0
  192. package/src/glob.ts +160 -0
  193. package/src/host.ts +90 -0
  194. package/src/i18n/en.ts +236 -0
  195. package/src/i18n/es.ts +236 -0
  196. package/src/i18n/index.ts +68 -0
  197. package/src/i18n/types.ts +230 -0
  198. package/src/index.ts +228 -0
  199. package/src/llm.ts +708 -0
  200. package/src/nearest.ts +61 -0
  201. package/src/net.ts +233 -0
  202. package/src/node.ts +63 -0
  203. package/src/openrouter.ts +125 -0
  204. package/src/optimize.ts +228 -0
  205. package/src/otlp.ts +179 -0
  206. package/src/phrases.ts +1047 -0
  207. package/src/pricing-overlay.ts +319 -0
  208. package/src/pricing.ts +468 -0
  209. package/src/profile.ts +124 -0
  210. package/src/promptfoo.ts +213 -0
  211. package/src/prune.ts +211 -0
  212. package/src/reorder.ts +307 -0
  213. package/src/review.ts +180 -0
  214. package/src/rules.ts +324 -0
  215. package/src/savings.ts +121 -0
  216. package/src/segment.ts +106 -0
  217. package/src/shared-prefix.ts +198 -0
  218. package/src/similarity.ts +28 -0
  219. package/src/structure.ts +652 -0
  220. package/src/suggest.ts +254 -0
  221. package/src/tokenizer.ts +190 -0
  222. package/src/types.ts +323 -0
  223. package/src/walk.ts +117 -0
@@ -0,0 +1,168 @@
1
+ const n = (value) => value.toLocaleString('es-ES');
2
+ /** Spanish catalogue. Mirrors `en.ts`, which is the source of truth. */
3
+ export const es = {
4
+ locale: 'es',
5
+ numberLocale: 'es-ES',
6
+ rules: {
7
+ 'duplicate-blocks': {
8
+ title: 'Párrafos repetidos',
9
+ rationale: 'Elimina párrafos enteros que ya aparecen antes en el prompt. Es habitual al montar prompts por concatenación de plantillas: el mismo bloque de instrucciones entra dos veces y se paga dos veces.',
10
+ },
11
+ 'near-duplicate-blocks': {
12
+ title: 'Párrafos casi idénticos',
13
+ rationale: 'Elimina párrafos con un 92% o más de palabras en común con otro anterior. Detecta instrucciones reformuladas que dicen lo mismo dos veces. Nivel agresivo: revisa el diff, porque el 8% que difiere puede ser justo el matiz que te importa.',
14
+ },
15
+ 'duplicate-lines': {
16
+ title: 'Líneas repetidas',
17
+ rationale: 'Elimina líneas que ya aparecen idénticas antes en el prompt, ignorando mayúsculas, acentos y puntuación. Solo actúa sobre líneas de 25 caracteres o más, para no tocar viñetas ni separadores legítimos.',
18
+ },
19
+ 'verbose-phrases': {
20
+ title: 'Perífrasis largas',
21
+ rationale: 'Sustituye construcciones largas por su equivalente corto ("con el fin de" → "para", "in order to" → "to"). El significado es idéntico; solo cambia el número de tokens.',
22
+ },
23
+ politeness: {
24
+ title: 'Fórmulas de cortesía',
25
+ rationale: 'Quita "por favor", "gracias", "please", "kindly"... El modelo no responde mejor por pedírselo con cortesía, y cada fórmula se paga en todas las llamadas.',
26
+ },
27
+ filler: {
28
+ title: 'Muletillas y rodeos',
29
+ rationale: 'Elimina arranques vacíos como "básicamente", "cabe destacar que" o "it is important to note that", que no aportan instrucción.',
30
+ },
31
+ hedges: {
32
+ title: 'Coletillas de duda',
33
+ rationale: 'Elimina "creo que", "I think", "en mi opinión". En una instrucción debilitan la orden sin añadir información.',
34
+ },
35
+ intensifiers: {
36
+ title: 'Intensificadores',
37
+ rationale: 'Quita "muy", "realmente", "extremely"... Rara vez cambian la tarea. Nivel agresivo porque en algún prompt concreto el matiz sí importa.',
38
+ },
39
+ 'self-check': {
40
+ title: 'Instrucciones de auto-verificación',
41
+ rationale: 'Quita "verifica tu respuesta", "double-check your work". Los modelos actuales ya verifican su trabajo; pedirlo explícitamente dispara pasos extra que se pagan en tokens de salida. Desactívala si tu flujo depende de esa verificación.',
42
+ },
43
+ emphasis: {
44
+ title: 'Énfasis en mayúsculas',
45
+ rationale: 'Pasa a minúscula palabras gritadas (MUST, NUNCA, CRITICAL) y quita prefijos tipo "IMPORTANTE:". Las mayúsculas se parten en más tokens que las minúsculas, y en los modelos actuales el énfasis excesivo hace que la instrucción se dispare de más.',
46
+ },
47
+ decoration: {
48
+ title: 'Separadores decorativos',
49
+ rationale: 'Elimina líneas hechas solo de caracteres repetidos (====, ----, ****) y las secuencias de signos de exclamación. No aportan estructura que el modelo aproveche y cuestan tokens en cada llamada.',
50
+ },
51
+ whitespace: {
52
+ title: 'Espacios y líneas en blanco sobrantes',
53
+ rationale: 'Quita espacios al final de línea, colapsa espacios repetidos dentro de la línea y reduce las líneas en blanco consecutivas a una. Respeta la sangría inicial para no romper listas ni markdown anidado.',
54
+ },
55
+ },
56
+ llm: {
57
+ emptyResponse: () => 'El modelo devolvió una respuesta vacía.',
58
+ protectedContentAltered: (count) => `El modelo alteró ${count} fragmento(s) protegido(s) (código, URL o marcador de plantilla). Descartado para no romper el prompt.`,
59
+ notShorter: (after, before) => `El resultado no es más corto (${after} vs ${before} tokens). Se mantiene la versión determinista.`,
60
+ suspiciousShrink: (retainedPct) => `El resultado conserva solo el ${retainedPct}% de los tokens. Eso parece un resumen, no una compresión: revísalo a mano antes de usarlo.`,
61
+ },
62
+ suggest: {
63
+ 'not-found': () => 'la frase citada no está en el prompt — el modelo parafraseó lo que estaba copiando',
64
+ 'touches-protected': () => 'editaría código, una URL, un marcador o una etiqueta, que se copian literalmente',
65
+ 'introduces-protected': () => 'el reemplazo añade un marcador o una URL que no estaba',
66
+ 'no-saving': () => 'no es más corto que lo que reemplaza',
67
+ overlaps: () => 'comparte texto con una sugerencia ya aceptada',
68
+ },
69
+ advisories: {
70
+ contextOverflow: ({ tokens, modelName, contextWindow }) => ({
71
+ title: 'El prompt no cabe en la ventana de contexto',
72
+ detail: `El prompt optimizado ocupa ~${n(tokens)} tokens y ${modelName} admite ${n(contextWindow)}. La llamada fallará: divide el contenido o cambia a un modelo con ventana mayor.`,
73
+ }),
74
+ promptCaching: ({ placeholder, prefixTokens, totalTokens, minTokens, modelName, hitRatePct, readPct, writePct, explicit, }) => {
75
+ const scope = placeholder
76
+ ? `El prefijo estable —lo anterior al primer marcador ${placeholder}— son ~${n(prefixTokens)} de los ${n(totalTokens)} tokens del prompt, y supera el mínimo cacheable de ${n(minTokens)} de ${modelName}.`
77
+ : `El prompt no tiene marcadores variables, así que el prefijo cacheable es entero y supera el mínimo de ${n(minTokens)} tokens de ${modelName}.`;
78
+ const how = explicit
79
+ ? 'Coloca el marcador de caché al final del prefijo estable: cualquier byte que cambie antes del corte invalida todo lo que va detrás.'
80
+ : `${modelName} cachea automáticamente por encima de su mínimo, así que no hay nada que activar; pero la regla es la misma: cualquier byte que cambie antes del corte invalida todo lo que va detrás.`;
81
+ return {
82
+ title: 'Activa prompt caching en el prefijo estable',
83
+ detail: `${scope} Con una tasa de acierto del ${hitRatePct}%, la lectura de caché cuesta un ${readPct}% del precio de entrada y la escritura un ${writePct}%. ${how}`,
84
+ };
85
+ },
86
+ promptCachingNotWorthIt: () => ({
87
+ title: 'Con esa tasa de acierto, la caché no compensa',
88
+ detail: 'Escribir en caché cuesta un 125% del precio de entrada y leer un 10%. Por debajo de un ~28% de aciertos pagas más de lo que ahorras. Sube la reutilización del prefijo o deja la caché desactivada.',
89
+ }),
90
+ belowCacheMinimum: ({ modelName, minTokens, placeholder, prefixTokens, totalTokens, mentionLowerMinimum, }) => {
91
+ const reason = placeholder
92
+ ? `aquí el primer marcador variable (${placeholder}) aparece a los ~${n(prefixTokens)} tokens y solo lo anterior puede cachearse`
93
+ : `este prompt tiene ~${n(totalTokens)}`;
94
+ return {
95
+ title: 'Por debajo del mínimo cacheable',
96
+ detail: `${modelName} necesita al menos ${n(minTokens)} tokens de prefijo para cachear; ${reason}. Marcar cache_control no dará error, simplemente no cacheará.` +
97
+ (mentionLowerMinimum
98
+ ? ' Claude Opus 5 baja ese mínimo a 512 tokens, así que prompts cortos que aquí no cachean, allí sí.'
99
+ : ''),
100
+ };
101
+ },
102
+ cachePrefixReorder: ({ staticTokensAfter, sharePct, placeholder }) => ({
103
+ title: 'Mueve las instrucciones estables antes del primer marcador',
104
+ detail: `Unos ~${n(staticTokensAfter)} tokens de contenido estable (el ${sharePct}% del prompt) están después del primer marcador variable ${placeholder}, así que hoy no se cachean nunca. Reordena la plantilla —instrucciones y contexto fijos primero, marcadores al final— y ese contenido pasa a leerse de caché al 10% del precio. Revisa que la reordenación no cambie el sentido del prompt.`,
105
+ }),
106
+ batchApi: () => ({
107
+ title: 'Si el trabajo tolera latencia, usa la Batch API',
108
+ detail: 'La Batch API aplica un 50% de descuento sobre entrada y salida. La mayoría de lotes terminan en menos de una hora, con un máximo de 24. Sirve para clasificación masiva, enriquecimiento de datos o evaluaciones: cualquier cosa que no responda a un usuario en tiempo real.',
109
+ }),
110
+ modelDowngrade: ({ modelName, tier, candidateName, currentUsd, candidateUsd }) => ({
111
+ title: `Esta tarea quizá no necesite ${modelName}`,
112
+ detail: `Por longitud y vocabulario, el prompt parece de complejidad "${tier}". Con ${candidateName} pasarías de ${currentUsd} a ${candidateUsd} al mes. Es una heurística por palabras clave, no un juicio de calidad: mide la diferencia con tus propias evaluaciones antes de cambiar en producción.`,
113
+ }),
114
+ outputDominated: ({ outputUsd, inputUsd }) => ({
115
+ title: 'Tu coste está en la salida, no en el prompt',
116
+ detail: `La salida supone ${outputUsd} al mes frente a ${inputUsd} de entrada. Acortar el prompt tiene un techo bajo aquí. Los dos controles que mueven la aguja son el parámetro effort (bájalo si la tarea no es intensiva en razonamiento) y pedir respuestas concisas de forma explícita.`,
117
+ }),
118
+ promoPricing: ({ modelName, promoInput, promoOutput, until, listInput, listOutput }) => ({
119
+ title: 'Estás calculando con precio promocional',
120
+ detail: `${modelName} tiene precio de lanzamiento ${promoInput}/${promoOutput} por millón de tokens hasta el ${until}. A partir de esa fecha pasa a ${listInput}/${listOutput}: tu factura subirá aunque no cambies nada.`,
121
+ }),
122
+ contradictoryInstructions: ({ axis, firstValue, firstSnippet, secondValue, secondSnippet, otherCount, }) => ({
123
+ title: `Dos instrucciones se contradicen sobre ${axis}`,
124
+ detail: `Una dice ${firstValue} ("${firstSnippet}") y otra dice ${secondValue} ("${secondSnippet}"). ` +
125
+ 'El modelo tiene que elegir una, y cuál elige puede cambiar entre llamadas: esto es un problema de corrección antes que de coste. ' +
126
+ 'Borrar la instrucción que no querías además acorta el prompt.' +
127
+ (otherCount > 0
128
+ ? ` Hay ${otherCount} ${otherCount === 1 ? 'pareja más' : 'parejas más'} de instrucciones que se contradicen.`
129
+ : ''),
130
+ }),
131
+ redundantExamples: ({ redundantCount, totalCount, redundantTokens, topSimilarityPct }) => ({
132
+ title: `${redundantCount} de ${totalCount} ejemplos repiten uno anterior`,
133
+ detail: `Comparten el ${topSimilarityPct}% o más de su redacción con un ejemplo previo y suponen unos ${n(redundantTokens)} tokens que pagas en cada llamada. ` +
134
+ 'Un ejemplo few-shot se paga a sí mismo enseñando algo nuevo; dos que demuestran el mismo patrón lo enseñan una vez. ' +
135
+ 'Léelos antes de borrar: un ejemplo que parece redundante puede estar mostrando un caso límite a propósito.',
136
+ }),
137
+ movableSchema: ({ blocks, tokens, keyList, cue }) => ({
138
+ title: 'El esquema de salida podría ir en la petición y no en el prompt',
139
+ detail: `${blocks === 1 ? 'Un bloque de esquema' : `${blocks} bloques de esquema`} introducido por "${cue}" define ${keyList}, y cuesta unos ${n(tokens)} tokens en cada llamada. ` +
140
+ 'Toda API relevante acepta ya un esquema de respuesta como parámetro de la petición — output_config.format, response_format, responseSchema — y moverlo allí es el cambio raro que sale más barato y además más estricto: la prosa le pide al modelo que cumpla, un parámetro obliga al decodificador. ' +
141
+ 'Trazum no puede hacer esta edición, porque cambia la llamada y no el prompt, y no comprueba si tu proveedor ofrece el parámetro — si no lo ofrece, esto no está disponible para ti.',
142
+ }),
143
+ restatedOutputFormat: ({ restatedCount, totalCount, restatedTokens, keyList }) => ({
144
+ title: 'El formato de salida está especificado dos veces',
145
+ detail: `La prosa describe ${restatedCount} de los ${totalCount} campos que tu esquema ya define (${keyList}), y cuesta unos ${n(restatedTokens)} tokens en cada llamada. ` +
146
+ 'El bloque de código es la versión que merece la pena conservar: no es ambiguo y Trazum nunca lo toca. ' +
147
+ 'Comprueba que ambos dicen lo mismo antes de borrar ninguno: cuando un prompt dice una cosa en prosa y otra en el esquema, lo que suele haberse quedado obsoleto es la prosa.',
148
+ }),
149
+ },
150
+ contradictionAxes: {
151
+ 'response-language': 'el idioma de la respuesta',
152
+ 'output-format': 'el formato de salida',
153
+ 'response-length': 'la longitud de la respuesta',
154
+ 'reasoning-visibility': 'si mostrar el razonamiento',
155
+ },
156
+ contradictionValues: {
157
+ 'fixed-language': 'siempre el mismo idioma',
158
+ 'mirror-language': 'el idioma de quien escribe',
159
+ 'format-json': 'JSON',
160
+ 'format-markdown': 'Markdown',
161
+ 'format-plain-text': 'texto plano',
162
+ 'length-brief': 'que sea breve',
163
+ 'length-detailed': 'que entre en detalle',
164
+ 'reasoning-shown': 'mostrar el razonamiento',
165
+ 'reasoning-hidden': 'ocultar el razonamiento',
166
+ },
167
+ };
168
+ //# sourceMappingURL=es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es.js","sourceRoot":"","sources":["../../src/i18n/es.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAEnE,wEAAwE;AACxE,MAAM,CAAC,MAAM,EAAE,GAAiB;IAC9B,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,OAAO;IAErB,KAAK,EAAE;QACL,kBAAkB,EAAE;YAClB,KAAK,EAAE,oBAAoB;YAC3B,SAAS,EACP,mMAAmM;SACtM;QACD,uBAAuB,EAAE;YACvB,KAAK,EAAE,yBAAyB;YAChC,SAAS,EACP,8OAA8O;SACjP;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,kBAAkB;YACzB,SAAS,EACP,0MAA0M;SAC7M;QACD,iBAAiB,EAAE;YACjB,KAAK,EAAE,mBAAmB;YAC1B,SAAS,EACP,yKAAyK;SAC5K;QACD,UAAU,EAAE;YACV,KAAK,EAAE,sBAAsB;YAC7B,SAAS,EACP,2JAA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BAAoB,CAAC,CAAC,cAAc,CAAC,2BAA2B;gBACnK,wGAAwG;gBACxG,8KAA8K;SACjL,CAAC;KACH;IAED,iBAAiB,EAAE;QACjB,mBAAmB,EAAE,2BAA2B;QAChD,eAAe,EAAE,sBAAsB;QACvC,iBAAiB,EAAE,6BAA6B;QAChD,sBAAsB,EAAE,4BAA4B;KACrD;IAED,mBAAmB,EAAE;QACnB,gBAAgB,EAAE,yBAAyB;QAC3C,iBAAiB,EAAE,4BAA4B;QAC/C,aAAa,EAAE,MAAM;QACrB,iBAAiB,EAAE,UAAU;QAC7B,mBAAmB,EAAE,aAAa;QAClC,cAAc,EAAE,eAAe;QAC/B,iBAAiB,EAAE,sBAAsB;QACzC,iBAAiB,EAAE,yBAAyB;QAC5C,kBAAkB,EAAE,yBAAyB;KAC9C;CACF,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { en } from './en.js';
2
+ import { es } from './es.js';
3
+ import { DEFAULT_LOCALE, LOCALES } from './types.js';
4
+ import type { CoreMessages, Locale } from './types.js';
5
+ /** Message catalogue for a locale. */
6
+ export declare function getMessages(locale?: Locale): CoreMessages;
7
+ /** Whether a string is a locale Trazum ships. */
8
+ export declare function isLocale(value: unknown): value is Locale;
9
+ /**
10
+ * Highest-priority locale in `input` that Trazum actually ships, or `null`
11
+ * when it lists none.
12
+ *
13
+ * Accepts a bare tag (`es`), a regional tag (`es-ES`, `en_GB`), a POSIX locale
14
+ * string (`es_ES.UTF-8`) or an Accept-Language list, so the same helper works
15
+ * for an HTTP header, a CLI flag and the LANG environment variable.
16
+ *
17
+ * The whole list is walked rather than just the first entry: a browser sending
18
+ * `fr-FR,es;q=0.9` prefers French, which we do not have, but it does read
19
+ * Spanish, which we do — falling straight back to English would ignore a
20
+ * preference the user actually expressed. Quality values are assumed to be in
21
+ * descending order, as every real client sends them.
22
+ *
23
+ * Returning `null` instead of a default is what lets callers tell "asked for
24
+ * something we don't have" from "asked for English", and so fall through to
25
+ * the next configuration source.
26
+ */
27
+ export declare function matchLocale(input: string | null | undefined): Locale | null;
28
+ /**
29
+ * Same as `matchLocale`, but falls back to the default locale rather than
30
+ * returning `null`: a bad locale should never be the reason an optimisation
31
+ * fails.
32
+ */
33
+ export declare function resolveLocale(input: string | null | undefined): Locale;
34
+ export { DEFAULT_LOCALE, LOCALES, en, es };
35
+ export type { BelowCacheMinimumParams, CachePrefixReorderParams, ContextOverflowParams, CoreMessages, Locale, LocalizedMessage, ModelDowngradeParams, OutputDominatedParams, PromoPricingParams, PromptCachingParams, RuleCopy, RuleId, } from './types.js';
36
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIvD,sCAAsC;AACtC,wBAAgB,WAAW,CAAC,MAAM,GAAE,MAAuB,GAAG,YAAY,CAEzE;AAED,iDAAiD;AACjD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAO3E;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAEtE;AAED,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAC3C,YAAY,EACV,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,QAAQ,EACR,MAAM,GACP,MAAM,YAAY,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { en } from './en.js';
2
+ import { es } from './es.js';
3
+ import { DEFAULT_LOCALE, LOCALES } from './types.js';
4
+ const CATALOGUES = { en, es };
5
+ /** Message catalogue for a locale. */
6
+ export function getMessages(locale = DEFAULT_LOCALE) {
7
+ return CATALOGUES[locale] ?? CATALOGUES[DEFAULT_LOCALE];
8
+ }
9
+ /** Whether a string is a locale Trazum ships. */
10
+ export function isLocale(value) {
11
+ return typeof value === 'string' && LOCALES.includes(value);
12
+ }
13
+ /**
14
+ * Highest-priority locale in `input` that Trazum actually ships, or `null`
15
+ * when it lists none.
16
+ *
17
+ * Accepts a bare tag (`es`), a regional tag (`es-ES`, `en_GB`), a POSIX locale
18
+ * string (`es_ES.UTF-8`) or an Accept-Language list, so the same helper works
19
+ * for an HTTP header, a CLI flag and the LANG environment variable.
20
+ *
21
+ * The whole list is walked rather than just the first entry: a browser sending
22
+ * `fr-FR,es;q=0.9` prefers French, which we do not have, but it does read
23
+ * Spanish, which we do — falling straight back to English would ignore a
24
+ * preference the user actually expressed. Quality values are assumed to be in
25
+ * descending order, as every real client sends them.
26
+ *
27
+ * Returning `null` instead of a default is what lets callers tell "asked for
28
+ * something we don't have" from "asked for English", and so fall through to
29
+ * the next configuration source.
30
+ */
31
+ export function matchLocale(input) {
32
+ if (!input)
33
+ return null;
34
+ for (const tag of input.split(',')) {
35
+ const base = tag.trim().split(/[-_.;]/)[0]?.toLowerCase() ?? '';
36
+ if (isLocale(base))
37
+ return base;
38
+ }
39
+ return null;
40
+ }
41
+ /**
42
+ * Same as `matchLocale`, but falls back to the default locale rather than
43
+ * returning `null`: a bad locale should never be the reason an optimisation
44
+ * fails.
45
+ */
46
+ export function resolveLocale(input) {
47
+ return matchLocale(input) ?? DEFAULT_LOCALE;
48
+ }
49
+ export { DEFAULT_LOCALE, LOCALES, en, es };
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGrD,MAAM,UAAU,GAAiC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAE5D,sCAAsC;AACtC,MAAM,UAAU,WAAW,CAAC,MAAM,GAAW,cAAc;IACzD,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,CAAC;AAC1D,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,OAA6B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACrF,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,WAAW,CAAC,KAAgC;IAC1D,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAChE,IAAI,QAAQ,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IAClC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,KAAgC;IAC5D,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,cAAc,CAAC;AAC9C,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC"}
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Internationalisation contract for the core.
3
+ *
4
+ * Every user-facing string the core produces lives in a locale catalogue
5
+ * instead of being hardcoded next to the logic. Adding a locale means adding
6
+ * one file — it never means touching the rules engine or the pricing model.
7
+ */
8
+ /** Locales shipped with Trazum. English is the source of truth. */
9
+ export declare const LOCALES: readonly ['en', 'es'];
10
+ export type Locale = (typeof LOCALES)[number];
11
+ export declare const DEFAULT_LOCALE: Locale;
12
+ /**
13
+ * Identifier of every deterministic rule.
14
+ *
15
+ * Declared as a union rather than `string` on purpose: adding a rule fails to
16
+ * compile until every locale catalogue describes it, so a new rule can never
17
+ * ship with a missing translation.
18
+ */
19
+ export type RuleId = 'duplicate-blocks' | 'near-duplicate-blocks' | 'duplicate-lines' | 'verbose-phrases' | 'politeness' | 'filler' | 'hedges' | 'intensifiers' | 'self-check' | 'emphasis' | 'decoration' | 'whitespace';
20
+ /** A headline plus its explanation, both already translated. */
21
+ export interface LocalizedMessage {
22
+ title: string;
23
+ detail: string;
24
+ }
25
+ export interface RuleCopy {
26
+ title: string;
27
+ /** What the rule does and why it is safe at its level. */
28
+ rationale: string;
29
+ }
30
+ export interface ContextOverflowParams {
31
+ tokens: number;
32
+ modelName: string;
33
+ contextWindow: number;
34
+ }
35
+ export interface PromptCachingParams {
36
+ /** First template placeholder, or `null` when the prompt has none. */
37
+ placeholder: string | null;
38
+ prefixTokens: number;
39
+ totalTokens: number;
40
+ minTokens: number;
41
+ modelName: string;
42
+ /** Cache hit rate as a whole percentage. */
43
+ hitRatePct: number;
44
+ /** Cache read price as a percentage of the input price, for this provider. */
45
+ readPct: number;
46
+ /** Cache write price as a percentage of the input price, for this provider. */
47
+ writePct: number;
48
+ /**
49
+ * Whether the caller has to mark the prefix.
50
+ *
51
+ * Telling somebody on OpenAI to "set cache_control" names a parameter that
52
+ * does not exist for them: their caching is automatic above a threshold. The
53
+ * advice to move stable content forward is identical either way — a prefix is
54
+ * a prefix — but the instruction that follows it is not.
55
+ */
56
+ explicit: boolean;
57
+ }
58
+ export interface BelowCacheMinimumParams {
59
+ modelName: string;
60
+ minTokens: number;
61
+ placeholder: string | null;
62
+ prefixTokens: number;
63
+ totalTokens: number;
64
+ /** Whether to point at Claude Opus 5's lower 512-token minimum. */
65
+ mentionLowerMinimum: boolean;
66
+ }
67
+ export interface CachePrefixReorderParams {
68
+ staticTokensAfter: number;
69
+ sharePct: number;
70
+ placeholder: string;
71
+ }
72
+ export interface ModelDowngradeParams {
73
+ modelName: string;
74
+ tier: string;
75
+ candidateName: string;
76
+ currentUsd: string;
77
+ candidateUsd: string;
78
+ }
79
+ export interface OutputDominatedParams {
80
+ outputUsd: string;
81
+ inputUsd: string;
82
+ }
83
+ export interface PromoPricingParams {
84
+ modelName: string;
85
+ promoInput: number;
86
+ promoOutput: number;
87
+ until: string;
88
+ listInput: number;
89
+ listOutput: number;
90
+ }
91
+ export interface ContradictoryInstructionsParams {
92
+ /** Human-readable name of the axis the two instructions disagree on. */
93
+ axis: string;
94
+ firstValue: string;
95
+ firstSnippet: string;
96
+ secondValue: string;
97
+ secondSnippet: string;
98
+ /** How many other axes also disagree, beyond this one. */
99
+ otherCount: number;
100
+ }
101
+ export interface RedundantExamplesParams {
102
+ redundantCount: number;
103
+ totalCount: number;
104
+ redundantTokens: number;
105
+ /** Similarity of the closest pair, 0-100. */
106
+ topSimilarityPct: number;
107
+ }
108
+ export interface MovableSchemaParams {
109
+ /** How many cued schema blocks were found. */
110
+ blocks: number;
111
+ /** Tokens they hold, fences included. */
112
+ tokens: number;
113
+ /** The keys, already formatted for prose. */
114
+ keyList: string;
115
+ /** The phrase that identified the block as an output contract. */
116
+ cue: string;
117
+ }
118
+ export interface RestatedOutputFormatParams {
119
+ restatedCount: number;
120
+ totalCount: number;
121
+ restatedTokens: number;
122
+ /** The restated field names, already formatted for display. */
123
+ keyList: string;
124
+ }
125
+ /** Reasons the optional LLM pass can reject a candidate. */
126
+ export interface LlmMessages {
127
+ emptyResponse(): string;
128
+ protectedContentAltered(count: number): string;
129
+ notShorter(after: number, before: number): string;
130
+ suspiciousShrink(retainedPct: number): string;
131
+ }
132
+ /** Why a proposed rewrite did not survive checking against the prompt. */
133
+ export interface SuggestMessages {
134
+ 'not-found'(): string;
135
+ 'touches-protected'(): string;
136
+ 'introduces-protected'(): string;
137
+ 'no-saving'(): string;
138
+ overlaps(): string;
139
+ }
140
+ /** Everything the core needs to speak one language. */
141
+ export interface CoreMessages {
142
+ locale: Locale;
143
+ /** BCP 47 tag used for number formatting (e.g. `en-US`). */
144
+ numberLocale: string;
145
+ rules: Record<RuleId, RuleCopy>;
146
+ llm: LlmMessages;
147
+ suggest: SuggestMessages;
148
+ advisories: {
149
+ contextOverflow(p: ContextOverflowParams): LocalizedMessage;
150
+ promptCaching(p: PromptCachingParams): LocalizedMessage;
151
+ promptCachingNotWorthIt(): LocalizedMessage;
152
+ belowCacheMinimum(p: BelowCacheMinimumParams): LocalizedMessage;
153
+ cachePrefixReorder(p: CachePrefixReorderParams): LocalizedMessage;
154
+ batchApi(): LocalizedMessage;
155
+ modelDowngrade(p: ModelDowngradeParams): LocalizedMessage;
156
+ outputDominated(p: OutputDominatedParams): LocalizedMessage;
157
+ promoPricing(p: PromoPricingParams): LocalizedMessage;
158
+ contradictoryInstructions(p: ContradictoryInstructionsParams): LocalizedMessage;
159
+ redundantExamples(p: RedundantExamplesParams): LocalizedMessage;
160
+ restatedOutputFormat(p: RestatedOutputFormatParams): LocalizedMessage;
161
+ movableSchema(p: MovableSchemaParams): LocalizedMessage;
162
+ };
163
+ /** Names of the axes two instructions can disagree on. */
164
+ contradictionAxes: Record<ContradictionAxisId, string>;
165
+ /** Names of each end of those axes, as they read inside the advisory. */
166
+ contradictionValues: Record<ContradictionValueId, string>;
167
+ }
168
+ /**
169
+ * Kept in step with `ContradictionAxis` in `structure.ts`. Declared here so a
170
+ * new axis fails to compile until every catalogue names it.
171
+ */
172
+ export type ContradictionAxisId = 'response-language' | 'output-format' | 'response-length' | 'reasoning-visibility';
173
+ /**
174
+ * The two ends of each axis. Identifiers rather than prose for the same reason
175
+ * the axes are: the advisory names both sides in its sentence, so leaving them
176
+ * as English strings in the detector would print English inside a Spanish
177
+ * report.
178
+ */
179
+ export type ContradictionValueId = 'fixed-language' | 'mirror-language' | 'format-json' | 'format-markdown' | 'format-plain-text' | 'length-brief' | 'length-detailed' | 'reasoning-shown' | 'reasoning-hidden';
180
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mEAAmE;AACnE,eAAO,MAAM,OAAO,YAAI,IAAI,EAAE,IAAI,CAAU,CAAC;AAE7C,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9C,eAAO,MAAM,cAAc,EAAE,MAAa,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,MAAM,GACd,kBAAkB,GAClB,uBAAuB,GACvB,iBAAiB,GACjB,iBAAiB,GACjB,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;AAEjB,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,sEAAs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B,eAAe,GACf,iBAAiB,GACjB,sBAAsB,CAAC;AAE3B;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAC5B,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,iBAAiB,GACjB,mBAAmB,GACnB,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Internationalisation contract for the core.
3
+ *
4
+ * Every user-facing string the core produces lives in a locale catalogue
5
+ * instead of being hardcoded next to the logic. Adding a locale means adding
6
+ * one file — it never means touching the rules engine or the pricing model.
7
+ */
8
+ /** Locales shipped with Trazum. English is the source of truth. */
9
+ export const LOCALES = ['en', 'es'];
10
+ export const DEFAULT_LOCALE = 'en';
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/i18n/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AAI7C,MAAM,CAAC,MAAM,cAAc,GAAW,IAAI,CAAC"}
@@ -0,0 +1,66 @@
1
+ export * from './types.js';
2
+ export { estimateTokens, countTokensAnthropic } from './tokenizer.js';
3
+ export { countSentences, profilePrompt } from './profile.js';
4
+ export { PHRASE_LANGUAGES } from './phrases.js';
5
+ export { toPromptfoo } from './promptfoo.js';
6
+ export { toOtlpMetrics } from './otlp.js';
7
+ export type { OtlpAttribute, OtlpDataPoint, OtlpInput, OtlpMetric, OtlpPayload } from './otlp.js';
8
+ export type { PromptfooExport, PromptfooOptions, PromptfooWarning } from './promptfoo.js';
9
+ export type { ProfileOptions, PromptProfile } from './profile.js';
10
+ export { SUGGEST_SYSTEM_PROMPT, applyRewrites, rejectionText, suggestRewrites } from './suggest.js';
11
+ export type { RejectedReason, RewriteSuggestion, SuggestOptions, SuggestResult, } from './suggest.js';
12
+ export type { AsyncTokenCounter, AnthropicCounterOptions } from './tokenizer.js';
13
+ export { MODELS, DEFAULT_MODEL, COST_MULTIPLIERS, PRICING_LAST_REVIEWED, reviewAgeDays, BUNDLED_CATALOGUE, getModel, listModels, effectivePricing, cheapestOfTier, modelFrom, cheapestOfTierIn, multipliersFor, } from './pricing.js';
14
+ export type { PricingCatalogue } from './pricing.js';
15
+ export type { CachingMode, Capability, CostMultipliers } from './types.js';
16
+ export { MAX_PRICING_BYTES, PRICING_MODEL_KEYS, PRICING_OVERLAY_KEYS, PricingOverlayError, applyPricingOverlay, catalogueFromOverlay, parsePricingOverlay, } from './pricing-overlay.js';
17
+ export type { PricingOverlay } from './pricing-overlay.js';
18
+ export { openrouterOverlay } from './openrouter.js';
19
+ export { amzDates, canonicalRequest, signRequest, signingKey } from './aws-sigv4.js';
20
+ export type { SignInput, SignedHeaders } from './aws-sigv4.js';
21
+ export { accessToken, pkcs8FromPem, signedJwt } from './gcp-auth.js';
22
+ export type { CachedToken, ServiceAccount } from './gcp-auth.js';
23
+ export type { OpenRouterResult } from './openrouter.js';
24
+ export { BASELINE_FILENAME, BASELINE_VERSION, BaselineError, MAX_BASELINE_BYTES, breaches, compareToBaseline, formatBaseline, moneyIsComparable, parseBaseline, } from './baseline.js';
25
+ export type { BaselineBreach, BaselineChange, BaselineComparison, BaselineDocument, BaselineThresholds, } from './baseline.js';
26
+ export { RULES, getRule } from './rules.js';
27
+ export { segment, join, protectedTexts } from './segment.js';
28
+ export { computeSavings, costOfCall, formatUsd, formatSignedUsd } from './savings.js';
29
+ export { buildAdvisories, recommendTier } from './advisories.js';
30
+ export type { AdvisoryOptions } from './advisories.js';
31
+ export { analyzeCachePrefix } from './cache.js';
32
+ export { reorderForCache } from './reorder.js';
33
+ export type { DeclinedBlock, ReorderOptions, ReorderResult, ReorderedBlock, } from './reorder.js';
34
+ export type { CachePrefixAnalysis } from './cache.js';
35
+ export { cacheableMinimum, sharedPrefixes } from './shared-prefix.js';
36
+ export type { PrefixCandidate, SharedPrefix, SharedPrefixOptions, } from './shared-prefix.js';
37
+ export { extractPrompts, promptId, hasMarker, SOURCE_EXTENSIONS } from './extract.js';
38
+ export type { ExtractedPrompt, DeclinedPrompt, ExtractionResult } from './extract.js';
39
+ export { detectFromSource } from './detect.js';
40
+ export type { Detection, Evidence, EvidenceKind, DetectOptions } from './detect.js';
41
+ export { optimize, withExactTokenCounts, DEFAULT_USAGE } from './optimize.js';
42
+ export { refineWithLlm, openAiCompatible, anthropicProvider, bedrockProvider, geminiProvider, vertexProvider, customProvider, providerFromEnv, REFINER_SYSTEM_PROMPT, } from './llm.js';
43
+ export type { RefineOptions, OpenAiCompatibleOptions, AnthropicProviderOptions, BedrockProviderOptions, GeminiProviderOptions, VertexProviderOptions, CustomProviderOptions, } from './llm.js';
44
+ export { DEFAULT_LOCALE, LOCALES, getMessages, isLocale, matchLocale, resolveLocale, en, es, } from './i18n/index.js';
45
+ export type { CoreMessages, Locale, LocalizedMessage, RuleCopy, RuleId } from './i18n/index.js';
46
+ export { analyzeExamples, findContradictions, findExamples, findMovableSchema, findRestatedFormat, } from './structure.js';
47
+ export type { Contradiction, ContradictionAxis, ContradictionSide, ExampleAnalysis, ExampleBlock, MovableSchema, RedundantExample, RestatedFormat, } from './structure.js';
48
+ export { jaccard, normalizeForCompare } from './similarity.js';
49
+ export { OUTPUT_CUES, OUTPUT_CUES_BY_LANGUAGE } from './phrases.js';
50
+ export { SAFE_FETCH_INIT, allowedEndpoints, checkedEndpoint, isPrivateHost, resolveEndpoint, validateLlmEndpoint, } from './net.js';
51
+ export type { EndpointRejection, ValidateEndpointOptions } from './net.js';
52
+ export { extractChanges, DEFAULT_CHANGE_LIMIT } from './changes.js';
53
+ export type { RuleChange } from './changes.js';
54
+ export { reviewExamples, EXAMPLE_REVIEW_SYSTEM_PROMPT } from './review.js';
55
+ export type { ExampleReview, ExampleRedundancy, ReviewExamplesOptions } from './review.js';
56
+ export { NothingToPrune, plannedCalls, pruneExamples, withoutExample } from './prune.js';
57
+ export type { ExampleContribution, PruneOptions, PruneReport } from './prune.js';
58
+ export { evaluate, fillPrompt, verdictFor } from './evaluate.js';
59
+ export type { EvalCase, EvalReport, EvalVerdict, EvaluateOptions } from './evaluate.js';
60
+ export { comparePrompts } from './compare.js';
61
+ export type { PromptComparison, CompareOptions, RuleDelta, AdvisoryDelta, } from './compare.js';
62
+ export { matchGlob, mostSpecificMatch, specificity } from './glob.js';
63
+ export { editDistance, nearestName } from './nearest.js';
64
+ export { CONFIG_FILENAME, CONFIG_KEYS, CONFIG_USAGE_KEYS, ConfigError, DEFAULT_EXTENSIONS, MAX_CONFIG_BYTES, MAX_CONFIG_SEARCH_DEPTH, budgetFor, parseConfig, } from './config-schema.js';
65
+ export type { ResolvedBudget, TrazumConfig } from './config-schema.js';
66
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAClG,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC1F,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;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