@warmdrift/kgauto-compiler 2.0.0-alpha.64 → 2.0.0-alpha.65
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-QKXTMVCT.mjs → chunk-4UO4CCSP.mjs} +150 -0
- package/dist/{chunk-YZRPNSSQ.mjs → chunk-DJVGJEJU.mjs} +13 -3
- package/dist/{chunk-DGPYLFDG.mjs → chunk-XTZ2ZQJQ.mjs} +14 -1
- package/dist/glassbox/index.d.mts +3 -3
- package/dist/glassbox/index.d.ts +3 -3
- package/dist/glassbox-routes/format.d.mts +2 -2
- package/dist/glassbox-routes/format.d.ts +2 -2
- package/dist/glassbox-routes/index.d.mts +4 -4
- package/dist/glassbox-routes/index.d.ts +4 -4
- package/dist/glassbox-routes/index.js +162 -2
- package/dist/glassbox-routes/index.mjs +2 -2
- package/dist/glassbox-routes/react/index.d.mts +2 -2
- package/dist/glassbox-routes/react/index.d.ts +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +284 -3
- package/dist/index.mjs +111 -3
- package/dist/{ir-B2dRyJXO.d.mts → ir-9rrfI3yB.d.mts} +32 -1
- package/dist/{ir-ClU56aBc.d.ts → ir-Dx_UXPfP.d.ts} +32 -1
- package/dist/key-health.d.mts +1 -1
- package/dist/key-health.d.ts +1 -1
- package/dist/key-health.js +14 -1
- package/dist/key-health.mjs +1 -1
- package/dist/profiles.d.mts +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +150 -0
- package/dist/profiles.mjs +1 -1
- package/dist/{types-CSDweZsl.d.mts → types-B4zlO58J.d.mts} +1 -1
- package/dist/{types-axAX1Bg0.d.mts → types-D-G7KXeI.d.mts} +1 -1
- package/dist/{types-C-Wp7HpI.d.ts → types-DSknEy2B.d.ts} +1 -1
- package/dist/{types-ByN3r0_7.d.ts → types-iwyFQHt3.d.ts} +1 -1
- package/package.json +1 -1
package/dist/key-health.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(key_health_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(key_health_exports);
|
|
26
26
|
|
|
27
27
|
// src/version.ts
|
|
28
|
-
var LIBRARY_VERSION = "2.0.0-alpha.
|
|
28
|
+
var LIBRARY_VERSION = "2.0.0-alpha.65";
|
|
29
29
|
|
|
30
30
|
// src/key-health.ts
|
|
31
31
|
var JSON_HEADERS = { "Content-Type": "application/json" };
|
|
@@ -74,6 +74,14 @@ var PROBE_SPECS = [
|
|
|
74
74
|
return Number.isFinite(n) ? n : void 0;
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
provider: "moonshot",
|
|
79
|
+
canonicalEnvName: "MOONSHOT_API_KEY",
|
|
80
|
+
buildRequest: (key) => ({
|
|
81
|
+
url: "https://api.moonshot.ai/v1/models",
|
|
82
|
+
headers: { Authorization: `Bearer ${key}` }
|
|
83
|
+
})
|
|
84
|
+
},
|
|
77
85
|
{
|
|
78
86
|
provider: "google",
|
|
79
87
|
canonicalEnvName: "GEMINI_API_KEY",
|
|
@@ -105,6 +113,11 @@ function createKeyHealthRoute(config) {
|
|
|
105
113
|
const aiSdk = envKey(env, "GOOGLE_GENERATIVE_AI_API_KEY");
|
|
106
114
|
key = gemini ?? google ?? aiSdk;
|
|
107
115
|
envName = gemini ? "GEMINI_API_KEY" : google ? "GOOGLE_API_KEY" : aiSdk ? "GOOGLE_GENERATIVE_AI_API_KEY" : "GEMINI_API_KEY";
|
|
116
|
+
} else if (spec.provider === "moonshot") {
|
|
117
|
+
const moonshot = envKey(env, "MOONSHOT_API_KEY");
|
|
118
|
+
const kimi = envKey(env, "KIMI_API_KEY");
|
|
119
|
+
key = moonshot ?? kimi;
|
|
120
|
+
envName = moonshot ? "MOONSHOT_API_KEY" : kimi ? "KIMI_API_KEY" : "MOONSHOT_API_KEY";
|
|
108
121
|
} else {
|
|
109
122
|
key = envKey(env, spec.canonicalEnvName);
|
|
110
123
|
}
|
package/dist/key-health.mjs
CHANGED
package/dist/profiles.d.mts
CHANGED
package/dist/profiles.d.ts
CHANGED
package/dist/profiles.js
CHANGED
|
@@ -1445,6 +1445,156 @@ var PROFILES_RAW = [
|
|
|
1445
1445
|
classify: 8
|
|
1446
1446
|
// overkill
|
|
1447
1447
|
}
|
|
1448
|
+
},
|
|
1449
|
+
// ── Z.ai (GLM) ──
|
|
1450
|
+
// alpha.65 (2026-07-18): first Z.ai profile, provider `zai` added same
|
|
1451
|
+
// release. Step-zero sources (L-049/L-081, all fetched 2026-07-18):
|
|
1452
|
+
// docs.z.ai/guides/llm/glm-5.2 (capabilities), docs.z.ai api-reference
|
|
1453
|
+
// chat-completion (wire params: thinking.type enabled|disabled default
|
|
1454
|
+
// enabled, reasoning_effort max..none, tool_stream, max output 131072),
|
|
1455
|
+
// docs.z.ai/guides/overview/pricing ($1.4 in / $4.4 out, cached input
|
|
1456
|
+
// $0.26, cache storage limited-time free), vLLM recipe (native ctx
|
|
1457
|
+
// 1,048,576). NO AI-trained numbers.
|
|
1458
|
+
{
|
|
1459
|
+
id: "glm-5.2",
|
|
1460
|
+
verifiedAgainstDocs: "2026-07-18",
|
|
1461
|
+
provider: "zai",
|
|
1462
|
+
status: "preview",
|
|
1463
|
+
maxContextTokens: 1048576,
|
|
1464
|
+
maxOutputTokens: 131072,
|
|
1465
|
+
// No documented tool-count cap — conservative default pending measured
|
|
1466
|
+
// evidence; matches the deepseek posture, not a doc number.
|
|
1467
|
+
maxTools: 16,
|
|
1468
|
+
// Hosted-API docs document tools + tool_choice + tool_stream but say
|
|
1469
|
+
// NOTHING about multiple tool_calls per response. Conservative false so
|
|
1470
|
+
// hunt-shaped ranking doesn't over-promise; flip on doc or probe
|
|
1471
|
+
// evidence (L-081: undocumented ≠ true).
|
|
1472
|
+
parallelToolCalls: false,
|
|
1473
|
+
structuredOutput: "native",
|
|
1474
|
+
systemPromptMode: "inline",
|
|
1475
|
+
streaming: true,
|
|
1476
|
+
cliffs: [],
|
|
1477
|
+
costInputPer1m: 1.4,
|
|
1478
|
+
costOutputPer1m: 4.4,
|
|
1479
|
+
lowering: {
|
|
1480
|
+
system: { mode: "inline" },
|
|
1481
|
+
// Automatic prefix caching ("intelligent caching mechanism") — no wire
|
|
1482
|
+
// marker to emit, DeepSeek-style. Cache-hit input $0.26/M (~0.19× of
|
|
1483
|
+
// miss) tracked in notes; storage limited-time free as of 2026-07-18.
|
|
1484
|
+
cache: { strategy: "unsupported" },
|
|
1485
|
+
tools: { format: "openai" },
|
|
1486
|
+
// thinking.type: 'enabled' (server default) | 'disabled'. lowerZai
|
|
1487
|
+
// emits an explicit disable only on forceThinkingZero cliffs.
|
|
1488
|
+
thinking: { field: "thinking.type", default: "auto" }
|
|
1489
|
+
},
|
|
1490
|
+
recovery: [
|
|
1491
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" },
|
|
1492
|
+
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
1493
|
+
],
|
|
1494
|
+
strengths: ["cost", "1m_context", "code", "tool_use", "json_output", "reasoning"],
|
|
1495
|
+
weaknesses: ["parallel_tools"],
|
|
1496
|
+
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.",
|
|
1497
|
+
// Starter hypotheses — verify with telemetry/probes; NO brain evidence
|
|
1498
|
+
// yet. Anchored on the vendor's agentic-coding positioning at a
|
|
1499
|
+
// mid-cost tier, discounted for the unproven parallel-tool story.
|
|
1500
|
+
archetypePerf: {
|
|
1501
|
+
generate: 7,
|
|
1502
|
+
// agentic-coding positioning — starter hypothesis
|
|
1503
|
+
transform: 7,
|
|
1504
|
+
// starter hypothesis
|
|
1505
|
+
plan: 7,
|
|
1506
|
+
// starter hypothesis
|
|
1507
|
+
summarize: 7,
|
|
1508
|
+
// tolerant archetype — starter hypothesis
|
|
1509
|
+
ask: 6,
|
|
1510
|
+
extract: 6,
|
|
1511
|
+
critique: 6,
|
|
1512
|
+
classify: 6,
|
|
1513
|
+
hunt: 5
|
|
1514
|
+
// tools work; parallel unproven → discounted
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
// ── Moonshot (Kimi) ──
|
|
1518
|
+
// alpha.65 (2026-07-18): first Moonshot profile, provider `moonshot` added
|
|
1519
|
+
// same release. Step-zero sources (all fetched 2026-07-18):
|
|
1520
|
+
// platform.kimi.ai/docs/pricing/chat-k3 ($3.00 cache-miss in / $0.30
|
|
1521
|
+
// cache-hit in / $15.00 out; 1,048,576 ctx; ToolCalls + JSON Mode +
|
|
1522
|
+
// Partial Mode), kimi-k3-quickstart (max_completion_tokens default
|
|
1523
|
+
// 131072, up to 1,048,576; base https://api.moonshot.ai/v1; vision via
|
|
1524
|
+
// base64 or ms://file-id, NO public image URLs), models-overview
|
|
1525
|
+
// (temperature FIXED 1.0, top_p FIXED 0.95, n FIXED 1, always reasons,
|
|
1526
|
+
// reasoning_effort 'max' only), tool-calls guide ("can choose to call
|
|
1527
|
+
// multiple tools at once … will tend to call them in parallel").
|
|
1528
|
+
{
|
|
1529
|
+
id: "kimi-k3",
|
|
1530
|
+
verifiedAgainstDocs: "2026-07-18",
|
|
1531
|
+
provider: "moonshot",
|
|
1532
|
+
status: "preview",
|
|
1533
|
+
maxContextTokens: 1048576,
|
|
1534
|
+
// Documented ceiling; default is 131,072 when unset.
|
|
1535
|
+
maxOutputTokens: 1048576,
|
|
1536
|
+
// No hard doc cap; docs recommend dynamic tool loading at "dozens or
|
|
1537
|
+
// hundreds" — 64 matches the frontier-agentic posture (sonnet-5 tier).
|
|
1538
|
+
maxTools: 64,
|
|
1539
|
+
parallelToolCalls: true,
|
|
1540
|
+
structuredOutput: "native",
|
|
1541
|
+
systemPromptMode: "inline",
|
|
1542
|
+
streaming: true,
|
|
1543
|
+
cliffs: [],
|
|
1544
|
+
costInputPer1m: 3,
|
|
1545
|
+
costOutputPer1m: 15,
|
|
1546
|
+
lowering: {
|
|
1547
|
+
system: { mode: "inline" },
|
|
1548
|
+
// Automatic context caching — no wire marker. Cache-hit input $0.30/M
|
|
1549
|
+
// (0.1× of miss) tracked in notes.
|
|
1550
|
+
cache: { strategy: "unsupported" },
|
|
1551
|
+
tools: { format: "openai" }
|
|
1552
|
+
// No thinking knob: reasoning is always-on and reasoning_effort
|
|
1553
|
+
// accepts only 'max' (= the server default). Nothing to lower.
|
|
1554
|
+
},
|
|
1555
|
+
recovery: [
|
|
1556
|
+
{ signal: "rate_limit", action: "escalate", reason: "429 \u2014 escalate" },
|
|
1557
|
+
{ signal: "model_not_found", action: "escalate", reason: "Deprecated \u2014 escalate (L-061)" }
|
|
1558
|
+
],
|
|
1559
|
+
strengths: ["quality", "reasoning", "1m_context", "parallel_tools", "tool_use", "code", "vision"],
|
|
1560
|
+
// 'latency' → latencyTierOf derives 'slow': always-on max-effort
|
|
1561
|
+
// reasoner with no off switch; no measured p50 yet, the tag is the
|
|
1562
|
+
// honest prior (reasoner family precedent: deepseek-v4-pro ~48s).
|
|
1563
|
+
weaknesses: ["cost", "latency"],
|
|
1564
|
+
notes: "Kimi K3 (Moonshot, API live 2026-07-16): 2.8T-param open-weight flagship, native vision. 1,048,576 ctx; max_completion_tokens default 131,072, ceiling 1,048,576. $3.00/$15.00 per 1M, cache-hit input $0.30/M (automatic caching). Reasoning ALWAYS ON (reasoning_effort max only, cannot disable; responses may carry reasoning_content). Wire quirks: temperature fixed 1.0 / top_p 0.95 / n 1 (kgauto never emits those); vision input must be base64 or ms://file-id \u2014 public image URLs rejected. status:preview \u2014 earns placement via the machinery.",
|
|
1565
|
+
// Starter hypotheses — verify with telemetry/probes; NO brain evidence
|
|
1566
|
+
// yet. Anchored on documented long-horizon-agentic + parallel-tool
|
|
1567
|
+
// strengths; discounted on terse archetypes where always-on reasoning
|
|
1568
|
+
// bills $15/M output for thinking the archetype doesn't need.
|
|
1569
|
+
archetypePerf: {
|
|
1570
|
+
hunt: 8,
|
|
1571
|
+
// parallel tools + long-horizon agentic — starter hypothesis
|
|
1572
|
+
plan: 8,
|
|
1573
|
+
// starter hypothesis
|
|
1574
|
+
generate: 8,
|
|
1575
|
+
// starter hypothesis
|
|
1576
|
+
critique: 7,
|
|
1577
|
+
ask: 7,
|
|
1578
|
+
extract: 7,
|
|
1579
|
+
transform: 7,
|
|
1580
|
+
summarize: 6,
|
|
1581
|
+
// works, but $15/M output reasoning tax on a tolerant archetype
|
|
1582
|
+
classify: 5
|
|
1583
|
+
// always-on reasoning cost + reasoner hedge risk
|
|
1584
|
+
},
|
|
1585
|
+
// Diagnostics-only (no prompt rewrite): reasoner-family hedge risk on
|
|
1586
|
+
// decisive archetypes, carried as a warning until K3-specific probe
|
|
1587
|
+
// evidence exists. The deepseek-reasoner family showed 8/10 judge
|
|
1588
|
+
// rationales citing hedging on classify (exclusion-finding ID 20,
|
|
1589
|
+
// 2026-05-28); K3 is an always-on reasoner and inherits the risk class,
|
|
1590
|
+
// not the conviction.
|
|
1591
|
+
archetypeConventions: [
|
|
1592
|
+
{
|
|
1593
|
+
archetype: "classify",
|
|
1594
|
+
cliffWarning: "kimi-k3 is an always-on reasoner: decisive archetypes (classify) may hedge, and reasoning tokens bill at $15/M output. Family-prior risk (deepseek-reasoner precedent), not K3-measured \u2014 probe before relying on it for classify.",
|
|
1595
|
+
reason: "Reasoner-family prior (exclusion-finding ID 20, 2026-05-28, deepseek-v4-pro on tt-intel/classify). No K3-specific evidence yet \u2014 warning only, no prompt rewrite."
|
|
1596
|
+
}
|
|
1597
|
+
]
|
|
1448
1598
|
}
|
|
1449
1599
|
];
|
|
1450
1600
|
var ALIASES = {
|
package/dist/profiles.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-
|
|
1
|
+
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-9rrfI3yB.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-
|
|
1
|
+
import { s as MutationApplied, B as BestPracticeAdvisory, F as FallbackReason, m as CallAttempt } from './ir-Dx_UXPfP.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Glass-Box observability types (alpha.17).
|
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.65",
|
|
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",
|