@trazum/cli 1.81.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/README.md +1 -1
- package/dist/gateway-server.d.ts.map +1 -1
- package/dist/gateway-server.js +14 -0
- package/dist/gateway-server.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +127 -6
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +133 -6
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/types.d.ts +137 -7
- package/dist/i18n/types.d.ts.map +1 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2502 -1639
- package/dist/index.js.map +1 -1
- package/dist/markdown.d.ts +10 -0
- package/dist/markdown.d.ts.map +1 -1
- package/dist/markdown.js +4 -4
- package/dist/markdown.js.map +1 -1
- package/package.json +2 -2
- package/src/gateway-server.ts +14 -0
- package/src/i18n/en.ts +160 -8
- package/src/i18n/es.ts +166 -8
- package/src/i18n/types.ts +141 -7
- package/src/index.ts +3108 -2132
- package/src/markdown.ts +14 -4
package/src/markdown.ts
CHANGED
|
@@ -169,6 +169,14 @@ export interface CheckMarkdownInput {
|
|
|
169
169
|
verdicts: MarkdownFileVerdict[];
|
|
170
170
|
level: RuleLevel;
|
|
171
171
|
tokenSource: 'heuristic' | 'external';
|
|
172
|
+
/**
|
|
173
|
+
* The widest band across the prompts this report covers.
|
|
174
|
+
*
|
|
175
|
+
* Widest and never averaged: a report over a prose prompt and a CSV covers
|
|
176
|
+
* text the estimator is 6% and 33% out on, and a figure between them
|
|
177
|
+
* describes neither. The caller holds the texts and computes it.
|
|
178
|
+
*/
|
|
179
|
+
band: number;
|
|
172
180
|
/** True when a walk limit stopped the run early. */
|
|
173
181
|
truncated: boolean;
|
|
174
182
|
/** Absent when no baseline governed the run. */
|
|
@@ -270,7 +278,7 @@ function baselineBlock(baseline: BaselineMarkdown, t: CliMessages): string[] {
|
|
|
270
278
|
}
|
|
271
279
|
|
|
272
280
|
export function renderCheckMarkdown(input: CheckMarkdownInput): string {
|
|
273
|
-
const { target, verdicts, level, tokenSource, truncated, t } = input;
|
|
281
|
+
const { target, verdicts, level, tokenSource, band, truncated, t } = input;
|
|
274
282
|
const n = (value: number): string => value.toLocaleString(t.numberLocale);
|
|
275
283
|
const md = t.markdown;
|
|
276
284
|
|
|
@@ -347,7 +355,7 @@ export function renderCheckMarkdown(input: CheckMarkdownInput): string {
|
|
|
347
355
|
|
|
348
356
|
lines.push(
|
|
349
357
|
`<sub>${md.footer(
|
|
350
|
-
tokenSource === 'external' ? md.sourceExact() : md.sourceEstimated(),
|
|
358
|
+
tokenSource === 'external' ? md.sourceExact() : md.sourceEstimated(band),
|
|
351
359
|
level,
|
|
352
360
|
)}</sub>`,
|
|
353
361
|
);
|
|
@@ -600,6 +608,8 @@ export interface BlameMarkdownInput {
|
|
|
600
608
|
truncated: boolean;
|
|
601
609
|
/** The priced movement across the history, when a model was resolved. */
|
|
602
610
|
netCost: { amount: string; modelDisplayName: string; callsPerMonth: number } | null;
|
|
611
|
+
/** This file's own measured band, computed by the caller that holds its text. */
|
|
612
|
+
band: number;
|
|
603
613
|
t: CliMessages;
|
|
604
614
|
}
|
|
605
615
|
|
|
@@ -617,7 +627,7 @@ export interface BlameMarkdownInput {
|
|
|
617
627
|
* `|` in the output to split a row and no backtick arithmetic to get wrong.
|
|
618
628
|
*/
|
|
619
629
|
export function renderBlameMarkdown(input: BlameMarkdownInput): string {
|
|
620
|
-
const { repoPath, rows, truncated, netCost, t } = input;
|
|
630
|
+
const { repoPath, rows, truncated, netCost, band, t } = input;
|
|
621
631
|
const n = (value: number): string => value.toLocaleString(t.numberLocale);
|
|
622
632
|
const cols = t.blame.columns;
|
|
623
633
|
|
|
@@ -713,7 +723,7 @@ export function renderBlameMarkdown(input: BlameMarkdownInput): string {
|
|
|
713
723
|
lines.push('');
|
|
714
724
|
}
|
|
715
725
|
|
|
716
|
-
lines.push(`<sub>${mdText(t.blame.estimateNote())}</sub>`);
|
|
726
|
+
lines.push(`<sub>${mdText(t.blame.estimateNote(band))}</sub>`);
|
|
717
727
|
|
|
718
728
|
return lines.join('\n');
|
|
719
729
|
}
|