@trazum/cli 2.4.0 → 2.4.1
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/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +1 -0
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +1 -0
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/types.d.ts +2 -0
- package/dist/i18n/types.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/i18n/en.ts +2 -0
- package/src/i18n/es.ts +2 -0
- package/src/i18n/types.ts +2 -0
- package/src/index.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trazum/cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
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": "2.4.
|
|
44
|
+
"@trazum/core": "2.4.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^26.4.0",
|
package/src/i18n/en.ts
CHANGED
|
@@ -2000,6 +2000,8 @@ ${bold('EXAMPLES')}
|
|
|
2000
2000
|
`${path}: a provider's cost report, which is a bill rather than usage. Set it beside a receipt with trazum reconcile.`,
|
|
2001
2001
|
nothingRead: () => 'Nothing here was a usage source this tool reads, so there is nothing to bill.',
|
|
2002
2002
|
sources: (read, seen) => `${read} of ${seen} file(s) read as usage.`,
|
|
2003
|
+
pricingLiveHint: (count) =>
|
|
2004
|
+
`${count} unpriced model id(s) are OpenRouter slugs, which the bundled catalogue does not carry. Run again with --pricing-live to price them from OpenRouter's own list.`,
|
|
2003
2005
|
written: (file) => `Wrote ${file}.`,
|
|
2004
2006
|
},
|
|
2005
2007
|
|
package/src/i18n/es.ts
CHANGED
|
@@ -2027,6 +2027,8 @@ ${bold('EJEMPLOS')}
|
|
|
2027
2027
|
`${path}: un informe de costes de proveedor, que es una factura y no uso. Ponlo junto a un recibo con trazum reconcile.`,
|
|
2028
2028
|
nothingRead: () => 'Nada de esto era una fuente de uso que esta herramienta lea, asi que no hay nada que facturar.',
|
|
2029
2029
|
sources: (read, seen) => `${read} de ${seen} archivo(s) leido(s) como uso.`,
|
|
2030
|
+
pricingLiveHint: (count) =>
|
|
2031
|
+
`${count} id(s) de modelo sin precio son slugs de OpenRouter, que el catalogo incluido no trae. Vuelve a ejecutar con --pricing-live para cobrarlos desde la propia lista de OpenRouter.`,
|
|
2030
2032
|
written: (file) => `Escrito ${file}.`,
|
|
2031
2033
|
},
|
|
2032
2034
|
|
package/src/i18n/types.ts
CHANGED
|
@@ -733,6 +733,8 @@ export interface CliMessages {
|
|
|
733
733
|
costReport(path: string): string;
|
|
734
734
|
nothingRead(): string;
|
|
735
735
|
sources(read: number, seen: number): string;
|
|
736
|
+
/** An unpriced slug with a slash is OpenRouter's, and --pricing-live prices it. */
|
|
737
|
+
pricingLiveHint(count: number): string;
|
|
736
738
|
written(file: string): string;
|
|
737
739
|
};
|
|
738
740
|
|
package/src/index.ts
CHANGED
|
@@ -3502,6 +3502,19 @@ async function commandBill(args: Args, pricing: PricingCatalogue, t: CliMessages
|
|
|
3502
3502
|
}
|
|
3503
3503
|
console.error(t.bill.sources(sources, files.length));
|
|
3504
3504
|
printReceiptSummary(document, t);
|
|
3505
|
+
|
|
3506
|
+
/*
|
|
3507
|
+
A slug with a slash in it is how OpenRouter names a model, and the bundled
|
|
3508
|
+
catalogue does not carry those: the live overlay does. Said only when the
|
|
3509
|
+
receipt's own unpriced gap holds one, so the hint is derived from what was
|
|
3510
|
+
refused rather than from which shape the file happened to be.
|
|
3511
|
+
*/
|
|
3512
|
+
const slugged = document.gaps.flatMap((gap) =>
|
|
3513
|
+
gap.kind === 'unpriced' ? gap.models.filter((model) => model.includes('/')) : [],
|
|
3514
|
+
);
|
|
3515
|
+
if (slugged.length > 0 && !boolFlag(args, 'pricing-live')) {
|
|
3516
|
+
console.error(t.bill.pricingLiveHint(slugged.length));
|
|
3517
|
+
}
|
|
3505
3518
|
}
|
|
3506
3519
|
|
|
3507
3520
|
/**
|