@warmdrift/kgauto-compiler 2.0.0-alpha.75 → 2.0.0-alpha.77
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/{chunk-WP22F3CX.mjs → chunk-GB7VJQ6C.mjs} +1 -1
- package/dist/glassbox/index.d.mts +3 -3
- package/dist/glassbox/index.d.ts +3 -3
- package/dist/glassbox-routes/format.d.mts +2 -2
- package/dist/glassbox-routes/format.d.ts +2 -2
- package/dist/glassbox-routes/index.d.mts +4 -4
- package/dist/glassbox-routes/index.d.ts +4 -4
- package/dist/glassbox-routes/index.js +1 -0
- package/dist/glassbox-routes/index.mjs +1 -0
- package/dist/glassbox-routes/react/index.d.mts +2 -2
- package/dist/glassbox-routes/react/index.d.ts +2 -2
- package/dist/index.d.mts +141 -5
- package/dist/index.d.ts +141 -5
- package/dist/index.js +256 -8
- package/dist/index.mjs +252 -8
- package/dist/{ir-B0v2f9NY.d.ts → ir-C02EIElQ.d.ts} +16 -6
- package/dist/{ir-CZukZvDn.d.mts → ir-CRV1_taF.d.mts} +16 -6
- package/dist/key-health.js +1 -1
- package/dist/key-health.mjs +1 -1
- package/dist/profiles.d.mts +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{types-Ba68lIs1.d.ts → types-3WdGMqin.d.mts} +2 -9
- package/dist/{types-D-PuKCWk.d.ts → types-C5BX9bzi.d.ts} +1 -1
- package/dist/{types-BgJ5iQB_.d.mts → types-Caq-hOIj.d.mts} +1 -1
- package/dist/{types-BOTLfJOp.d.mts → types-CkRvjxrI.d.ts} +2 -9
- package/package.json +1 -1
|
@@ -1209,12 +1209,21 @@ interface CallAttempt {
|
|
|
1209
1209
|
* for alpha.10+ — e.g. mid-stream policy rejects)
|
|
1210
1210
|
* - `provider_auth_failed` alpha.14 — initial provider returned 401/403
|
|
1211
1211
|
* (upstream key revocation, malformed-but-truthy
|
|
1212
|
-
* key
|
|
1213
|
-
*
|
|
1212
|
+
* key). The chain walks to the next
|
|
1213
|
+
* non-same-provider target instead of
|
|
1214
1214
|
* short-circuiting; same-provider remaining
|
|
1215
1215
|
* entries skip with errorCode='auth_inferred'.
|
|
1216
|
+
* - `provider_billing_exhausted` alpha.77 — the provider's ACCOUNT is out
|
|
1217
|
+
* of credits (Anthropic "credit balance is too
|
|
1218
|
+
* low" 400, OpenAI insufficient_quota 429,
|
|
1219
|
+
* Google billing-disabled, DeepSeek 402). Walks
|
|
1220
|
+
* like auth and skips same-provider siblings
|
|
1221
|
+
* (errorCode='billing_exhausted_inferred').
|
|
1222
|
+
* Distinct from auth AND from rate_limit because
|
|
1223
|
+
* its disposition is distinct: it never clears
|
|
1224
|
+
* on its own — a human funds the account.
|
|
1216
1225
|
*/
|
|
1217
|
-
type FallbackReason = 'rate_limit' | 'provider_error' | 'cost_cap' | 'cliff' | 'contract_violation' | 'provider_auth_failed';
|
|
1226
|
+
type FallbackReason = 'rate_limit' | 'provider_error' | 'cost_cap' | 'cliff' | 'contract_violation' | 'provider_auth_failed' | 'provider_billing_exhausted';
|
|
1218
1227
|
interface CallResult {
|
|
1219
1228
|
/** Compile handle (still valid for record() if consumer wants to add oracle scores later). */
|
|
1220
1229
|
handle: string;
|
|
@@ -1470,10 +1479,11 @@ interface RecordInput {
|
|
|
1470
1479
|
/** Model originally targeted when a fallback fired. */
|
|
1471
1480
|
fellOverFrom?: string;
|
|
1472
1481
|
/**
|
|
1473
|
-
* Why the fallback fired
|
|
1474
|
-
*
|
|
1482
|
+
* Why the fallback fired — the SAME closed set as CallResult.fallbackReason
|
|
1483
|
+
* (one derivation; the alpha.77 DTS break caught this field's inline copy
|
|
1484
|
+
* drifting when the canonical union grew a member).
|
|
1475
1485
|
*/
|
|
1476
|
-
fallbackReason?:
|
|
1486
|
+
fallbackReason?: FallbackReason;
|
|
1477
1487
|
/**
|
|
1478
1488
|
* alpha.66 — true when the one-shot same-model retry fired during this
|
|
1479
1489
|
* call (migration 039 `retried_same_model`). Powers the offline rollup:
|
|
@@ -1209,12 +1209,21 @@ interface CallAttempt {
|
|
|
1209
1209
|
* for alpha.10+ — e.g. mid-stream policy rejects)
|
|
1210
1210
|
* - `provider_auth_failed` alpha.14 — initial provider returned 401/403
|
|
1211
1211
|
* (upstream key revocation, malformed-but-truthy
|
|
1212
|
-
* key
|
|
1213
|
-
*
|
|
1212
|
+
* key). The chain walks to the next
|
|
1213
|
+
* non-same-provider target instead of
|
|
1214
1214
|
* short-circuiting; same-provider remaining
|
|
1215
1215
|
* entries skip with errorCode='auth_inferred'.
|
|
1216
|
+
* - `provider_billing_exhausted` alpha.77 — the provider's ACCOUNT is out
|
|
1217
|
+
* of credits (Anthropic "credit balance is too
|
|
1218
|
+
* low" 400, OpenAI insufficient_quota 429,
|
|
1219
|
+
* Google billing-disabled, DeepSeek 402). Walks
|
|
1220
|
+
* like auth and skips same-provider siblings
|
|
1221
|
+
* (errorCode='billing_exhausted_inferred').
|
|
1222
|
+
* Distinct from auth AND from rate_limit because
|
|
1223
|
+
* its disposition is distinct: it never clears
|
|
1224
|
+
* on its own — a human funds the account.
|
|
1216
1225
|
*/
|
|
1217
|
-
type FallbackReason = 'rate_limit' | 'provider_error' | 'cost_cap' | 'cliff' | 'contract_violation' | 'provider_auth_failed';
|
|
1226
|
+
type FallbackReason = 'rate_limit' | 'provider_error' | 'cost_cap' | 'cliff' | 'contract_violation' | 'provider_auth_failed' | 'provider_billing_exhausted';
|
|
1218
1227
|
interface CallResult {
|
|
1219
1228
|
/** Compile handle (still valid for record() if consumer wants to add oracle scores later). */
|
|
1220
1229
|
handle: string;
|
|
@@ -1470,10 +1479,11 @@ interface RecordInput {
|
|
|
1470
1479
|
/** Model originally targeted when a fallback fired. */
|
|
1471
1480
|
fellOverFrom?: string;
|
|
1472
1481
|
/**
|
|
1473
|
-
* Why the fallback fired
|
|
1474
|
-
*
|
|
1482
|
+
* Why the fallback fired — the SAME closed set as CallResult.fallbackReason
|
|
1483
|
+
* (one derivation; the alpha.77 DTS break caught this field's inline copy
|
|
1484
|
+
* drifting when the canonical union grew a member).
|
|
1475
1485
|
*/
|
|
1476
|
-
fallbackReason?:
|
|
1486
|
+
fallbackReason?: FallbackReason;
|
|
1477
1487
|
/**
|
|
1478
1488
|
* alpha.66 — true when the one-shot same-model retry fired during this
|
|
1479
1489
|
* call (migration 039 `retried_same_model`). Powers the offline rollup:
|
package/dist/key-health.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(key_health_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(key_health_exports);
|
|
26
26
|
|
|
27
27
|
// src/version.ts
|
|
28
|
-
var LIBRARY_VERSION = "2.0.0-alpha.
|
|
28
|
+
var LIBRARY_VERSION = "2.0.0-alpha.77";
|
|
29
29
|
|
|
30
30
|
// src/key-health.ts
|
|
31
31
|
var JSON_HEADERS = { "Content-Type": "application/json" };
|
package/dist/key-health.mjs
CHANGED
package/dist/profiles.d.mts
CHANGED
package/dist/profiles.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { i as Adapter, x as SectionKind } from './ir-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Internal config + hook types for createGlassboxRoutes().
|
|
5
|
-
*
|
|
6
|
-
* The public contract lives on `GlassboxRoutesConfig` in ./index.ts; these
|
|
7
|
-
* are the narrower per-handler shapes consumed by proxy.ts and stream.ts.
|
|
8
|
-
*/
|
|
1
|
+
import { i as Adapter, F as FallbackReason, x as SectionKind } from './ir-CRV1_taF.mjs';
|
|
9
2
|
|
|
10
3
|
/**
|
|
11
4
|
* Wire contract for the Glass-Box Chrome extension's brain-poll endpoint.
|
|
@@ -131,7 +124,7 @@ interface TraceDetail extends TraceSummary {
|
|
|
131
124
|
/** Derived: cacheReadInputTokens / max(tokensIn, 1). 0-1. */
|
|
132
125
|
inputCacheHitRatio: number;
|
|
133
126
|
fellOverFrom?: string;
|
|
134
|
-
fallbackReason?:
|
|
127
|
+
fallbackReason?: FallbackReason;
|
|
135
128
|
/** Up to 2 alternatives. Empty array (not undefined) when none qualify. */
|
|
136
129
|
counterfactuals?: TraceCounterfactual[];
|
|
137
130
|
/** Undefined when 7d volume < 5/day (insufficient data). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-
|
|
1
|
+
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-C02EIElQ.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-
|
|
1
|
+
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-CRV1_taF.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import { i as Adapter, x as SectionKind } from './ir-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Internal config + hook types for createGlassboxRoutes().
|
|
5
|
-
*
|
|
6
|
-
* The public contract lives on `GlassboxRoutesConfig` in ./index.ts; these
|
|
7
|
-
* are the narrower per-handler shapes consumed by proxy.ts and stream.ts.
|
|
8
|
-
*/
|
|
1
|
+
import { i as Adapter, F as FallbackReason, x as SectionKind } from './ir-C02EIElQ.js';
|
|
9
2
|
|
|
10
3
|
/**
|
|
11
4
|
* Wire contract for the Glass-Box Chrome extension's brain-poll endpoint.
|
|
@@ -131,7 +124,7 @@ interface TraceDetail extends TraceSummary {
|
|
|
131
124
|
/** Derived: cacheReadInputTokens / max(tokensIn, 1). 0-1. */
|
|
132
125
|
inputCacheHitRatio: number;
|
|
133
126
|
fellOverFrom?: string;
|
|
134
|
-
fallbackReason?:
|
|
127
|
+
fallbackReason?: FallbackReason;
|
|
135
128
|
/** Up to 2 alternatives. Empty array (not undefined) when none qualify. */
|
|
136
129
|
counterfactuals?: TraceCounterfactual[];
|
|
137
130
|
/** Undefined when 7d volume < 5/day (insufficient data). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmdrift/kgauto-compiler",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.77",
|
|
4
4
|
"description": "Prompt compiler with executable provider knowledge for multi-model AI apps: normalized multi-provider transport with fallback chains, compile-time cliff guards, a curated model registry, and a telemetry flight recorder. Swap models without rewriting prompts.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|