@warmdrift/kgauto-compiler 2.0.0-alpha.85 → 2.0.0-alpha.86

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.
@@ -611,9 +611,21 @@ var PROFILES_RAW = [
611
611
  },
612
612
  {
613
613
  id: "gemini-2.5-pro",
614
- verifiedAgainstDocs: "2026-05-08",
614
+ verifiedAgainstDocs: "2026-08-08",
615
615
  provider: "google",
616
- status: "current",
616
+ // alpha.86 — AVAILABILITY demotion, not a provider-lifecycle mirror.
617
+ // Google's docs still list 2.5-pro as Stable, but the serving layer
618
+ // disagrees per account cohort: tt-intel measured 4/4 refusals
619
+ // ("no longer available to new users", 2026-08-02, their bench), and
620
+ // kgauto's own key 429s on a FreeTier per-day quota (probed
621
+ // 2026-08-08). A chain anchor that hard-fails for whole account
622
+ // cohorts is not an anchor; `legacy` removes it from cost-ordered
623
+ // chains and new selection while keeping the profile resolvable for
624
+ // consumers who pass it explicitly. Re-promotion is one status flip
625
+ // if Google restores availability. The registry cannot yet express
626
+ // account-cohort availability as data — see interfaces/kgauto.md
627
+ // ## Requested 2026-08-02.
628
+ status: "legacy",
617
629
  maxContextTokens: 1048576,
618
630
  maxOutputTokens: 65535,
619
631
  maxTools: 128,
@@ -643,7 +655,7 @@ var PROFILES_RAW = [
643
655
  }
644
656
  ],
645
657
  strengths: ["reasoning", "1m_context", "structured_output", "tool_use"],
646
- weaknesses: ["pricing_above_200k"],
658
+ weaknesses: ["pricing_above_200k", "availability_restricted_by_account_cohort"],
647
659
  // Master plan §3.3 anchor: tier-2 cross-provider in almost every chain.
648
660
  // Sits on the frontier at perf-9 — close to Sonnet but cheaper input.
649
661
  archetypePerf: {
@@ -2,7 +2,7 @@ import {
2
2
  allProfiles,
3
3
  resolveModelAlias,
4
4
  tryGetProfile
5
- } from "./chunk-FD3NFXDC.mjs";
5
+ } from "./chunk-2MQIVVEU.mjs";
6
6
 
7
7
  // src/brain-query.ts
