@trazum/core 1.9.0 → 1.25.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 (108) hide show
  1. package/README.md +12 -5
  2. package/dist/advisories.d.ts.map +1 -1
  3. package/dist/advisories.js +94 -4
  4. package/dist/advisories.js.map +1 -1
  5. package/dist/against.d.ts +32 -0
  6. package/dist/against.d.ts.map +1 -0
  7. package/dist/against.js +34 -0
  8. package/dist/against.js.map +1 -0
  9. package/dist/config-schema.d.ts +42 -1
  10. package/dist/config-schema.d.ts.map +1 -1
  11. package/dist/config-schema.js +61 -0
  12. package/dist/config-schema.js.map +1 -1
  13. package/dist/conversation.d.ts +121 -0
  14. package/dist/conversation.d.ts.map +1 -0
  15. package/dist/conversation.js +157 -0
  16. package/dist/conversation.js.map +1 -0
  17. package/dist/csv.d.ts +61 -0
  18. package/dist/csv.d.ts.map +1 -0
  19. package/dist/csv.js +149 -0
  20. package/dist/csv.js.map +1 -0
  21. package/dist/evaluate.d.ts +24 -0
  22. package/dist/evaluate.d.ts.map +1 -1
  23. package/dist/evaluate.js +5 -2
  24. package/dist/evaluate.js.map +1 -1
  25. package/dist/i18n/en.d.ts.map +1 -1
  26. package/dist/i18n/en.js +18 -7
  27. package/dist/i18n/en.js.map +1 -1
  28. package/dist/i18n/es.d.ts.map +1 -1
  29. package/dist/i18n/es.js +18 -7
  30. package/dist/i18n/es.js.map +1 -1
  31. package/dist/i18n/types.d.ts +28 -1
  32. package/dist/i18n/types.d.ts.map +1 -1
  33. package/dist/index.d.ts +25 -1
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +28 -0
  36. package/dist/index.js.map +1 -1
  37. package/dist/input-shape.d.ts +104 -0
  38. package/dist/input-shape.d.ts.map +1 -0
  39. package/dist/input-shape.js +132 -0
  40. package/dist/input-shape.js.map +1 -0
  41. package/dist/levers.d.ts +151 -0
  42. package/dist/levers.d.ts.map +1 -0
  43. package/dist/levers.js +160 -0
  44. package/dist/levers.js.map +1 -0
  45. package/dist/node.d.ts +1 -1
  46. package/dist/node.d.ts.map +1 -1
  47. package/dist/output-shape.d.ts +96 -0
  48. package/dist/output-shape.d.ts.map +1 -0
  49. package/dist/output-shape.js +145 -0
  50. package/dist/output-shape.js.map +1 -0
  51. package/dist/pricing-overlay.d.ts +1 -1
  52. package/dist/pricing-overlay.d.ts.map +1 -1
  53. package/dist/pricing-overlay.js +46 -0
  54. package/dist/pricing-overlay.js.map +1 -1
  55. package/dist/repeats.d.ts +75 -0
  56. package/dist/repeats.d.ts.map +1 -0
  57. package/dist/repeats.js +82 -0
  58. package/dist/repeats.js.map +1 -0
  59. package/dist/reprice.d.ts +143 -0
  60. package/dist/reprice.d.ts.map +1 -0
  61. package/dist/reprice.js +82 -0
  62. package/dist/reprice.js.map +1 -0
  63. package/dist/session-cost.d.ts +70 -0
  64. package/dist/session-cost.d.ts.map +1 -0
  65. package/dist/session-cost.js +90 -0
  66. package/dist/session-cost.js.map +1 -0
  67. package/dist/session-ledger.d.ts +77 -0
  68. package/dist/session-ledger.d.ts.map +1 -0
  69. package/dist/session-ledger.js +99 -0
  70. package/dist/session-ledger.js.map +1 -0
  71. package/dist/tokenizer.d.ts +33 -26
  72. package/dist/tokenizer.d.ts.map +1 -1
  73. package/dist/tokenizer.js +95 -34
  74. package/dist/tokenizer.js.map +1 -1
  75. package/dist/ttl-fit.d.ts +103 -0
  76. package/dist/ttl-fit.d.ts.map +1 -0
  77. package/dist/ttl-fit.js +184 -0
  78. package/dist/ttl-fit.js.map +1 -0
  79. package/dist/types.d.ts +1 -1
  80. package/dist/types.d.ts.map +1 -1
  81. package/dist/usage.d.ts +637 -0
  82. package/dist/usage.d.ts.map +1 -0
  83. package/dist/usage.js +634 -0
  84. package/dist/usage.js.map +1 -0
  85. package/package.json +1 -1
  86. package/src/advisories.ts +96 -4
  87. package/src/against.ts +48 -0
  88. package/src/config-schema.ts +106 -0
  89. package/src/conversation.ts +305 -0
  90. package/src/csv.ts +184 -0
  91. package/src/evaluate.ts +33 -3
  92. package/src/i18n/en.ts +19 -6
  93. package/src/i18n/es.ts +19 -6
  94. package/src/i18n/types.ts +29 -1
  95. package/src/index.ts +65 -1
  96. package/src/input-shape.ts +259 -0
  97. package/src/levers.ts +331 -0
  98. package/src/node.ts +1 -1
  99. package/src/output-shape.ts +254 -0
  100. package/src/pricing-overlay.ts +52 -1
  101. package/src/repeats.ts +166 -0
  102. package/src/reprice.ts +227 -0
  103. package/src/session-cost.ts +170 -0
  104. package/src/session-ledger.ts +189 -0
  105. package/src/tokenizer.ts +93 -30
  106. package/src/ttl-fit.ts +251 -0
  107. package/src/types.ts +1 -0
  108. package/src/usage.ts +1267 -0
