@trazum/cli 1.82.0 → 1.83.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trazum/cli",
3
- "version": "1.82.0",
3
+ "version": "1.83.0",
4
4
  "description": "Trazum CLI: find where your LLM bill goes, price every finding per month, and enforce token budgets in CI.",
5
5
  "license": "MIT",
6
6
  "author": "David Mu\u00f1oz Rey",
@@ -41,7 +41,7 @@
41
41
  "prepublishOnly": "npm run build && npm test"
42
42
  },
43
43
  "dependencies": {
44
- "@trazum/core": "1.82.0"
44
+ "@trazum/core": "1.83.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^26.2.0",
package/src/i18n/en.ts CHANGED
@@ -59,10 +59,12 @@ ${bold('USAGE')}
59
59
  trazum schema <contract>
60
60
  trazum rollup <document...|dir> [--json] [--html-out <file>]
61
61
  trazum position <usage.jsonl>
62
+ trazum receipt <usage.jsonl|dir> [--stamp] [-o <file>]
62
63
  trazum from-claude-code <file|dir> [--label <name>] [-o <file>]
63
64
  trazum from-otel <file|dir> [--label-from-service] [-o <file>]
64
65
  trazum from-litellm <file|dir> [-o <file>]
65
66
  trazum from-helicone <file|dir> [-o <file>]
67
+ trazum from-langsmith <file|dir> [-o <file>]
66
68
  trazum switch <usage.jsonl> --to <model> [--migration-usd <n>] [--cases <n>]
67
69
  trazum ownrate --gpu-usd-hour <n> --tokens-per-second <n> [--utilization <0-1>]
68
70
  trazum pulse [--max-stale-hours <n>]
@@ -181,6 +183,18 @@ ${bold('OPTIONS FOR from-helicone')}
181
183
  conversation, so the records carry no session and the conversation findings
182
184
  cannot be answered from this log; that is said on every run.
183
185
 
186
+ ${bold('OPTIONS FOR from-langsmith')}
187
+ -o, --out <file> Write the usage log there instead of stdout.
188
+
189
+ A LangSmith run export, read as a usage log: model, timestamp, label, the
190
+ trace as the session, and the token counts, and nothing else. The inputs and
191
+ the outputs stay in the run, and the metadata bag is read for named keys and
192
+ never copied. Only run_type "llm" is a call: chains, tools and retrievers are
193
+ skipped and counted, because the chain wrapping a call repeats its child's
194
+ tokens. A run whose metadata names no model is refused rather than priced by
195
+ the run's name, which is a client class. LangSmith's own cost is reported on
196
+ its own and never merged into Trazum's.
197
+
184
198
  ${bold('OPTIONS FOR from-litellm')}
185
199
  -o, --out <file> Write the usage log there instead of stdout.
186
200
 
@@ -230,6 +244,26 @@ ${bold('OPTIONS FOR position')}
230
244
  floor, on an over, and on a zero rate: never a forecast, and no field in
231
245
  the document names a date.
232
246
 
247
+ ${bold('OPTIONS FOR receipt')}
248
+ --stamp Record the emission time in the document. Off by
249
+ default so two runs on one log produce the same
250
+ bytes: the period the figures cover is already in
251
+ there, from the log's own clock.
252
+ -o, --out <file> Write the receipt there instead of to standard
253
+ output. The summary always goes to standard
254
+ error, so a redirect writes a document and not a
255
+ document with a summary stapled to the front.
256
+ --pricing <file> Price it with your own card instead of the
257
+ bundled catalogue.
258
+ --pricing-live Price it against live rates via OpenRouter.
259
+
260
+ A profile answers where it ran. A receipt is the same figures shaped so they
261
+ still answer somewhere else: every line carries the rates behind its money
262
+ and the date that provider's rates were last read off its own page. What is
263
+ not in it is prompt text, answers, file paths, branch names, credentials and
264
+ sessions: not redacted, absent, because the shape it is built from has no
265
+ field that can hold them. It sends nothing anywhere.
266
+
233
267
  ${bold('OPTIONS FOR pulse')}
234
268
  --max-stale-hours <n> Exit 1 when something that runs here has not run
235
269
  in over n hours. Without it, the ages are
@@ -1008,6 +1042,14 @@ ${bold('EXAMPLES')}
1008
1042
  },
