@warmdrift/kgauto-compiler 2.0.0-alpha.86 → 2.0.0-alpha.88
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-QDWOMQYN.mjs → chunk-DSHWJFM2.mjs} +5 -1
- package/dist/{chunk-V4T2CBRI.mjs → chunk-GCOVYPJA.mjs} +1 -1
- package/dist/{chunk-2MQIVVEU.mjs → chunk-UNTUOZAG.mjs} +180 -24
- 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 +123 -23
- package/dist/glassbox-routes/index.mjs +2 -2
- 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 +23 -5
- package/dist/index.d.ts +23 -5
- package/dist/index.js +290 -30
- package/dist/index.mjs +112 -8
- package/dist/{ir-5TJLAYKR.d.mts → ir-P3NEU8z4.d.mts} +84 -1
- package/dist/{ir-C1zmvAh6.d.ts → ir-ZgN2KkuF.d.ts} +84 -1
- package/dist/key-health.js +1 -1
- package/dist/key-health.mjs +1 -1
- package/dist/profiles.d.mts +43 -2
- package/dist/profiles.d.ts +43 -2
- package/dist/profiles.js +184 -24
- package/dist/profiles.mjs +9 -1
- package/dist/{types-BiV-qN_x.d.mts → types-7sF3adLO.d.mts} +1 -1
- package/dist/{types-C2H37XLR.d.ts → types-B_MjEB0h.d.ts} +1 -1
- package/dist/{types-8Goj1cKf.d.ts → types-BgfuVIVI.d.ts} +1 -1
- package/dist/{types-BcYPDXgJ.d.mts → types-CK0zUlVE.d.mts} +1 -1
- package/package.json +8 -2
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
allProfiles,
|
|
3
3
|
resolveModelAlias,
|
|
4
4
|
tryGetProfile
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UNTUOZAG.mjs";
|
|
6
6
|
|
|
7
7
|
// src/brain-query.ts
|
|
8
8
|
var FRESH_SNAPSHOT = {
|
|
@@ -13,6 +13,9 @@ var FRESH_SNAPSHOT = {
|
|
|
13
13
|
};
|
|
14
14
|
var snapshot = { ...FRESH_SNAPSHOT };
|
|
15
15
|
var runtime;
|
|
16
|
+
function configFreshness() {
|
|
17
|
+
return runtime && snapshot.data ? "brain" : "bundled";
|
|
18
|
+
}
|
|
16
19
|
function configureBrainQuery(rt) {
|
|
17
20
|
runtime = rt;
|
|
18
21
|
snapshot = { ...FRESH_SNAPSHOT };
|
|
@@ -816,6 +819,7 @@ var loadChainsFromBrain = createBrainQueryCache({
|
|
|
816
819
|
});
|
|
817
820
|
|
|
818
821
|
export {
|
|
822
|
+
configFreshness,
|
|
819
823
|
configureBrainQuery,
|
|
820
824
|
createBrainQueryCache,
|
|
821
825
|
isBrainQueryActiveFor,
|
|
@@ -211,7 +211,7 @@ var PROFILES_RAW = [
|
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
id: "claude-opus-4-7",
|
|
214
|
-
verifiedAgainstDocs: "2026-
|
|
214
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
215
215
|
provider: "anthropic",
|
|
216
216
|
status: "legacy",
|
|
217
217
|
// s76 2026-07-25: docs list as LEGACY (Opus 5 is current). Bundle said current while the brain already said legacy — the two disagreed.
|
|
@@ -261,7 +261,7 @@ var PROFILES_RAW = [
|
|
|
261
261
|
},
|
|
262
262
|
{
|
|
263
263
|
id: "claude-opus-4-6",
|
|
264
|
-
verifiedAgainstDocs: "2026-
|
|
264
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
265
265
|
provider: "anthropic",
|
|
266
266
|
status: "legacy",
|
|
267
267
|
maxContextTokens: 1e6,
|
|
@@ -306,7 +306,7 @@ var PROFILES_RAW = [
|
|
|
306
306
|
},
|
|
307
307
|
{
|
|
308
308
|
id: "claude-sonnet-4-6",
|
|
309
|
-
verifiedAgainstDocs: "2026-
|
|
309
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
310
310
|
provider: "anthropic",
|
|
311
311
|
status: "legacy",
|
|
312
312
|
// s76 2026-07-25: docs list as LEGACY (Sonnet 5 is current).
|
|
@@ -347,7 +347,7 @@ var PROFILES_RAW = [
|
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
349
|
id: "claude-haiku-4-5",
|
|
350
|
-
verifiedAgainstDocs: "2026-
|
|
350
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
351
351
|
provider: "anthropic",
|
|
352
352
|
status: "current",
|
|
353
353
|
maxContextTokens: 2e5,
|
|
@@ -410,7 +410,7 @@ var PROFILES_RAW = [
|
|
|
410
410
|
// ── Google ──
|
|
411
411
|
{
|
|
412
412
|
id: "gemini-2.5-flash",
|
|
413
|
-
verifiedAgainstDocs: "2026-
|
|
413
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
414
414
|
provider: "google",
|
|
415
415
|
status: "current",
|
|
416
416
|
maxContextTokens: 1048576,
|
|
@@ -516,7 +516,7 @@ var PROFILES_RAW = [
|
|
|
516
516
|
// thresholds. The brain will validate/relax these as evidence accumulates
|
|
517
517
|
// per (archetype, model) tuple. Currently ZERO brain rows for this model.
|
|
518
518
|
id: "gemini-2.5-flash-lite",
|
|
519
|
-
verifiedAgainstDocs: "2026-
|
|
519
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
520
520
|
provider: "google",
|
|
521
521
|
status: "current",
|
|
522
522
|
maxContextTokens: 1048576,
|
|
@@ -673,7 +673,7 @@ var PROFILES_RAW = [
|
|
|
673
673
|
},
|
|
674
674
|
{
|
|
675
675
|
id: "gemini-3.1-pro-preview",
|
|
676
|
-
verifiedAgainstDocs: "2026-
|
|
676
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
677
677
|
provider: "google",
|
|
678
678
|
status: "preview",
|
|
679
679
|
maxContextTokens: 1048576,
|
|
@@ -733,7 +733,7 @@ var PROFILES_RAW = [
|
|
|
733
733
|
// deepseek-reasoner registered as aliases (see ALIASES below).
|
|
734
734
|
{
|
|
735
735
|
id: "deepseek-v4-flash",
|
|
736
|
-
verifiedAgainstDocs: "2026-
|
|
736
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
737
737
|
provider: "deepseek",
|
|
738
738
|
status: "current",
|
|
739
739
|
maxContextTokens: 1e6,
|
|
@@ -751,8 +751,8 @@ var PROFILES_RAW = [
|
|
|
751
751
|
reason: "Sequential tool calls only \u2014 L-040"
|
|
752
752
|
}
|
|
753
753
|
],
|
|
754
|
-
costInputPer1m: 0.
|
|
755
|
-
costOutputPer1m:
|
|
754
|
+
costInputPer1m: 0.44,
|
|
755
|
+
costOutputPer1m: 1.32,
|
|
756
756
|
lowering: {
|
|
757
757
|
system: { mode: "inline" },
|
|
758
758
|
cache: { strategy: "unsupported" },
|
|
@@ -771,7 +771,7 @@ var PROFILES_RAW = [
|
|
|
771
771
|
// baseQuality (it carries 'reasoning') with no latency counterweight,
|
|
772
772
|
// leapfrogged gemini-2.5-flash as PB's summarize leader once reachable.
|
|
773
773
|
latencyTier: "slow",
|
|
774
|
-
notes: "Cheap workhorse. 1M context, 384k max output. Cache-hit input $0.0028/M (1/50\xD7 of miss). Aliased as `deepseek-chat` (non-thinking) and `deepseek-reasoner` (thinking) \u2014 see ALIASES.",
|
|
774
|
+
notes: "Cheap workhorse. 1M context, 384k max output. Cache-hit input $0.0028/M (1/50\xD7 of miss). Aliased as `deepseek-chat` (non-thinking) and `deepseek-reasoner` (thinking) \u2014 see ALIASES. PEAK/OFF-PEAK since 2026-08-16 (page fetched 2026-08-24): peak = weekdays 01:00-04:00 + 06:00-10:00 UTC, off-peak = all other hours at HALF peak. Encoded prices ARE the peak rate (conservative: never understate cost); off-peak traffic costs half what the estimate says. alpha.87 shipped the DEAD pre-transition prices ($0.14/$0.28 flash, $0.435/$0.87 pro) with a fresh verification stamp \u2014 corrected here (alpha.88). A single price field cannot represent a two-rate schedule; catalog-sync extractions oscillate between the rates day-to-day (peak read 08-21, off-peak read 08-22) \u2014 time-of-day pricing remains unmodeled, roadmap.",
|
|
775
775
|
// Master plan §6.2 anchor. Brain-validated tier 1 cross-provider for
|
|
776
776
|
// classify (169 rows, 0% empty). Tier 0 for summarize-with-no-tools.
|
|
777
777
|
// Falls off on hunt (sequential tools — L-040) and reasoning depth.
|
|
@@ -806,7 +806,7 @@ var PROFILES_RAW = [
|
|
|
806
806
|
},
|
|
807
807
|
{
|
|
808
808
|
id: "deepseek-v4-pro",
|
|
809
|
-
verifiedAgainstDocs: "2026-
|
|
809
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
810
810
|
provider: "deepseek",
|
|
811
811
|
status: "current",
|
|
812
812
|
maxContextTokens: 1e6,
|
|
@@ -830,8 +830,8 @@ var PROFILES_RAW = [
|
|
|
830
830
|
// cache-hit in; no promo caveat). The old $1.74/$3.48 "regular post-promo"
|
|
831
831
|
// was a projected revert that never happened (L-073/L-081) — it 4×-overstated
|
|
832
832
|
// cost and suppressed V4-Pro in cost-aware ranking.
|
|
833
|
-
costInputPer1m:
|
|
834
|
-
costOutputPer1m:
|
|
833
|
+
costInputPer1m: 1.32,
|
|
834
|
+
costOutputPer1m: 3.96,
|
|
835
835
|
lowering: {
|
|
836
836
|
system: { mode: "inline" },
|
|
837
837
|
cache: { strategy: "unsupported" },
|
|
@@ -847,7 +847,7 @@ var PROFILES_RAW = [
|
|
|
847
847
|
// of the served set. Tag derivation would say 'medium'; the measurement says
|
|
848
848
|
// otherwise.
|
|
849
849
|
latencyTier: "slow",
|
|
850
|
-
notes: "Pro tier. 1M context, 384k max output. $0.435/$0.87 per 1M (cache-hit in $0.003625) \u2014 verified live 2026-06-22; the launch promo became the standing price (no revert). Default mode = thinking.",
|
|
850
|
+
notes: "Pro tier. 1M context, 384k max output. $0.435/$0.87 per 1M (cache-hit in $0.003625) \u2014 verified live 2026-06-22; the launch promo became the standing price (no revert). Default mode = thinking. PEAK/OFF-PEAK since 2026-08-16 (page fetched 2026-08-24): peak = weekdays 01:00-04:00 + 06:00-10:00 UTC, off-peak = all other hours at HALF peak. Encoded prices ARE the peak rate (conservative: never understate cost); off-peak traffic costs half what the estimate says. alpha.87 shipped the DEAD pre-transition prices ($0.14/$0.28 flash, $0.435/$0.87 pro) with a fresh verification stamp \u2014 corrected here (alpha.88). A single price field cannot represent a two-rate schedule; catalog-sync extractions oscillate between the rates day-to-day (peak read 08-21, off-peak read 08-22) \u2014 time-of-day pricing remains unmodeled, roadmap.",
|
|
851
851
|
// Master plan §3.3: tier 3 cross-provider for plan chain. Reasoning
|
|
852
852
|
// bumped one notch over V4-Flash; same parallel-tool ceiling.
|
|
853
853
|
archetypePerf: {
|
|
@@ -1455,13 +1455,111 @@ var PROFILES_RAW = [
|
|
|
1455
1455
|
// +1 vs 2.5-flash — but still below Sonnet/Opus reasoning floor
|
|
1456
1456
|
}
|
|
1457
1457
|
},
|
|
1458
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
1459
|
+
// gemini-3.6-flash — hand-onboarded s86 (2026-08-14), step-zero against
|
|
1460
|
+
// Google docs (models/gemini-3.6-flash page + pricing via catalog-sync's
|
|
1461
|
+
// two-agreeing-extraction the same day). Docs list it as Stable and call
|
|
1462
|
+
// it "previous-generation Flash" (3.5-flash is now "legacy" in Google's
|
|
1463
|
+
// wording) — but kgauto status is 'preview' per the standing entry rule:
|
|
1464
|
+
// a new model enters on capability data verified only at the docs level,
|
|
1465
|
+
// preview is unreachable by starter chains, and promotion to routing
|
|
1466
|
+
// happens through brain evidence, not through Google's marketing tier.
|
|
1467
|
+
// This also means NO family-primary retarget rides this release.
|
|
1468
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
1469
|
+
{
|
|
1470
|
+
id: "gemini-3.6-flash",
|
|
1471
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
1472
|
+
versionAdded: "2.0.0-alpha.87",
|
|
1473
|
+
provider: "google",
|
|
1474
|
+
status: "preview",
|
|
1475
|
+
maxContextTokens: 1048576,
|
|
1476
|
+
maxOutputTokens: 65536,
|
|
1477
|
+
maxTools: 128,
|
|
1478
|
+
parallelToolCalls: true,
|
|
1479
|
+
structuredOutput: "native",
|
|
1480
|
+
systemPromptMode: "separate",
|
|
1481
|
+
streaming: true,
|
|
1482
|
+
cliffs: [
|
|
1483
|
+
{
|
|
1484
|
+
metric: "input_tokens",
|
|
1485
|
+
threshold: 8e3,
|
|
1486
|
+
action: "downgrade_quality_warning",
|
|
1487
|
+
reason: "Inherited Flash-family guard (2.5\u21923.5 lineage); no 3.6 brain evidence yet"
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
metric: "tool_count",
|
|
1491
|
+
threshold: 20,
|
|
1492
|
+
action: "drop_to_top_relevant",
|
|
1493
|
+
reason: "Inherited from Flash family: tool reliability drops above ~20 (despite 128 hard limit). Validate per (archetype, model) after n\u226520."
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
metric: "thinking_with_short_output",
|
|
1497
|
+
threshold: 1,
|
|
1498
|
+
action: "force_thinking_budget_zero",
|
|
1499
|
+
reason: "Thinking supported per Google docs; same drain risk as 2.5/3.5-flash \u2014 thinking tokens consume maxOutputTokens"
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
metric: "tool_count",
|
|
1503
|
+
threshold: 1,
|
|
1504
|
+
whenIntent: "summarize",
|
|
1505
|
+
action: "strip_tools",
|
|
1506
|
+
reason: "Inherited from 2.5-flash s11 cliff: summarize+tools \u2192 empty response. Preemptive family guard until brain evidence on 3.6-flash specifically."
|
|
1507
|
+
}
|
|
1508
|
+
],
|
|
1509
|
+
costInputPer1m: 0.75,
|
|
1510
|
+
// promo through 2026-12-31; $1.50 from 2027-01-01 (TIME_BOUNDED_PRICING_ROWS carries the transition)
|
|
1511
|
+
costOutputPer1m: 3.75,
|
|
1512
|
+
// promo through 2026-12-31; $7.50 from 2027-01-01
|
|
1513
|
+
lowering: {
|
|
1514
|
+
...GOOGLE_LOWERING_BASE,
|
|
1515
|
+
cache: { ...GOOGLE_LOWERING_BASE.cache, discount: 0.1 },
|
|
1516
|
+
thinking: { field: "generationConfig.thinkingConfig.thinkingBudget", default: "auto" }
|
|
1517
|
+
},
|
|
1518
|
+
recovery: [
|
|
1519
|
+
{
|
|
1520
|
+
signal: "empty_response_after_tool",
|
|
1521
|
+
action: "retry_with_params",
|
|
1522
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1523
|
+
maxRetries: 1,
|
|
1524
|
+
reason: "Inherited Flash-family pattern: empty after tool result \u2014 retry with thinking off"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
signal: "empty_response",
|
|
1528
|
+
action: "retry_with_params",
|
|
1529
|
+
retryParams: { "generationConfig.thinkingConfig.thinkingBudget": 0 },
|
|
1530
|
+
maxRetries: 1,
|
|
1531
|
+
reason: "Empty response \u2014 try with thinking off"
|
|
1532
|
+
},
|
|
1533
|
+
{
|
|
1534
|
+
signal: "malformed_function_call",
|
|
1535
|
+
action: "escalate",
|
|
1536
|
+
reason: "MALFORMED_FUNCTION_CALL maps to stop \u2014 escalate to next target"
|
|
1537
|
+
}
|
|
1538
|
+
],
|
|
1539
|
+
strengths: ["agentic_loops", "coding", "1m_context", "parallel_tools", "thinking_mode"],
|
|
1540
|
+
weaknesses: ["no_brain_evidence_yet"],
|
|
1541
|
+
notes: "Hand-onboarded s86 (2026-08-24; the session ran under a 10-day-slow machine clock, hence 08-14 stamps in kin artifacts), step-zero verified: 1,048,576 ctx / 65,536 out (Google model page). PRICING (page 2026-08-24): $0.75/$3.75 promo through 2026-12-31, $1.50/$7.50 from 2027-01-01 \u2014 the alpha.87 profile carried the post-promo rate as if current; corrected alpha.88. Docs status Stable; enters kgauto as preview per standing rule (availability != lifecycle, promotion via brain evidence). Function calling + structured outputs + thinking per docs; parallel tools assumed per Flash family (docs silent). First flagged by the release watcher s73 (2026-07-24); ~31 days in the onboarding queue.",
|
|
1542
|
+
archetypePerf: {
|
|
1543
|
+
hunt: 9,
|
|
1544
|
+
// Flash-family parallel-tool tier (L-040); inherited from 3.5-flash
|
|
1545
|
+
classify: 7,
|
|
1546
|
+
summarize: 7,
|
|
1547
|
+
transform: 7,
|
|
1548
|
+
ask: 8,
|
|
1549
|
+
generate: 8,
|
|
1550
|
+
plan: 7,
|
|
1551
|
+
extract: 7,
|
|
1552
|
+
critique: 5
|
|
1553
|
+
}
|
|
1554
|
+
},
|
|
1458
1555
|
{
|
|
1459
1556
|
// Auto-onboarded 2026-07-01 from `claude-sonnet-4-6`; VERIFIED 2026-07-02
|
|
1460
1557
|
// against the claude-api reference (cc-portfolio ratification pass). The
|
|
1461
|
-
// clone got context right (1M)
|
|
1462
|
-
//
|
|
1463
|
-
//
|
|
1464
|
-
//
|
|
1558
|
+
// clone got context right (1M). PRICING RE-BASED 2026-08-14 (s86): the
|
|
1559
|
+
// introductory $2/$10 was made PERMANENT — Anthropic's pricing page now
|
|
1560
|
+
// states the scheduled Sept-1 increase to $3/$15 "will not occur", so
|
|
1561
|
+
// $2/$10 IS the sticker. (The $3/$15 encoded 07-02 was correct under the
|
|
1562
|
+
// time-bounded-pricing convention at the time; the bound was cancelled.) The clone got max output WRONG:
|
|
1465
1563
|
// Sonnet 5 is 128k, not 4-6's 64k — corrected. New tokenizer (~30% more
|
|
1466
1564
|
// tokens for the same text vs 4-6): byte-budget consumers should re-baseline.
|
|
1467
1565
|
// API quirks (claude-api ref): (a) NON-DEFAULT temperature/top_p/top_k
|
|
@@ -1474,7 +1572,7 @@ var PROFILES_RAW = [
|
|
|
1474
1572
|
// 'preview' per the Fable precedent — no brain evidence yet; promotion to
|
|
1475
1573
|
// 'current' is an explicit call. (L-049/L-081.)
|
|
1476
1574
|
id: "claude-sonnet-5",
|
|
1477
|
-
verifiedAgainstDocs: "2026-
|
|
1575
|
+
verifiedAgainstDocs: "2026-08-24",
|
|
1478
1576
|
provider: "anthropic",
|
|
1479
1577
|
status: "current",
|
|
1480
1578
|
// s76 2026-07-25: GA per docs; was preview.
|
|
@@ -1486,8 +1584,9 @@ var PROFILES_RAW = [
|
|
|
1486
1584
|
systemPromptMode: "inline",
|
|
1487
1585
|
streaming: true,
|
|
1488
1586
|
cliffs: [],
|
|
1489
|
-
costInputPer1m:
|
|
1490
|
-
|
|
1587
|
+
costInputPer1m: 2,
|
|
1588
|
+
// 2026-08-24: intro price made PERMANENT (docs: "the previously scheduled increase to $3/$15 on September 1, 2026 will not occur")
|
|
1589
|
+
costOutputPer1m: 10,
|
|
1491
1590
|
lowering: ANTHROPIC_LOWERING_BASE,
|
|
1492
1591
|
recovery: [
|
|
1493
1592
|
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" },
|
|
@@ -1678,6 +1777,55 @@ function _setProfileBrainHook(hook) {
|
|
|
1678
1777
|
function canonicalId(id) {
|
|
1679
1778
|
return brainHook.resolveAlias?.(id) ?? ALIASES[id] ?? id;
|
|
1680
1779
|
}
|
|
1780
|
+
var CONSUMER_INDEX = /* @__PURE__ */ new Map();
|
|
1781
|
+
function registerProfiles(profiles) {
|
|
1782
|
+
for (const p of profiles) CONSUMER_INDEX.set(p.id, p);
|
|
1783
|
+
}
|
|
1784
|
+
function _testClearConsumerProfiles() {
|
|
1785
|
+
CONSUMER_INDEX.clear();
|
|
1786
|
+
}
|
|
1787
|
+
function inferProviderFromId(id) {
|
|
1788
|
+
const lower = id.toLowerCase();
|
|
1789
|
+
if (lower.startsWith("claude")) return "anthropic";
|
|
1790
|
+
if (lower.startsWith("gemini") || lower.startsWith("palm")) return "google";
|
|
1791
|
+
if (lower.startsWith("gpt") || /^o[0-9]/.test(lower) || lower.startsWith("chatgpt")) return "openai";
|
|
1792
|
+
if (lower.startsWith("deepseek")) return "deepseek";
|
|
1793
|
+
if (lower.startsWith("glm")) return "zai";
|
|
1794
|
+
if (lower.startsWith("kimi") || lower.startsWith("moonshot")) return "moonshot";
|
|
1795
|
+
return void 0;
|
|
1796
|
+
}
|
|
1797
|
+
function bestEffortProfile(id) {
|
|
1798
|
+
const canonical = canonicalId(id);
|
|
1799
|
+
const existing = tryGetProfile(canonical);
|
|
1800
|
+
if (existing) return existing;
|
|
1801
|
+
const provider = inferProviderFromId(canonical);
|
|
1802
|
+
if (!provider) return void 0;
|
|
1803
|
+
const donor = PROFILES_RAW.find((p) => p.provider === provider && p.status === "current") ?? PROFILES_RAW.find((p) => p.provider === provider);
|
|
1804
|
+
if (!donor) return void 0;
|
|
1805
|
+
const synth = {
|
|
1806
|
+
id: canonical,
|
|
1807
|
+
provider,
|
|
1808
|
+
bestEffort: true,
|
|
1809
|
+
status: "preview",
|
|
1810
|
+
maxContextTokens: 128e3,
|
|
1811
|
+
maxOutputTokens: 4096,
|
|
1812
|
+
maxTools: donor.maxTools,
|
|
1813
|
+
parallelToolCalls: false,
|
|
1814
|
+
structuredOutput: "none",
|
|
1815
|
+
systemPromptMode: donor.systemPromptMode,
|
|
1816
|
+
streaming: donor.streaming,
|
|
1817
|
+
cliffs: [],
|
|
1818
|
+
costInputPer1m: 0,
|
|
1819
|
+
costOutputPer1m: 0,
|
|
1820
|
+
lowering: donor.lowering,
|
|
1821
|
+
recovery: [],
|
|
1822
|
+
strengths: [],
|
|
1823
|
+
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data"],
|
|
1824
|
+
notes: `Synthesized by onUnprofiledModel:'best-effort' (provider ${provider} inferred from id; wire mechanics borrowed from ${donor.id}). No cliffs, no measured knowledge, cost UNKNOWN (recorded as 0). Replace via registerProfiles() for real guards.`
|
|
1825
|
+
};
|
|
1826
|
+
CONSUMER_INDEX.set(canonical, synth);
|
|
1827
|
+
return synth;
|
|
1828
|
+
}
|
|
1681
1829
|
function resolveModelAlias(id) {
|
|
1682
1830
|
return canonicalId(id);
|
|
1683
1831
|
}
|
|
@@ -1686,18 +1834,22 @@ var PROFILE_INDEX = new Map(
|
|
|
1686
1834
|
);
|
|
1687
1835
|
function getProfile(id) {
|
|
1688
1836
|
const canonical = canonicalId(id);
|
|
1837
|
+
const fromConsumer = CONSUMER_INDEX.get(canonical);
|
|
1838
|
+
if (fromConsumer) return fromConsumer;
|
|
1689
1839
|
const fromBrain = brainHook.getProfile?.(canonical);
|
|
1690
1840
|
if (fromBrain) return fromBrain;
|
|
1691
1841
|
const p = PROFILE_INDEX.get(canonical);
|
|
1692
1842
|
if (!p) {
|
|
1693
1843
|
const known = [...PROFILE_INDEX.keys(), ...Object.keys(ALIASES)].join(", ");
|
|
1694
|
-
throw new Error(
|
|
1844
|
+
throw new Error(
|
|
1845
|
+
`Unknown model id: "${id}". Known: ${known}. For a model kgauto has not onboarded: registerProfiles([...]) supplies a full profile, or policy.onUnprofiledModel:'best-effort' compiles with guards skipped (alpha.87).`
|
|
1846
|
+
);
|
|
1695
1847
|
}
|
|
1696
1848
|
return p;
|
|
1697
1849
|
}
|
|
1698
1850
|
function tryGetProfile(id) {
|
|
1699
1851
|
const canonical = canonicalId(id);
|
|
1700
|
-
return brainHook.getProfile?.(canonical) ?? PROFILE_INDEX.get(canonical);
|
|
1852
|
+
return CONSUMER_INDEX.get(canonical) ?? brainHook.getProfile?.(canonical) ?? PROFILE_INDEX.get(canonical);
|
|
1701
1853
|
}
|
|
1702
1854
|
function allProfiles() {
|
|
1703
1855
|
return PROFILES_RAW;
|
|
@@ -1714,6 +1866,10 @@ export {
|
|
|
1714
1866
|
latencyTierOf,
|
|
1715
1867
|
ALIASES,
|
|
1716
1868
|
_setProfileBrainHook,
|
|
1869
|
+
registerProfiles,
|
|
1870
|
+
_testClearConsumerProfiles,
|
|
1871
|
+
inferProviderFromId,
|
|
1872
|
+
bestEffortProfile,
|
|
1717
1873
|
resolveModelAlias,
|
|
1718
1874
|
getProfile,
|
|
1719
1875
|
tryGetProfile,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as GlassboxEvent } from '../types-
|
|
2
|
-
export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-
|
|
3
|
-
import '../ir-
|
|
1
|
+
import { G as GlassboxEvent } from '../types-7sF3adLO.mjs';
|
|
2
|
+
export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-7sF3adLO.mjs';
|
|
3
|
+
import '../ir-P3NEU8z4.mjs';
|
|
4
4
|
import '../dialect.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/glassbox/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as GlassboxEvent } from '../types-
|
|
2
|
-
export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-
|
|
3
|
-
import '../ir-
|
|
1
|
+
import { G as GlassboxEvent } from '../types-B_MjEB0h.js';
|
|
2
|
+
export { A as AdvisoryFiredData, C as CompileDoneData, a as CompileStartData, E as ExecuteAttemptData, b as ExecuteSuccessData, F as FallbackWalkedData, c as GLASSBOX_STREAM_TTL_MS, d as GlassboxEventKind, e as GlassboxPubSub } from '../types-B_MjEB0h.js';
|
|
3
|
+
import '../ir-ZgN2KkuF.js';
|
|
4
4
|
import '../dialect.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as GlassboxEvent } from '../types-
|
|
2
|
-
import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-
|
|
3
|
-
export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-
|
|
4
|
-
import '../ir-
|
|
1
|
+
import { G as GlassboxEvent } from '../types-7sF3adLO.mjs';
|
|
2
|
+
import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-CK0zUlVE.mjs';
|
|
3
|
+
export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-CK0zUlVE.mjs';
|
|
4
|
+
import '../ir-P3NEU8z4.mjs';
|
|
5
5
|
import '../dialect.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as GlassboxEvent } from '../types-
|
|
2
|
-
import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-
|
|
3
|
-
export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-
|
|
4
|
-
import '../ir-
|
|
1
|
+
import { G as GlassboxEvent } from '../types-B_MjEB0h.js';
|
|
2
|
+
import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-BgfuVIVI.js';
|
|
3
|
+
export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-BgfuVIVI.js';
|
|
4
|
+
import '../ir-ZgN2KkuF.js';
|
|
5
5
|
import '../dialect.js';
|
|
6
6
|
|
|
7
7
|
/**
|