@warmdrift/kgauto-compiler 2.0.0-alpha.96 → 2.0.0-alpha.97
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-2D4H7HGZ.mjs → chunk-77AHSX6Y.mjs} +2 -2
- package/dist/{chunk-SRPRNTDT.mjs → chunk-AFYBZRQV.mjs} +2 -2
- package/dist/{chunk-AMV3M2KH.mjs → chunk-HHIXHL4O.mjs} +50 -6
- package/dist/{chunk-26IS3Y6Z.mjs → chunk-IEEROFZW.mjs} +1 -1
- package/dist/glassbox-routes/index.js +31 -4
- package/dist/glassbox-routes/index.mjs +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +52 -8
- package/dist/index.mjs +4 -4
- package/dist/key-health.js +1 -1
- package/dist/key-health.mjs +1 -1
- package/dist/probe.js +51 -7
- package/dist/probe.mjs +3 -3
- package/dist/profiles.js +50 -6
- package/dist/profiles.mjs +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
allProfiles,
|
|
3
3
|
resolveModelAlias,
|
|
4
4
|
tryGetProfile
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HHIXHL4O.mjs";
|
|
6
6
|
|
|
7
7
|
// src/brain-query.ts
|
|
8
8
|
var FRESH_SNAPSHOT = {
|
|
@@ -182,7 +182,7 @@ function mapPerAxisMetrics(raw, fallbackAppId, fallbackArchetype, fallbackModel,
|
|
|
182
182
|
var ARCHETYPE_FLOOR_DEFAULT = 6;
|
|
183
183
|
var ABSOLUTE_FLOOR = 4;
|
|
184
184
|
function rawArchetypePerf(profile, archetype) {
|
|
185
|
-
return profile.archetypePerf?.[archetype] ??
|
|
185
|
+
return profile.archetypePerf?.[archetype] ?? ARCHETYPE_FLOOR_DEFAULT;
|
|
186
186
|
}
|
|
187
187
|
function hasSequentialToolCliffForHunt(profile) {
|
|
188
188
|
if (profile.parallelToolCalls !== false) return false;
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getModelCompatibility,
|
|
10
10
|
isBrainQueryActiveFor,
|
|
11
11
|
policySetHas
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-77AHSX6Y.mjs";
|
|
13
13
|
import {
|
|
14
14
|
bucketContext,
|
|
15
15
|
bucketHistory,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
latencyTierOf,
|
|
31
31
|
resolveModelAlias,
|
|
32
32
|
tryGetProfile
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-HHIXHL4O.mjs";
|
|
34
34
|
|
|
35
35
|
// src/models-brain.ts
|
|
36
36
|
function isModelRow(x) {
|
|
@@ -1914,6 +1914,19 @@ var PROFILES_RAW = [
|
|
|
1914
1914
|
id: "glm-5.2",
|
|
1915
1915
|
verifiedAgainstDocs: "2026-07-18",
|
|
1916
1916
|
provider: "zai",
|
|
1917
|
+
probedLimits: [
|
|
1918
|
+
{
|
|
1919
|
+
metric: "tool_count",
|
|
1920
|
+
testedAt: 6,
|
|
1921
|
+
demanded: 3,
|
|
1922
|
+
served: [3, 3, 3],
|
|
1923
|
+
outcome: "held",
|
|
1924
|
+
trials: 3,
|
|
1925
|
+
lastProbed: "2026-08-29",
|
|
1926
|
+
route: "openrouter:baidu",
|
|
1927
|
+
claim: "Measured 2026-08-29 via OpenRouter (served-by Baidu): 6 tools offered, 3 of 3 demanded served in parallel, 3/3 trials. Route-scoped \u2014 direct z.ai is unmeasured (no key held)."
|
|
1928
|
+
}
|
|
1929
|
+
],
|
|
1917
1930
|
status: "preview",
|
|
1918
1931
|
maxContextTokens: 1048576,
|
|
1919
1932
|
maxOutputTokens: 131072,
|
|
@@ -1924,7 +1937,8 @@ var PROFILES_RAW = [
|
|
|
1924
1937
|
// NOTHING about multiple tool_calls per response. Conservative false so
|
|
1925
1938
|
// hunt-shaped ranking doesn't over-promise; flip on doc or probe
|
|
1926
1939
|
// evidence (L-081: undocumented ≠ true).
|
|
1927
|
-
parallelToolCalls:
|
|
1940
|
+
parallelToolCalls: true,
|
|
1941
|
+
// alpha.96 — see weaknesses note; was an unevidenced blanket false
|
|
1928
1942
|
structuredOutput: "native",
|
|
1929
1943
|
systemPromptMode: "inline",
|
|
1930
1944
|
streaming: true,
|
|
@@ -1947,7 +1961,17 @@ var PROFILES_RAW = [
|
|
|
1947
1961
|
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
1948
1962
|
],
|
|
1949
1963
|
strengths: ["cost", "1m_context", "code", "tool_use", "json_output", "reasoning"],
|
|
1950
|
-
|
|
1964
|
+
// alpha.96 — 'parallel_tools' REMOVED. Measured 2026-08-29 via OpenRouter
|
|
1965
|
+
// (served-by Baidu), 6 tools offered, 3 of 3 demanded served in PARALLEL,
|
|
1966
|
+
// 3/3 trials. ROUTE-SCOPED: per the alpha.92 execute-leg contract there is
|
|
1967
|
+
// no cross-route verdict transfer, and direct z.ai is UNMEASURED (we hold
|
|
1968
|
+
// no zai key). But `parallelToolCalls: false` was a blanket claim with no
|
|
1969
|
+
// route qualification and no evidence at all, and it is capability-
|
|
1970
|
+
// REDUCING — it drives requires-adapter/reject. An unsubstantiated reducer
|
|
1971
|
+
// must not reduce. Contradicted on the one route we can reach is enough to
|
|
1972
|
+
// stop enforcing it; it is not enough to claim the opposite, which is why
|
|
1973
|
+
// probedLimits below carries the route.
|
|
1974
|
+
weaknesses: [],
|
|
1951
1975
|
notes: "GLM-5.2 (Z.ai, 2026-06): agentic-coding flagship. 1,048,576 ctx / 131,072 max out. $1.40/$4.40 per 1M; cached input $0.26/M (automatic caching, no marker; storage limited-time free as of 2026-07-18). Thinking on by default (`thinking.type`), `reasoning_effort` max..none. Parallel tool calls UNDOCUMENTED on the hosted API \u2014 profile says false until doc or probe evidence. status:preview \u2014 no brain evidence yet; earns placement via the machinery.",
|
|
1952
1976
|
// Starter hypotheses — verify with telemetry/probes; NO brain evidence
|
|
1953
1977
|
// yet. Anchored on the vendor's agentic-coding positioning at a
|
|
@@ -1965,8 +1989,11 @@ var PROFILES_RAW = [
|
|
|
1965
1989
|
extract: 6,
|
|
1966
1990
|
critique: 6,
|
|
1967
1991
|
classify: 6,
|
|
1968
|
-
|
|
1969
|
-
//
|
|
1992
|
+
// alpha.96 — was 5, discounted for "parallel unproven". Parallel is no
|
|
1993
|
+
// longer unproven on the reachable route (3/3, 2026-08-29). The discount
|
|
1994
|
+
// had no other stated basis, so it is withdrawn to the neutral floor.
|
|
1995
|
+
// Judgment, not measurement — same standard as the DeepSeek correction.
|
|
1996
|
+
hunt: 6
|
|
1970
1997
|
}
|
|
1971
1998
|
},
|
|
1972
1999
|
// ── Moonshot (Kimi) ──
|
|
@@ -2099,7 +2126,24 @@ function bestEffortProfile(id) {
|
|
|
2099
2126
|
maxContextTokens: 128e3,
|
|
2100
2127
|
maxOutputTokens: 4096,
|
|
2101
2128
|
maxTools: donor.maxTools,
|
|
2102
|
-
|
|
2129
|
+
// alpha.97 — was `false`. That was the SAME MISTAKE as the three profiles
|
|
2130
|
+
// corrected in alpha.96, in the one place it does the most damage: applied
|
|
2131
|
+
// to models nobody has measured at all.
|
|
2132
|
+
//
|
|
2133
|
+
// `false` here is capability-REDUCING and unsubstantiated by construction —
|
|
2134
|
+
// a synthesized profile exists precisely because we know nothing. It made
|
|
2135
|
+
// `getModelCompatibility(<any unprofiled model>, {archetype:'hunt'})`
|
|
2136
|
+
// return `requires-adapter` (verified: raw score 5 vs floor 6, adapter
|
|
2137
|
+
// offered), so every consumer on `onUnprofiledModel:'best-effort'` was told
|
|
2138
|
+
// to serialize tool calls on a model we had never touched.
|
|
2139
|
+
//
|
|
2140
|
+
// The never-worse-than-raw rule decides it: for an unknown model kgauto
|
|
2141
|
+
// must behave exactly as a direct call would, and a direct call passes
|
|
2142
|
+
// every tool and lets the provider default apply. `true` is not a claim
|
|
2143
|
+
// that the model parallelises — it is the absence of a claim, expressed as
|
|
2144
|
+
// non-interference. The honest long-term fix is a third state (unknown)
|
|
2145
|
+
// rather than a boolean; that is P4 in the rebuild contract.
|
|
2146
|
+
parallelToolCalls: true,
|
|
2103
2147
|
structuredOutput: "none",
|
|
2104
2148
|
systemPromptMode: donor.systemPromptMode,
|
|
2105
2149
|
streaming: donor.streaming,
|
|
@@ -2109,7 +2153,7 @@ function bestEffortProfile(id) {
|
|
|
2109
2153
|
lowering: donor.lowering,
|
|
2110
2154
|
recovery: [],
|
|
2111
2155
|
strengths: [],
|
|
2112
|
-
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data"],
|
|
2156
|
+
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data; kgauto does not reduce capability for a model it has never measured (alpha.97)"],
|
|
2113
2157
|
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.`
|
|
2114
2158
|
};
|
|
2115
2159
|
CONSUMER_INDEX.set(canonical, synth);
|
|
@@ -1959,6 +1959,19 @@ var PROFILES_RAW = [
|
|
|
1959
1959
|
id: "glm-5.2",
|
|
1960
1960
|
verifiedAgainstDocs: "2026-07-18",
|
|
1961
1961
|
provider: "zai",
|
|
1962
|
+
probedLimits: [
|
|
1963
|
+
{
|
|
1964
|
+
metric: "tool_count",
|
|
1965
|
+
testedAt: 6,
|
|
1966
|
+
demanded: 3,
|
|
1967
|
+
served: [3, 3, 3],
|
|
1968
|
+
outcome: "held",
|
|
1969
|
+
trials: 3,
|
|
1970
|
+
lastProbed: "2026-08-29",
|
|
1971
|
+
route: "openrouter:baidu",
|
|
1972
|
+
claim: "Measured 2026-08-29 via OpenRouter (served-by Baidu): 6 tools offered, 3 of 3 demanded served in parallel, 3/3 trials. Route-scoped \u2014 direct z.ai is unmeasured (no key held)."
|
|
1973
|
+
}
|
|
1974
|
+
],
|
|
1962
1975
|
status: "preview",
|
|
1963
1976
|
maxContextTokens: 1048576,
|
|
1964
1977
|
maxOutputTokens: 131072,
|
|
@@ -1969,7 +1982,8 @@ var PROFILES_RAW = [
|
|
|
1969
1982
|
// NOTHING about multiple tool_calls per response. Conservative false so
|
|
1970
1983
|
// hunt-shaped ranking doesn't over-promise; flip on doc or probe
|
|
1971
1984
|
// evidence (L-081: undocumented ≠ true).
|
|
1972
|
-
parallelToolCalls:
|
|
1985
|
+
parallelToolCalls: true,
|
|
1986
|
+
// alpha.96 — see weaknesses note; was an unevidenced blanket false
|
|
1973
1987
|
structuredOutput: "native",
|
|
1974
1988
|
systemPromptMode: "inline",
|
|
1975
1989
|
streaming: true,
|
|
@@ -1992,7 +2006,17 @@ var PROFILES_RAW = [
|
|
|
1992
2006
|
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
1993
2007
|
],
|
|
1994
2008
|
strengths: ["cost", "1m_context", "code", "tool_use", "json_output", "reasoning"],
|
|
1995
|
-
|
|
2009
|
+
// alpha.96 — 'parallel_tools' REMOVED. Measured 2026-08-29 via OpenRouter
|
|
2010
|
+
// (served-by Baidu), 6 tools offered, 3 of 3 demanded served in PARALLEL,
|
|
2011
|
+
// 3/3 trials. ROUTE-SCOPED: per the alpha.92 execute-leg contract there is
|
|
2012
|
+
// no cross-route verdict transfer, and direct z.ai is UNMEASURED (we hold
|
|
2013
|
+
// no zai key). But `parallelToolCalls: false` was a blanket claim with no
|
|
2014
|
+
// route qualification and no evidence at all, and it is capability-
|
|
2015
|
+
// REDUCING — it drives requires-adapter/reject. An unsubstantiated reducer
|
|
2016
|
+
// must not reduce. Contradicted on the one route we can reach is enough to
|
|
2017
|
+
// stop enforcing it; it is not enough to claim the opposite, which is why
|
|
2018
|
+
// probedLimits below carries the route.
|
|
2019
|
+
weaknesses: [],
|
|
1996
2020
|
notes: "GLM-5.2 (Z.ai, 2026-06): agentic-coding flagship. 1,048,576 ctx / 131,072 max out. $1.40/$4.40 per 1M; cached input $0.26/M (automatic caching, no marker; storage limited-time free as of 2026-07-18). Thinking on by default (`thinking.type`), `reasoning_effort` max..none. Parallel tool calls UNDOCUMENTED on the hosted API \u2014 profile says false until doc or probe evidence. status:preview \u2014 no brain evidence yet; earns placement via the machinery.",
|
|
1997
2021
|
// Starter hypotheses — verify with telemetry/probes; NO brain evidence
|
|
1998
2022
|
// yet. Anchored on the vendor's agentic-coding positioning at a
|
|
@@ -2010,8 +2034,11 @@ var PROFILES_RAW = [
|
|
|
2010
2034
|
extract: 6,
|
|
2011
2035
|
critique: 6,
|
|
2012
2036
|
classify: 6,
|
|
2013
|
-
|
|
2014
|
-
//
|
|
2037
|
+
// alpha.96 — was 5, discounted for "parallel unproven". Parallel is no
|
|
2038
|
+
// longer unproven on the reachable route (3/3, 2026-08-29). The discount
|
|
2039
|
+
// had no other stated basis, so it is withdrawn to the neutral floor.
|
|
2040
|
+
// Judgment, not measurement — same standard as the DeepSeek correction.
|
|
2041
|
+
hunt: 6
|
|
2015
2042
|
}
|
|
2016
2043
|
},
|
|
2017
2044
|
// ── Moonshot (Kimi) ──
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ARCHETYPE_FLOOR_DEFAULT,
|
|
3
3
|
getDefaultFallbackChain
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-77AHSX6Y.mjs";
|
|
5
5
|
import {
|
|
6
6
|
tryGetProfile
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-HHIXHL4O.mjs";
|
|
8
8
|
import {
|
|
9
9
|
subscribe,
|
|
10
10
|
subscribeApp
|
package/dist/index.d.mts
CHANGED
|
@@ -1241,7 +1241,7 @@ declare function runStrategyEvalWithAttribution(opts: Omit<GoldenEvalOptions, 'a
|
|
|
1241
1241
|
* guard in `tests/version.test.ts` fails the suite (and therefore
|
|
1242
1242
|
* `prepublishOnly`) when they diverge — a stale constant cannot reach npm.
|
|
1243
1243
|
*/
|
|
1244
|
-
declare const LIBRARY_VERSION = "2.0.0-alpha.
|
|
1244
|
+
declare const LIBRARY_VERSION = "2.0.0-alpha.97";
|
|
1245
1245
|
|
|
1246
1246
|
/**
|
|
1247
1247
|
* Oracle contract — how an app tells the brain whether a response was good.
|
package/dist/index.d.ts
CHANGED
|
@@ -1241,7 +1241,7 @@ declare function runStrategyEvalWithAttribution(opts: Omit<GoldenEvalOptions, 'a
|
|
|
1241
1241
|
* guard in `tests/version.test.ts` fails the suite (and therefore
|
|
1242
1242
|
* `prepublishOnly`) when they diverge — a stale constant cannot reach npm.
|
|
1243
1243
|
*/
|
|
1244
|
-
declare const LIBRARY_VERSION = "2.0.0-alpha.
|
|
1244
|
+
declare const LIBRARY_VERSION = "2.0.0-alpha.97";
|
|
1245
1245
|
|
|
1246
1246
|
/**
|
|
1247
1247
|
* Oracle contract — how an app tells the brain whether a response was good.
|
package/dist/index.js
CHANGED
|
@@ -2279,6 +2279,19 @@ var PROFILES_RAW = [
|
|
|
2279
2279
|
id: "glm-5.2",
|
|
2280
2280
|
verifiedAgainstDocs: "2026-07-18",
|
|
2281
2281
|
provider: "zai",
|
|
2282
|
+
probedLimits: [
|
|
2283
|
+
{
|
|
2284
|
+
metric: "tool_count",
|
|
2285
|
+
testedAt: 6,
|
|
2286
|
+
demanded: 3,
|
|
2287
|
+
served: [3, 3, 3],
|
|
2288
|
+
outcome: "held",
|
|
2289
|
+
trials: 3,
|
|
2290
|
+
lastProbed: "2026-08-29",
|
|
2291
|
+
route: "openrouter:baidu",
|
|
2292
|
+
claim: "Measured 2026-08-29 via OpenRouter (served-by Baidu): 6 tools offered, 3 of 3 demanded served in parallel, 3/3 trials. Route-scoped \u2014 direct z.ai is unmeasured (no key held)."
|
|
2293
|
+
}
|
|
2294
|
+
],
|
|
2282
2295
|
status: "preview",
|
|
2283
2296
|
maxContextTokens: 1048576,
|
|
2284
2297
|
maxOutputTokens: 131072,
|
|
@@ -2289,7 +2302,8 @@ var PROFILES_RAW = [
|
|
|
2289
2302
|
// NOTHING about multiple tool_calls per response. Conservative false so
|
|
2290
2303
|
// hunt-shaped ranking doesn't over-promise; flip on doc or probe
|
|
2291
2304
|
// evidence (L-081: undocumented ≠ true).
|
|
2292
|
-
parallelToolCalls:
|
|
2305
|
+
parallelToolCalls: true,
|
|
2306
|
+
// alpha.96 — see weaknesses note; was an unevidenced blanket false
|
|
2293
2307
|
structuredOutput: "native",
|
|
2294
2308
|
systemPromptMode: "inline",
|
|
2295
2309
|
streaming: true,
|
|
@@ -2312,7 +2326,17 @@ var PROFILES_RAW = [
|
|
|
2312
2326
|
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
2313
2327
|
],
|
|
2314
2328
|
strengths: ["cost", "1m_context", "code", "tool_use", "json_output", "reasoning"],
|
|
2315
|
-
|
|
2329
|
+
// alpha.96 — 'parallel_tools' REMOVED. Measured 2026-08-29 via OpenRouter
|
|
2330
|
+
// (served-by Baidu), 6 tools offered, 3 of 3 demanded served in PARALLEL,
|
|
2331
|
+
// 3/3 trials. ROUTE-SCOPED: per the alpha.92 execute-leg contract there is
|
|
2332
|
+
// no cross-route verdict transfer, and direct z.ai is UNMEASURED (we hold
|
|
2333
|
+
// no zai key). But `parallelToolCalls: false` was a blanket claim with no
|
|
2334
|
+
// route qualification and no evidence at all, and it is capability-
|
|
2335
|
+
// REDUCING — it drives requires-adapter/reject. An unsubstantiated reducer
|
|
2336
|
+
// must not reduce. Contradicted on the one route we can reach is enough to
|
|
2337
|
+
// stop enforcing it; it is not enough to claim the opposite, which is why
|
|
2338
|
+
// probedLimits below carries the route.
|
|
2339
|
+
weaknesses: [],
|
|
2316
2340
|
notes: "GLM-5.2 (Z.ai, 2026-06): agentic-coding flagship. 1,048,576 ctx / 131,072 max out. $1.40/$4.40 per 1M; cached input $0.26/M (automatic caching, no marker; storage limited-time free as of 2026-07-18). Thinking on by default (`thinking.type`), `reasoning_effort` max..none. Parallel tool calls UNDOCUMENTED on the hosted API \u2014 profile says false until doc or probe evidence. status:preview \u2014 no brain evidence yet; earns placement via the machinery.",
|
|
2317
2341
|
// Starter hypotheses — verify with telemetry/probes; NO brain evidence
|
|
2318
2342
|
// yet. Anchored on the vendor's agentic-coding positioning at a
|
|
@@ -2330,8 +2354,11 @@ var PROFILES_RAW = [
|
|
|
2330
2354
|
extract: 6,
|
|
2331
2355
|
critique: 6,
|
|
2332
2356
|
classify: 6,
|
|
2333
|
-
|
|
2334
|
-
//
|
|
2357
|
+
// alpha.96 — was 5, discounted for "parallel unproven". Parallel is no
|
|
2358
|
+
// longer unproven on the reachable route (3/3, 2026-08-29). The discount
|
|
2359
|
+
// had no other stated basis, so it is withdrawn to the neutral floor.
|
|
2360
|
+
// Judgment, not measurement — same standard as the DeepSeek correction.
|
|
2361
|
+
hunt: 6
|
|
2335
2362
|
}
|
|
2336
2363
|
},
|
|
2337
2364
|
// ── Moonshot (Kimi) ──
|
|
@@ -2464,7 +2491,24 @@ function bestEffortProfile(id) {
|
|
|
2464
2491
|
maxContextTokens: 128e3,
|
|
2465
2492
|
maxOutputTokens: 4096,
|
|
2466
2493
|
maxTools: donor.maxTools,
|
|
2467
|
-
|
|
2494
|
+
// alpha.97 — was `false`. That was the SAME MISTAKE as the three profiles
|
|
2495
|
+
// corrected in alpha.96, in the one place it does the most damage: applied
|
|
2496
|
+
// to models nobody has measured at all.
|
|
2497
|
+
//
|
|
2498
|
+
// `false` here is capability-REDUCING and unsubstantiated by construction —
|
|
2499
|
+
// a synthesized profile exists precisely because we know nothing. It made
|
|
2500
|
+
// `getModelCompatibility(<any unprofiled model>, {archetype:'hunt'})`
|
|
2501
|
+
// return `requires-adapter` (verified: raw score 5 vs floor 6, adapter
|
|
2502
|
+
// offered), so every consumer on `onUnprofiledModel:'best-effort'` was told
|
|
2503
|
+
// to serialize tool calls on a model we had never touched.
|
|
2504
|
+
//
|
|
2505
|
+
// The never-worse-than-raw rule decides it: for an unknown model kgauto
|
|
2506
|
+
// must behave exactly as a direct call would, and a direct call passes
|
|
2507
|
+
// every tool and lets the provider default apply. `true` is not a claim
|
|
2508
|
+
// that the model parallelises — it is the absence of a claim, expressed as
|
|
2509
|
+
// non-interference. The honest long-term fix is a third state (unknown)
|
|
2510
|
+
// rather than a boolean; that is P4 in the rebuild contract.
|
|
2511
|
+
parallelToolCalls: true,
|
|
2468
2512
|
structuredOutput: "none",
|
|
2469
2513
|
systemPromptMode: donor.systemPromptMode,
|
|
2470
2514
|
streaming: donor.streaming,
|
|
@@ -2474,7 +2518,7 @@ function bestEffortProfile(id) {
|
|
|
2474
2518
|
lowering: donor.lowering,
|
|
2475
2519
|
recovery: [],
|
|
2476
2520
|
strengths: [],
|
|
2477
|
-
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data"],
|
|
2521
|
+
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data; kgauto does not reduce capability for a model it has never measured (alpha.97)"],
|
|
2478
2522
|
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.`
|
|
2479
2523
|
};
|
|
2480
2524
|
CONSUMER_INDEX.set(canonical, synth);
|
|
@@ -2675,7 +2719,7 @@ _setProfileBrainHook({
|
|
|
2675
2719
|
var ARCHETYPE_FLOOR_DEFAULT = 6;
|
|
2676
2720
|
var ABSOLUTE_FLOOR = 4;
|
|
2677
2721
|
function rawArchetypePerf(profile, archetype) {
|
|
2678
|
-
return profile.archetypePerf?.[archetype] ??
|
|
2722
|
+
return profile.archetypePerf?.[archetype] ?? ARCHETYPE_FLOOR_DEFAULT;
|
|
2679
2723
|
}
|
|
2680
2724
|
function hasSequentialToolCliffForHunt(profile) {
|
|
2681
2725
|
if (profile.parallelToolCalls !== false) return false;
|
|
@@ -6626,7 +6670,7 @@ function validateFinalFit(ir, profile, tokens) {
|
|
|
6626
6670
|
}
|
|
6627
6671
|
|
|
6628
6672
|
// src/version.ts
|
|
6629
|
-
var LIBRARY_VERSION = "2.0.0-alpha.
|
|
6673
|
+
var LIBRARY_VERSION = "2.0.0-alpha.97";
|
|
6630
6674
|
|
|
6631
6675
|
// src/pricing-brain.ts
|
|
6632
6676
|
function isPricingRow(x) {
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
LIBRARY_VERSION,
|
|
8
8
|
createKeyHealthRoute,
|
|
9
9
|
keyFingerprint
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IEEROFZW.mjs";
|
|
11
11
|
import {
|
|
12
12
|
ARCHETYPE_FAMILY_FITS,
|
|
13
13
|
BLOCKED_MODEL_FAMILY_SIBLING_SERVED_CODE,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
runAdvisor,
|
|
64
64
|
setTokenizer,
|
|
65
65
|
wilsonLowerBound
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-AFYBZRQV.mjs";
|
|
67
67
|
import {
|
|
68
68
|
ABSOLUTE_FLOOR,
|
|
69
69
|
ARCHETYPE_FLOOR_DEFAULT,
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
policySetHas,
|
|
101
101
|
readBrainReadEnv,
|
|
102
102
|
resolveProviderKey
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-77AHSX6Y.mjs";
|
|
104
104
|
import {
|
|
105
105
|
ALL_ARCHETYPES,
|
|
106
106
|
DIALECT_VERSION,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
registerProfiles,
|
|
128
128
|
resolveModelAlias,
|
|
129
129
|
tryGetProfile
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-HHIXHL4O.mjs";
|
|
131
131
|
import {
|
|
132
132
|
emitAdvisoryFired,
|
|
133
133
|
emitCompileDone,
|
package/dist/key-health.js
CHANGED
|
@@ -28,7 +28,7 @@ __export(key_health_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(key_health_exports);
|
|
29
29
|
|
|
30
30
|
// src/version.ts
|
|
31
|
-
var LIBRARY_VERSION = "2.0.0-alpha.
|
|
31
|
+
var LIBRARY_VERSION = "2.0.0-alpha.97";
|
|
32
32
|
|
|
33
33
|
// src/key-health.ts
|
|
34
34
|
var JSON_HEADERS = { "Content-Type": "application/json" };
|
package/dist/key-health.mjs
CHANGED
package/dist/probe.js
CHANGED
|
@@ -2021,6 +2021,19 @@ var PROFILES_RAW = [
|
|
|
2021
2021
|
id: "glm-5.2",
|
|
2022
2022
|
verifiedAgainstDocs: "2026-07-18",
|
|
2023
2023
|
provider: "zai",
|
|
2024
|
+
probedLimits: [
|
|
2025
|
+
{
|
|
2026
|
+
metric: "tool_count",
|
|
2027
|
+
testedAt: 6,
|
|
2028
|
+
demanded: 3,
|
|
2029
|
+
served: [3, 3, 3],
|
|
2030
|
+
outcome: "held",
|
|
2031
|
+
trials: 3,
|
|
2032
|
+
lastProbed: "2026-08-29",
|
|
2033
|
+
route: "openrouter:baidu",
|
|
2034
|
+
claim: "Measured 2026-08-29 via OpenRouter (served-by Baidu): 6 tools offered, 3 of 3 demanded served in parallel, 3/3 trials. Route-scoped \u2014 direct z.ai is unmeasured (no key held)."
|
|
2035
|
+
}
|
|
2036
|
+
],
|
|
2024
2037
|
status: "preview",
|
|
2025
2038
|
maxContextTokens: 1048576,
|
|
2026
2039
|
maxOutputTokens: 131072,
|
|
@@ -2031,7 +2044,8 @@ var PROFILES_RAW = [
|
|
|
2031
2044
|
// NOTHING about multiple tool_calls per response. Conservative false so
|
|
2032
2045
|
// hunt-shaped ranking doesn't over-promise; flip on doc or probe
|
|
2033
2046
|
// evidence (L-081: undocumented ≠ true).
|
|
2034
|
-
parallelToolCalls:
|
|
2047
|
+
parallelToolCalls: true,
|
|
2048
|
+
// alpha.96 — see weaknesses note; was an unevidenced blanket false
|
|
2035
2049
|
structuredOutput: "native",
|
|
2036
2050
|
systemPromptMode: "inline",
|
|
2037
2051
|
streaming: true,
|
|
@@ -2054,7 +2068,17 @@ var PROFILES_RAW = [
|
|
|
2054
2068
|
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
2055
2069
|
],
|
|
2056
2070
|
strengths: ["cost", "1m_context", "code", "tool_use", "json_output", "reasoning"],
|
|
2057
|
-
|
|
2071
|
+
// alpha.96 — 'parallel_tools' REMOVED. Measured 2026-08-29 via OpenRouter
|
|
2072
|
+
// (served-by Baidu), 6 tools offered, 3 of 3 demanded served in PARALLEL,
|
|
2073
|
+
// 3/3 trials. ROUTE-SCOPED: per the alpha.92 execute-leg contract there is
|
|
2074
|
+
// no cross-route verdict transfer, and direct z.ai is UNMEASURED (we hold
|
|
2075
|
+
// no zai key). But `parallelToolCalls: false` was a blanket claim with no
|
|
2076
|
+
// route qualification and no evidence at all, and it is capability-
|
|
2077
|
+
// REDUCING — it drives requires-adapter/reject. An unsubstantiated reducer
|
|
2078
|
+
// must not reduce. Contradicted on the one route we can reach is enough to
|
|
2079
|
+
// stop enforcing it; it is not enough to claim the opposite, which is why
|
|
2080
|
+
// probedLimits below carries the route.
|
|
2081
|
+
weaknesses: [],
|
|
2058
2082
|
notes: "GLM-5.2 (Z.ai, 2026-06): agentic-coding flagship. 1,048,576 ctx / 131,072 max out. $1.40/$4.40 per 1M; cached input $0.26/M (automatic caching, no marker; storage limited-time free as of 2026-07-18). Thinking on by default (`thinking.type`), `reasoning_effort` max..none. Parallel tool calls UNDOCUMENTED on the hosted API \u2014 profile says false until doc or probe evidence. status:preview \u2014 no brain evidence yet; earns placement via the machinery.",
|
|
2059
2083
|
// Starter hypotheses — verify with telemetry/probes; NO brain evidence
|
|
2060
2084
|
// yet. Anchored on the vendor's agentic-coding positioning at a
|
|
@@ -2072,8 +2096,11 @@ var PROFILES_RAW = [
|
|
|
2072
2096
|
extract: 6,
|
|
2073
2097
|
critique: 6,
|
|
2074
2098
|
classify: 6,
|
|
2075
|
-
|
|
2076
|
-
//
|
|
2099
|
+
// alpha.96 — was 5, discounted for "parallel unproven". Parallel is no
|
|
2100
|
+
// longer unproven on the reachable route (3/3, 2026-08-29). The discount
|
|
2101
|
+
// had no other stated basis, so it is withdrawn to the neutral floor.
|
|
2102
|
+
// Judgment, not measurement — same standard as the DeepSeek correction.
|
|
2103
|
+
hunt: 6
|
|
2077
2104
|
}
|
|
2078
2105
|
},
|
|
2079
2106
|
// ── Moonshot (Kimi) ──
|
|
@@ -2200,7 +2227,24 @@ function bestEffortProfile(id) {
|
|
|
2200
2227
|
maxContextTokens: 128e3,
|
|
2201
2228
|
maxOutputTokens: 4096,
|
|
2202
2229
|
maxTools: donor.maxTools,
|
|
2203
|
-
|
|
2230
|
+
// alpha.97 — was `false`. That was the SAME MISTAKE as the three profiles
|
|
2231
|
+
// corrected in alpha.96, in the one place it does the most damage: applied
|
|
2232
|
+
// to models nobody has measured at all.
|
|
2233
|
+
//
|
|
2234
|
+
// `false` here is capability-REDUCING and unsubstantiated by construction —
|
|
2235
|
+
// a synthesized profile exists precisely because we know nothing. It made
|
|
2236
|
+
// `getModelCompatibility(<any unprofiled model>, {archetype:'hunt'})`
|
|
2237
|
+
// return `requires-adapter` (verified: raw score 5 vs floor 6, adapter
|
|
2238
|
+
// offered), so every consumer on `onUnprofiledModel:'best-effort'` was told
|
|
2239
|
+
// to serialize tool calls on a model we had never touched.
|
|
2240
|
+
//
|
|
2241
|
+
// The never-worse-than-raw rule decides it: for an unknown model kgauto
|
|
2242
|
+
// must behave exactly as a direct call would, and a direct call passes
|
|
2243
|
+
// every tool and lets the provider default apply. `true` is not a claim
|
|
2244
|
+
// that the model parallelises — it is the absence of a claim, expressed as
|
|
2245
|
+
// non-interference. The honest long-term fix is a third state (unknown)
|
|
2246
|
+
// rather than a boolean; that is P4 in the rebuild contract.
|
|
2247
|
+
parallelToolCalls: true,
|
|
2204
2248
|
structuredOutput: "none",
|
|
2205
2249
|
systemPromptMode: donor.systemPromptMode,
|
|
2206
2250
|
streaming: donor.streaming,
|
|
@@ -2210,7 +2254,7 @@ function bestEffortProfile(id) {
|
|
|
2210
2254
|
lowering: donor.lowering,
|
|
2211
2255
|
recovery: [],
|
|
2212
2256
|
strengths: [],
|
|
2213
|
-
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data"],
|
|
2257
|
+
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data; kgauto does not reduce capability for a model it has never measured (alpha.97)"],
|
|
2214
2258
|
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.`
|
|
2215
2259
|
};
|
|
2216
2260
|
CONSUMER_INDEX.set(canonical, synth);
|
|
@@ -2359,7 +2403,7 @@ _setProfileBrainHook({
|
|
|
2359
2403
|
// src/compatibility.ts
|
|
2360
2404
|
var ARCHETYPE_FLOOR_DEFAULT = 6;
|
|
2361
2405
|
function rawArchetypePerf(profile, archetype) {
|
|
2362
|
-
return profile.archetypePerf?.[archetype] ??
|
|
2406
|
+
return profile.archetypePerf?.[archetype] ?? ARCHETYPE_FLOOR_DEFAULT;
|
|
2363
2407
|
}
|
|
2364
2408
|
function hasSequentialToolCliffForHunt(profile) {
|
|
2365
2409
|
if (profile.parallelToolCalls !== false) return false;
|
package/dist/probe.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compile
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AFYBZRQV.mjs";
|
|
4
|
+
import "./chunk-77AHSX6Y.mjs";
|
|
5
5
|
import "./chunk-FEMPY6EC.mjs";
|
|
6
6
|
import {
|
|
7
7
|
deriveCliffEvidenceClass,
|
|
8
8
|
getProfile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HHIXHL4O.mjs";
|
|
10
10
|
|
|
11
11
|
// src/probe.ts
|
|
12
12
|
function compileSuppressing(ir, opts) {
|
package/dist/profiles.js
CHANGED
|
@@ -1952,6 +1952,19 @@ var PROFILES_RAW = [
|
|
|
1952
1952
|
id: "glm-5.2",
|
|
1953
1953
|
verifiedAgainstDocs: "2026-07-18",
|
|
1954
1954
|
provider: "zai",
|
|
1955
|
+
probedLimits: [
|
|
1956
|
+
{
|
|
1957
|
+
metric: "tool_count",
|
|
1958
|
+
testedAt: 6,
|
|
1959
|
+
demanded: 3,
|
|
1960
|
+
served: [3, 3, 3],
|
|
1961
|
+
outcome: "held",
|
|
1962
|
+
trials: 3,
|
|
1963
|
+
lastProbed: "2026-08-29",
|
|
1964
|
+
route: "openrouter:baidu",
|
|
1965
|
+
claim: "Measured 2026-08-29 via OpenRouter (served-by Baidu): 6 tools offered, 3 of 3 demanded served in parallel, 3/3 trials. Route-scoped \u2014 direct z.ai is unmeasured (no key held)."
|
|
1966
|
+
}
|
|
1967
|
+
],
|
|
1955
1968
|
status: "preview",
|
|
1956
1969
|
maxContextTokens: 1048576,
|
|
1957
1970
|
maxOutputTokens: 131072,
|
|
@@ -1962,7 +1975,8 @@ var PROFILES_RAW = [
|
|
|
1962
1975
|
// NOTHING about multiple tool_calls per response. Conservative false so
|
|
1963
1976
|
// hunt-shaped ranking doesn't over-promise; flip on doc or probe
|
|
1964
1977
|
// evidence (L-081: undocumented ≠ true).
|
|
1965
|
-
parallelToolCalls:
|
|
1978
|
+
parallelToolCalls: true,
|
|
1979
|
+
// alpha.96 — see weaknesses note; was an unevidenced blanket false
|
|
1966
1980
|
structuredOutput: "native",
|
|
1967
1981
|
systemPromptMode: "inline",
|
|
1968
1982
|
streaming: true,
|
|
@@ -1985,7 +1999,17 @@ var PROFILES_RAW = [
|
|
|
1985
1999
|
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
1986
2000
|
],
|
|
1987
2001
|
strengths: ["cost", "1m_context", "code", "tool_use", "json_output", "reasoning"],
|
|
1988
|
-
|
|
2002
|
+
// alpha.96 — 'parallel_tools' REMOVED. Measured 2026-08-29 via OpenRouter
|
|
2003
|
+
// (served-by Baidu), 6 tools offered, 3 of 3 demanded served in PARALLEL,
|
|
2004
|
+
// 3/3 trials. ROUTE-SCOPED: per the alpha.92 execute-leg contract there is
|
|
2005
|
+
// no cross-route verdict transfer, and direct z.ai is UNMEASURED (we hold
|
|
2006
|
+
// no zai key). But `parallelToolCalls: false` was a blanket claim with no
|
|
2007
|
+
// route qualification and no evidence at all, and it is capability-
|
|
2008
|
+
// REDUCING — it drives requires-adapter/reject. An unsubstantiated reducer
|
|
2009
|
+
// must not reduce. Contradicted on the one route we can reach is enough to
|
|
2010
|
+
// stop enforcing it; it is not enough to claim the opposite, which is why
|
|
2011
|
+
// probedLimits below carries the route.
|
|
2012
|
+
weaknesses: [],
|
|
1989
2013
|
notes: "GLM-5.2 (Z.ai, 2026-06): agentic-coding flagship. 1,048,576 ctx / 131,072 max out. $1.40/$4.40 per 1M; cached input $0.26/M (automatic caching, no marker; storage limited-time free as of 2026-07-18). Thinking on by default (`thinking.type`), `reasoning_effort` max..none. Parallel tool calls UNDOCUMENTED on the hosted API \u2014 profile says false until doc or probe evidence. status:preview \u2014 no brain evidence yet; earns placement via the machinery.",
|
|
1990
2014
|
// Starter hypotheses — verify with telemetry/probes; NO brain evidence
|
|
1991
2015
|
// yet. Anchored on the vendor's agentic-coding positioning at a
|
|
@@ -2003,8 +2027,11 @@ var PROFILES_RAW = [
|
|
|
2003
2027
|
extract: 6,
|
|
2004
2028
|
critique: 6,
|
|
2005
2029
|
classify: 6,
|
|
2006
|
-
|
|
2007
|
-
//
|
|
2030
|
+
// alpha.96 — was 5, discounted for "parallel unproven". Parallel is no
|
|
2031
|
+
// longer unproven on the reachable route (3/3, 2026-08-29). The discount
|
|
2032
|
+
// had no other stated basis, so it is withdrawn to the neutral floor.
|
|
2033
|
+
// Judgment, not measurement — same standard as the DeepSeek correction.
|
|
2034
|
+
hunt: 6
|
|
2008
2035
|
}
|
|
2009
2036
|
},
|
|
2010
2037
|
// ── Moonshot (Kimi) ──
|
|
@@ -2137,7 +2164,24 @@ function bestEffortProfile(id) {
|
|
|
2137
2164
|
maxContextTokens: 128e3,
|
|
2138
2165
|
maxOutputTokens: 4096,
|
|
2139
2166
|
maxTools: donor.maxTools,
|
|
2140
|
-
|
|
2167
|
+
// alpha.97 — was `false`. That was the SAME MISTAKE as the three profiles
|
|
2168
|
+
// corrected in alpha.96, in the one place it does the most damage: applied
|
|
2169
|
+
// to models nobody has measured at all.
|
|
2170
|
+
//
|
|
2171
|
+
// `false` here is capability-REDUCING and unsubstantiated by construction —
|
|
2172
|
+
// a synthesized profile exists precisely because we know nothing. It made
|
|
2173
|
+
// `getModelCompatibility(<any unprofiled model>, {archetype:'hunt'})`
|
|
2174
|
+
// return `requires-adapter` (verified: raw score 5 vs floor 6, adapter
|
|
2175
|
+
// offered), so every consumer on `onUnprofiledModel:'best-effort'` was told
|
|
2176
|
+
// to serialize tool calls on a model we had never touched.
|
|
2177
|
+
//
|
|
2178
|
+
// The never-worse-than-raw rule decides it: for an unknown model kgauto
|
|
2179
|
+
// must behave exactly as a direct call would, and a direct call passes
|
|
2180
|
+
// every tool and lets the provider default apply. `true` is not a claim
|
|
2181
|
+
// that the model parallelises — it is the absence of a claim, expressed as
|
|
2182
|
+
// non-interference. The honest long-term fix is a third state (unknown)
|
|
2183
|
+
// rather than a boolean; that is P4 in the rebuild contract.
|
|
2184
|
+
parallelToolCalls: true,
|
|
2141
2185
|
structuredOutput: "none",
|
|
2142
2186
|
systemPromptMode: donor.systemPromptMode,
|
|
2143
2187
|
streaming: donor.streaming,
|
|
@@ -2147,7 +2191,7 @@ function bestEffortProfile(id) {
|
|
|
2147
2191
|
lowering: donor.lowering,
|
|
2148
2192
|
recovery: [],
|
|
2149
2193
|
strengths: [],
|
|
2150
|
-
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data"],
|
|
2194
|
+
weaknesses: ["best-effort synthesized profile \u2014 no verified capability data; kgauto does not reduce capability for a model it has never measured (alpha.97)"],
|
|
2151
2195
|
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.`
|
|
2152
2196
|
};
|
|
2153
2197
|
CONSUMER_INDEX.set(canonical, synth);
|
package/dist/profiles.mjs
CHANGED
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.97",
|
|
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",
|