1009
1043
 
1010
1044
  errors: {
1045
+ fileNotFound: (path) =>
1046
+ `${path}: not found. Check the path, or point this at the directory that holds it.`,
1047
+ fileIsDirectory: (path) =>
1048
+ `${path} is a directory, and this command reads a file. Name the file inside it, or use a command that walks a folder.`,
1049
+ fileIsDirectoryUnnamed: () =>
1050
+ 'that path is a directory, and this command reads a file. Name the file inside it, or use a command that walks a folder.',
1051
+ fileNotReadable: (path) =>
1052
+ `${path}: no permission to read it. Check the file's owner and mode, then run this again.`,
1011
1053
  livePricingFailed: (url: string, detail: string) =>
1012
1054
  `Could not load live prices from ${url}: ${detail}. The bundled prices are still there. Drop --pricing-live to use them.`,
1013
1055
  optionNeedsValue: (name) => `Option --${name} needs a value.`,
@@ -1171,7 +1213,7 @@ ${bold('EXAMPLES')}
1171
1213
  beyondThisPromptTokensOnly: () =>
1172
1214
  'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. If any of your prompts go to a metered API, "trazum profile <usage.jsonl>" reads what the provider actually charged and prices the levers that are not the prompt. Recording that log is a few lines and it never contains prompt text.',
1173
1215
  beyondThisPrompt: () =>
1174
- 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 40% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs, and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.',
1216
+ 'Shortening a prompt is the smallest lever there is: measured on an ordinary support prompt, the rules recover about 1% of a monthly bill. On a metered API the things that move 60% to 80% are which model the call goes to, the Batch API, prompt caching, and what re-sending the conversation costs, and "trazum profile <usage.jsonl>" prices all four from what the provider actually charged. Recording that log is a few lines and it never contains prompt text.',
1175
1217
  windowUse: (before, after, model, window) =>
1176
1218
  `Context window: ${before} → ${after} of ${model}'s ${window} tokens, room the conversation gets instead.`,
1177
1219
  tokensOnlyAskedFor: () =>
@@ -1724,6 +1766,19 @@ ${bold('EXAMPLES')}
1724
1766
  snippetHeading: () => 'Paste into trazum.config.json (the "pricing" overlay file):',
1725
1767
  },
1726
1768
 
1769
+ receipt: {
1770
+ noLog: () => 'Name a usage log to make a receipt from.',
1771
+ written: (file, lines) => `Wrote a receipt of ${lines} line(s) to ${file}.`,
1772
+ summary: (lines, usd) =>
1773
+ `${lines} line(s), ${usd} priced. Every figure carries the rate behind it and the date that rate was reviewed.`,
1774
+ unpriced: (models, calls) =>
1775
+ `${models} model(s) the catalogue does not price, covering ${calls} call(s): named in the receipt's gaps, and kept out of the total rather than costed at zero.`,
1776
+ unread: (count) => `${count} line(s) of the log could not be read, and the receipt says so.`,
1777
+ noClock: () =>
1778
+ 'The log carries no clock, so the receipt is unbounded in time and states that rather than inventing a period.',
1779
+ nothingToBill: () => 'Nothing in this log could be priced, so the receipt has no lines.',
1780
+ },
1781
+
1727
1782
  fromOtel: {
1728
1783
  noPath: () => 'from-otel needs an OTLP file or directory: trazum from-otel spans.json',
1729
1784
  notFound: (path) => `${path}: not found`,
@@ -1756,6 +1811,25 @@ ${bold('EXAMPLES')}
1756
1811
  written: (file) => `Wrote ${file}.`,
1757
1812
  },