@@ -0,0 +1,103 @@
1
+ import type { PricingCatalogue } from './pricing.js';
2
+ import type { UsageRecord } from './usage.js';
3
+ /**
4
+ * Does the cache TTL fit how fast the turns actually arrive?
5
+ *
6
+ * ## The mechanism nothing else can see
7
+ *
8
+ * A cache entry lives 5 minutes, or an hour at twice the write price. Whether
9
+ * either is the right choice depends on one number the bill never shows: **how
10
+ * long the workload waits between turns.** A support agent whose users answer in
11
+ * nine minutes writes a 5-minute entry on every turn and reads it back on none of
12
+ * them — every write expires unread, which from the bill is indistinguishable
13
+ * from any other losing cache. `cacheEconomics` can say *that* money was lost;
14
+ * only the clock can say *why*, and the why decides the fix: the 1-hour TTL, or
15
+ * caching switched off.
16
+ *
17
+ * The opposite mistake is quieter and this is the only place it appears at all:
18
+ * turns arriving seconds apart, written at the 1-hour rate. Those writes work —
19
+ * the verdict above reads `paid-off` — and every one of them pays 2x input for
20
+ * endurance the workload never uses. **Switching them to the 5-minute TTL is the
21
+ * one exact saving in this module**: the same tokens at 1.25x instead of 2x,
22
+ * which is the same-tokens-different-rate arithmetic `cacheEconomics` already
23
+ * draws the counterfactual line at.
24
+ *
25
+ * ## What it measures, and how it stays honest
26
+ *
27
+ * The gap between consecutive turns **of the same conversation**, from the
28
+ * recorded clock — sessions are what a cache entry actually serves, and gaps
29
+ * between unrelated calls of a label say nothing about whether *this*
30
+ * conversation's next turn found the entry alive. Timestamps are sorted within
31
+ * each session before differencing, so the measurement is independent of the
32
+ * order of the log — the property the conversation tracker had to learn the
33
+ * hard way.
34
+ *
35
+ * The reported number is the **median** gap, named as such: a median survives
36
+ * the overnight gap between a user's Tuesday and Wednesday in a way a mean does
37
+ * not, and a verdict hung on a mean would flip on one lunch break.
38
+ *
39
+ * When the log did not record which TTL the writes used, the gap can sit where
40
+ * the verdict depends on the answer — over 5 minutes and under an hour survives
41
+ * one TTL and not the other. That is reported as `unsettled`, the same refusal
42
+ * `cacheEconomics` makes for the same missing field, and never resolved in the
43
+ * flattering direction.
44
+ *
45
+ * The session key is used to group turns and never leaves this module, like
46
+ * everywhere else the field is touched.
47
+ */
48
+ /** Cache-entry lifetimes, in milliseconds. Anthropic's two published TTLs. */
49
+ export declare const TTL_5M_MS: number;
50
+ export declare const TTL_1H_MS: number;
51
+ export type TtlFitVerdict =
52
+ /** The median gap outlives the entry: writes expire before the next turn. */
53
+ 'expires-before-reuse'
54
+ /** 1-hour writes on gaps inside the 5-minute window: paying 2x for nothing. */
55
+ | 'overlong-ttl'
56
+ /** The TTL the log did not record decides the verdict, so nothing does. */
57
+ | 'unsettled'
58
+ /** The entry outlives the gap at the TTL the writes actually used. */
59
+ | 'fits';
60
+ export interface CacheTtlFit {
61
+ label: string;
62
+ model: string;
63
+ modelName: string;
64
+ /** Conversations with at least two timestamped turns. Never which ones. */
65
+ sessions: number;
66
+ /** Gaps measured across them. */
67
+ gaps: number;
68
+ medianGapMs: number;
69
+ /** Write tokens the log said were 5-minute entries. */
70
+ write5mTokens: number;
71
+ /** Write tokens the log said were 1-hour entries. */
72
+ write1hTokens: number;
73
+ /** Write tokens whose TTL the log did not record. */
74
+ assumedTtlTokens: number;
75
+ verdict: TtlFitVerdict;
76
+ /**
77
+ * What the 1-hour writes would save at the 5-minute rate, when the gaps show
78
+ * the hour is never needed. Exact — the same tokens at 1.25x instead of 2x,
79
+ * at the model's own input rate — and zero for every other verdict.
80
+ */
81
+ overpayUsd: number;
82
+ }
83
+ export interface TtlFitOptions {
84
+ catalogue: PricingCatalogue;
85
+ /** Date the prices are read at, so a promotional rate resolves the same way. */
86
+ on?: Date;
87
+ }
88
+ export interface TtlFitTracker {
89
+ /** Feed one parsed record. */
90
+ add(record: UsageRecord): void;
91
+ /** The finished measurement. */
92
+ finish(): CacheTtlFit[];
93
+ }
94
+ /**
95
+ * An accumulator, like the conversation tracker and for the same reason: a
96
+ * usage log is measured in megabytes and `profileUsage` makes one pass. What
97
+ * this holds is one number per timestamped call that belongs to a session,
98
+ * which is the minimum the gaps can be computed from at all.
99
+ */
100
+ export declare function createTtlFitTracker(options: TtlFitOptions): TtlFitTracker;
101
+ /** The same measurement over a list, for a caller holding one already. */
102
+ export declare function cacheTtlFit(records: readonly UsageRecord[], options: TtlFitOptions): CacheTtlFit[];
103
+ //# sourceMappingURL=ttl-fit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ttl-fit.d.ts","sourceRoot":"","sources":["../src/ttl-fit.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,8EAA8E;AAC9E,eAAO,MAAM,SAAS,QAAgB,CAAC;AACvC,eAAO,MAAM,SAAS,QAAiB,CAAC;AAExC,MAAM,MAAM,aAAa;AACvB,6EAA6E;AAC3E,sBAAsB;AACxB,+EAA+E;GAC7E,cAAc;AAChB,2EAA2E;GACzE,WAAW;AACb,sEAAsE;GACpE,MAAM,CAAC;AAEX,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,aAAa,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC;IACvB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAC5B,gFAAgF;IAChF,EAAE,CAAC,EAAE,IAAI,CAAC;CACX;AAED,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,GAAG,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/B,gCAAgC;IAChC,MAAM,IAAI,WAAW,EAAE,CAAC;CACzB;AAeD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAuHzE;AAED,0EAA0E;AAC1E,wBAAgB,WAAW,CACzB,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,EAAE,aAAa,GACrB,WAAW,EAAE,CAIf"}
@@ -0,0 +1,184 @@
1
+ import { effectivePricing, multipliersFor } from './pricing.js';
2
+ import { UNLABELLED } from './usage.js';
3
+ /**
4
+ * Does the cache TTL fit how fast the turns actually arrive?
5
+ *
6
+ * ## The mechanism nothing else can see
7
+ *
8
+ * A cache entry lives 5 minutes, or an hour at twice the write price. Whether
9
+ * either is the right choice depends on one number the bill never shows: **how
10
+ * long the workload waits between turns.** A support agent whose users answer in
11
+ * nine minutes writes a 5-minute entry on every turn and reads it back on none of
12
+ * them — every write expires unread, which from the bill is indistinguishable
13
+ * from any other losing cache. `cacheEconomics` can say *that* money was lost;
14
+ * only the clock can say *why*, and the why decides the fix: the 1-hour TTL, or
15
+ * caching switched off.
16
+ *
17
+ * The opposite mistake is quieter and this is the only place it appears at all:
18
+ * turns arriving seconds apart, written at the 1-hour rate. Those writes work —
19
+ * the verdict above reads `paid-off` — and every one of them pays 2x input for
20
+ * endurance the workload never uses. **Switching them to the 5-minute TTL is the
21
+ * one exact saving in this module**: the same tokens at 1.25x instead of 2x,
22
+ * which is the same-tokens-different-rate arithmetic `cacheEconomics` already
23
+ * draws the counterfactual line at.
24
+ *
25
+ * ## What it measures, and how it stays honest
26
+ *
27
+ * The gap between consecutive turns **of the same conversation**, from the
28
+ * recorded clock — sessions are what a cache entry actually serves, and gaps
29
+ * between unrelated calls of a label say nothing about whether *this*
30
+ * conversation's next turn found the entry alive. Timestamps are sorted within
31
+ * each session before differencing, so the measurement is independent of the
32
+ * order of the log — the property the conversation tracker had to learn the
33
+ * hard way.
34
+ *
35
+ * The reported number is the **median** gap, named as such: a median survives
36
+ * the overnight gap between a user's Tuesday and Wednesday in a way a mean does
37
+ * not, and a verdict hung on a mean would flip on one lunch break.
38
+ *
39
+ * When the log did not record which TTL the writes used, the gap can sit where
40
+ * the verdict depends on the answer — over 5 minutes and under an hour survives
41
+ * one TTL and not the other. That is reported as `unsettled`, the same refusal
42
+ * `cacheEconomics` makes for the same missing field, and never resolved in the
43
+ * flattering direction.
44
+ *
45
+ * The session key is used to group turns and never leaves this module, like
46
+ * everywhere else the field is touched.
47
+ */
48
+ /** Cache-entry lifetimes, in milliseconds. Anthropic's two published TTLs. */
49
+ export const TTL_5M_MS = 5 * 60 * 1000;
50
+ export const TTL_1H_MS = 60 * 60 * 1000;
51
+ const median = (sorted) => {
52
+ const mid = Math.floor(sorted.length / 2);
53
+ return sorted.length % 2 === 1 ? sorted[mid] : (sorted[mid - 1] + sorted[mid]) / 2;
54
+ };
55
+ /**
56
+ * An accumulator, like the conversation tracker and for the same reason: a
57
+ * usage log is measured in megabytes and `profileUsage` makes one pass. What
58
+ * this holds is one number per timestamped call that belongs to a session,
59
+ * which is the minimum the gaps can be computed from at all.
60
+ */
61
+ export function createTtlFitTracker(options) {
62
+ const { catalogue, on = new Date() } = options;
63
+ const slices = new Map();
64
+ const add = (record) => {
65
+ // An unpriced model has no rates to judge a TTL against, and contributes no
66
+ // dollars anywhere else either.
67
+ if (!catalogue.byId.has(record.model))
68
+ return;
69
+ const writes = record.cacheWrite5mTokens + record.cacheWrite1hTokens;
70
+ const hasClockedTurn = record.session !== null && record.ts !== null;
71
+ // A slice exists once it writes to the cache or can contribute a gap;
72
+ // everything else has nothing to say here.
73
+ if (writes === 0 && !hasClockedTurn)
74
+ return;
75
+ const key = `${record.label ?? UNLABELLED}\n${record.model}`;
76
+ let slice = slices.get(key);
77
+ if (!slice) {
78
+ slice = { write5mTokens: 0, write1hTokens: 0, assumedTtlTokens: 0, sessions: new Map() };
79
+ slices.set(key, slice);
80
+ }
81
+ if (record.writeTtlKnown) {
82
+ slice.write5mTokens += record.cacheWrite5mTokens;
83
+ slice.write1hTokens += record.cacheWrite1hTokens;
84
+ }
85
+ else {
86
+ // The flat count sits in the 5m bucket by pricing convention; here it is
87
+ // kept apart, because the whole question is which TTL it really was.
88
+ slice.assumedTtlTokens += record.cacheWrite5mTokens;
89
+ }
90
+ if (hasClockedTurn) {
91
+ const turns = slice.sessions.get(record.session);
92
+ if (turns)
93
+ turns.push(record.ts);
94
+ else
95
+ slice.sessions.set(record.session, [record.ts]);
96
+ }
97
+ };
98
+ const finish = () => {
99
+ const out = [];
100
+ for (const [key, slice] of slices) {
101
+ const writes = slice.write5mTokens + slice.write1hTokens + slice.assumedTtlTokens;
102
+ // No writes means no TTL to judge. Gaps alone are the conversation
103
+ // tracker's business, not this module's.
104
+ if (writes === 0)
105
+ continue;
106
+ const gaps = [];
107
+ let sessions = 0;
108
+ for (const turns of slice.sessions.values()) {
109
+ if (turns.length < 2)
110
+ continue;
111
+ sessions += 1;
112
+ turns.sort((a, b) => a - b);
113
+ for (let i = 1; i < turns.length; i += 1)
114
+ gaps.push(turns[i] - turns[i - 1]);
115
+ }
116
+ // Writes with no measurable gap: the caller reports "could not be
117
+ // measured" from the absence of a row, the same way missing sessions
118
+ // read everywhere else.
119
+ if (gaps.length === 0)
120
+ continue;
121
+ const split = key.indexOf('\n');
122
+ const modelId = key.slice(split + 1);
123
+ const model = catalogue.byId.get(modelId);
124
+ gaps.sort((a, b) => a - b);
125
+ const gap = median(gaps);
126
+ /**
127
+ * First match wins, ordered so that a certain failure outranks an
128
+ * uncertain one and money comes last: writes that expire are broken at
129
+ * any price, and only writes that demonstrably work can be overpaying.
130
+ */
131
+ let verdict;
132
+ if (slice.write5mTokens > 0 && gap > TTL_5M_MS)
133
+ verdict = 'expires-before-reuse';
134
+ else if (slice.write1hTokens > 0 && gap > TTL_1H_MS)
135
+ verdict = 'expires-before-reuse';
136
+ else if (slice.assumedTtlTokens > 0 && gap > TTL_1H_MS)
137
+ verdict = 'expires-before-reuse';
138
+ else if (slice.write1hTokens > 0 && gap <= TTL_5M_MS)
139
+ verdict = 'overlong-ttl';
140
+ else if (slice.assumedTtlTokens > 0 && gap > TTL_5M_MS)
141
+ verdict = 'unsettled';
142
+ else
143
+ verdict = 'fits';
144
+ const { inputPerMTok } = effectivePricing(model, on);
145
+ const rates = multipliersFor(model);
146
+ const overpayUsd = verdict === 'overlong-ttl'
147
+ ? (slice.write1hTokens / 1_000_000) *
148
+ inputPerMTok *
149
+ (rates.cacheWrite1h - rates.cacheWrite5m)
150
+ : 0;
151
+ out.push({
152
+ label: key.slice(0, split),
153
+ model: modelId,
154
+ modelName: model.displayName,
155
+ sessions,
156
+ gaps: gaps.length,
157
+ medianGapMs: gap,
158
+ write5mTokens: slice.write5mTokens,
159
+ write1hTokens: slice.write1hTokens,
160
+ assumedTtlTokens: slice.assumedTtlTokens,
161
+ verdict,
162
+ overpayUsd,
163
+ });
164
+ }
165
+ // Broken first, then overpaying by money, then the rest — the order
166
+ // somebody would act in.
167
+ const rank = {
168
+ 'expires-before-reuse': 0,
169
+ 'overlong-ttl': 1,
170
+ unsettled: 2,
171
+ fits: 3,
172
+ };
173
+ return out.sort((a, b) => rank[a.verdict] - rank[b.verdict] || b.overpayUsd - a.overpayUsd);
174
+ };
175
+ return { add, finish };
176
+ }
177
+ /** The same measurement over a list, for a caller holding one already. */
178
+ export function cacheTtlFit(records, options) {
179
+ const tracker = createTtlFitTracker(options);
180
+ for (const record of records)
181
+ tracker.add(record);
182
+ return tracker.finish();
183
+ }
184
+ //# sourceMappingURL=ttl-fit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ttl-fit.js","sourceRoot":"","sources":["../src/ttl-fit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AACvC,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAyDxC,MAAM,MAAM,GAAG,CAAC,MAAgB,EAAU,EAAE;IAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAE,GAAG,MAAM,CAAC,GAAG,CAAE,CAAC,GAAG,CAAC,CAAC;AACxF,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAsB;IACxD,MAAM,EAAE,SAAS,EAAE,EAAE,GAAG,IAAI,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC;IAC/C,MA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AC"}
package/dist/types.d.ts CHANGED
@@ -39,7 +39,7 @@ export interface RuleResult {
39
39
  /** Severity of an advisory: the higher it is, the more money is usually at stake. */
40
40
  export type AdvisorySeverity = 'info' | 'opportunity' | 'warning';
41
41
  /** Every advisory the core can emit. */
42
- export type AdvisoryId = 'context-overflow' | 'prompt-caching' | 'prompt-caching-not-worth-it' | 'below-cache-minimum' | 'cache-prefix-reorder' | 'batch-api' | 'model-downgrade' | 'output-dominated' | 'promo-pricing' | 'contradictory-instructions' | 'redundant-examples' | 'restated-output-format' | 'movable-output-schema';
42
+ export type AdvisoryId = 'context-overflow' | 'context-near-limit' | 'prompt-caching' | 'prompt-caching-not-worth-it' | 'below-cache-minimum' | 'cache-prefix-reorder' | 'batch-api' | 'model-downgrade' | 'output-dominated' | 'promo-pricing' | 'contradictory-instructions' | 'redundant-examples' | 'restated-output-format' | 'movable-output-schema';
43
43
  /** A recommendation that does NOT modify the prompt, only informs. */
44
44
  export interface Advisory {
45
45
  id: AdvisoryId;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,gEAAgE;AAChE,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,YAAY,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,wEAAwE;IACxE,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACrD;AAED,4EAA4E;AAC5E,MAAM,WA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