@warmdrift/kgauto-check 0.3.0 → 0.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/LICENSE +21 -0
- package/README.md +50 -11
- package/dist/bin.js +19 -38
- package/dist/chunk-6ZBEABKR.js +4636 -0
- package/dist/index.d.ts +260 -14
- package/dist/index.js +13 -1
- package/package.json +5 -4
- package/dist/chunk-NHTVNYK2.js +0 -477
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,12 @@ declare const CallSiteSchema: z.ZodObject<{
|
|
|
16
16
|
model: z.ZodString;
|
|
17
17
|
/** How the model id is selected at this site. */
|
|
18
18
|
modelSelection: z.ZodOptional<z.ZodEnum<["hardcoded", "config", "env", "dynamic"]>>;
|
|
19
|
+
/**
|
|
20
|
+
* 0.4.0 (Amendment B): where the request is served, when the code shows it — the
|
|
21
|
+
* provider's own API, or a cloud platform that serves the provider's models on its
|
|
22
|
+
* own lifecycle schedule. Omit when you cannot tell.
|
|
23
|
+
*/
|
|
24
|
+
platform: z.ZodOptional<z.ZodEnum<["provider-api", "vertex", "bedrock", "azure", "other"]>>;
|
|
19
25
|
/**
|
|
20
26
|
* Best-guess intent archetype from kgauto's dialect (ask, classify,
|
|
21
27
|
* critique, extract, generate, hunt, plan, summarize, transform).
|
|
@@ -47,6 +53,7 @@ declare const CallSiteSchema: z.ZodObject<{
|
|
|
47
53
|
id: string;
|
|
48
54
|
model: string;
|
|
49
55
|
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
56
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
50
57
|
archetype?: string | undefined;
|
|
51
58
|
estInputTokens?: number | undefined;
|
|
52
59
|
maxInputTokens?: number | undefined;
|
|
@@ -63,6 +70,7 @@ declare const CallSiteSchema: z.ZodObject<{
|
|
|
63
70
|
id: string;
|
|
64
71
|
model: string;
|
|
65
72
|
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
73
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
66
74
|
archetype?: string | undefined;
|
|
67
75
|
estInputTokens?: number | undefined;
|
|
68
76
|
maxInputTokens?: number | undefined;
|
|
@@ -76,6 +84,38 @@ declare const CallSiteSchema: z.ZodObject<{
|
|
|
76
84
|
estCallsPerMonth?: number | undefined;
|
|
77
85
|
notes?: string | undefined;
|
|
78
86
|
}>;
|
|
87
|
+
/**
|
|
88
|
+
* 0.4.0 (R5) — a model id the project holds where no literal call site
|
|
89
|
+
* carries it: a model picker, a config default, an environment default, a
|
|
90
|
+
* list of supported models. The card reports on its lifecycle; there is no
|
|
91
|
+
* request shape to check it against.
|
|
92
|
+
*/
|
|
93
|
+
declare const ModelMentionSchema: z.ZodObject<{
|
|
94
|
+
/** Model id exactly as written in the project. */
|
|
95
|
+
model: z.ZodString;
|
|
96
|
+
/** Where it is written, e.g. "src/config/models.ts:14". */
|
|
97
|
+
where: z.ZodString;
|
|
98
|
+
modelSelection: z.ZodOptional<z.ZodEnum<["hardcoded", "config", "env", "dynamic"]>>;
|
|
99
|
+
/**
|
|
100
|
+
* 0.4.0 (Amendment B): where the request is served, when the code shows it — the
|
|
101
|
+
* provider's own API, or a cloud platform that serves the provider's models on its
|
|
102
|
+
* own lifecycle schedule. Omit when you cannot tell.
|
|
103
|
+
*/
|
|
104
|
+
platform: z.ZodOptional<z.ZodEnum<["provider-api", "vertex", "bedrock", "azure", "other"]>>;
|
|
105
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
model: string;
|
|
108
|
+
where: string;
|
|
109
|
+
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
110
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
111
|
+
notes?: string | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
model: string;
|
|
114
|
+
where: string;
|
|
115
|
+
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
116
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
117
|
+
notes?: string | undefined;
|
|
118
|
+
}>;
|
|
79
119
|
declare const ExtractSchema: z.ZodObject<{
|
|
80
120
|
project: z.ZodObject<{
|
|
81
121
|
name: z.ZodString;
|
|
@@ -87,6 +127,7 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
87
127
|
name: string;
|
|
88
128
|
description?: string | undefined;
|
|
89
129
|
}>;
|
|
130
|
+
/** May be empty (0.4.0): a project with no literal call site still gets a card. */
|
|
90
131
|
callSites: z.ZodArray<z.ZodObject<{
|
|
91
132
|
/** Agent-chosen stable label, e.g. "api/summarize.ts:42" or "hunt loop". */
|
|
92
133
|
id: z.ZodString;
|
|
@@ -94,6 +135,12 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
94
135
|
model: z.ZodString;
|
|
95
136
|
/** How the model id is selected at this site. */
|
|
96
137
|
modelSelection: z.ZodOptional<z.ZodEnum<["hardcoded", "config", "env", "dynamic"]>>;
|
|
138
|
+
/**
|
|
139
|
+
* 0.4.0 (Amendment B): where the request is served, when the code shows it — the
|
|
140
|
+
* provider's own API, or a cloud platform that serves the provider's models on its
|
|
141
|
+
* own lifecycle schedule. Omit when you cannot tell.
|
|
142
|
+
*/
|
|
143
|
+
platform: z.ZodOptional<z.ZodEnum<["provider-api", "vertex", "bedrock", "azure", "other"]>>;
|
|
97
144
|
/**
|
|
98
145
|
* Best-guess intent archetype from kgauto's dialect (ask, classify,
|
|
99
146
|
* critique, extract, generate, hunt, plan, summarize, transform).
|
|
@@ -125,6 +172,7 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
125
172
|
id: string;
|
|
126
173
|
model: string;
|
|
127
174
|
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
175
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
128
176
|
archetype?: string | undefined;
|
|
129
177
|
estInputTokens?: number | undefined;
|
|
130
178
|
maxInputTokens?: number | undefined;
|
|
@@ -141,6 +189,7 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
141
189
|
id: string;
|
|
142
190
|
model: string;
|
|
143
191
|
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
192
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
144
193
|
archetype?: string | undefined;
|
|
145
194
|
estInputTokens?: number | undefined;
|
|
146
195
|
maxInputTokens?: number | undefined;
|
|
@@ -154,6 +203,33 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
154
203
|
estCallsPerMonth?: number | undefined;
|
|
155
204
|
notes?: string | undefined;
|
|
156
205
|
}>, "many">;
|
|
206
|
+
/** Model ids no call site carries (0.4.0). */
|
|
207
|
+
models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
208
|
+
/** Model id exactly as written in the project. */
|
|
209
|
+
model: z.ZodString;
|
|
210
|
+
/** Where it is written, e.g. "src/config/models.ts:14". */
|
|
211
|
+
where: z.ZodString;
|
|
212
|
+
modelSelection: z.ZodOptional<z.ZodEnum<["hardcoded", "config", "env", "dynamic"]>>;
|
|
213
|
+
/**
|
|
214
|
+
* 0.4.0 (Amendment B): where the request is served, when the code shows it — the
|
|
215
|
+
* provider's own API, or a cloud platform that serves the provider's models on its
|
|
216
|
+
* own lifecycle schedule. Omit when you cannot tell.
|
|
217
|
+
*/
|
|
218
|
+
platform: z.ZodOptional<z.ZodEnum<["provider-api", "vertex", "bedrock", "azure", "other"]>>;
|
|
219
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
model: string;
|
|
222
|
+
where: string;
|
|
223
|
+
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
224
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
225
|
+
notes?: string | undefined;
|
|
226
|
+
}, {
|
|
227
|
+
model: string;
|
|
228
|
+
where: string;
|
|
229
|
+
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
230
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
231
|
+
notes?: string | undefined;
|
|
232
|
+
}>, "many">>;
|
|
157
233
|
notes: z.ZodOptional<z.ZodString>;
|
|
158
234
|
}, "strip", z.ZodTypeAny, {
|
|
159
235
|
project: {
|
|
@@ -164,6 +240,7 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
164
240
|
id: string;
|
|
165
241
|
model: string;
|
|
166
242
|
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
243
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
167
244
|
archetype?: string | undefined;
|
|
168
245
|
estInputTokens?: number | undefined;
|
|
169
246
|
maxInputTokens?: number | undefined;
|
|
@@ -178,6 +255,13 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
178
255
|
notes?: string | undefined;
|
|
179
256
|
}[];
|
|
180
257
|
notes?: string | undefined;
|
|
258
|
+
models?: {
|
|
259
|
+
model: string;
|
|
260
|
+
where: string;
|
|
261
|
+
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
262
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
263
|
+
notes?: string | undefined;
|
|
264
|
+
}[] | undefined;
|
|
181
265
|
}, {
|
|
182
266
|
project: {
|
|
183
267
|
name: string;
|
|
@@ -187,6 +271,7 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
187
271
|
id: string;
|
|
188
272
|
model: string;
|
|
189
273
|
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
274
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
190
275
|
archetype?: string | undefined;
|
|
191
276
|
estInputTokens?: number | undefined;
|
|
192
277
|
maxInputTokens?: number | undefined;
|
|
@@ -201,23 +286,140 @@ declare const ExtractSchema: z.ZodObject<{
|
|
|
201
286
|
notes?: string | undefined;
|
|
202
287
|
}[];
|
|
203
288
|
notes?: string | undefined;
|
|
289
|
+
models?: {
|
|
290
|
+
model: string;
|
|
291
|
+
where: string;
|
|
292
|
+
modelSelection?: "hardcoded" | "config" | "env" | "dynamic" | undefined;
|
|
293
|
+
platform?: "provider-api" | "vertex" | "bedrock" | "azure" | "other" | undefined;
|
|
294
|
+
notes?: string | undefined;
|
|
295
|
+
}[] | undefined;
|
|
204
296
|
}>;
|
|
205
297
|
type CallSite = z.infer<typeof CallSiteSchema>;
|
|
298
|
+
type ModelMention = z.infer<typeof ModelMentionSchema>;
|
|
206
299
|
type Extract = z.infer<typeof ExtractSchema>;
|
|
207
300
|
|
|
301
|
+
/**
|
|
302
|
+
* The lifecycle ledger's row shape (R1). The data lives in
|
|
303
|
+
* `lifecycle-ledger.ts`, generated from the providers' saved pages by
|
|
304
|
+
* `scripts/build-ledger.mjs` — never typed by hand.
|
|
305
|
+
*/
|
|
306
|
+
type LedgerProvider = 'anthropic' | 'openai' | 'google' | 'deepseek';
|
|
307
|
+
/** The provider's word, mapped onto one small set. `pageWord` keeps the page's own text. */
|
|
308
|
+
type LedgerWord = 'deprecated' | 'retired' | 'shut down' | 'legacy' | 'rerouted' | 'scheduled for shutdown';
|
|
309
|
+
interface LedgerRow {
|
|
310
|
+
/** The model id exactly as the page writes it. */
|
|
311
|
+
id: string;
|
|
312
|
+
provider: LedgerProvider;
|
|
313
|
+
word: LedgerWord;
|
|
314
|
+
/** The page's own status text for this row (a table cell, a section heading or a sentence). */
|
|
315
|
+
pageWord: string;
|
|
316
|
+
/** ISO date the page gives for the announcement / deprecation, when it gives one. */
|
|
317
|
+
announced?: string;
|
|
318
|
+
/** ISO date the page gives for retirement, shutdown or discontinuation. */
|
|
319
|
+
shutdown?: string;
|
|
320
|
+
/** ISO date the page gives as a floor ("not sooner than", "at earliest"). */
|
|
321
|
+
shutdownFloor?: string;
|
|
322
|
+
/** The page's date text, verbatim. */
|
|
323
|
+
dateText?: string;
|
|
324
|
+
/** The replacement the page names, backticks removed. */
|
|
325
|
+
replacement?: string;
|
|
326
|
+
/** Where the page says requests to this id are now routed. */
|
|
327
|
+
routesTo?: string;
|
|
328
|
+
/** DeepSeek: the model the page said the name pointed to when it announced the discontinuation. */
|
|
329
|
+
pointedTo?: string;
|
|
330
|
+
/** How the id was matched when the page names it by display name ("GPT-4o (…)"). */
|
|
331
|
+
matchedBy?: 'display-name';
|
|
332
|
+
/** The page section the row sits in, when the page is split by family. */
|
|
333
|
+
section?: string;
|
|
334
|
+
/** A second sentence from the same page that the row relies on. */
|
|
335
|
+
note?: string;
|
|
336
|
+
url: string;
|
|
337
|
+
/** ISO date the page was read. */
|
|
338
|
+
readOn: string;
|
|
339
|
+
/** The page line (or sentence) the row was built from, verbatim. */
|
|
340
|
+
quote: string;
|
|
341
|
+
/** A second page that confirms the row, with its own quote and read date. */
|
|
342
|
+
alsoUrl?: string;
|
|
343
|
+
alsoQuote?: string;
|
|
344
|
+
alsoReadOn?: string;
|
|
345
|
+
}
|
|
346
|
+
interface LedgerSource {
|
|
347
|
+
provider: LedgerProvider;
|
|
348
|
+
url: string;
|
|
349
|
+
/** ISO UTC time of the curl. */
|
|
350
|
+
readAt: string;
|
|
351
|
+
/** sha256 of the saved page bytes. */
|
|
352
|
+
sha256: string;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* R3 — an id is matched as a developer writes it; R1/R2 — the ledger is read
|
|
357
|
+
* before the catalog. Pure functions over the generated ledger and the
|
|
358
|
+
* compiler's catalog; no network.
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
interface Resolution {
|
|
362
|
+
/** The id exactly as configured. */
|
|
363
|
+
configured: string;
|
|
364
|
+
/** The id looked up. */
|
|
365
|
+
base: string;
|
|
366
|
+
/** What was done to get from one to the other, in words; empty when nothing was. */
|
|
367
|
+
steps: string[];
|
|
368
|
+
/** Set when the id is a partner platform's form: its lifecycle dates may differ from the provider's own API. */
|
|
369
|
+
partner?: Partner;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* A cloud platform that serves a provider's models on its own lifecycle schedule, or (0.4.1, R3)
|
|
373
|
+
* a gateway the id is explicitly written for: neither is the provider's own API.
|
|
374
|
+
*/
|
|
375
|
+
type Partner = 'vertex' | 'bedrock' | 'azure' | 'openrouter';
|
|
376
|
+
/**
|
|
377
|
+
* The prefix, Bedrock and Vertex forms are rewritten to the provider's own
|
|
378
|
+
* id. A dated snapshot is NOT stripped here — the lookup tries the dated id
|
|
379
|
+
* first, because the pages list dated snapshots as rows of their own.
|
|
380
|
+
*/
|
|
381
|
+
declare function resolveId(configured: string): Resolution;
|
|
382
|
+
interface LedgerHit {
|
|
383
|
+
row?: LedgerRow;
|
|
384
|
+
/** The id the ledger row was found under, when it differs from the resolved base. */
|
|
385
|
+
via?: string;
|
|
386
|
+
/** The id the catalog should be read under. */
|
|
387
|
+
catalogId: string;
|
|
388
|
+
}
|
|
389
|
+
declare function lookupLedger(res: Resolution): LedgerHit;
|
|
390
|
+
interface SiteState {
|
|
391
|
+
/** The partner platform the site runs on, if anything says so. */
|
|
392
|
+
partner?: Partner;
|
|
393
|
+
/** The extract stated the provider's own API and nothing contradicts it: the only certain case. */
|
|
394
|
+
providerApi: boolean;
|
|
395
|
+
/** The extract's stated platform and the id's form or the site's notes disagree. */
|
|
396
|
+
conflict?: string;
|
|
397
|
+
/** Amendment D1: where the partner came from — the id's own form, the extract's stated platform, or only words in the path or notes. */
|
|
398
|
+
source?: 'id' | 'stated' | 'words';
|
|
399
|
+
}
|
|
400
|
+
|
|
208
401
|
/**
|
|
209
402
|
* The deterministic check engine. Every finding carries a confidence tier —
|
|
210
403
|
* the mechanical answer to "how much confidence?":
|
|
211
404
|
*
|
|
212
|
-
* certain —
|
|
213
|
-
*
|
|
405
|
+
* certain — the provider's own page, or a fact read from the
|
|
406
|
+
* developer's code; stated flatly.
|
|
407
|
+
* likely — priced/inferred from the agent's own estimates, or a
|
|
408
|
+
* kgauto catalog value no provider page is cited for; a
|
|
409
|
+
* provider's word where the call may not use the
|
|
410
|
+
* provider's own API; no retry or fallback in the code.
|
|
214
411
|
* measurable-only — honestly unknowable from a code read; each one is
|
|
215
412
|
* exactly what the observe day exists to measure.
|
|
216
413
|
*
|
|
217
|
-
*
|
|
218
|
-
* (
|
|
219
|
-
*
|
|
220
|
-
* is
|
|
414
|
+
* 0.4.0: the provider's word comes first. A model id is resolved as the
|
|
415
|
+
* developer wrote it (R3), looked up in the lifecycle ledger read from the
|
|
416
|
+
* providers' deprecation pages (R1), then in the compiler's catalog, whose
|
|
417
|
+
* `providerLifecycle` is the page's word with its read date (R2). kgauto's own
|
|
418
|
+
* routing `status` is never printed as a fact about the model, and a limit
|
|
419
|
+
* that is only a kgauto default is never printed as certain (R4).
|
|
420
|
+
*
|
|
421
|
+
* No network, no writes: the card's destination sentence is true because
|
|
422
|
+
* there is no code path that could make it false.
|
|
221
423
|
*/
|
|
222
424
|
|
|
223
425
|
type Confidence = 'certain' | 'likely' | 'measurable-only';
|
|
@@ -228,7 +430,7 @@ interface Finding {
|
|
|
228
430
|
confidence: Confidence;
|
|
229
431
|
title: string;
|
|
230
432
|
detail: string;
|
|
231
|
-
/** Where the claim comes from — catalog field, extract field, arithmetic. */
|
|
433
|
+
/** Where the claim comes from — a provider page with its URL, a catalog field, an extract field, arithmetic. */
|
|
232
434
|
basis: string;
|
|
233
435
|
callSites: string[];
|
|
234
436
|
}
|
|
@@ -238,22 +440,62 @@ interface CheckResult {
|
|
|
238
440
|
catalogVersion: string;
|
|
239
441
|
}
|
|
240
442
|
interface EngineOptions {
|
|
241
|
-
/** Test seam:
|
|
443
|
+
/** Test seam: catalog lookup override for a resolved id. Defaults to the bundled roster. */
|
|
242
444
|
resolve?: (id: string) => {
|
|
243
445
|
canonical: string;
|
|
244
446
|
profile: ModelProfile | undefined;
|
|
245
447
|
};
|
|
246
|
-
/** Test seam: full roster override (for cheaper-candidate scans). */
|
|
448
|
+
/** Test seam: full roster override (for cheaper-candidate scans and the family sort). */
|
|
247
449
|
roster?: () => ModelProfile[];
|
|
450
|
+
/** Amendment B3: the user ran the CLI with --share, so the footer must not say nothing is uploaded. */
|
|
451
|
+
share?: boolean;
|
|
248
452
|
}
|
|
249
453
|
declare const DESTINATION_SENTENCE: string;
|
|
454
|
+
type Line = Omit<Finding, 'id' | 'callSites'>;
|
|
455
|
+
/** What the check knows about one model id as configured. */
|
|
456
|
+
interface ModelAnalysis {
|
|
457
|
+
res: Resolution;
|
|
458
|
+
/** The id as the card prints it: as configured, with what it was looked up as. */
|
|
459
|
+
shown: string;
|
|
460
|
+
row?: LedgerRow;
|
|
461
|
+
/** The ledger id the row was found under, when it differs from the looked-up id. */
|
|
462
|
+
via?: string;
|
|
463
|
+
/** The catalog profile the request checks run against; absent = the checks skip this id. */
|
|
464
|
+
profile?: ModelProfile;
|
|
465
|
+
/** The id the profile was found under. */
|
|
466
|
+
canonical: string;
|
|
467
|
+
lines: Line[];
|
|
468
|
+
/** The partner platform the site runs on, when the extract shows one. */
|
|
469
|
+
partner?: Partner;
|
|
470
|
+
/** Amendment D1: the site's state, so a line can say where its partner came from. */
|
|
471
|
+
state?: SiteState;
|
|
472
|
+
}
|
|
473
|
+
declare function analyseModel(configured: string, opts?: EngineOptions, site?: {
|
|
474
|
+
id?: string;
|
|
475
|
+
where?: string;
|
|
476
|
+
notes?: string;
|
|
477
|
+
platform?: string;
|
|
478
|
+
}): ModelAnalysis;
|
|
250
479
|
declare function runCheck(extract: Extract, opts?: EngineOptions): CheckResult;
|
|
251
|
-
declare function renderCard(extract: Extract, findings: Finding[],
|
|
480
|
+
declare function renderCard(extract: Extract, findings: Finding[], analyses?: ReadonlyMap<string, ModelAnalysis>, share?: boolean): string;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* GENERATED by scripts/build-ledger.mjs from the providers' own deprecation
|
|
484
|
+
* pages, saved by `curl -sL` and read on the dates below. Do not edit by
|
|
485
|
+
* hand: re-fetch the pages and re-run the script. Every row carries the page
|
|
486
|
+
* line it came from (`quote`), the URL and the day it was read; the script
|
|
487
|
+
* refused any row whose quote is not on the page.
|
|
488
|
+
*
|
|
489
|
+
* Rows per provider: anthropic 21 · openai 171 · google 76 · deepseek 4 (272 in all).
|
|
490
|
+
*/
|
|
491
|
+
|
|
492
|
+
declare const LEDGER_SOURCES: readonly LedgerSource[];
|
|
493
|
+
declare const LEDGER: readonly LedgerRow[];
|
|
252
494
|
|
|
253
495
|
declare function buildServer(): McpServer;
|
|
254
496
|
|
|
255
|
-
declare const SERVER_INSTRUCTIONS = "You are talking to kgauto-check, a local, offline checker for AI call surfaces.\n\nFlow: (1) call start_check to get extraction instructions, (2) read THIS project's code yourself and build the extract, (3) call run_check with it, (4) present the returned card to your human verbatim (it is grouped by confidence tier on purpose), (5) if they want measured numbers, call get_observe_day_plan.\n\nPrivacy contract, which you should relay to your human: the extract contains identifiers and counts only \u2014 never prompt text, never source code, never secrets. This check ran
|
|
256
|
-
declare const START_CHECK_INSTRUCTIONS
|
|
497
|
+
declare const SERVER_INSTRUCTIONS = "You are talking to kgauto-check, a local, offline checker for AI call surfaces.\n\nFlow: (1) call start_check to get extraction instructions, (2) read THIS project's code yourself and build the extract, (3) call run_check with it, (4) present the returned card to your human verbatim (it is grouped by confidence tier on purpose), (5) if they want measured numbers, call get_observe_day_plan.\n\nPrivacy contract, which you should relay to your human: the extract contains identifiers and counts only \u2014 never prompt text, never source code, never secrets. This check ran on your machine, against the catalog bundled with it and the providers\u2019 deprecation pages it was built with. Nothing was uploaded; no rows were written anywhere.\n\nget_model_facts answers one-off questions about any model id \u2014 what its provider's deprecation page says, then the verified catalog \u2014 and is what makes keeping this server installed useful between checks.";
|
|
498
|
+
declare const START_CHECK_INSTRUCTIONS: string;
|
|
257
499
|
|
|
258
500
|
/**
|
|
259
501
|
* Rung 2 of the ladder: the one-day observe run. v1 of this tool hands the
|
|
@@ -264,7 +506,11 @@ declare const START_CHECK_INSTRUCTIONS = "# kgauto check \u2014 extraction instr
|
|
|
264
506
|
*/
|
|
265
507
|
declare const OBSERVE_DAY_PLAN = "# The one-day observe run (for you, the agent \u2014 decision stays with your human)\n\n## What it is\nOne day of your project's normal traffic, observed. No routing changes: every call still goes to exactly the model your code chooses today. The observation records, per call: model, token counts in/out, cost at verified prices, latency, success/failure with a classified error code, and per-attempt rows when retries happen. Identifiers and counts \u2014 prompt text is never required.\n\n## What it answers (the measurable-only tier of your check card)\n- actual failure rate per model \u2014 including walkaway failures that green health checks miss\n- actual input-waste ratio per call site (the >85% input-share signal, measured instead of estimated)\n- which call sites dominate spend\n- the evidence base for whether a cheaper model could hold quality here (kgauto's judged eval runs on real captured cases, never on price alone)\n\n## The two honesty requirements (non-negotiable, relay both)\n1. **Destination, named before anything runs.** Your human gets one plain sentence stating exactly where outcome rows land and what is in them, BEFORE the first row is written. \"Nothing is uploaded\" was true of the check because it writes nothing; the observe day writes rows, so it must say where.\n2. **Observation never intervenes.** If your project uses fallback chains, observing must not pin a model and silently disable the chain \u2014 a forced pin is an intervention sold as observation. Rows are recorded per attempt, so the chain's real behaviour is what gets measured.\n\n## How to proceed\nThe integration is small (the kgauto compiler's call/record path with your existing keys), but because rows now land somewhere, the wiring starts with that destination sentence and your human's explicit yes. Next step: have your human reply to whoever pointed them at kgauto \u2014 the observe day is set up per-project, together.";
|
|
266
508
|
|
|
267
|
-
/**
|
|
509
|
+
/**
|
|
510
|
+
* One model id → what the provider's page says first (the lifecycle ledger,
|
|
511
|
+
* then the catalog profile's providerLifecycle), then the catalog card.
|
|
512
|
+
* Honest miss on an id in neither (s51).
|
|
513
|
+
*/
|
|
268
514
|
declare function renderModelFacts(model: string): string;
|
|
269
515
|
|
|
270
516
|
/** One source of truth: package.json, read at runtime (dist/ sits one level
|
|
@@ -272,4 +518,4 @@ declare function renderModelFacts(model: string): string;
|
|
|
272
518
|
* two declarations of one fact. */
|
|
273
519
|
declare const CHECK_VERSION: string;
|
|
274
520
|
|
|
275
|
-
export { CHECK_VERSION, type CallSite, CallSiteSchema, type CheckResult, type Confidence, DESTINATION_SENTENCE, type EngineOptions, type Extract, ExtractSchema, type Finding, OBSERVE_DAY_PLAN, SERVER_INSTRUCTIONS, START_CHECK_INSTRUCTIONS, type Severity, buildServer, renderCard, renderModelFacts, runCheck };
|
|
521
|
+
export { CHECK_VERSION, type CallSite, CallSiteSchema, type CheckResult, type Confidence, DESTINATION_SENTENCE, type EngineOptions, type Extract, ExtractSchema, type Finding, LEDGER, LEDGER_SOURCES, type LedgerProvider, type LedgerRow, type LedgerSource, type LedgerWord, type ModelAnalysis, type ModelMention, ModelMentionSchema, OBSERVE_DAY_PLAN, SERVER_INSTRUCTIONS, START_CHECK_INSTRUCTIONS, type Severity, analyseModel, buildServer, lookupLedger, renderCard, renderModelFacts, resolveId, runCheck };
|
package/dist/index.js
CHANGED
|
@@ -3,24 +3,36 @@ import {
|
|
|
3
3
|
CallSiteSchema,
|
|
4
4
|
DESTINATION_SENTENCE,
|
|
5
5
|
ExtractSchema,
|
|
6
|
+
LEDGER,
|
|
7
|
+
LEDGER_SOURCES,
|
|
8
|
+
ModelMentionSchema,
|
|
6
9
|
OBSERVE_DAY_PLAN,
|
|
7
10
|
SERVER_INSTRUCTIONS,
|
|
8
11
|
START_CHECK_INSTRUCTIONS,
|
|
12
|
+
analyseModel,
|
|
9
13
|
buildServer,
|
|
14
|
+
lookupLedger,
|
|
10
15
|
renderCard,
|
|
11
16
|
renderModelFacts,
|
|
17
|
+
resolveId,
|
|
12
18
|
runCheck
|
|
13
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6ZBEABKR.js";
|
|
14
20
|
export {
|
|
15
21
|
CHECK_VERSION,
|
|
16
22
|
CallSiteSchema,
|
|
17
23
|
DESTINATION_SENTENCE,
|
|
18
24
|
ExtractSchema,
|
|
25
|
+
LEDGER,
|
|
26
|
+
LEDGER_SOURCES,
|
|
27
|
+
ModelMentionSchema,
|
|
19
28
|
OBSERVE_DAY_PLAN,
|
|
20
29
|
SERVER_INSTRUCTIONS,
|
|
21
30
|
START_CHECK_INSTRUCTIONS,
|
|
31
|
+
analyseModel,
|
|
22
32
|
buildServer,
|
|
33
|
+
lookupLedger,
|
|
23
34
|
renderCard,
|
|
24
35
|
renderModelFacts,
|
|
36
|
+
resolveId,
|
|
25
37
|
runCheck
|
|
26
38
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmdrift/kgauto-check",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Point your AI at your project — kgauto's local check, as a pure CLI for coding agents. Your agent extracts the project's AI surface (identifiers and counts, never code) and this tool checks it against kgauto's verified model catalog: statuses, prices, cliffs, capability mismatches, resilience. Fully offline; --share is the one explicit opt-in exception.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"README.md"
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
14
15
|
],
|
|
15
16
|
"engines": {
|
|
16
17
|
"node": ">=18"
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
"ai-cost",
|
|
32
33
|
"prompt-compiler"
|
|
33
34
|
],
|
|
34
|
-
"license": "
|
|
35
|
+
"license": "MIT",
|
|
35
36
|
"repository": {
|
|
36
37
|
"type": "git",
|
|
37
38
|
"url": "git+https://github.com/stue/kgauto.git",
|
|
@@ -39,7 +40,7 @@
|
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
42
|
-
"@warmdrift/kgauto-compiler": "
|
|
43
|
+
"@warmdrift/kgauto-compiler": "2.0.0-alpha.133",
|
|
43
44
|
"zod": "^3.23.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|