@trazum/core 1.44.0 → 1.46.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 +10 -0
- package/dist/guard.d.ts +79 -0
- package/dist/guard.d.ts.map +1 -0
- package/dist/guard.js +136 -0
- package/dist/guard.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +231 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +325 -0
- package/dist/init.js.map +1 -0
- package/package.json +1 -1
- package/src/guard.ts +204 -0
- package/src/index.ts +15 -0
- package/src/init.ts +500 -0
package/README.md
CHANGED
|
@@ -184,6 +184,16 @@ differ: no budget configured, nothing measured, or a model the catalogue
|
|
|
184
184
|
cannot price. Pure and synchronous, because a function that reads a file
|
|
185
185
|
cannot promise an answer in milliseconds.
|
|
186
186
|
|
|
187
|
+
## The guard
|
|
188
|
+
|
|
189
|
+
`guardSpend(request, { catalogue })` wraps `answerCost` with what to do
|
|
190
|
+
instead. A refusal carries alternatives — route, batch, or both combined the
|
|
191
|
+
way `billLevers` combines them rather than summed — each priced for the single
|
|
192
|
+
call being decided, each carrying its typed assumption, and each filtered to
|
|
193
|
+
models whose context window the prompt actually fits. `cannot-tell` never
|
|
194
|
+
becomes `yes`: a guard that permits whatever it cannot judge permits
|
|
195
|
+
everything the moment its inputs go missing.
|
|
196
|
+
|
|
187
197
|
## Comparing two versions
|
|
188
198
|
|
|
189
199
|
```ts
|
package/dist/guard.d.ts
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The thing spending the money can finally ask, and be told no.
|
|
3
|
+
*
|
|
4
|
+
* 1.44 gave an endpoint that *answers*. An agent may consult it and ignore it,
|
|
5
|
+
* which is fine — advice an implementation can skip is still advice worth
|
|
6
|
+
* having. What was missing is the shape of a refusal an agent can act on.
|
|
7
|
+
*
|
|
8
|
+
* **A guard that only says no teaches a caller to stop asking.** A model told
|
|
9
|
+
* "denied" with no alternative has exactly two moves: send it anyway, or fail
|
|
10
|
+
* the user's request. Both are worse than the call it wanted to make. So every
|
|
11
|
+
* refusal here arrives with the levers that exist — this work routes to a
|
|
12
|
+
* cheaper model that still fits, a batch window would halve it — each with
|
|
13
|
+
* what it is worth *for this call*, and the assumption it rests on.
|
|
14
|
+
*
|
|
15
|
+
* **The guard never spends to answer.** No provider call, no LLM pass, no
|
|
16
|
+
* pull. The answer comes from the store and the catalogue, or it says it
|
|
17
|
+
* cannot tell. A cost guard that costs money to consult is a joke with a bill
|
|
18
|
+
* attached.
|
|
19
|
+
*
|
|
20
|
+
* **An alternative the prompt does not fit in is not an alternative.** A
|
|
21
|
+
* cheaper model with a smaller context window does not make this call cheaper;
|
|
22
|
+
* it makes it impossible. Those are filtered out here rather than offered and
|
|
23
|
+
* blamed later.
|
|
24
|
+
*/
|
|
25
|
+
import type { AnswerRequest, CostAnswer } from './answer.js';
|
|
26
|
+
import type { PricingCatalogue } from './pricing.js';
|
|
27
|
+
import type { PlanAssumption } from './plan.js';
|
|
28
|
+
export type GuardVerdict = 'yes' | 'no' | 'cannot-tell';
|
|
29
|
+
export interface GuardAlternative {
|
|
30
|
+
kind: 'route' | 'batch' | 'route+batch';
|
|
31
|
+
/** The model this moves to, when it moves. */
|
|
32
|
+
model: {
|
|
33
|
+
id: string;
|
|
34
|
+
displayName: string;
|
|
35
|
+
} | null;
|
|
36
|
+
/**
|
|
37
|
+
* What this alternative saves **on this call** — not per month.
|
|
38
|
+
*
|
|
39
|
+
* The caller is deciding one call, right now. A monthly figure would be the
|
|
40
|
+
* right number at the wrong moment, and an agent has no way to act on it.
|
|
41
|
+
*/
|
|
42
|
+
savingUsd: number;
|
|
43
|
+
/** What the log cannot confirm, typed as everywhere since 1.38. */
|
|
44
|
+
assumes: PlanAssumption[];
|
|
45
|
+
/**
|
|
46
|
+
* Whether the described call fits this alternative's context window.
|
|
47
|
+
*
|
|
48
|
+
* Only `true` ever reaches a caller — the false ones are dropped before
|
|
49
|
+
* they are offered. The field exists so the rule is visible in the type
|
|
50
|
+
* rather than buried in a filter nobody reads.
|
|
51
|
+
*/
|
|
52
|
+
fits: true;
|
|
53
|
+
}
|
|
54
|
+
export interface GuardAnswer {
|
|
55
|
+
schemaVersion: 1;
|
|
56
|
+
verdict: GuardVerdict;
|
|
57
|
+
/** The full cost answer, halves and provenance intact. */
|
|
58
|
+
cost: CostAnswer;
|
|
59
|
+
/**
|
|
60
|
+
* What to do instead, dearest saving first. Present on a refusal, and on a
|
|
61
|
+
* yes as well: an agent that can spend less while still being allowed to
|
|
62
|
+
* spend should be told so.
|
|
63
|
+
*/
|
|
64
|
+
alternatives: GuardAlternative[];
|
|
65
|
+
/**
|
|
66
|
+
* A one-line reason a human will read in a log. The fields above are what a
|
|
67
|
+
* machine acts on; this is never the only place a fact appears.
|
|
68
|
+
*/
|
|
69
|
+
because: string;
|
|
70
|
+
}
|
|
71
|
+
export interface GuardRequest extends AnswerRequest {
|
|
72
|
+
/** Whether the caller says this work can wait for a batch window. */
|
|
73
|
+
batchEligible?: boolean;
|
|
74
|
+
}
|
|
75
|
+
export declare function guardSpend(request: GuardRequest, options: {
|
|
76
|
+
catalogue: PricingCatalogue;
|
|
77
|
+
on?: Date;
|
|
78
|
+
}): GuardAnswer;
|
|
79
|
+
//# sourceMappingURL=guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard.d.ts","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,IAAI,GAAG,aAAa,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,aAAa,CAAC;IACxC,8CAA8C;IAC9C,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAClD;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,CAAC,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,0DAA0D;IAC1D,IAAI,EAAE,UAAU,CAAC;IACjB;;;;OAIG;IACH,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAuBD,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD,qEAAqE;IACrE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,UAAU,CACxB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE;IAAE,SAAS,EAAE,gBAAgB,CAAC;IAAC,EAAE,CAAC,EAAE,IAAI,CAAA;CAAE,GAClD,WAAW,CA8Eb"}
|
package/dist/guard.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The thing spending the money can finally ask, and be told no.
|
|
3
|
+
*
|
|
4
|
+
* 1.44 gave an endpoint that *answers*. An agent may consult it and ignore it,
|
|
5
|
+
* which is fine — advice an implementation can skip is still advice worth
|
|
6
|
+
* having. What was missing is the shape of a refusal an agent can act on.
|
|
7
|
+
*
|
|
8
|
+
* **A guard that only says no teaches a caller to stop asking.** A model told
|
|
9
|
+
* "denied" with no alternative has exactly two moves: send it anyway, or fail
|
|
10
|
+
* the user's request. Both are worse than the call it wanted to make. So every
|
|
11
|
+
* refusal here arrives with the levers that exist — this work routes to a
|
|
12
|
+
* cheaper model that still fits, a batch window would halve it — each with
|
|
13
|
+
* what it is worth *for this call*, and the assumption it rests on.
|
|
14
|
+
*
|
|
15
|
+
* **The guard never spends to answer.** No provider call, no LLM pass, no
|
|
16
|
+
* pull. The answer comes from the store and the catalogue, or it says it
|
|
17
|
+
* cannot tell. A cost guard that costs money to consult is a joke with a bill
|
|
18
|
+
* attached.
|
|
19
|
+
*
|
|
20
|
+
* **An alternative the prompt does not fit in is not an alternative.** A
|
|
21
|
+
* cheaper model with a smaller context window does not make this call cheaper;
|
|
22
|
+
* it makes it impossible. Those are filtered out here rather than offered and
|
|
23
|
+
* blamed later.
|
|
24
|
+
*/
|
|
25
|
+
import { answerCost } from './answer.js';
|
|
26
|
+
import { effectivePricing, multipliersFor } from './pricing.js';
|
|
27
|
+
/** Models cheaper than this one, in the same family, that the prompt fits in. */
|
|
28
|
+
function cheaperThan(model, catalogue, inputTokens, on) {
|
|
29
|
+
const here = effectivePricing(model, on);
|
|
30
|
+
return [...catalogue.byId.values()]
|
|
31
|
+
.filter((candidate) => {
|
|
32
|
+
if (candidate.id === model.id)
|
|
33
|
+
return false;
|
|
34
|
+
if (candidate.provider !== model.provider)
|
|
35
|
+
return false;
|
|
36
|
+
const there = effectivePricing(candidate, on);
|
|
37
|
+
if (there.inputPerMTok >= here.inputPerMTok)
|
|
38
|
+
return false;
|
|
39
|
+
// A model the prompt does not fit in is not a cheaper way to make this
|
|
40
|
+
// call; it is a way not to make it.
|
|
41
|
+
return candidate.contextWindow >= inputTokens;
|
|
42
|
+
})
|
|
43
|
+
.sort((a, b) => effectivePricing(b, on).inputPerMTok - effectivePricing(a, on).inputPerMTok);
|
|
44
|
+
}
|
|
45
|
+
export function guardSpend(request, options) {
|
|
46
|
+
const { catalogue, on = new Date() } = options;
|
|
47
|
+
const cost = answerCost(request, { catalogue, on });
|
|
48
|
+
const alternatives = [];
|
|
49
|
+
const model = request.model === undefined ? undefined : catalogue.byId.get(request.model);
|
|
50
|
+
if (model !== undefined && cost.call !== null) {
|
|
51
|
+
const inputTokens = cost.call.inputTokens;
|
|
52
|
+
const outputTokens = cost.call.outputTokens;
|
|
53
|
+
const here = effectivePricing(model, on);
|
|
54
|
+
const priceOf = (candidate) => {
|
|
55
|
+
const rates = effectivePricing(candidate, on);
|
|
56
|
+
return (inputTokens / 1_000_000) * rates.inputPerMTok + (outputTokens / 1_000_000) * rates.outputPerMTok;
|
|
57
|
+
};
|
|
58
|
+
const mine = (inputTokens / 1_000_000) * here.inputPerMTok + (outputTokens / 1_000_000) * here.outputPerMTok;
|
|
59
|
+
const batchRate = multipliersFor(model).batch;
|
|
60
|
+
for (const candidate of cheaperThan(model, catalogue, inputTokens, on)) {
|
|
61
|
+
const routed = priceOf(candidate);
|
|
62
|
+
const candidateBatch = multipliersFor(candidate).batch;
|
|
63
|
+
const both = candidateBatch === null ? null : routed * candidateBatch;
|
|
64
|
+
/**
|
|
65
|
+
* Route and batch on the same call combine the way `billLevers` has
|
|
66
|
+
* combined them since 1.23: the batch discount applies to the *cheaper*
|
|
67
|
+
* model's price, never as a second subtraction from this one. Adding the
|
|
68
|
+
* two savings is the arithmetic `plan` exists to kill.
|
|
69
|
+
*/
|
|
70
|
+
if (request.batchEligible === true && both !== null) {
|
|
71
|
+
alternatives.push({
|
|
72
|
+
kind: 'route+batch',
|
|
73
|
+
model: { id: candidate.id, displayName: candidate.displayName },
|
|
74
|
+
savingUsd: mine - both,
|
|
75
|
+
assumes: [
|
|
76
|
+
{ kind: 'model-capability', model: candidate.displayName },
|
|
77
|
+
{ kind: 'batch-window' },
|
|
78
|
+
],
|
|
79
|
+
fits: true,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
alternatives.push({
|
|
83
|
+
kind: 'route',
|
|
84
|
+
model: { id: candidate.id, displayName: candidate.displayName },
|
|
85
|
+
savingUsd: mine - routed,
|
|
86
|
+
assumes: [{ kind: 'model-capability', model: candidate.displayName }],
|
|
87
|
+
fits: true,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
if (request.batchEligible === true && batchRate !== null) {
|
|
91
|
+
alternatives.push({
|
|
92
|
+
kind: 'batch',
|
|
93
|
+
model: null,
|
|
94
|
+
savingUsd: mine - mine * batchRate,
|
|
95
|
+
assumes: [{ kind: 'batch-window' }],
|
|
96
|
+
fits: true,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
alternatives.sort((a, b) => b.savingUsd - a.savingUsd);
|
|
101
|
+
/**
|
|
102
|
+
* The verdict maps the cost answer's three outcomes onto the three an agent
|
|
103
|
+
* can act on. `cannot-tell` stays `cannot-tell` rather than defaulting to
|
|
104
|
+
* yes: a guard that permits whatever it cannot judge is a guard that permits
|
|
105
|
+
* everything the moment its inputs go missing.
|
|
106
|
+
*/
|
|
107
|
+
const verdict = cost.verdict === 'cannot-tell' ? 'cannot-tell' : cost.verdict === 'over' ? 'no' : 'yes';
|
|
108
|
+
return {
|
|
109
|
+
schemaVersion: 1,
|
|
110
|
+
verdict,
|
|
111
|
+
cost,
|
|
112
|
+
alternatives,
|
|
113
|
+
because: reasonFor(verdict, cost, alternatives),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function reasonFor(verdict, cost, alternatives) {
|
|
117
|
+
if (verdict === 'cannot-tell') {
|
|
118
|
+
return cost.reason === 'no-budget-configured'
|
|
119
|
+
? 'No budget is configured, so there is nothing to judge this against.'
|
|
120
|
+
: cost.reason === 'nothing-measured'
|
|
121
|
+
? 'Nothing has been measured yet, so how much of the budget is gone is unknown.'
|
|
122
|
+
: 'This model is not in the price catalogue, so the call cannot be priced.';
|
|
123
|
+
}
|
|
124
|
+
if (verdict === 'no') {
|
|
125
|
+
const lead = cost.restsOn === 'measured'
|
|
126
|
+
? 'The budget is already spent, measured.'
|
|
127
|
+
: 'This call would take the budget past its limit, on an estimate of the call.';
|
|
128
|
+
return alternatives.length === 0
|
|
129
|
+
? `${lead} No cheaper way to make this call exists in the catalogue.`
|
|
130
|
+
: `${lead} The cheapest alternative below saves the most.`;
|
|
131
|
+
}
|
|
132
|
+
return alternatives.length === 0
|
|
133
|
+
? 'Within budget, and no cheaper way to make this call exists in the catalogue.'
|
|
134
|
+
: 'Within budget — and there is still a cheaper way to make this call.';
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guard.js","sourceRoot":"","sources":["../src/guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAgDhE,iFAAiF;AACjF,SAAS,WAAW,CAClB,KAAmB,EACnB,SAA2B,EAC3B,WAAmB,EACnB,EAAQ;IAER,MAAM,IAAI,GAAG,gBAAgB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;SAChC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE;QACpB,IAAI,SAAS,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE;YAAE,OAAO,KAAK,CAAC;QAC5C,IAAI,SAAS,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QACxD,MAAM,KAAK,GAAG,gBAAgB,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;QAC9C,IAAI,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO,KAAK,CAAC;QAC1D,uEAAuE;QACvE,oCAAoC;QACpC,OAAO,SAAS,CAAC,aAAa,IAAI,WAAW,CAAC;IAChD,CAAC,CAAC;SACD,IAAI,CAAC,CAAC,CAAC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UAAU;YACtC,CAAC,CAAC,wCAAwC;YAC1C,CAAC,CAAC,6EAA6E,CAAC;QAClF,OAAO,YAAY,CAAC,MAAM,KAAK,CAAC;YAC9B,CAAC,CAAC,GAAG,IAAI,4DAA4D;YACrE,CAAC,CAAC,GAAG,IAAI,iDAAiD,CAAC;IAC/D,CAAC;IACD,OAAO,YAAY,CAAC,MAAM,KAAK,CAAC;QAC9B,CAAC,CAAC,8EAA8E;QAChF,CAAC,CAAC,qEAAqE,CAAC;AAC5E,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export type { PlanAction, PlanActionKind, PlanAssumption, PlanDocument } from '.
|
|
|
18
18
|
export { verifyPlan } from './verify.js';
|
|
19
19
|
export { buildHistory, storedReportFrom, MIN_RUN } from './history.js';
|
|
20
20
|
export { answerCost } from './answer.js';
|
|
21
|
+
export { guardSpend } from './guard.js';
|
|
22
|
+
export type { GuardAlternative, GuardAnswer, GuardRequest, GuardVerdict } from './guard.js';
|
|
23
|
+
export { proposeInit, HEADLINE_FLOOR_SHARE, MIN_RATE_DAYS } from './init.js';
|
|
24
|
+
export type { InitDecline, InitHeadline, InitJustification, InitKey, InitObservations, InitOptions, InitProposal, NoHeadline, ProviderSighting, UsageSighting, } from './init.js';
|
|
21
25
|
export type { AnswerRequest, AnswerVerdict, BudgetPosition, CallEstimate, CannotTellReasonAnswer, CostAnswer, } from './answer.js';
|
|
22
26
|
export { evaluateWatch, firedKey, COVERAGE_FLOOR, DAY_MS } from './watch.js';
|
|
23
27
|
export type { NotJudgeable, WatchAbstention, WatchCrossing, WatchGate, WatchOptions, WatchResult, WatchThresholds, } from './watch.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,oBAAoB,EAAE,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EACvB,SAAS,EACT,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,8 @@ export { buildPlan, planLabelName } from './plan.js';
|
|
|
22
22
|
export { verifyPlan } from './verify.js';
|
|
23
23
|
export { buildHistory, storedReportFrom, MIN_RUN } from './history.js';
|
|
24
24
|
export { answerCost } from './answer.js';
|
|
25
|
+
export { guardSpend } from './guard.js';
|
|
26
|
+
export { proposeInit, HEADLINE_FLOOR_SHARE, MIN_RATE_DAYS } from './init.js';
|
|
25
27
|
export { evaluateWatch, firedKey, COVERAGE_FLOOR, DAY_MS } from './watch.js';
|
|
26
28
|
export { STORE_SCHEMA_VERSION, identityOf, resolveStore, recordsFromBuckets, bucketsFromRecords, storeInventory, pruneRecords, } from './store.js';
|
|
27
29
|
export { CONNECTORS, connectorFor, normalizeAnthropicUsage, normalizeOpenAIUsage, bucketedProfile, bucketedCacheEconomics, } from './connector.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,QAAQ,GACT,MAAM,YAAY,CAAC;AAWpB,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAClF,gFAAgF;AAChF,4EAA4E;AAC5E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAA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;AAGzF,mEAAmE;AACnE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGjE,gCAAgC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAQ9C,0EAA0E;AAC1E,+EAA+E;AAC/E,8EAA8E;AAC9E,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEzD,8EAA8E;AAC9E,6EAA6E;AAC7E,2DAA2D;AAC3D,OAAO,EACL,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/init.d.ts
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The first five minutes, decided without touching a disk.
|
|
3
|
+
*
|
|
4
|
+
* Everything since 1.41 raised the ceiling. This lowers the floor: from
|
|
5
|
+
* `npx @trazum/cli` to a finding worth money, without reading a page of
|
|
6
|
+
* documentation. Twenty-one commands is a wall to somebody who has none of
|
|
7
|
+
* them yet, and that wall is why a good tool gets closed inside a minute.
|
|
8
|
+
*
|
|
9
|
+
* **The proposal is a document, not a side effect.** What `init` would write
|
|
10
|
+
* is decided here, from observations the CLI collected, and returned as a
|
|
11
|
+
* value. So every rule below is testable without a filesystem, and `--dry-run`
|
|
12
|
+
* is the same code path minus the write rather than a second implementation
|
|
13
|
+
* that drifts from the first.
|
|
14
|
+
*
|
|
15
|
+
* **A key with no evidence is not written.** A generated config full of
|
|
16
|
+
* guessed thresholds is a config nobody trusts and everybody deletes — and it
|
|
17
|
+
* is worse than an empty one, because it looks like a decision somebody made.
|
|
18
|
+
* Every key that lands carries the observation that justified it; every key
|
|
19
|
+
* that does not carries what would settle it. Both are typed values, because a
|
|
20
|
+
* first run that explains itself only in prose cannot be checked by a test.
|
|
21
|
+
*
|
|
22
|
+
* **Measurement is not policy.** A log says what your traffic *was* — how many
|
|
23
|
+
* calls, which model, how long the outputs ran. Those are measurements and
|
|
24
|
+
* this file writes them. A budget says what your traffic *may cost*, which no
|
|
25
|
+
* log can answer: picking "the measured month plus twenty per cent" would be
|
|
26
|
+
* this tool inventing a threshold and then grading somebody against it. So
|
|
27
|
+
* `spend` is always declined, and the measured figure is handed over so the
|
|
28
|
+
* person who *can* set a budget has the number in front of them.
|
|
29
|
+
*/
|
|
30
|
+
import type { TrazumConfig } from './config-schema.js';
|
|
31
|
+
import type { Detection, EvidenceKind } from './detect.js';
|
|
32
|
+
import type { HostEnvironment } from './host.js';
|
|
33
|
+
import type { SliceLevers } from './levers.js';
|
|
34
|
+
import type { PricingCatalogue } from './pricing.js';
|
|
35
|
+
import type { UsageProfileReport } from './usage.js';
|
|
36
|
+
import type { Locale } from './i18n/index.js';
|
|
37
|
+
/** A source file that was read, and what `detectFromSource` made of it. */
|
|
38
|
+
export interface ProviderSighting {
|
|
39
|
+
file: string;
|
|
40
|
+
detection: Detection;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Something that might hold usage, found lying around.
|
|
44
|
+
*
|
|
45
|
+
* `where` is a path for the file kinds and the **name** of an environment
|
|
46
|
+
* variable for a credential — never its value. That rule has held since the
|
|
47
|
+
* connector shipped in 1.41 and it holds here: a first-run summary is the
|
|
48
|
+
* single most likely thing somebody pastes into a chat window.
|
|
49
|
+
*/
|
|
50
|
+
export interface UsageSighting {
|
|
51
|
+
kind: 'log-file' | 'log-directory' | 'store' | 'connector-credential';
|
|
52
|
+
where: string;
|
|
53
|
+
/** The provider this source belongs to, when the sighting names one. */
|
|
54
|
+
provider: string | null;
|
|
55
|
+
}
|
|
56
|
+
/** Everything the CLI saw, handed over as data. */
|
|
57
|
+
export interface InitObservations {
|
|
58
|
+
host: HostEnvironment;
|
|
59
|
+
/** Every source file read, strongest evidence first within each file. */
|
|
60
|
+
sightings: ProviderSighting[];
|
|
61
|
+
/** Prompt files the walk found. */
|
|
62
|
+
promptFiles: string[];
|
|
63
|
+
/** Usage sources found. Empty is a real answer and is reported as one. */
|
|
64
|
+
usage: UsageSighting[];
|
|
65
|
+
/**
|
|
66
|
+
* The profile of a usage source that was found **and** parsed.
|
|
67
|
+
*
|
|
68
|
+
* Null covers two different situations and the proposal keeps them apart:
|
|
69
|
+
* nothing was found, or something was found and could not be read. The
|
|
70
|
+
* caller says which by what it puts in `usage`.
|
|
71
|
+
*/
|
|
72
|
+
measured: UsageProfileReport | null;
|
|
73
|
+
/** The locale the environment asked for, when it asked for one. */
|
|
74
|
+
locale: Locale | null;
|
|
75
|
+
/** A config already sitting in the working directory. */
|
|
76
|
+
existing: {
|
|
77
|
+
path: string;
|
|
78
|
+
config: TrazumConfig;
|
|
79
|
+
} | null;
|
|
80
|
+
}
|
|
81
|
+
/** Every config key `init` is allowed to have an opinion about. */
|
|
82
|
+
export type InitKey = 'locale' | 'extensions' | 'usage.model' | 'usage.callsPerMonth' | 'usage.avgOutputTokens' | 'usage.cacheHitRate' | 'usage.batchEligible' | 'labels' | 'spend.maxUsd';
|
|
83
|
+
/** Why a key was written, in a shape a test can assert on. */
|
|
84
|
+
export type InitJustification = {
|
|
85
|
+
key: 'locale';
|
|
86
|
+
value: Locale;
|
|
87
|
+
from: 'environment';
|
|
88
|
+
} | {
|
|
89
|
+
key: 'extensions';
|
|
90
|
+
value: string[];
|
|
91
|
+
from: 'walk';
|
|
92
|
+
files: number;
|
|
93
|
+
} | {
|
|
94
|
+
key: 'usage.model';
|
|
95
|
+
value: string;
|
|
96
|
+
from: 'measured';
|
|
97
|
+
/** Share of the measured bill this model carries, 0-1. */
|
|
98
|
+
share: number;
|
|
99
|
+
} | {
|
|
100
|
+
key: 'usage.model';
|
|
101
|
+
value: string;
|
|
102
|
+
from: 'source';
|
|
103
|
+
file: string;
|
|
104
|
+
line: number;
|
|
105
|
+
evidence: EvidenceKind;
|
|
106
|
+
} | {
|
|
107
|
+
key: 'usage.callsPerMonth';
|
|
108
|
+
value: number;
|
|
109
|
+
from: 'measured';
|
|
110
|
+
calls: number;
|
|
111
|
+
days: number;
|
|
112
|
+
} | {
|
|
113
|
+
key: 'usage.avgOutputTokens';
|
|
114
|
+
value: number;
|
|
115
|
+
from: 'measured';
|
|
116
|
+
outputTokens: number;
|
|
117
|
+
calls: number;
|
|
118
|
+
} | {
|
|
119
|
+
key: 'usage.cacheHitRate';
|
|
120
|
+
value: number;
|
|
121
|
+
from: 'measured';
|
|
122
|
+
cacheReadTokens: number;
|
|
123
|
+
inputTokens: number;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Why a key was left out, and what would settle it.
|
|
127
|
+
*
|
|
128
|
+
* A refusal never arrives bare — the rule the guard established in 1.45, here
|
|
129
|
+
* applied to a file rather than to a call. "No provider written" with nothing
|
|
130
|
+
* after it is indistinguishable from a bug.
|
|
131
|
+
*/
|
|
132
|
+
export type InitDecline = {
|
|
133
|
+
key: 'usage.model';
|
|
134
|
+
why: 'no-evidence';
|
|
135
|
+
} | {
|
|
136
|
+
key: 'usage.model';
|
|
137
|
+
why: 'conflicting-evidence';
|
|
138
|
+
files: string[];
|
|
139
|
+
} | {
|
|
140
|
+
key: 'usage.model';
|
|
141
|
+
why: 'provider-only';
|
|
142
|
+
provider: string;
|
|
143
|
+
file: string;
|
|
144
|
+
} | {
|
|
145
|
+
key: 'usage.callsPerMonth';
|
|
146
|
+
why: 'nothing-measured';
|
|
147
|
+
} | {
|
|
148
|
+
key: 'usage.callsPerMonth';
|
|
149
|
+
why: 'window-too-short';
|
|
150
|
+
days: number;
|
|
151
|
+
calls: number;
|
|
152
|
+
} | {
|
|
153
|
+
key: 'usage.callsPerMonth';
|
|
154
|
+
why: 'undated-calls';
|
|
155
|
+
undated: number;
|
|
156
|
+
calls: number;
|
|
157
|
+
} | {
|
|
158
|
+
key: 'usage.avgOutputTokens';
|
|
159
|
+
why: 'nothing-measured';
|
|
160
|
+
} | {
|
|
161
|
+
key: 'usage.cacheHitRate';
|
|
162
|
+
why: 'nothing-measured';
|
|
163
|
+
} | {
|
|
164
|
+
key: 'usage.cacheHitRate';
|
|
165
|
+
why: 'not-recorded';
|
|
166
|
+
} | {
|
|
167
|
+
key: 'usage.batchEligible';
|
|
168
|
+
why: 'only-you-know';
|
|
169
|
+
} | {
|
|
170
|
+
key: 'labels';
|
|
171
|
+
why: 'unprovable';
|
|
172
|
+
labels: number;
|
|
173
|
+
} | {
|
|
174
|
+
key: 'spend.maxUsd';
|
|
175
|
+
why: 'a-budget-is-a-policy';
|
|
176
|
+
measuredUsd: number | null;
|
|
177
|
+
days: number | null;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* The single most valuable thing the first run found, with its arithmetic.
|
|
181
|
+
*
|
|
182
|
+
* One finding, not a ranked table. `doctor` and `plan` exist for the table,
|
|
183
|
+
* and a first run that opens with fourteen rows has told somebody nothing —
|
|
184
|
+
* they came to find out whether this is worth an afternoon.
|
|
185
|
+
*/
|
|
186
|
+
export interface InitHeadline {
|
|
187
|
+
slice: SliceLevers;
|
|
188
|
+
/** Which lever the figure is. `route+batch` is computed, never summed. */
|
|
189
|
+
lever: 'route' | 'batch' | 'route+batch';
|
|
190
|
+
savingUsd: number;
|
|
191
|
+
/** Always measured. Nothing in a headline rests on a call that never happened. */
|
|
192
|
+
provenance: 'measured';
|
|
193
|
+
/** Days of measurement behind it, so the figure has a unit a reader can check. */
|
|
194
|
+
days: number;
|
|
195
|
+
}
|
|
196
|
+
export type NoHeadline = 'nothing-measured' | 'nothing-could-be-priced' | 'no-lever-clears-the-floor';
|
|
197
|
+
export interface InitProposal {
|
|
198
|
+
schemaVersion: 1;
|
|
199
|
+
/** Exactly the keys that were justified, and nothing else. */
|
|
200
|
+
config: TrazumConfig;
|
|
201
|
+
justified: InitJustification[];
|
|
202
|
+
declined: InitDecline[];
|
|
203
|
+
headline: InitHeadline | null;
|
|
204
|
+
/** Set when `headline` is null, so "nothing found" is never bare. */
|
|
205
|
+
noHeadline: NoHeadline | null;
|
|
206
|
+
/**
|
|
207
|
+
* The config already there, and which of its keys this proposal would
|
|
208
|
+
* change. Named before anything is written: an `init` that silently replaces
|
|
209
|
+
* a config somebody tuned is the worst possible first impression.
|
|
210
|
+
*/
|
|
211
|
+
overwrites: {
|
|
212
|
+
path: string;
|
|
213
|
+
keys: InitKey[];
|
|
214
|
+
} | null;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* The shortest measured span that may be stated as a monthly rate.
|
|
218
|
+
*
|
|
219
|
+
* Four weeks, so every weekday appears the same number of times. Three days of
|
|
220
|
+
* traffic multiplied by ten is a forecast wearing a measurement's clothes, and
|
|
221
|
+
* this repository has refused that since the series shipped in 1.40.
|
|
222
|
+
*/
|
|
223
|
+
export declare const MIN_RATE_DAYS = 28;
|
|
224
|
+
/** The share of the bill a headline must clear to be worth being the headline. */
|
|
225
|
+
export declare const HEADLINE_FLOOR_SHARE = 0.01;
|
|
226
|
+
export interface InitOptions {
|
|
227
|
+
catalogue: PricingCatalogue;
|
|
228
|
+
on?: Date;
|
|
229
|
+
}
|
|
230
|
+
export declare function proposeInit(observations: InitObservations, options: InitOptions): InitProposal;
|
|
231
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,KAA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