8
8
  var FRESH_SNAPSHOT = {
@@ -451,8 +451,14 @@ var STARTER_CHAINS_GROUNDED = {
451
451
  critique: [
452
452
  { id: "claude-opus-4-7", grounding: "judgment", reason: "Highest reasoning bar, no degradation tier \u2014 engineer pick, awaiting measured backing" },
453
453
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Same-provider walk-down from Opus on 429" },
454
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor in similar quality bracket" },
455
- { id: "gpt-5.5", grounding: "judgment", reason: "alpha.16: third-provider frontier-tier floor (archetypePerf=9)" }
454
+ // alpha.86: gemini-2.5-pro dropped availability-restricted (tt-intel
455
+ // measured 4/4 cohort refusal 2026-08-02; kgauto key free-tier-quota
456
+ // 429 2026-08-08). No current Google model clears the critique floor
457
+ // (3.5-flash critique=5; 3.1-pro-preview scores 10 but is preview —
458
+ // default chains carry promoted models only). deepseek-v4-pro takes the
459
+ // third-provider tail instead.
460
+ { id: "gpt-5.5", grounding: "judgment", reason: "alpha.16: third-provider frontier-tier floor (archetypePerf=9)" },
461
+ { id: "deepseek-v4-pro", grounding: "judgment", reason: "alpha.86: third-provider tail replacing availability-restricted gemini-2.5-pro \u2014 critique=6 clears the floor exactly; last-resort when Anthropic AND OpenAI are down, not a quality peer of the tiers above" }
456
462
  ],
457
463
  // alpha.62 (eval spine) — pairwise output comparison. Same reasoning-floor
458
464
  // posture as critique (a verdict from a weak judge is worse than no
@@ -461,14 +467,16 @@ var STARTER_CHAINS_GROUNDED = {
461
467
  judge: [
462
468
  { id: "claude-opus-4-8", grounding: "judgment", reason: "Highest reasoning bar for pairwise verdicts \u2014 current opus (s64 roster)" },
463
469
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Same-provider walk-down on 429" },
464
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor in similar quality bracket" },
465
- { id: "gpt-5.5", grounding: "judgment", reason: "Third-provider frontier-tier floor" }
470
+ // alpha.86: gemini-2.5-pro dropped (availability-restricted; see critique
471
+ // note). gpt-5.5 remains the cross-provider frontier floor for verdicts.
472
+ { id: "gpt-5.5", grounding: "judgment", reason: "Third-provider frontier-tier floor" },
473
+ { id: "deepseek-v4-pro", grounding: "judgment", reason: "alpha.86: third-provider tail replacing availability-restricted gemini-2.5-pro \u2014 native structured output per the judge contract; last-resort tier" }
466
474
  ],
467
475
  // Reasoning matters — Sonnet primary; walk UP to Opus on 429.
468
476
  plan: [
469
477
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Reasoning + cost balance \u2014 engineer pick" },
470
478
  { id: "claude-opus-4-7", grounding: "judgment", reason: 'Same-provider walk-UP on 429 (rare exception to "always cheaper")' },
471
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
479
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
472
480
  { id: "deepseek-v4-pro", grounding: "judgment", reason: "Tier 3 cost floor \u2014 no brain evidence yet" },
473
481
  { id: "gpt-5.4", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=7) \u2014 closes openai-in-default-fallback-chains" }
474
482
  ],
@@ -476,7 +484,7 @@ var STARTER_CHAINS_GROUNDED = {
476
484
  generate: [
477
485
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality + cost match \u2014 engineer pick" },
478
486
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
479
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
487
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
480
488
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.16: third-provider tail (archetypePerf=7) \u2014 closes mono-Anthropic gap" }
481
489
  ],
482
490
  // ask::sonnet — STARTER_CHAINS calls this "Quality + cost match" but
@@ -485,7 +493,7 @@ var STARTER_CHAINS_GROUNDED = {
485
493
  ask: [
486
494
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality + cost match \u2014 engineer pick. NOTE: tt-intel s78 prod showed 27% empty rate; placement awaits measurement validation" },
487
495
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
488
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
496
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
489
497
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.16: third-provider tail (archetypePerf=7)" }
490
498
  ],
491
499
  // Structured-output archetype — Flash skipped (alpha.8 MAX_TOKENS cliff,
@@ -493,14 +501,14 @@ var STARTER_CHAINS_GROUNDED = {
493
501
  extract: [
494
502
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Reliable structured-output anchor \u2014 engineer pick" },
495
503
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down with native structured output" },
496
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor with structured-output support" },
504
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor with native structured output \u2014 replaces availability-restricted gemini-2.5-pro" },
497
505
  { id: "gpt-5.4", grounding: "capability-fact", reason: "alpha.16: third-provider floor \u2014 native structured-output capability (archetypePerf=8)" }
498
506
  ],
499
507
  // Forgiving archetype — Sonnet primary but Flash safely floors it.
500
508
  transform: [
501
509
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality anchor \u2014 engineer pick" },
502
510
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
503
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
511
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
504
512
  { id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost floor \u2014 forgiving archetype tolerates Flash" },
505
513
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=7) \u2014 closes openai-in-default-fallback-chains" }
506
514
  ],
@@ -508,7 +516,7 @@ var STARTER_CHAINS_GROUNDED = {
508
516
  // (capability-fact: Flash 15-75 parallel calls/step vs DeepSeek 7-8).
509
517
  hunt: [
510
518
  { id: "gemini-2.5-flash", grounding: "capability-fact", reason: "L-040 parallel-tool throughput champion (15-75 calls/step)" },
511
- { id: "gemini-2.5-pro", grounding: "capability-fact", reason: "Cross-provider tier 1 with strong parallel-tool support" },
519
+ { id: "gemini-3.5-flash", grounding: "capability-fact", reason: "alpha.86: parallel-tool agentic tier (hunt archetypePerf 9, L-040 family) \u2014 replaces availability-restricted gemini-2.5-pro" },
512
520
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality safety net for blocked-Flash case" },
513
521
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Reduced tool budget \u2014 cliff at 16 fires" },
514
522
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.33: third-provider tail \u2014 OpenAI parallel-tool capable archetype" }
@@ -556,9 +564,9 @@ var STARTER_CHAINS_BY_MODE_GROUNDED = {
556
564
  reason: "Cross-provider safety net \u2014 Sonnet handles sequential agentic loops cleanly"
557
565
  },
558
566
  {
559
- id: "gemini-2.5-pro",
567
+ id: "gemini-3.5-flash",
560
568
  grounding: "judgment",
561
- reason: "Third-provider tail when no DeepSeek key reachable"
569
+ reason: "alpha.86: third-provider tail when no DeepSeek key reachable \u2014 replaces availability-restricted gemini-2.5-pro"
562
570
  }
563
571
  ]
564
572
  }
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var LIBRARY_VERSION = "2.0.0-alpha.85";
2
+ var LIBRARY_VERSION = "2.0.0-alpha.86";
3
3
 
4
4
  // src/key-health.ts
5
5
  var JSON_HEADERS = { "Content-Type": "application/json" };
@@ -1,6 +1,6 @@
1
- import { G as GlassboxEvent } from '../types-y42mwdvM.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-y42mwdvM.mjs';
3
- import '../ir-JUoybVM-.mjs';
1
+ import { G as GlassboxEvent } from '../types-BiV-qN_x.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-BiV-qN_x.mjs';
3
+ import '../ir-5TJLAYKR.mjs';
4
4
  import '../dialect.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { G as GlassboxEvent } from '../types-BqTKRECa.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-BqTKRECa.js';
3
- import '../ir-DfrM71pA.js';
1
+ import { G as GlassboxEvent } from '../types-C2H37XLR.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-C2H37XLR.js';
3
+ import '../ir-C1zmvAh6.js';
4
4
  import '../dialect.js';
5
5
 
6
6
  /**
@@ -1,5 +1,5 @@
1
- import { T as TraceHealth } from '../types-BGH_KAHu.mjs';
2
- import '../ir-JUoybVM-.mjs';
1
+ import { T as TraceHealth } from '../types-BcYPDXgJ.mjs';
2
+ import '../ir-5TJLAYKR.mjs';
3
3
  import '../dialect.mjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { T as TraceHealth } from '../types-DLDJbCha.js';
2
- import '../ir-DfrM71pA.js';
1
+ import { T as TraceHealth } from '../types-8Goj1cKf.js';
2
+ import '../ir-C1zmvAh6.js';
3
3
  import '../dialect.js';
4
4
 
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { G as GlassboxEvent } from '../types-y42mwdvM.mjs';
2
- import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-BGH_KAHu.mjs';
3
- export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-BGH_KAHu.mjs';
4
- import '../ir-JUoybVM-.mjs';
1
+ import { G as GlassboxEvent } from '../types-BiV-qN_x.mjs';
2
+ import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-BcYPDXgJ.mjs';
3
+ export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-BcYPDXgJ.mjs';
4
+ import '../ir-5TJLAYKR.mjs';
5
5
  import '../dialect.mjs';
6
6
 
7
7
  /**
@@ -1,7 +1,7 @@
1
- import { G as GlassboxEvent } from '../types-BqTKRECa.js';
2
- import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-DLDJbCha.js';
3
- export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-DLDJbCha.js';
4
- import '../ir-DfrM71pA.js';
1
+ import { G as GlassboxEvent } from '../types-C2H37XLR.js';
2
+ import { a as TraceDetail, b as TraceSummary, c as TraceCounterfactual } from '../types-8Goj1cKf.js';
3
+ export { A as AdvisoryRecord, T as TraceHealth, d as TraceSectionRewrite } from '../types-8Goj1cKf.js';
4
+ import '../ir-C1zmvAh6.js';
5
5
  import '../dialect.js';
6
6
 
7
7
  /**
@@ -665,9 +665,21 @@ var PROFILES_RAW = [
665
665
  },
666
666
  {
667
667
  id: "gemini-2.5-pro",
668
- verifiedAgainstDocs: "2026-05-08",
668
+ verifiedAgainstDocs: "2026-08-08",
669
669
  provider: "google",
670
- status: "current",
670
+ // alpha.86 — AVAILABILITY demotion, not a provider-lifecycle mirror.
671
+ // Google's docs still list 2.5-pro as Stable, but the serving layer
672
+ // disagrees per account cohort: tt-intel measured 4/4 refusals
673
+ // ("no longer available to new users", 2026-08-02, their bench), and
674
+ // kgauto's own key 429s on a FreeTier per-day quota (probed
675
+ // 2026-08-08). A chain anchor that hard-fails for whole account
676
+ // cohorts is not an anchor; `legacy` removes it from cost-ordered
677
+ // chains and new selection while keeping the profile resolvable for
678
+ // consumers who pass it explicitly. Re-promotion is one status flip
679
+ // if Google restores availability. The registry cannot yet express
680
+ // account-cohort availability as data — see interfaces/kgauto.md
681
+ // ## Requested 2026-08-02.
682
+ status: "legacy",
671
683
  maxContextTokens: 1048576,
672
684
  maxOutputTokens: 65535,
673
685
  maxTools: 128,
@@ -697,7 +709,7 @@ var PROFILES_RAW = [
697
709
  }
698
710
  ],
699
711
  strengths: ["reasoning", "1m_context", "structured_output", "tool_use"],
700
- weaknesses: ["pricing_above_200k"],
712
+ weaknesses: ["pricing_above_200k", "availability_restricted_by_account_cohort"],
701
713
  // Master plan §3.3 anchor: tier-2 cross-provider in almost every chain.
702
714
  // Sits on the frontier at perf-9 — close to Sonnet but cheaper input.
703
715
  archetypePerf: {
@@ -1989,8 +2001,14 @@ var STARTER_CHAINS_GROUNDED = {
1989
2001
  critique: [
1990
2002
  { id: "claude-opus-4-7", grounding: "judgment", reason: "Highest reasoning bar, no degradation tier \u2014 engineer pick, awaiting measured backing" },
1991
2003
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Same-provider walk-down from Opus on 429" },
1992
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor in similar quality bracket" },
1993
- { id: "gpt-5.5", grounding: "judgment", reason: "alpha.16: third-provider frontier-tier floor (archetypePerf=9)" }
2004
+ // alpha.86: gemini-2.5-pro dropped availability-restricted (tt-intel
2005
+ // measured 4/4 cohort refusal 2026-08-02; kgauto key free-tier-quota
2006
+ // 429 2026-08-08). No current Google model clears the critique floor
2007
+ // (3.5-flash critique=5; 3.1-pro-preview scores 10 but is preview —
2008
+ // default chains carry promoted models only). deepseek-v4-pro takes the
2009
+ // third-provider tail instead.
2010
+ { id: "gpt-5.5", grounding: "judgment", reason: "alpha.16: third-provider frontier-tier floor (archetypePerf=9)" },
2011
+ { id: "deepseek-v4-pro", grounding: "judgment", reason: "alpha.86: third-provider tail replacing availability-restricted gemini-2.5-pro \u2014 critique=6 clears the floor exactly; last-resort when Anthropic AND OpenAI are down, not a quality peer of the tiers above" }
1994
2012
  ],
1995
2013
  // alpha.62 (eval spine) — pairwise output comparison. Same reasoning-floor
1996
2014
  // posture as critique (a verdict from a weak judge is worse than no
@@ -1999,14 +2017,16 @@ var STARTER_CHAINS_GROUNDED = {
1999
2017
  judge: [
2000
2018
  { id: "claude-opus-4-8", grounding: "judgment", reason: "Highest reasoning bar for pairwise verdicts \u2014 current opus (s64 roster)" },
2001
2019
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Same-provider walk-down on 429" },
2002
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor in similar quality bracket" },
2003
- { id: "gpt-5.5", grounding: "judgment", reason: "Third-provider frontier-tier floor" }
2020
+ // alpha.86: gemini-2.5-pro dropped (availability-restricted; see critique
2021
+ // note). gpt-5.5 remains the cross-provider frontier floor for verdicts.
2022
+ { id: "gpt-5.5", grounding: "judgment", reason: "Third-provider frontier-tier floor" },
2023
+ { id: "deepseek-v4-pro", grounding: "judgment", reason: "alpha.86: third-provider tail replacing availability-restricted gemini-2.5-pro \u2014 native structured output per the judge contract; last-resort tier" }
2004
2024
  ],
2005
2025
  // Reasoning matters — Sonnet primary; walk UP to Opus on 429.
2006
2026
  plan: [
2007
2027
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Reasoning + cost balance \u2014 engineer pick" },
2008
2028
  { id: "claude-opus-4-7", grounding: "judgment", reason: 'Same-provider walk-UP on 429 (rare exception to "always cheaper")' },
2009
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
2029
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
2010
2030
  { id: "deepseek-v4-pro", grounding: "judgment", reason: "Tier 3 cost floor \u2014 no brain evidence yet" },
2011
2031
  { id: "gpt-5.4", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=7) \u2014 closes openai-in-default-fallback-chains" }
2012
2032
  ],
@@ -2014,7 +2034,7 @@ var STARTER_CHAINS_GROUNDED = {
2014
2034
  generate: [
2015
2035
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality + cost match \u2014 engineer pick" },
2016
2036
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
2017
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
2037
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
2018
2038
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.16: third-provider tail (archetypePerf=7) \u2014 closes mono-Anthropic gap" }
2019
2039
  ],
2020
2040
  // ask::sonnet — STARTER_CHAINS calls this "Quality + cost match" but
@@ -2023,7 +2043,7 @@ var STARTER_CHAINS_GROUNDED = {
2023
2043
  ask: [
2024
2044
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality + cost match \u2014 engineer pick. NOTE: tt-intel s78 prod showed 27% empty rate; placement awaits measurement validation" },
2025
2045
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
2026
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
2046
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
2027
2047
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.16: third-provider tail (archetypePerf=7)" }
2028
2048
  ],
2029
2049
  // Structured-output archetype — Flash skipped (alpha.8 MAX_TOKENS cliff,
@@ -2031,14 +2051,14 @@ var STARTER_CHAINS_GROUNDED = {
2031
2051
  extract: [
2032
2052
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Reliable structured-output anchor \u2014 engineer pick" },
2033
2053
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down with native structured output" },
2034
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor with structured-output support" },
2054
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor with native structured output \u2014 replaces availability-restricted gemini-2.5-pro" },
2035
2055
  { id: "gpt-5.4", grounding: "capability-fact", reason: "alpha.16: third-provider floor \u2014 native structured-output capability (archetypePerf=8)" }
2036
2056
  ],
2037
2057
  // Forgiving archetype — Sonnet primary but Flash safely floors it.
2038
2058
  transform: [
2039
2059
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality anchor \u2014 engineer pick" },
2040
2060
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
2041
- { id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
2061
+ { id: "gemini-3.5-flash", grounding: "judgment", reason: "alpha.86: cross-provider anchor \u2014 replaces availability-restricted gemini-2.5-pro (tt-intel 4/4 cohort refusal 2026-08-02; probed serving 200 on kgauto key 2026-08-08)" },
2042
2062
  { id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost floor \u2014 forgiving archetype tolerates Flash" },
2043
2063
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=7) \u2014 closes openai-in-default-fallback-chains" }
2044
2064
  ],
@@ -2046,7 +2066,7 @@ var STARTER_CHAINS_GROUNDED = {
2046
2066
  // (capability-fact: Flash 15-75 parallel calls/step vs DeepSeek 7-8).
2047
2067
  hunt: [
2048
2068
  { id: "gemini-2.5-flash", grounding: "capability-fact", reason: "L-040 parallel-tool throughput champion (15-75 calls/step)" },
2049
- { id: "gemini-2.5-pro", grounding: "capability-fact", reason: "Cross-provider tier 1 with strong parallel-tool support" },
2069
+ { id: "gemini-3.5-flash", grounding: "capability-fact", reason: "alpha.86: parallel-tool agentic tier (hunt archetypePerf 9, L-040 family) \u2014 replaces availability-restricted gemini-2.5-pro" },
2050
2070
  { id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality safety net for blocked-Flash case" },
2051
2071
  { id: "claude-haiku-4-5", grounding: "judgment", reason: "Reduced tool budget \u2014 cliff at 16 fires" },
2052
2072
  { id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.33: third-provider tail \u2014 OpenAI parallel-tool capable archetype" }
@@ -2094,9 +2114,9 @@ var STARTER_CHAINS_BY_MODE_GROUNDED = {
2094
2114
  reason: "Cross-provider safety net \u2014 Sonnet handles sequential agentic loops cleanly"
2095
2115
  },
2096
2116
  {
2097
- id: "gemini-2.5-pro",
2117
+ id: "gemini-3.5-flash",
2098
2118
  grounding: "judgment",
2099
- reason: "Third-provider tail when no DeepSeek key reachable"
2119
+ reason: "alpha.86: third-provider tail when no DeepSeek key reachable \u2014 replaces availability-restricted gemini-2.5-pro"
2100
2120
  }
2101
2121
  ]
2102
2122
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ARCHETYPE_FLOOR_DEFAULT,
3
3
  getDefaultFallbackChain
4
- } from "../chunk-LO2JXTGG.mjs";
4
+ } from "../chunk-QDWOMQYN.mjs";
5
5
  import {
6
6
  tryGetProfile
7
- } from "../chunk-FD3NFXDC.mjs";
7
+ } from "../chunk-2MQIVVEU.mjs";
8
8
  import {
9
9
  subscribe,
10
10
  subscribeApp
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as TraceDetail } from '../../types-BGH_KAHu.mjs';
3
- import '../../ir-JUoybVM-.mjs';
2
+ import { a as TraceDetail } from '../../types-BcYPDXgJ.mjs';
3
+ import '../../ir-5TJLAYKR.mjs';
4
4
  import '../../dialect.mjs';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as TraceDetail } from '../../types-DLDJbCha.js';
3
- import '../../ir-DfrM71pA.js';
2
+ import { a as TraceDetail } from '../../types-8Goj1cKf.js';
3
+ import '../../ir-C1zmvAh6.js';
4
4
  import '../../dialect.js';
5
5
 
6
6
  /**
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, B as BestPracticeAdvisory, F as FallbackReason, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-JUoybVM-.mjs';
2
- export { m as CallAttempt, n as CallError, o as ChainModelEntry, p as ChainWithGrounding, q as Constraints, E as EffortLevel, r as GoldenCaptureOptions, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, s as MutationApplied, t as NormalizedTokens, u as OutcomeKind, v as PerAxisMetricsByModel, w as PromptSection, x as SectionKind, y as ShadowProbeConfig, T as ToolCall, z as ToolDefinition, D as captureGoldenIr, J as hasMutation, K as mutationId, L as parseGoldenCaptureRate, Q as resolveGoldenCaptureRate, U as shouldCaptureGolden } from './ir-JUoybVM-.mjs';
1
+ import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, B as BestPracticeAdvisory, F as FallbackReason, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-5TJLAYKR.mjs';
2
+ export { m as CallAttempt, n as CallError, o as ChainModelEntry, p as ChainWithGrounding, q as Constraints, E as EffortLevel, r as GoldenCaptureOptions, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, s as MutationApplied, t as NormalizedTokens, u as OutcomeKind, v as PerAxisMetricsByModel, w as PromptSection, x as SectionKind, y as ShadowProbeConfig, T as ToolCall, z as ToolDefinition, D as captureGoldenIr, J as hasMutation, K as mutationId, L as parseGoldenCaptureRate, Q as resolveGoldenCaptureRate, U as shouldCaptureGolden } from './ir-5TJLAYKR.mjs';
3
3
  import { ModelProfile, ArchetypeConvention } from './profiles.mjs';
4
4
  export { ALIASES, CacheStrategy, CliffRule, LATENCY_TIER_MS, LatencyTier, LoweringSpec, RecoveryRule, StructuredOutputCapability, SystemPromptMode, allProfiles, getProfile, latencyTierOf, profilesByProvider, resolveModelAlias, tryGetProfile } from './profiles.mjs';
5
5
  export { BrainForwardConfig, BrainForwardRoutes, createBrainForwardRoutes } from './brain-proxy.mjs';
@@ -655,6 +655,12 @@ interface OutcomePayload {
655
655
  latency_ms: number;
656
656
  success: boolean;
657
657
  empty_response: boolean;
658
+ /**
659
+ * alpha.86 (migration 056) — synthetic-writer self-mark. Key OMITTED for
660
+ * organic traffic (and against pre-056 brains). NULL in the table means
661
+ * organic; liveness rules compute over `source IS NULL` rows.
662
+ */
663
+ source?: string;
658
664
  error_type?: string;
659
665
  tools_called?: string[];
660
666
  oracle_score?: number;
@@ -1226,7 +1232,7 @@ declare function runStrategyEvalWithAttribution(opts: Omit<GoldenEvalOptions, 'a
1226
1232
  * guard in `tests/version.test.ts` fails the suite (and therefore
1227
1233
  * `prepublishOnly`) when they diverge — a stale constant cannot reach npm.
1228
1234
  */
1229
- declare const LIBRARY_VERSION = "2.0.0-alpha.85";
1235
+ declare const LIBRARY_VERSION = "2.0.0-alpha.86";
1230
1236
 
1231
1237
  /**
1232
1238
  * Oracle contract — how an app tells the brain whether a response was good.
@@ -3630,6 +3636,37 @@ declare function getRecentRollback(opts: {
3630
3636
  windowDays?: number;
3631
3637
  nowMs?: number;
3632
3638
  }): PromotionRow | undefined;
3639
+ /**
3640
+ * alpha.86 — cold-start prefetch, the promotions twin of alpha.73's
3641
+ * `prefetchMeasuredFailure`.
3642
+ *
3643
+ * alpha.73 fixed cold-isolate blindness for the measured-failure gate and
3644
+ * did not cover this sibling subsystem: `compile()` is synchronous, so on a
3645
+ * cold isolate `getApplicablePromotion` reads an empty snapshot and an
3646
+ * ACTIVE promotion silently does not apply — hitting low-traffic consumers
3647
+ * (whose isolates are cold most of the time) hardest, directly under
3648
+ * trust-artifact #3. Found s81 via the smoke's own cold-cache bug; grep
3649
+ * confirmed zero prefetch call sites existed.
3650
+ *
3651
+ * Also the fix for the s81 smoke incident's root shape: this starts the SWR
3652
+ * refresh directly, so it cannot be defeated by `getApplicablePromotion`'s
3653
+ * argument validation early-returns.
3654
+ *
3655
+ * Returns the in-flight promise (or undefined when not configured / already
3656
+ * fresh) so a caller can await it. NEVER throws.
3657
+ */
3658
+ declare function prefetchPromotions(appId: string): Promise<void> | undefined;
3659
+ /**
3660
+ * alpha.86 — bounded await on the promotions warm-up, for async callers
3661
+ * only (`call()`); `compile()` stays synchronous. Same contract as
3662
+ * `awaitMeasuredFailureReady`: bounded, silent on timeout, protective
3663
+ * never required — a slow or down brain delays a call by at most
3664
+ * `timeoutMs` and can never fail one. A zero budget still kicks the
3665
+ * prefetch (the opt-out is "do not make me wait", not "do not warm up").
3666
+ *
3667
+ * NEVER throws.
3668
+ */
3669
+ declare function awaitPromotionsReady(appId: string, timeoutMs: number): Promise<void>;
3633
3670
  /** Reset module state. Tests must call between cases. */
3634
3671
  declare function _testResetPromotions(): void;
3635
3672
  /** Wait for any in-flight refresh to settle. */
@@ -4015,4 +4052,4 @@ declare function planDecomposition(args: PlanDecompositionArgs): DecompositionPl
4015
4052
  */
4016
4053
  declare function compile(ir: PromptIR, opts?: CompileOptions): CompileResult;
4017
4054
 
4018
- export { ABSOLUTE_FLOOR, type AISDKConvertedMessage, ALT_BLIND_TOKEN_BUDGET_BREACH, ALT_STRATEGY_IDS, ARCHETYPE_FAMILY_FITS, ARCHETYPE_FLOOR_DEFAULT, type ActionableAdvisory, Adapter, type AdvisoryEvidenceWindow, type AdvisoryResolutionSource, type AdvisorySeverity, type AdvisoryStatus, type AdvisorySuggestedFix, ApiKeys, type AppOracle, type ApplySectionRewritesArgs, type ApplySectionRewritesResult, ArchetypeConvention, type ArchetypeFamilyFit, type ArchetypePerfMap, type ArchetypePerfNMap, type ArchetypePerfScoreResult, type AttachCacheControlResult, BLOCKED_MODEL_FAMILY_SIBLING_SERVED_CODE, BLOCKED_MODEL_NOT_IN_ROSTER_CODE, BRAIN_READ_ENV_NAMES, BURST_SPAN_MS, BestPracticeAdvisory, type BrainConfig, type BrainDeadLetterEntry, type BrainHealthSnapshot, type BrainQueryConfig, type BrainReadEnv, COACH_CFG, COST_RANKING_REFERENCE_SHAPE, CallOptions, CallResult, ChainEntry, type CompatibilityIntent, type CompileForAISDKv6Result, type CompileOptions, CompilePolicy, CompileResult, CompiledRequest, type CreateDelegateOpts, DECOMPOSITION_TEMPLATES, DECOMPOSITION_TEMPLATES_VERSION, DEFAULT_FINDINGS_ENDPOINT, DEFAULT_MEASURED_FAILURE_ENDPOINT, DEFAULT_PROMOTIONS_ENDPOINT, DELEGATE_TOOL_DEFINITION, DISCIPLINE_GATES_V1_ALT_BLIND_HEADER, DISCIPLINE_GATES_V1_ALT_HEADER, type DecompositionPlan, type DecompositionStep, type DecompositionTemplate, type DelegateHandle, type DelegateRefusalReason, type DelegateResult, type DelegateToolArgs, type ExclusionFindingRow, type ExclusionResolutionSource, type ExecuteErr, type ExecuteOk, type ExecuteOptions, type ExecuteResult, type ExecutorCandidate, type FallbackPosture, FallbackReason, FamilyResolutionError, type GetActionableAdvisoriesOptions, type GetApplicablePromotionOpts, type GetDefaultFallbackChainOpts, type GetMeasuredFailureOpts, type GetPerAxisMetricsOpts, type GetRecommendedPrimaryOptions, type GoldenEvalAxis, type GoldenEvalCase, type GoldenEvalOptions, type GoldenEvalRunResult, type GoldenEvalStrategyId, type GoldenIrRecordInput, Grounding, IntentArchetypeName, JUDGE_RUBRICS, LIBRARY_VERSION, type LLMJudgeOptions, MEASURED_FAILURE_CFG, MEASURED_GROUNDING_MIN_N, type MarkAdvisoryResolvedOptions, type MarkExclusionFindingHandledOptions, type MarkPromoteReadyHandledOptions, type MeasuredFailureRuntime, type MeasuredFailureVerdict, type ModelBrainRow, type ModelCompatibility, ModelProfile, NormalizedResponse, type OracleContext, OracleScore, type OutcomePayload, OutcomeResult, OutputMode, PRODUCER_OWNED_RULE_CODES, PROVIDER_ENV_KEYS, PerAxisMetrics, type PlannedStep, type PricingRow, type ProbeShadowOptions, type ProbeShadowServed, type ProfileToRowOptions, type PromoteReadyFindingRow, type PromoteReadyResolution, type PromotionRow, type PromotionsRuntime, PromptIR, Provider, ProviderOverrides, type ProviderReachability, ROLLBACK_SUPPRESSION_WINDOW_DAYS, RULE_DISCIPLINE_GATES_V1, RULE_DISCIPLINE_GATES_V1_STRUCTURED, RULE_SEQUENTIAL_TOOL_CLIFF, type ReachabilityOpts, RecordInput, RecordOutcomeInput, type RunAdvisorPhase2Context, STRATEGY_AUTHORSHIP_INDEPENDENT, STRATEGY_AUTHORSHIP_LIMITATION, SectionRewrite, type ShadowProbeRecordInput, type StrategyAttribution, type StrategyAttributionResult, type StrategyOutcome, type SupportedProvider, type SurfaceFailureRow, type SurfaceStats, SystemModelMessage, TRANSLATOR_FLOOR, _testResetMeasuredFailure, _testResetPromotions, _testWaitForMeasuredFailureRefresh, _testWaitForPromotionsRefresh, altBlindGatesBlockFor, altGatesBlockFor, applyArchetypeConvention, applySectionRewrites, attachCacheControlToStreamTextInput, awaitMeasuredFailureReady, brainHealth, buildGoldenIrRow, buildLLMJudge, buildPairwiseJudgePrompt, buildShadowProbeRow, burstCaveat, call, chainProviderSpread, classifyEvidenceWindow, classifyStrategyOutcome, clearBrain, combineOrderSwappedVerdicts, compile, compileForAISDKv6, configureBrain, configureMeasuredFailureBrain, configurePromotionsBrain, countTokens, createDelegate, deriveFamilyFromModelId, deriveOwnership, estimateChainCostUsd, estimateModelCostUsd, execute, findBetterFit, flushBrainDeadLetter, formatEvidenceSpan, getActionableAdvisories, getAllStarterChains, getAllStarterChainsWithGrounding, getApplicablePromotion, getArchetypePerfScore, getDefaultFallbackChain, getDefaultFallbackChainWithGrounding, getMeasuredFailureVerdict, getModelCompatibility, getPerAxisMetrics, getReachabilityDiagnostic, getRecentRollback, getRecommendedPrimary, getSequentialStarterChain, getSequentialStarterChainWithGrounding, getStaleExclusionFindings, getStarterChain, getStarterChainWithGrounding, isAltStrategy, isAutoPromoteEnabledFromEnv, isBrainQueryActiveFor, isBrainSync, isDelegateEnabledFromEnv, isExclusionFindingsBrainActive, isMeasuredFailureBrainActive, isMeasuredFailureGateEnabledFromEnv, isModelReachable, isPromotionsBrainActive, isProviderReachable, judgeMeasuredFailure, loadAliasesFromBrain, loadArchetypePerfFromBrain, loadArchetypePerfNFromBrain, loadChainsFromBrain, loadModelsFromBrain, loadPricingFromBrain, mapMeasuredFailureRows, markAdvisoryResolved, markExclusionFindingHandled, markPromoteReadyHandled, parseJudgeVerdict, peekBrainDeadLetter, planDecomposition, prefetchMeasuredFailure, probeShadow, profileToRow, readBrainReadEnv, record, recordGoldenIr, recordOutcome, recordShadowProbe, renderIrForJudge, resetTokenizer, resolveConventionsForProfile, resolvePricingAt, resolveProviderKey, rowToAdvisory, rubricFor, runAdvisor, runGoldenEval, runStrategyEvalWithAttribution, setTokenizer, wilsonLowerBound, withAltBlindDisciplineContract, withAltDisciplineContract, withDisciplineContract };
4055
+ export { ABSOLUTE_FLOOR, type AISDKConvertedMessage, ALT_BLIND_TOKEN_BUDGET_BREACH, ALT_STRATEGY_IDS, ARCHETYPE_FAMILY_FITS, ARCHETYPE_FLOOR_DEFAULT, type ActionableAdvisory, Adapter, type AdvisoryEvidenceWindow, type AdvisoryResolutionSource, type AdvisorySeverity, type AdvisoryStatus, type AdvisorySuggestedFix, ApiKeys, type AppOracle, type ApplySectionRewritesArgs, type ApplySectionRewritesResult, ArchetypeConvention, type ArchetypeFamilyFit, type ArchetypePerfMap, type ArchetypePerfNMap, type ArchetypePerfScoreResult, type AttachCacheControlResult, BLOCKED_MODEL_FAMILY_SIBLING_SERVED_CODE, BLOCKED_MODEL_NOT_IN_ROSTER_CODE, BRAIN_READ_ENV_NAMES, BURST_SPAN_MS, BestPracticeAdvisory, type BrainConfig, type BrainDeadLetterEntry, type BrainHealthSnapshot, type BrainQueryConfig, type BrainReadEnv, COACH_CFG, COST_RANKING_REFERENCE_SHAPE, CallOptions, CallResult, ChainEntry, type CompatibilityIntent, type CompileForAISDKv6Result, type CompileOptions, CompilePolicy, CompileResult, CompiledRequest, type CreateDelegateOpts, DECOMPOSITION_TEMPLATES, DECOMPOSITION_TEMPLATES_VERSION, DEFAULT_FINDINGS_ENDPOINT, DEFAULT_MEASURED_FAILURE_ENDPOINT, DEFAULT_PROMOTIONS_ENDPOINT, DELEGATE_TOOL_DEFINITION, DISCIPLINE_GATES_V1_ALT_BLIND_HEADER, DISCIPLINE_GATES_V1_ALT_HEADER, type DecompositionPlan, type DecompositionStep, type DecompositionTemplate, type DelegateHandle, type DelegateRefusalReason, type DelegateResult, type DelegateToolArgs, type ExclusionFindingRow, type ExclusionResolutionSource, type ExecuteErr, type ExecuteOk, type ExecuteOptions, type ExecuteResult, type ExecutorCandidate, type FallbackPosture, FallbackReason, FamilyResolutionError, type GetActionableAdvisoriesOptions, type GetApplicablePromotionOpts, type GetDefaultFallbackChainOpts, type GetMeasuredFailureOpts, type GetPerAxisMetricsOpts, type GetRecommendedPrimaryOptions, type GoldenEvalAxis, type GoldenEvalCase, type GoldenEvalOptions, type GoldenEvalRunResult, type GoldenEvalStrategyId, type GoldenIrRecordInput, Grounding, IntentArchetypeName, JUDGE_RUBRICS, LIBRARY_VERSION, type LLMJudgeOptions, MEASURED_FAILURE_CFG, MEASURED_GROUNDING_MIN_N, type MarkAdvisoryResolvedOptions, type MarkExclusionFindingHandledOptions, type MarkPromoteReadyHandledOptions, type MeasuredFailureRuntime, type MeasuredFailureVerdict, type ModelBrainRow, type ModelCompatibility, ModelProfile, NormalizedResponse, type OracleContext, OracleScore, type OutcomePayload, OutcomeResult, OutputMode, PRODUCER_OWNED_RULE_CODES, PROVIDER_ENV_KEYS, PerAxisMetrics, type PlannedStep, type PricingRow, type ProbeShadowOptions, type ProbeShadowServed, type ProfileToRowOptions, type PromoteReadyFindingRow, type PromoteReadyResolution, type PromotionRow, type PromotionsRuntime, PromptIR, Provider, ProviderOverrides, type ProviderReachability, ROLLBACK_SUPPRESSION_WINDOW_DAYS, RULE_DISCIPLINE_GATES_V1, RULE_DISCIPLINE_GATES_V1_STRUCTURED, RULE_SEQUENTIAL_TOOL_CLIFF, type ReachabilityOpts, RecordInput, RecordOutcomeInput, type RunAdvisorPhase2Context, STRATEGY_AUTHORSHIP_INDEPENDENT, STRATEGY_AUTHORSHIP_LIMITATION, SectionRewrite, type ShadowProbeRecordInput, type StrategyAttribution, type StrategyAttributionResult, type StrategyOutcome, type SupportedProvider, type SurfaceFailureRow, type SurfaceStats, SystemModelMessage, TRANSLATOR_FLOOR, _testResetMeasuredFailure, _testResetPromotions, _testWaitForMeasuredFailureRefresh, _testWaitForPromotionsRefresh, altBlindGatesBlockFor, altGatesBlockFor, applyArchetypeConvention, applySectionRewrites, attachCacheControlToStreamTextInput, awaitMeasuredFailureReady, awaitPromotionsReady, brainHealth, buildGoldenIrRow, buildLLMJudge, buildPairwiseJudgePrompt, buildShadowProbeRow, burstCaveat, call, chainProviderSpread, classifyEvidenceWindow, classifyStrategyOutcome, clearBrain, combineOrderSwappedVerdicts, compile, compileForAISDKv6, configureBrain, configureMeasuredFailureBrain, configurePromotionsBrain, countTokens, createDelegate, deriveFamilyFromModelId, deriveOwnership, estimateChainCostUsd, estimateModelCostUsd, execute, findBetterFit, flushBrainDeadLetter, formatEvidenceSpan, getActionableAdvisories, getAllStarterChains, getAllStarterChainsWithGrounding, getApplicablePromotion, getArchetypePerfScore, getDefaultFallbackChain, getDefaultFallbackChainWithGrounding, getMeasuredFailureVerdict, getModelCompatibility, getPerAxisMetrics, getReachabilityDiagnostic, getRecentRollback, getRecommendedPrimary, getSequentialStarterChain, getSequentialStarterChainWithGrounding, getStaleExclusionFindings, getStarterChain, getStarterChainWithGrounding, isAltStrategy, isAutoPromoteEnabledFromEnv, isBrainQueryActiveFor, isBrainSync, isDelegateEnabledFromEnv, isExclusionFindingsBrainActive, isMeasuredFailureBrainActive, isMeasuredFailureGateEnabledFromEnv, isModelReachable, isPromotionsBrainActive, isProviderReachable, judgeMeasuredFailure, loadAliasesFromBrain, loadArchetypePerfFromBrain, loadArchetypePerfNFromBrain, loadChainsFromBrain, loadModelsFromBrain, loadPricingFromBrain, mapMeasuredFailureRows, markAdvisoryResolved, markExclusionFindingHandled, markPromoteReadyHandled, parseJudgeVerdict, peekBrainDeadLetter, planDecomposition, prefetchMeasuredFailure, prefetchPromotions, probeShadow, profileToRow, readBrainReadEnv, record, recordGoldenIr, recordOutcome, recordShadowProbe, renderIrForJudge, resetTokenizer, resolveConventionsForProfile, resolvePricingAt, resolveProviderKey, rowToAdvisory, rubricFor, runAdvisor, runGoldenEval, runStrategyEvalWithAttribution, setTokenizer, wilsonLowerBound, withAltBlindDisciplineContract, withAltDisciplineContract, withDisciplineContract };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, B as BestPracticeAdvisory, F as FallbackReason, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-DfrM71pA.js';
2
- export { m as CallAttempt, n as CallError, o as ChainModelEntry, p as ChainWithGrounding, q as Constraints, E as EffortLevel, r as GoldenCaptureOptions, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, s as MutationApplied, t as NormalizedTokens, u as OutcomeKind, v as PerAxisMetricsByModel, w as PromptSection, x as SectionKind, y as ShadowProbeConfig, T as ToolCall, z as ToolDefinition, D as captureGoldenIr, J as hasMutation, K as mutationId, L as parseGoldenCaptureRate, Q as resolveGoldenCaptureRate, U as shouldCaptureGolden } from './ir-DfrM71pA.js';
1
+ import { C as CompilePolicy, N as NormalizedResponse, A as ApiKeys, P as ProviderOverrides, a as CompiledRequest, b as PromptIR, c as CallOptions, d as CallResult, S as SystemModelMessage, e as CompileResult, B as BestPracticeAdvisory, F as FallbackReason, f as SectionRewrite, R as RecordInput, g as RecordOutcomeInput, O as OutcomeResult, h as OracleScore, i as Adapter, j as PerAxisMetrics, k as Provider, l as ChainEntry, G as Grounding } from './ir-C1zmvAh6.js';
2
+ export { m as CallAttempt, n as CallError, o as ChainModelEntry, p as ChainWithGrounding, q as Constraints, E as EffortLevel, r as GoldenCaptureOptions, H as HistoryCachePolicy, I as IntentDeclaration, M as Message, s as MutationApplied, t as NormalizedTokens, u as OutcomeKind, v as PerAxisMetricsByModel, w as PromptSection, x as SectionKind, y as ShadowProbeConfig, T as ToolCall, z as ToolDefinition, D as captureGoldenIr, J as hasMutation, K as mutationId, L as parseGoldenCaptureRate, Q as resolveGoldenCaptureRate, U as shouldCaptureGolden } from './ir-C1zmvAh6.js';
3
3
  import { ModelProfile, ArchetypeConvention } from './profiles.js';
4
4
  export { ALIASES, CacheStrategy, CliffRule, LATENCY_TIER_MS, LatencyTier, LoweringSpec, RecoveryRule, StructuredOutputCapability, SystemPromptMode, allProfiles, getProfile, latencyTierOf, profilesByProvider, resolveModelAlias, tryGetProfile } from './profiles.js';
5
5
  export { BrainForwardConfig, BrainForwardRoutes, createBrainForwardRoutes } from './brain-proxy.js';
@@ -655,6 +655,12 @@ interface OutcomePayload {
655
655
  latency_ms: number;
656
656
  success: boolean;
657
657
  empty_response: boolean;
658
+ /**
659
+ * alpha.86 (migration 056) — synthetic-writer self-mark. Key OMITTED for
660
+ * organic traffic (and against pre-056 brains). NULL in the table means
661
+ * organic; liveness rules compute over `source IS NULL` rows.
662
+ */
663
+ source?: string;
658
664
  error_type?: string;
659
665
  tools_called?: string[];
660
666
  oracle_score?: number;
@@ -1226,7 +1232,7 @@ declare function runStrategyEvalWithAttribution(opts: Omit<GoldenEvalOptions, 'a
1226
1232
  * guard in `tests/version.test.ts` fails the suite (and therefore
1227
1233
  * `prepublishOnly`) when they diverge — a stale constant cannot reach npm.
1228
1234
  */
1229
- declare const LIBRARY_VERSION = "2.0.0-alpha.85";
1235
+ declare const LIBRARY_VERSION = "2.0.0-alpha.86";
1230
1236
 
1231
1237
  /**
1232
1238
  * Oracle contract — how an app tells the brain whether a response was good.
@@ -3630,6 +3636,37 @@ declare function getRecentRollback(opts: {
3630
3636
  windowDays?: number;
3631
3637
  nowMs?: number;
3632
3638
  }): PromotionRow | undefined;
3639
+ /**
3640
+ * alpha.86 — cold-start prefetch, the promotions twin of alpha.73's
3641
+ * `prefetchMeasuredFailure`.
3642
+ *
3643
+ * alpha.73 fixed cold-isolate blindness for the measured-failure gate and
3644
+ * did not cover this sibling subsystem: `compile()` is synchronous, so on a
3645
+ * cold isolate `getApplicablePromotion` reads an empty snapshot and an
3646
+ * ACTIVE promotion silently does not apply — hitting low-traffic consumers
3647
+ * (whose isolates are cold most of the time) hardest, directly under
3648
+ * trust-artifact #3. Found s81 via the smoke's own cold-cache bug; grep
3649
+ * confirmed zero prefetch call sites existed.
3650
+ *
3651
+ * Also the fix for the s81 smoke incident's root shape: this starts the SWR
3652
+ * refresh directly, so it cannot be defeated by `getApplicablePromotion`'s
3653
+ * argument validation early-returns.
3654
+ *
3655
+ * Returns the in-flight promise (or undefined when not configured / already
3656
+ * fresh) so a caller can await it. NEVER throws.
3657
+ */
3658
+ declare function prefetchPromotions(appId: string): Promise<void> | undefined;
3659
+ /**
3660
+ * alpha.86 — bounded await on the promotions warm-up, for async callers
3661
+ * only (`call()`); `compile()` stays synchronous. Same contract as
3662
+ * `awaitMeasuredFailureReady`: bounded, silent on timeout, protective
3663
+ * never required — a slow or down brain delays a call by at most
3664
+ * `timeoutMs` and can never fail one. A zero budget still kicks the
3665
+ * prefetch (the opt-out is "do not make me wait", not "do not warm up").
3666
+ *
3667
+ * NEVER throws.
3668
+ */
3669
+ declare function awaitPromotionsReady(appId: string, timeoutMs: number): Promise<void>;
3633
3670
  /** Reset module state. Tests must call between cases. */
3634
3671
  declare function _testResetPromotions(): void;
3635
3672
  /** Wait for any in-flight refresh to settle. */
@@ -4015,4 +4052,4 @@ declare function planDecomposition(args: PlanDecompositionArgs): DecompositionPl
4015
4052
  */
4016
4053
  declare function compile(ir: PromptIR, opts?: CompileOptions): CompileResult;
4017
4054
 
4018
- export { ABSOLUTE_FLOOR, type AISDKConvertedMessage, ALT_BLIND_TOKEN_BUDGET_BREACH, ALT_STRATEGY_IDS, ARCHETYPE_FAMILY_FITS, ARCHETYPE_FLOOR_DEFAULT, type ActionableAdvisory, Adapter, type AdvisoryEvidenceWindow, type AdvisoryResolutionSource, type AdvisorySeverity, type AdvisoryStatus, type AdvisorySuggestedFix, ApiKeys, type AppOracle, type ApplySectionRewritesArgs, type ApplySectionRewritesResult, ArchetypeConvention, type ArchetypeFamilyFit, type ArchetypePerfMap, type ArchetypePerfNMap, type ArchetypePerfScoreResult, type AttachCacheControlResult, BLOCKED_MODEL_FAMILY_SIBLING_SERVED_CODE, BLOCKED_MODEL_NOT_IN_ROSTER_CODE, BRAIN_READ_ENV_NAMES, BURST_SPAN_MS, BestPracticeAdvisory, type BrainConfig, type BrainDeadLetterEntry, type BrainHealthSnapshot, type BrainQueryConfig, type BrainReadEnv, COACH_CFG, COST_RANKING_REFERENCE_SHAPE, CallOptions, CallResult, ChainEntry, type CompatibilityIntent, type CompileForAISDKv6Result, type CompileOptions, CompilePolicy, CompileResult, CompiledRequest, type CreateDelegateOpts, DECOMPOSITION_TEMPLATES, DECOMPOSITION_TEMPLATES_VERSION, DEFAULT_FINDINGS_ENDPOINT, DEFAULT_MEASURED_FAILURE_ENDPOINT, DEFAULT_PROMOTIONS_ENDPOINT, DELEGATE_TOOL_DEFINITION, DISCIPLINE_GATES_V1_ALT_BLIND_HEADER, DISCIPLINE_GATES_V1_ALT_HEADER, type DecompositionPlan, type DecompositionStep, type DecompositionTemplate, type DelegateHandle, type DelegateRefusalReason, type DelegateResult, type DelegateToolArgs, type ExclusionFindingRow, type ExclusionResolutionSource, type ExecuteErr, type ExecuteOk, type ExecuteOptions, type ExecuteResult, type ExecutorCandidate, type FallbackPosture, FallbackReason, FamilyResolutionError, type GetActionableAdvisoriesOptions, type GetApplicablePromotionOpts, type GetDefaultFallbackChainOpts, type GetMeasuredFailureOpts, type GetPerAxisMetricsOpts, type GetRecommendedPrimaryOptions, type GoldenEvalAxis, type GoldenEvalCase, type GoldenEvalOptions, type GoldenEvalRunResult, type GoldenEvalStrategyId, type GoldenIrRecordInput, Grounding, IntentArchetypeName, JUDGE_RUBRICS, LIBRARY_VERSION, type LLMJudgeOptions, MEASURED_FAILURE_CFG, MEASURED_GROUNDING_MIN_N, type MarkAdvisoryResolvedOptions, type MarkExclusionFindingHandledOptions, type MarkPromoteReadyHandledOptions, type MeasuredFailureRuntime, type MeasuredFailureVerdict, type ModelBrainRow, type ModelCompatibility, ModelProfile, NormalizedResponse, type OracleContext, OracleScore, type OutcomePayload, OutcomeResult, OutputMode, PRODUCER_OWNED_RULE_CODES, PROVIDER_ENV_KEYS, PerAxisMetrics, type PlannedStep, type PricingRow, type ProbeShadowOptions, type ProbeShadowServed, type ProfileToRowOptions, type PromoteReadyFindingRow, type PromoteReadyResolution, type PromotionRow, type PromotionsRuntime, PromptIR, Provider, ProviderOverrides, type ProviderReachability, ROLLBACK_SUPPRESSION_WINDOW_DAYS, RULE_DISCIPLINE_GATES_V1, RULE_DISCIPLINE_GATES_V1_STRUCTURED, RULE_SEQUENTIAL_TOOL_CLIFF, type ReachabilityOpts, RecordInput, RecordOutcomeInput, type RunAdvisorPhase2Context, STRATEGY_AUTHORSHIP_INDEPENDENT, STRATEGY_AUTHORSHIP_LIMITATION, SectionRewrite, type ShadowProbeRecordInput, type StrategyAttribution, type StrategyAttributionResult, type StrategyOutcome, type SupportedProvider, type SurfaceFailureRow, type SurfaceStats, SystemModelMessage, TRANSLATOR_FLOOR, _testResetMeasuredFailure, _testResetPromotions, _testWaitForMeasuredFailureRefresh, _testWaitForPromotionsRefresh, altBlindGatesBlockFor, altGatesBlockFor, applyArchetypeConvention, applySectionRewrites, attachCacheControlToStreamTextInput, awaitMeasuredFailureReady, brainHealth, buildGoldenIrRow, buildLLMJudge, buildPairwiseJudgePrompt, buildShadowProbeRow, burstCaveat, call, chainProviderSpread, classifyEvidenceWindow, classifyStrategyOutcome, clearBrain, combineOrderSwappedVerdicts, compile, compileForAISDKv6, configureBrain, configureMeasuredFailureBrain, configurePromotionsBrain, countTokens, createDelegate, deriveFamilyFromModelId, deriveOwnership, estimateChainCostUsd, estimateModelCostUsd, execute, findBetterFit, flushBrainDeadLetter, formatEvidenceSpan, getActionableAdvisories, getAllStarterChains, getAllStarterChainsWithGrounding, getApplicablePromotion, getArchetypePerfScore, getDefaultFallbackChain, getDefaultFallbackChainWithGrounding, getMeasuredFailureVerdict, getModelCompatibility, getPerAxisMetrics, getReachabilityDiagnostic, getRecentRollback, getRecommendedPrimary, getSequentialStarterChain, getSequentialStarterChainWithGrounding, getStaleExclusionFindings, getStarterChain, getStarterChainWithGrounding, isAltStrategy, isAutoPromoteEnabledFromEnv, isBrainQueryActiveFor, isBrainSync, isDelegateEnabledFromEnv, isExclusionFindingsBrainActive, isMeasuredFailureBrainActive, isMeasuredFailureGateEnabledFromEnv, isModelReachable, isPromotionsBrainActive, isProviderReachable, judgeMeasuredFailure, loadAliasesFromBrain, loadArchetypePerfFromBrain, loadArchetypePerfNFromBrain, loadChainsFromBrain, loadModelsFromBrain, loadPricingFromBrain, mapMeasuredFailureRows, markAdvisoryResolved, markExclusionFindingHandled, markPromoteReadyHandled, parseJudgeVerdict, peekBrainDeadLetter, planDecomposition, prefetchMeasuredFailure, probeShadow, profileToRow, readBrainReadEnv, record, recordGoldenIr, recordOutcome, recordShadowProbe, renderIrForJudge, resetTokenizer, resolveConventionsForProfile, resolvePricingAt, resolveProviderKey, rowToAdvisory, rubricFor, runAdvisor, runGoldenEval, runStrategyEvalWithAttribution, setTokenizer, wilsonLowerBound, withAltBlindDisciplineContract, withAltDisciplineContract, withDisciplineContract };
4055
+ export { ABSOLUTE_FLOOR, type AISDKConvertedMessage, ALT_BLIND_TOKEN_BUDGET_BREACH, ALT_STRATEGY_IDS, ARCHETYPE_FAMILY_FITS, ARCHETYPE_FLOOR_DEFAULT, type ActionableAdvisory, Adapter, type AdvisoryEvidenceWindow, type AdvisoryResolutionSource, type AdvisorySeverity, type AdvisoryStatus, type AdvisorySuggestedFix, ApiKeys, type AppOracle, type ApplySectionRewritesArgs, type ApplySectionRewritesResult, ArchetypeConvention, type ArchetypeFamilyFit, type ArchetypePerfMap, type ArchetypePerfNMap, type ArchetypePerfScoreResult, type AttachCacheControlResult, BLOCKED_MODEL_FAMILY_SIBLING_SERVED_CODE, BLOCKED_MODEL_NOT_IN_ROSTER_CODE, BRAIN_READ_ENV_NAMES, BURST_SPAN_MS, BestPracticeAdvisory, type BrainConfig, type BrainDeadLetterEntry, type BrainHealthSnapshot, type BrainQueryConfig, type BrainReadEnv, COACH_CFG, COST_RANKING_REFERENCE_SHAPE, CallOptions, CallResult, ChainEntry, type CompatibilityIntent, type CompileForAISDKv6Result, type CompileOptions, CompilePolicy, CompileResult, CompiledRequest, type CreateDelegateOpts, DECOMPOSITION_TEMPLATES, DECOMPOSITION_TEMPLATES_VERSION, DEFAULT_FINDINGS_ENDPOINT, DEFAULT_MEASURED_FAILURE_ENDPOINT, DEFAULT_PROMOTIONS_ENDPOINT, DELEGATE_TOOL_DEFINITION, DISCIPLINE_GATES_V1_ALT_BLIND_HEADER, DISCIPLINE_GATES_V1_ALT_HEADER, type DecompositionPlan, type DecompositionStep, type DecompositionTemplate, type DelegateHandle, type DelegateRefusalReason, type DelegateResult, type DelegateToolArgs, type ExclusionFindingRow, type ExclusionResolutionSource, type ExecuteErr, type ExecuteOk, type ExecuteOptions, type ExecuteResult, type ExecutorCandidate, type FallbackPosture, FallbackReason, FamilyResolutionError, type GetActionableAdvisoriesOptions, type GetApplicablePromotionOpts, type GetDefaultFallbackChainOpts, type GetMeasuredFailureOpts, type GetPerAxisMetricsOpts, type GetRecommendedPrimaryOptions, type GoldenEvalAxis, type GoldenEvalCase, type GoldenEvalOptions, type GoldenEvalRunResult, type GoldenEvalStrategyId, type GoldenIrRecordInput, Grounding, IntentArchetypeName, JUDGE_RUBRICS, LIBRARY_VERSION, type LLMJudgeOptions, MEASURED_FAILURE_CFG, MEASURED_GROUNDING_MIN_N, type MarkAdvisoryResolvedOptions, type MarkExclusionFindingHandledOptions, type MarkPromoteReadyHandledOptions, type MeasuredFailureRuntime, type MeasuredFailureVerdict, type ModelBrainRow, type ModelCompatibility, ModelProfile, NormalizedResponse, type OracleContext, OracleScore, type OutcomePayload, OutcomeResult, OutputMode, PRODUCER_OWNED_RULE_CODES, PROVIDER_ENV_KEYS, PerAxisMetrics, type PlannedStep, type PricingRow, type ProbeShadowOptions, type ProbeShadowServed, type ProfileToRowOptions, type PromoteReadyFindingRow, type PromoteReadyResolution, type PromotionRow, type PromotionsRuntime, PromptIR, Provider, ProviderOverrides, type ProviderReachability, ROLLBACK_SUPPRESSION_WINDOW_DAYS, RULE_DISCIPLINE_GATES_V1, RULE_DISCIPLINE_GATES_V1_STRUCTURED, RULE_SEQUENTIAL_TOOL_CLIFF, type ReachabilityOpts, RecordInput, RecordOutcomeInput, type RunAdvisorPhase2Context, STRATEGY_AUTHORSHIP_INDEPENDENT, STRATEGY_AUTHORSHIP_LIMITATION, SectionRewrite, type ShadowProbeRecordInput, type StrategyAttribution, type StrategyAttributionResult, type StrategyOutcome, type SupportedProvider, type SurfaceFailureRow, type SurfaceStats, SystemModelMessage, TRANSLATOR_FLOOR, _testResetMeasuredFailure, _testResetPromotions, _testWaitForMeasuredFailureRefresh, _testWaitForPromotionsRefresh, altBlindGatesBlockFor, altGatesBlockFor, applyArchetypeConvention, applySectionRewrites, attachCacheControlToStreamTextInput, awaitMeasuredFailureReady, awaitPromotionsReady, brainHealth, buildGoldenIrRow, buildLLMJudge, buildPairwiseJudgePrompt, buildShadowProbeRow, burstCaveat, call, chainProviderSpread, classifyEvidenceWindow, classifyStrategyOutcome, clearBrain, combineOrderSwappedVerdicts, compile, compileForAISDKv6, configureBrain, configureMeasuredFailureBrain, configurePromotionsBrain, countTokens, createDelegate, deriveFamilyFromModelId, deriveOwnership, estimateChainCostUsd, estimateModelCostUsd, execute, findBetterFit, flushBrainDeadLetter, formatEvidenceSpan, getActionableAdvisories, getAllStarterChains, getAllStarterChainsWithGrounding, getApplicablePromotion, getArchetypePerfScore, getDefaultFallbackChain, getDefaultFallbackChainWithGrounding, getMeasuredFailureVerdict, getModelCompatibility, getPerAxisMetrics, getReachabilityDiagnostic, getRecentRollback, getRecommendedPrimary, getSequentialStarterChain, getSequentialStarterChainWithGrounding, getStaleExclusionFindings, getStarterChain, getStarterChainWithGrounding, isAltStrategy, isAutoPromoteEnabledFromEnv, isBrainQueryActiveFor, isBrainSync, isDelegateEnabledFromEnv, isExclusionFindingsBrainActive, isMeasuredFailureBrainActive, isMeasuredFailureGateEnabledFromEnv, isModelReachable, isPromotionsBrainActive, isProviderReachable, judgeMeasuredFailure, loadAliasesFromBrain, loadArchetypePerfFromBrain, loadArchetypePerfNFromBrain, loadChainsFromBrain, loadModelsFromBrain, loadPricingFromBrain, mapMeasuredFailureRows, markAdvisoryResolved, markExclusionFindingHandled, markPromoteReadyHandled, parseJudgeVerdict, peekBrainDeadLetter, planDecomposition, prefetchMeasuredFailure, prefetchPromotions, probeShadow, profileToRow, readBrainReadEnv, record, recordGoldenIr, recordOutcome, recordShadowProbe, renderIrForJudge, resetTokenizer, resolveConventionsForProfile, resolvePricingAt, resolveProviderKey, rowToAdvisory, rubricFor, runAdvisor, runGoldenEval, runStrategyEvalWithAttribution, setTokenizer, wilsonLowerBound, withAltBlindDisciplineContract, withAltDisciplineContract, withDisciplineContract };