1758
1813
 
1814
+ fromLangsmith: {
1815
+ noPath: () =>
1816
+ 'from-langsmith needs a run export or a directory: trazum from-langsmith runs.json',
1817
+ notFound: (path) => `${path}: not found`,
1818
+ noExports: (path) =>
1819
+ `${path}: no .json/.jsonl/.ndjson exports under it. LangSmith's runs come out of its list-runs endpoint, the SDK's list_runs(), or the export button on a project's runs table.`,
1820
+ summary: (files, rows) => `${files} file(s), ${rows} model call(s) read.`,
1821
+ notModelCalls: (count) =>
1822
+ `${count} run(s) were not model calls and are not in the output: chains, tools, retrievers and prompts. A LangSmith trace is a tree and the chain wrapping a call repeats its child's tokens, so summing the tree would bill the same tokens once per level.`,
1823
+ unnamedModel: (count) =>
1824
+ `${count} model call(s) named no model in their metadata and are not in the output. The run's own name is a client class: "ChatAnthropic" is not a model anybody can price, so it is refused rather than guessed at. Set ls_model_name, or record the invocation params.`,
1825
+ noTokens: (count) =>
1826
+ `${count} model call(s) carried no token counts and are not in the output: logged runs nobody can price. Counted here and worth a look at the tracer.`,
1827
+ reportedCost: (usd) =>
1828
+ `LangSmith priced these same calls at ${usd} with its own table. That figure is not merged into anything Trazum computes: two price tables summed into one total is how a report becomes quietly wrong. Compare them deliberately or not at all.`,
1829
+ unparseable: (count) => `${count} line(s) did not parse as JSON.`,
1830
+ written: (file) => `Wrote ${file}.`,
1831
+ },
1832
+
1759
1833
  fromLiteLlm: {
1760
1834
  noPath: () =>
1761
1835
  'from-litellm needs a spend-log export or a directory: trazum from-litellm spend.json',
@@ -1949,6 +2023,8 @@ ${bold('EXAMPLES')}
1949
2023
  unit: () => ' (USD per million tokens)',
1950
2024
  reviewedOn: (date, days) =>
1951
2025
  ` Table reviewed on ${date}${ago(days)}. Verify before budgeting.`,
2026
+ reviewedByProvider: (rows) => ` Per provider: ${rows}`,
2027
+ reviewedGroup: (date, days, providers) => `${date}${ago(days)} ${providers}`,
1952
2028
  columns: {
1953
2029
  model: 'model',
1954
2030
  input: 'input',
@@ -2678,6 +2754,13 @@ ${bold('EXAMPLES')}
2678
2754
  'No record in this log carries a timestamp, so --since/--until have nothing to filter by. A time window over a clockless log would gate nothing, which is not an answer. Add "ts" to the records, the recipe in the README shows where.',
2679
2755
  windowMatchesNothing: (from, to) =>
2680
2756
  `No record falls inside this window. The log covers ${from} → ${to}. A window matching nothing must not become a $0 report, under --max-usd it would pass a budget gate over a period the log does not cover.`,
2757
+ gateNothingMeasured: (reason) =>
2758
+ `A spend gate is armed and there was nothing to judge: ${reason}. An absence is not a pass, so this exits 1 rather than reporting $0 against your budget. Fix the log, or pass --allow-empty if a period with no calls is the expected answer.`,
2759
+ nothingUnreadable: (lines) =>
2760
+ `every one of the ${count(lines)} ${lines === 1 ? 'line' : 'lines'} in that file was unreadable`,
2761
+ nothingUnpriced: (calls) =>
2762
+ `${count(calls)} ${calls === 1 ? 'call was' : 'calls were'} recorded and none of their models are in the price table`,
2763
+ nothingEmpty: () => 'the log holds no records at all',
2681
2764
  sinceAfterUntil: () =>
2682
2765
  '--since is at or after --until, so the window contains no time at all. Check the two dates.',
2683
2766
  badWhen: (flag, value) =>
package/src/i18n/es.ts CHANGED
@@ -46,10 +46,12 @@ ${bold('USO')}
46
46
  trazum schema <contrato>
47
47
  trazum rollup <documento...|dir> [--json] [--html-out <fichero>]
48
48
  trazum position <uso.jsonl>
49
+ trazum receipt <uso.jsonl|dir> [--stamp] [-o <fichero>]
49
50
  trazum from-claude-code <fichero|dir> [--label <nombre>] [-o <fichero>]
50
51
  trazum from-otel <fichero|dir> [--label-from-service] [-o <fichero>]
51
52
  trazum from-litellm <fichero|dir> [-o <fichero>]
52
53
  trazum from-helicone <fichero|dir> [-o <fichero>]
54
+ trazum from-langsmith <fichero|dir> [-o <fichero>]
53
55
  trazum switch <uso.jsonl> --to <modelo> [--migration-usd <n>] [--cases <n>]
54
56
  trazum ownrate --gpu-usd-hour <n> --tokens-per-second <n> [--utilization <0-1>]
55
57
  trazum pulse [--max-stale-hours <n>]
@@ -121,6 +123,29 @@ ${bold('OPCIONES DE rollup')}
121
123
 
122
124
  Sale con 1 cuando una contribución se entregó y no se pudo agregar.
123
125
 
126
+ ${bold('OPCIONES DE receipt')}
127
+ --stamp Registra la hora de emisión en el documento.
128
+ Desactivado por defecto para que dos ejecuciones
129
+ sobre un log den los mismos bytes: el periodo que
130
+ cubren las cifras ya está dentro, leído del reloj
131
+ del propio log.
132
+ -o, --out <fichero> Escribe el recibo ahí en vez de en la salida
133
+ estándar. El resumen siempre va al error
134
+ estándar, así que una redirección escribe un
135
+ documento y no un documento con un resumen
136
+ pegado delante.
137
+ --pricing <fichero> Lo precia con tu propia tarjeta de precios en
138
+ vez de con el catálogo incluido.
139
+ --pricing-live Lo precia con tarifas en vivo vía OpenRouter.
140
+
141
+ Un perfil responde donde se ejecutó. Un recibo son las mismas cifras con la
142
+ forma que las deja seguir respondiendo en otro sitio: cada línea lleva las
143
+ tarifas que produjeron su dinero y la fecha en que las de ese proveedor se
144
+ leyeron por última vez de su propia página. Lo que no lleva es texto del
145
+ prompt, respuestas, rutas de fichero, nombres de rama, credenciales ni
146
+ sesiones: no censurados, ausentes, porque la forma de la que se construye no
147
+ tiene campo donde meterlos. No envía nada a ningún sitio.
148
+
124
149
  ${bold('OPCIONES DE write')}
125
150
  --answers <fichero> Un objeto JSON de ids de slot y respuestas. Sin
126
151
  esto, las preguntas se hacen una a una; una línea
@@ -185,6 +210,19 @@ ${bold('OPCIONES DE from-helicone')}
185
210
  registros no llevan sesión y los hallazgos de conversación no se pueden
186
211
  responder desde este registro; se dice en cada ejecución.
187
212
 
213
+ ${bold('OPCIONES DE from-langsmith')}
214
+ -o, --out <fichero> Escribe el log de uso ahí en vez de en stdout.
215
+
216
+ Un export de runs de LangSmith, leído como un log de uso: modelo, marca de
217
+ tiempo, etiqueta, la traza como sesión y los recuentos de tokens, y nada más.
218
+ Los inputs y los outputs se quedan en el run, y de los metadatos se leen
219
+ claves con nombre y nunca se copian enteros. Solo run_type "llm" es una
220
+ llamada: cadenas, herramientas y retrievers se saltan y se cuentan, porque la
221
+ cadena que envuelve una llamada repite los tokens de su hijo. Un run cuyos
222
+ metadatos no nombran modelo se rechaza en lugar de tarifarlo por el nombre
223
+ del run, que es una clase cliente. El coste propio de LangSmith se informa
224
+ aparte y nunca se mezcla con el de Trazum.
225
+
188
226
  ${bold('OPCIONES DE from-litellm')}
189
227
  -o, --out <fichero> Escribe el log de uso ahí en vez de en stdout.
190
228
 
@@ -1045,6 +1083,14 @@ ${bold('EJEMPLOS')}
1045
1083
  },
1046
1084
 
1047
1085
  errors: {
1086
+ fileNotFound: (path) =>
1087
+ `${path}: no encontrado. Revisa la ruta, o apunta esto al directorio que lo contiene.`,
1088
+ fileIsDirectory: (path) =>
1089
+ `${path} es un directorio, y este comando lee un fichero. Nombra el fichero de dentro, o usa un comando que recorra una carpeta.`,
1090
+ fileIsDirectoryUnnamed: () =>
1091
+ 'esa ruta es un directorio, y este comando lee un fichero. Nombra el fichero de dentro, o usa un comando que recorra una carpeta.',
1092
+ fileNotReadable: (path) =>
1093
+ `${path}: sin permiso de lectura. Revisa el dueño y los permisos del fichero, y vuelve a ejecutarlo.`,
1048
1094
  livePricingFailed: (url: string, detail: string) =>
1049
1095
  `No se han podido cargar los precios en vivo desde ${url}: ${detail}. Los precios incluidos siguen ahí: quita --pricing-live para usarlos.`,
1050
1096
  optionNeedsValue: (name) => `La opción --${name} necesita un valor.`,
@@ -1203,7 +1249,7 @@ ${bold('EJEMPLOS')}
1203
1249
  beyondThisPromptTokensOnly: () =>
1204
1250
  'Acortar un prompt es la palanca más pequeña que hay: medido en un prompt de soporte corriente, las reglas recuperan alrededor del 1% de una factura mensual. Si alguno de tus prompts va a una API de pago por uso, "trazum profile <usage.jsonl>" lee lo que el proveedor cobró de verdad y calcula las palancas que no son el prompt. Grabar ese registro son unas pocas líneas y nunca contiene texto del prompt.',
1205
1251
  beyondThisPrompt: () =>
1206
- 'Acortar un prompt es la palanca más pequeña que hay: medido en un prompt de soporte corriente, las reglas recuperan alrededor del 1% de una factura mensual. En una API de pago por uso, lo que mueve del 40% al 80% es a qué modelo va la llamada, la Batch API, la caché de prompts, y lo que cuesta reenviar la conversación, y "trazum profile <usage.jsonl>" calcula las cuatro a partir de lo que el proveedor cobró de verdad. Grabar ese registro son unas pocas líneas y nunca contiene texto del prompt.',
1252
+ 'Acortar un prompt es la palanca más pequeña que hay: medido en un prompt de soporte corriente, las reglas recuperan alrededor del 1% de una factura mensual. En una API de pago por uso, lo que mueve del 60% al 80% es a qué modelo va la llamada, la Batch API, la caché de prompts, y lo que cuesta reenviar la conversación, y "trazum profile <usage.jsonl>" calcula las cuatro a partir de lo que el proveedor cobró de verdad. Grabar ese registro son unas pocas líneas y nunca contiene texto del prompt.',
1207
1253
  windowUse: (before, after, model, window) =>
1208
1254
  `Ventana de contexto: ${before} → ${after} de los ${window} tokens de ${model}, sitio que se lleva la conversación.`,
1209
1255
  tokensOnlyAskedFor: () =>
@@ -1744,6 +1790,19 @@ ${bold('EJEMPLOS')}
1744
1790
  snippetHeading: () => 'Pega en trazum.config.json (el fichero de overlay «pricing»):',
1745
1791
  },
1746
1792
 
1793
+ receipt: {
1794
+ noLog: () => 'Nombra un log de uso del que hacer el recibo.',
1795
+ written: (file, lines) => `Recibo de ${lines} línea(s) escrito en ${file}.`,
1796
+ summary: (lines, usd) =>
1797
+ `${lines} línea(s), ${usd} con precio. Cada cifra lleva la tarifa que la produjo y la fecha en que se revisó esa tarifa.`,
1798
+ unpriced: (models, calls) =>
1799
+ `${models} modelo(s) que el catálogo no precia, con ${calls} llamada(s): nombrados en los huecos del recibo y fuera del total, en vez de costados a cero.`,
1800
+ unread: (count) => `${count} línea(s) del log no se pudieron leer, y el recibo lo dice.`,
1801
+ noClock: () =>
1802
+ 'El log no lleva reloj, así que el recibo no está acotado en el tiempo y lo declara en vez de inventarse un periodo.',
1803
+ nothingToBill: () => 'Nada de este log se pudo precificar, así que el recibo no tiene líneas.',
1804
+ },
1805
+
1747
1806
  fromOtel: {
1748
1807
  noPath: () => 'from-otel necesita un archivo o directorio OTLP: trazum from-otel spans.json',
1749
1808
  notFound: (path) => `${path}: no existe`,
@@ -1776,6 +1835,25 @@ ${bold('EJEMPLOS')}
1776
1835
  written: (file) => `Escrito ${file}.`,
1777
1836
  },
1778
1837
 
1838
+ fromLangsmith: {
1839
+ noPath: () =>
1840
+ 'from-langsmith necesita un export de runs o un directorio: trazum from-langsmith runs.json',
1841
+ notFound: (path) => `${path}: no encontrado`,
1842
+ noExports: (path) =>
1843
+ `${path}: no hay exports .json/.jsonl/.ndjson dentro. Los runs de LangSmith salen de su endpoint de listado, del list_runs() del SDK o del botón de exportar en la tabla de runs de un proyecto.`,
1844
+ summary: (files, rows) => `${files} archivo(s), ${rows} llamada(s) al modelo leídas.`,
1845
+ notModelCalls: (count) =>
1846
+ `${count} run(s) no eran llamadas al modelo y no están en la salida: cadenas, herramientas, retrievers y prompts. Una traza de LangSmith es un árbol y la cadena que envuelve una llamada repite los tokens de su hijo, así que sumar el árbol facturaría los mismos tokens una vez por nivel.`,
1847
+ unnamedModel: (count) =>
1848
+ `${count} llamada(s) no nombran modelo en sus metadatos y no están en la salida. El nombre del run es una clase cliente: «ChatAnthropic» no es un modelo que nadie pueda tarifar, así que se rechaza en lugar de adivinarlo. Pon ls_model_name o registra los invocation params.`,
1849
+ noTokens: (count) =>
1850
+ `${count} llamada(s) no traían recuento de tokens y no están en la salida: runs registrados que nadie puede tarifar. Se cuentan aquí y merecen una mirada en el tracer.`,
1851
+ reportedCost: (usd) =>
1852
+ `LangSmith tarifó estas mismas llamadas en ${usd} con su propia tabla. Esa cifra no se mezcla con nada que calcule Trazum: sumar dos tablas de precios en un total es como un informe se vuelve silenciosamente falso. Compáralas a propósito o no las compares.`,
1853
+ unparseable: (count) => `${count} línea(s) no se han podido leer como JSON.`,
1854
+ written: (file) => `Escrito ${file}.`,
1855
+ },
1856
+
1779
1857
  fromLiteLlm: {
1780
1858
  noPath: () =>
1781
1859
  'from-litellm necesita un export de spend log o un directorio: trazum from-litellm spend.json',
@@ -1970,6 +2048,8 @@ ${bold('EJEMPLOS')}
1970
2048
  unit: () => ' (USD por millón de tokens)',
1971
2049
  reviewedOn: (date, days) =>
1972
2050
  ` Tabla revisada el ${date}${hace(days)}. Verifica antes de presupuestar.`,
2051
+ reviewedByProvider: (rows) => ` Por proveedor: ${rows}`,
2052
+ reviewedGroup: (date, days, providers) => `${date}${hace(days)} ${providers}`,
1973
2053
  columns: {
1974
2054
  model: 'modelo',
1975
2055
  input: 'entrada',
@@ -2696,6 +2776,13 @@ ${bold('EJEMPLOS')}
2696
2776
  'Ningún registro lleva marca de tiempo, así que --since/--until no tienen por qué filtrar. Una ventana temporal sobre un registro sin reloj no vigilaría nada, y eso no es una respuesta. Añade "ts" a los registros: la receta del README dice dónde.',
2697
2777
  windowMatchesNothing: (from, to) =>
2698
2778
  `Ningún registro cae dentro de esta ventana. El registro cubre ${from} → ${to}. Una ventana que no encuentra nada no debe volverse un informe de $0: bajo --max-usd pasaría una puerta de presupuesto sobre un periodo que el registro no cubre.`,
2779
+ gateNothingMeasured: (reason) =>
2780
+ `Hay una puerta de gasto armada y no había nada que juzgar: ${reason}. Una ausencia no es un aprobado, así que esto sale con 1 en vez de reportar $0 contra tu presupuesto. Arregla el registro, o pasa --allow-empty si un periodo sin llamadas es la respuesta esperada.`,
2781
+ nothingUnreadable: (lines) =>
2782
+ `las ${count(lines)} ${lines === 1 ? 'línea del fichero era ilegible' : 'líneas del fichero eran ilegibles'}`,
2783
+ nothingUnpriced: (calls) =>
2784
+ `se ${count(calls) && calls === 1 ? 'registró 1 llamada' : `registraron ${count(calls)} llamadas`} y ninguno de sus modelos está en la tabla de precios`,
2785
+ nothingEmpty: () => 'el registro no tiene ni un solo apunte',
2699
2786
  sinceAfterUntil: () =>
2700
2787
  '--since es igual o posterior a --until, así que la ventana no contiene tiempo alguno. Revisa las dos fechas.',
2701
2788
  badWhen: (flag, value) =>
package/src/i18n/types.ts CHANGED
@@ -81,6 +81,20 @@ export interface CliMessages {
81
81
  };
82
82
 
83
83
  errors: {
84
+ /**
85
+ * A filesystem refusal, said in this product's voice rather than Node's.
86
+ *
87
+ * Seven commands used to let `ENOENT: no such file or directory, open
88
+ * '/nope/x.txt'` reach the reader on the commonest mistake there is, a
89
+ * mistyped path, while the five converters answered `/nope/x.json: not
90
+ * found`. The doctrine's rule is that a refusal never arrives bare, so
91
+ * these say the path, what was wrong with it, and the move that settles it.
92
+ */
93
+ fileNotFound(path: string): string;
94
+ fileIsDirectory(path: string): string;
95
+ /** Node reports EISDIR from `read` with no path on it, so this one names none. */
96
+ fileIsDirectoryUnnamed(): string;
97
+ fileNotReadable(path: string): string;
84
98
  livePricingFailed: (url: string, detail: string) => string;
85
99
  optionNeedsValue(name: string): string;
86
100
  mustBeNonNegative(name: string, raw: string): string;
@@ -578,6 +592,20 @@ export interface CliMessages {
578
592
  snippetHeading(): string;
579
593
  };
580
594
 
595
+ /**
596
+ * `receipt` — the bill's counts with the provenance of every figure, shaped
597
+ * so they still answer somewhere other than the terminal that produced them.
598
+ */
599
+ receipt: {
600
+ noLog(): string;
601
+ written(file: string, lines: number): string;
602
+ summary(lines: number, usd: string): string;
603
+ unpriced(models: number, calls: number): string;
604
+ unread(count: number): string;
605
+ noClock(): string;
606
+ nothingToBill(): string;
607
+ };
608
+
581
609
  fromOtel: {
582
610
  noPath(): string;
583
611
  notFound(path: string): string;
@@ -615,6 +643,27 @@ export interface CliMessages {
615
643
  written(file: string): string;
616
644
  };
617
645
 
646
+ fromLangsmith: {
647
+ noPath(): string;
648
+ notFound(path: string): string;
649
+ noExports(path: string): string;
650
+ summary(files: number, rows: number): string;
651
+ /**
652
+ * Runs that were not model calls: chains, tools, retrievers, prompts.
653
+ *
654
+ * Most of a LangSmith export, and said out loud because a reader who
655
+ * converted a thousand runs into three hundred records is owed the reason.
656
+ */
657
+ notModelCalls(count: number): string;
658
+ /** Runs whose metadata named no model: counted, never priced by the client class. */
659
+ unnamedModel(count: number): string;
660
+ noTokens(count: number): string;
661
+ /** LangSmith's own priced figure, stated and never merged into Trazum's. */
662
+ reportedCost(usd: string): string;
663
+ unparseable(count: number): string;
664
+ written(file: string): string;
665
+ };
666
+
618
667
  fromLiteLlm: {
619
668
  noPath(): string;
620
669
  notFound(path: string): string;
@@ -764,6 +813,15 @@ export interface CliMessages {
764
813
  unit(): string;
765
814
  /** `days` is null when the date is unusable or in the future. */
766
815
  reviewedOn(date: string, days: number | null): string;
816
+ /**
817
+ * Said only when the providers disagree, which is the case the headline
818
+ * date cannot carry: it is the oldest of them, so a reader pricing only
819
+ * Anthropic calls is told the table is two months old when their half of
820
+ * it was checked today.
821
+ */
822
+ reviewedByProvider(rows: string): string;
823
+ /** The providers that share one review date, joined into the line above. */
824
+ reviewedGroup(date: string, days: number | null, providers: string): string;
767
825
  columns: {
768
826
  model: string;
769
827
  input: string;
@@ -1065,7 +1123,7 @@ export interface CliMessages {
1065
1123
  * The section the whole command builds towards.
1066
1124
  *
1067
1125
  * Trazum's rules recover about 1% of a bill. Which model a call goes to moves
1068
- * 40% to 80%, and the Batch API moves 50% flat. A report that shows where the
1126
+ * 60% to 80%, and the Batch API moves 50% flat. A report that shows where the
1069
1127
  * money went and then stops is a report that leaves the reader with the
1070
1128
  * smallest lever in their hand.
1071
1129
  */
@@ -1621,6 +1679,18 @@ export interface CliMessages {
1621
1679
  windowNeedsClock(): string;
1622
1680
  /** A window matching nothing must not become a passing $0 gate. */
1623
1681
  windowMatchesNothing(from: string, to: string): string;
1682
+ /**
1683
+ * A gate armed over a report with nothing in it.
1684
+ *
1685
+ * `reason` names the gap: unreadable lines, models with no price, or a log
1686
+ * that is genuinely empty. The doctrine's rule is that an absence is never
1687
+ * reported as a pass, and this is the sentence that refuses to.
1688
+ */
1689
+ gateNothingMeasured(reason: string): string;
1690
+ /** The three gaps, for the sentence above. */
1691
+ nothingUnreadable(lines: number): string;
1692
+ nothingUnpriced(calls: number): string;
1693
+ nothingEmpty(): string;
1624
1694
  sinceAfterUntil(): string;
1625
1695
  badWhen(flag: string, value: string): string;
1626
1696
  /**