@warmdrift/kgauto-compiler 2.0.0-alpha.7 → 2.0.0-alpha.71
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/README.md +176 -46
- package/dist/brain-proxy.d.mts +113 -0
- package/dist/brain-proxy.d.ts +113 -0
- package/dist/brain-proxy.js +193 -0
- package/dist/brain-proxy.mjs +6 -0
- package/dist/chunk-4UO4CCSP.mjs +1620 -0
- package/dist/chunk-65ZMX5OT.mjs +169 -0
- package/dist/{chunk-5TI6PNSK.mjs → chunk-BVEXV5KC.mjs} +11 -0
- package/dist/chunk-NBO4R5PC.mjs +313 -0
- package/dist/chunk-P3TOAEG4.mjs +56 -0
- package/dist/chunk-RO22VFIF.mjs +29 -0
- package/dist/chunk-SBFSYCQG.mjs +719 -0
- package/dist/chunk-URFQR3SB.mjs +203 -0
- package/dist/dialect.d.mts +41 -3
- package/dist/dialect.d.ts +41 -3
- package/dist/dialect.js +14 -2
- package/dist/dialect.mjs +5 -3
- package/dist/glassbox/index.d.mts +59 -0
- package/dist/glassbox/index.d.ts +59 -0
- package/dist/glassbox/index.js +312 -0
- package/dist/glassbox/index.mjs +12 -0
- package/dist/glassbox-routes/format.d.mts +24 -0
- package/dist/glassbox-routes/format.d.ts +24 -0
- package/dist/glassbox-routes/format.js +86 -0
- package/dist/glassbox-routes/format.mjs +18 -0
- package/dist/glassbox-routes/index.d.mts +191 -0
- package/dist/glassbox-routes/index.d.ts +191 -0
- package/dist/glassbox-routes/index.js +2888 -0
- package/dist/glassbox-routes/index.mjs +667 -0
- package/dist/glassbox-routes/react/index.d.mts +74 -0
- package/dist/glassbox-routes/react/index.d.ts +74 -0
- package/dist/glassbox-routes/react/index.js +819 -0
- package/dist/glassbox-routes/react/index.mjs +754 -0
- package/dist/index.d.mts +2745 -17
- package/dist/index.d.ts +2745 -17
- package/dist/index.js +9006 -1651
- package/dist/index.mjs +5103 -367
- package/dist/ir-BEQ28muo.d.ts +1608 -0
- package/dist/ir-CnnJST_N.d.mts +1608 -0
- package/dist/key-health.d.mts +131 -0
- package/dist/key-health.d.ts +131 -0
- package/dist/key-health.js +228 -0
- package/dist/key-health.mjs +6 -0
- package/dist/profiles.d.mts +292 -2
- package/dist/profiles.d.ts +292 -2
- package/dist/profiles.js +1231 -16
- package/dist/profiles.mjs +9 -1
- package/dist/types-B--CYzMo.d.ts +131 -0
- package/dist/types-BDFrJkma.d.mts +131 -0
- package/dist/types-DSeJJ6tt.d.ts +149 -0
- package/dist/types-DeGRCTlJ.d.mts +149 -0
- package/package.json +54 -8
- package/dist/chunk-MBEI5UOM.mjs +0 -409
- package/dist/profiles-B3eNQ2py.d.ts +0 -619
- package/dist/profiles-Py8c7zjJ.d.mts +0 -619
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
import {
|
|
2
|
+
tryGetProfile
|
|
3
|
+
} from "./chunk-4UO4CCSP.mjs";
|
|
4
|
+
|
|
5
|
+
// src/brain-query.ts
|
|
6
|
+
var FRESH_SNAPSHOT = {
|
|
7
|
+
data: null,
|
|
8
|
+
expiresAt: 0,
|
|
9
|
+
refreshing: false,
|
|
10
|
+
warned: false
|
|
11
|
+
};
|
|
12
|
+
var snapshot = { ...FRESH_SNAPSHOT };
|
|
13
|
+
var runtime;
|
|
14
|
+
function configureBrainQuery(rt) {
|
|
15
|
+
runtime = rt;
|
|
16
|
+
snapshot = { ...FRESH_SNAPSHOT };
|
|
17
|
+
}
|
|
18
|
+
function createBrainQueryCache(opts) {
|
|
19
|
+
return () => {
|
|
20
|
+
const rt = runtime;
|
|
21
|
+
if (!rt || !rt.enabledTables.has(opts.table)) {
|
|
22
|
+
return opts.bundledFallback();
|
|
23
|
+
}
|
|
24
|
+
const now = Date.now();
|
|
25
|
+
const stale = snapshot.expiresAt <= now;
|
|
26
|
+
if (stale && !snapshot.refreshing) {
|
|
27
|
+
snapshot.refreshing = true;
|
|
28
|
+
void asyncRefresh(rt);
|
|
29
|
+
}
|
|
30
|
+
if (snapshot.data) {
|
|
31
|
+
const rows = snapshot.data[opts.table];
|
|
32
|
+
if (Array.isArray(rows) && rows.length > 0) {
|
|
33
|
+
try {
|
|
34
|
+
return opts.mapRows(rows);
|
|
35
|
+
} catch {
|
|
36
|
+
return opts.bundledFallback();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return opts.bundledFallback();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
var pendingRefresh;
|
|
44
|
+
async function asyncRefresh(rt) {
|
|
45
|
+
const promise = doRefresh(rt);
|
|
46
|
+
pendingRefresh = promise;
|
|
47
|
+
try {
|
|
48
|
+
await promise;
|
|
49
|
+
} finally {
|
|
50
|
+
if (pendingRefresh === promise) pendingRefresh = void 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var DEFAULT_CONFIG_URL = "https://kgauto-dashboard.vercel.app/api/kgauto-v2/config";
|
|
54
|
+
async function doRefresh(rt) {
|
|
55
|
+
const url = rt.configEndpoint ?? DEFAULT_CONFIG_URL;
|
|
56
|
+
try {
|
|
57
|
+
const res = await rt.fetchImpl(url, { method: "GET" });
|
|
58
|
+
if (!res.ok) {
|
|
59
|
+
throw new Error(`brain-query ${res.status}: ${res.statusText}`);
|
|
60
|
+
}
|
|
61
|
+
const body = await res.json();
|
|
62
|
+
if (runtime !== rt) return;
|
|
63
|
+
snapshot = {
|
|
64
|
+
data: body,
|
|
65
|
+
expiresAt: Date.now() + rt.ttlMs,
|
|
66
|
+
refreshing: false,
|
|
67
|
+
warned: snapshot.warned
|
|
68
|
+
};
|
|
69
|
+
} catch (err) {
|
|
70
|
+
if (runtime !== rt) return;
|
|
71
|
+
snapshot.refreshing = false;
|
|
72
|
+
snapshot.expiresAt = Date.now() + rt.ttlMs;
|
|
73
|
+
if (!snapshot.warned) {
|
|
74
|
+
snapshot.warned = true;
|
|
75
|
+
(rt.onError ?? defaultOnError)(err);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function defaultOnError(err) {
|
|
80
|
+
console.warn("[kgauto] brain-query failed (using bundled fallback):", err);
|
|
81
|
+
}
|
|
82
|
+
function isBrainQueryActiveFor(table) {
|
|
83
|
+
return runtime !== void 0 && runtime.enabledTables.has(table);
|
|
84
|
+
}
|
|
85
|
+
async function getPerAxisMetrics(opts) {
|
|
86
|
+
const fetchFn = opts.fetch ?? fetch;
|
|
87
|
+
const endpoint = opts.endpoint ?? runtime?.endpoint;
|
|
88
|
+
if (!endpoint) return null;
|
|
89
|
+
const windowDays = opts.windowDays ?? 30;
|
|
90
|
+
const body = {
|
|
91
|
+
p_app_id: opts.appId,
|
|
92
|
+
p_archetype: opts.archetype,
|
|
93
|
+
p_model: opts.model,
|
|
94
|
+
p_window_days: windowDays,
|
|
95
|
+
p_quality_floor: opts.qualityFloor ?? null
|
|
96
|
+
};
|
|
97
|
+
const headers = {
|
|
98
|
+
Accept: "application/json",
|
|
99
|
+
"Content-Type": "application/json",
|
|
100
|
+
...opts.apiKey ? { Authorization: `Bearer ${opts.apiKey}` } : {}
|
|
101
|
+
};
|
|
102
|
+
try {
|
|
103
|
+
const res = await fetchFn(`${endpoint}/rpc/get_per_axis_metrics`, {
|
|
104
|
+
method: "POST",
|
|
105
|
+
headers,
|
|
106
|
+
body: JSON.stringify(body)
|
|
107
|
+
});
|
|
108
|
+
if (!res.ok) return null;
|
|
109
|
+
const raw = await res.json();
|
|
110
|
+
return mapPerAxisMetrics(raw, opts.appId, opts.archetype, opts.model, windowDays);
|
|
111
|
+
} catch {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function mapPerAxisMetrics(raw, fallbackAppId, fallbackArchetype, fallbackModel, fallbackWindowDays) {
|
|
116
|
+
if (raw === null || raw === void 0) return null;
|
|
117
|
+
if (typeof raw !== "object") return null;
|
|
118
|
+
const r = raw;
|
|
119
|
+
if (Array.isArray(raw)) {
|
|
120
|
+
if (raw.length === 0) return null;
|
|
121
|
+
return mapPerAxisMetrics(raw[0], fallbackAppId, fallbackArchetype, fallbackModel, fallbackWindowDays);
|
|
122
|
+
}
|
|
123
|
+
const num = (v) => {
|
|
124
|
+
if (v === null || v === void 0) return null;
|
|
125
|
+
if (typeof v === "number") return Number.isFinite(v) ? v : null;
|
|
126
|
+
if (typeof v === "string") {
|
|
127
|
+
const n = Number(v);
|
|
128
|
+
return Number.isFinite(n) ? n : null;
|
|
129
|
+
}
|
|
130
|
+
return null;
|
|
131
|
+
};
|
|
132
|
+
const int = (v) => {
|
|
133
|
+
const n = num(v);
|
|
134
|
+
return n === null ? 0 : Math.trunc(n);
|
|
135
|
+
};
|
|
136
|
+
const bool = (v) => {
|
|
137
|
+
if (v === null || v === void 0) return null;
|
|
138
|
+
if (typeof v === "boolean") return v;
|
|
139
|
+
return null;
|
|
140
|
+
};
|
|
141
|
+
const str = (v, fallback) => typeof v === "string" ? v : fallback;
|
|
142
|
+
const cost = r.cost_efficiency ?? {};
|
|
143
|
+
const time = r.time_efficiency ?? {};
|
|
144
|
+
const rel = r.reliability ?? {};
|
|
145
|
+
return {
|
|
146
|
+
appId: str(r.app_id, fallbackAppId),
|
|
147
|
+
archetype: str(r.archetype, fallbackArchetype),
|
|
148
|
+
model: str(r.model, fallbackModel),
|
|
149
|
+
windowDays: num(r.window_days) ?? fallbackWindowDays,
|
|
150
|
+
nRows: int(r.n_rows),
|
|
151
|
+
nRowsClean: int(r.n_rows_clean),
|
|
152
|
+
nQualityOutcomes: int(r.n_quality_outcomes),
|
|
153
|
+
magicRate: num(r.magic_rate),
|
|
154
|
+
qualityFloorMet: bool(r.quality_floor_met),
|
|
155
|
+
costEfficiency: {
|
|
156
|
+
avgCostUsd: num(cost.avg_cost_usd),
|
|
157
|
+
avgCostUsdClean: num(cost.avg_cost_usd_clean),
|
|
158
|
+
avgInputTokens: num(cost.avg_input_tokens),
|
|
159
|
+
avgOutputTokens: num(cost.avg_output_tokens),
|
|
160
|
+
inputTokenRatio: num(cost.input_token_ratio)
|
|
161
|
+
},
|
|
162
|
+
timeEfficiency: {
|
|
163
|
+
avgLatencyMs: num(time.avg_latency_ms),
|
|
164
|
+
avgTtftMs: num(time.avg_ttft_ms)
|
|
165
|
+
},
|
|
166
|
+
reliability: {
|
|
167
|
+
successRate: num(rel.success_rate),
|
|
168
|
+
successRateClean: num(rel.success_rate_clean),
|
|
169
|
+
emptyRate: num(rel.empty_rate),
|
|
170
|
+
emptyRateClean: num(rel.empty_rate_clean)
|
|
171
|
+
},
|
|
172
|
+
evidenceFreshnessDays: num(r.evidence_freshness_days)
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// src/compatibility.ts
|
|
177
|
+
var ARCHETYPE_FLOOR_DEFAULT = 6;
|
|
178
|
+
var ABSOLUTE_FLOOR = 4;
|
|
179
|
+
function rawArchetypePerf(profile, archetype) {
|
|
180
|
+
return profile.archetypePerf?.[archetype] ?? 5;
|
|
181
|
+
}
|
|
182
|
+
function hasSequentialToolCliffForHunt(profile) {
|
|
183
|
+
if (profile.parallelToolCalls !== false) return false;
|
|
184
|
+
const huntScore = profile.archetypePerf?.hunt ?? 5;
|
|
185
|
+
return huntScore < ARCHETYPE_FLOOR_DEFAULT;
|
|
186
|
+
}
|
|
187
|
+
function adapterForCliff(profile, archetype) {
|
|
188
|
+
if (archetype === "hunt" && hasSequentialToolCliffForHunt(profile)) {
|
|
189
|
+
const otherScores = [];
|
|
190
|
+
if (profile.archetypePerf) {
|
|
191
|
+
for (const [k, v] of Object.entries(profile.archetypePerf)) {
|
|
192
|
+
if (k === "hunt") continue;
|
|
193
|
+
if (typeof v === "number") otherScores.push(v);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
const sorted = [...otherScores].sort((a, b) => a - b);
|
|
197
|
+
const median = sorted.length === 0 ? ARCHETYPE_FLOOR_DEFAULT + 1 : sorted[Math.floor(sorted.length / 2)] ?? ARCHETYPE_FLOOR_DEFAULT + 1;
|
|
198
|
+
const estimated = Math.max(ARCHETYPE_FLOOR_DEFAULT + 1, median);
|
|
199
|
+
return {
|
|
200
|
+
adapter: {
|
|
201
|
+
parameter: "toolOrchestration",
|
|
202
|
+
value: "sequential",
|
|
203
|
+
consequence: "Tool calls run one at a time instead of in parallel \u2014 slower per step but reliable for this model."
|
|
204
|
+
},
|
|
205
|
+
estimatedScoreWithAdapter: estimated
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return void 0;
|
|
209
|
+
}
|
|
210
|
+
function archetypeDescriptor(archetype) {
|
|
211
|
+
return archetype;
|
|
212
|
+
}
|
|
213
|
+
function getModelCompatibility(modelId, intent) {
|
|
214
|
+
const profile = tryGetProfile(modelId);
|
|
215
|
+
if (!profile) {
|
|
216
|
+
return {
|
|
217
|
+
status: "reject",
|
|
218
|
+
reason: `Model "${modelId}" is not registered with kgauto \u2014 no compatibility data available.`,
|
|
219
|
+
archetypePerf: 0
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
const { archetype, toolOrchestration } = intent;
|
|
223
|
+
const rawScore = rawArchetypePerf(profile, archetype);
|
|
224
|
+
const descriptor = archetypeDescriptor(archetype);
|
|
225
|
+
const adapterMatch = adapterForCliff(profile, archetype);
|
|
226
|
+
if (toolOrchestration === "sequential" && adapterMatch && adapterMatch.adapter.parameter === "toolOrchestration" && adapterMatch.adapter.value === "sequential") {
|
|
227
|
+
return {
|
|
228
|
+
status: "compatible",
|
|
229
|
+
reason: `Suited for ${descriptor} with sequential tool calls.`,
|
|
230
|
+
archetypePerf: rawScore
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
if (rawScore >= ARCHETYPE_FLOOR_DEFAULT) {
|
|
234
|
+
return {
|
|
235
|
+
status: "compatible",
|
|
236
|
+
reason: `Suited for ${descriptor}.`,
|
|
237
|
+
archetypePerf: rawScore
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
if (adapterMatch) {
|
|
241
|
+
return {
|
|
242
|
+
status: "requires-adapter",
|
|
243
|
+
reason: `Best with ${adapterMatch.adapter.value} ${adapterMatch.adapter.parameter === "toolOrchestration" ? "tool calls" : adapterMatch.adapter.parameter} for ${descriptor} \u2014 slower but works.`,
|
|
244
|
+
archetypePerf: rawScore,
|
|
245
|
+
archetypePerfWithAdapter: adapterMatch.estimatedScoreWithAdapter,
|
|
246
|
+
adapter: adapterMatch.adapter
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
status: "reject",
|
|
251
|
+
reason: `Not suited for ${descriptor} \u2014 would underperform significantly.`,
|
|
252
|
+
archetypePerf: rawScore
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// src/env.ts
|
|
257
|
+
var SUPPORTED_PROVIDERS = Object.freeze([
|
|
258
|
+
"anthropic",
|
|
259
|
+
"google",
|
|
260
|
+
"openai",
|
|
261
|
+
"deepseek",
|
|
262
|
+
"zai",
|
|
263
|
+
"moonshot"
|
|
264
|
+
]);
|
|
265
|
+
function isSupportedProvider(p) {
|
|
266
|
+
return SUPPORTED_PROVIDERS.includes(p);
|
|
267
|
+
}
|
|
268
|
+
var PROVIDER_ENV_KEYS = Object.freeze({
|
|
269
|
+
anthropic: Object.freeze(["ANTHROPIC_API_KEY"]),
|
|
270
|
+
google: Object.freeze([
|
|
271
|
+
"GOOGLE_API_KEY",
|
|
272
|
+
"GEMINI_API_KEY",
|
|
273
|
+
"GOOGLE_GENERATIVE_AI_API_KEY"
|
|
274
|
+
]),
|
|
275
|
+
openai: Object.freeze(["OPENAI_API_KEY"]),
|
|
276
|
+
deepseek: Object.freeze(["DEEPSEEK_API_KEY"]),
|
|
277
|
+
// alpha.65 — Z.ai (GLM family). ZAI_API_KEY is the canonical name; the
|
|
278
|
+
// Z_AI_API_KEY variant covers the underscore convention some tooling uses
|
|
279
|
+
// for the brand's "Z.ai" spelling.
|
|
280
|
+
zai: Object.freeze(["ZAI_API_KEY", "Z_AI_API_KEY"]),
|
|
281
|
+
// alpha.65 — Moonshot AI (Kimi family). MOONSHOT_API_KEY is canonical
|
|
282
|
+
// (api.moonshot.ai); KIMI_API_KEY covers the platform.kimi.ai rebrand
|
|
283
|
+
// surface so consumers keyed under either name resolve.
|
|
284
|
+
moonshot: Object.freeze(["MOONSHOT_API_KEY", "KIMI_API_KEY"])
|
|
285
|
+
});
|
|
286
|
+
function defaultEnv() {
|
|
287
|
+
return typeof process !== "undefined" && process.env ? process.env : {};
|
|
288
|
+
}
|
|
289
|
+
function readKeyValue(raw) {
|
|
290
|
+
if (raw === void 0) return void 0;
|
|
291
|
+
const trimmed = raw.trim();
|
|
292
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
293
|
+
}
|
|
294
|
+
function resolveProviderKey(provider, opts = {}) {
|
|
295
|
+
if (!isSupportedProvider(provider)) return void 0;
|
|
296
|
+
const explicit = readKeyValue(opts.apiKeys?.[provider]);
|
|
297
|
+
if (explicit) return explicit;
|
|
298
|
+
const env = opts.envSource ?? defaultEnv();
|
|
299
|
+
for (const name of PROVIDER_ENV_KEYS[provider]) {
|
|
300
|
+
const v = readKeyValue(env[name]);
|
|
301
|
+
if (v) return v;
|
|
302
|
+
}
|
|
303
|
+
return void 0;
|
|
304
|
+
}
|
|
305
|
+
function isProviderReachable(provider, opts = {}) {
|
|
306
|
+
return resolveProviderKey(provider, opts) !== void 0;
|
|
307
|
+
}
|
|
308
|
+
function isModelReachable(modelId, opts = {}) {
|
|
309
|
+
const profile = tryGetProfile(modelId);
|
|
310
|
+
if (!profile) return false;
|
|
311
|
+
return isProviderReachable(profile.provider, opts);
|
|
312
|
+
}
|
|
313
|
+
function getReachabilityDiagnostic(opts = {}) {
|
|
314
|
+
const env = opts.envSource ?? defaultEnv();
|
|
315
|
+
const out = {};
|
|
316
|
+
for (const provider of SUPPORTED_PROVIDERS) {
|
|
317
|
+
if (readKeyValue(opts.apiKeys?.[provider])) {
|
|
318
|
+
out[provider] = { reachable: true, via: "apiKeys" };
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
const envKeyFound = PROVIDER_ENV_KEYS[provider].find((name) => readKeyValue(env[name]));
|
|
322
|
+
out[provider] = envKeyFound ? { reachable: true, via: "env", envKeyFound } : { reachable: false, via: null };
|
|
323
|
+
}
|
|
324
|
+
return out;
|
|
325
|
+
}
|
|
326
|
+
function readBrainReadEnv(envSource = defaultEnv()) {
|
|
327
|
+
const endpoint = readKeyValue(envSource.KGAUTO_V2_BRAIN_SUPABASE_URL) ?? readKeyValue(envSource.KGAUTO_V2_BRAIN_URL);
|
|
328
|
+
const jwt = readKeyValue(envSource.KGAUTO_V2_BRAIN_JWT) ?? readKeyValue(envSource.GLASSBOX_BRAIN_JWT);
|
|
329
|
+
const anonKey = readKeyValue(envSource.KGAUTO_V2_BRAIN_ANON_KEY);
|
|
330
|
+
const missingEnv = [];
|
|
331
|
+
if (!endpoint) missingEnv.push("KGAUTO_V2_BRAIN_SUPABASE_URL");
|
|
332
|
+
if (!jwt) missingEnv.push("KGAUTO_V2_BRAIN_JWT");
|
|
333
|
+
if (!anonKey) missingEnv.push("KGAUTO_V2_BRAIN_ANON_KEY");
|
|
334
|
+
return { endpoint, jwt, anonKey, missingEnv };
|
|
335
|
+
}
|
|
336
|
+
function isSameModelRetryEnabledFromEnv(envSource = defaultEnv()) {
|
|
337
|
+
const raw = (envSource.KGAUTO_SAME_MODEL_RETRY ?? "").trim().toLowerCase();
|
|
338
|
+
return raw === "1" || raw === "true";
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// src/fallback.ts
|
|
342
|
+
var STARTER_CHAINS_GROUNDED = {
|
|
343
|
+
// Reasoning floor — never degrade. Walk UP on 429 to Opus → cross-provider.
|
|
344
|
+
critique: [
|
|
345
|
+
{ id: "claude-opus-4-7", grounding: "judgment", reason: "Highest reasoning bar, no degradation tier \u2014 engineer pick, awaiting measured backing" },
|
|
346
|
+
{ id: "claude-sonnet-4-6", grounding: "judgment", reason: "Same-provider walk-down from Opus on 429" },
|
|
347
|
+
{ id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor in similar quality bracket" },
|
|
348
|
+
{ id: "gpt-5.5", grounding: "judgment", reason: "alpha.16: third-provider frontier-tier floor (archetypePerf=9)" }
|
|
349
|
+
],
|
|
350
|
+
// alpha.62 (eval spine) — pairwise output comparison. Same reasoning-floor
|
|
351
|
+
// posture as critique (a verdict from a weak judge is worse than no
|
|
352
|
+
// verdict); tier 0 anchored on the CURRENT opus (4-8, s64 roster). Strict
|
|
353
|
+
// JSON output, so every tier declares native structured output.
|
|
354
|
+
judge: [
|
|
355
|
+
{ id: "claude-opus-4-8", grounding: "judgment", reason: "Highest reasoning bar for pairwise verdicts \u2014 current opus (s64 roster)" },
|
|
356
|
+
{ id: "claude-sonnet-4-6", grounding: "judgment", reason: "Same-provider walk-down on 429" },
|
|
357
|
+
{ id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor in similar quality bracket" },
|
|
358
|
+
{ id: "gpt-5.5", grounding: "judgment", reason: "Third-provider frontier-tier floor" }
|
|
359
|
+
],
|
|
360
|
+
// Reasoning matters — Sonnet primary; walk UP to Opus on 429.
|
|
361
|
+
plan: [
|
|
362
|
+
{ id: "claude-sonnet-4-6", grounding: "judgment", reason: "Reasoning + cost balance \u2014 engineer pick" },
|
|
363
|
+
{ id: "claude-opus-4-7", grounding: "judgment", reason: 'Same-provider walk-UP on 429 (rare exception to "always cheaper")' },
|
|
364
|
+
{ id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
|
|
365
|
+
{ id: "deepseek-v4-pro", grounding: "judgment", reason: "Tier 3 cost floor \u2014 no brain evidence yet" },
|
|
366
|
+
{ id: "gpt-5.4", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=7) \u2014 closes openai-in-default-fallback-chains" }
|
|
367
|
+
],
|
|
368
|
+
// Quality + cost match.
|
|
369
|
+
generate: [
|
|
370
|
+
{ id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality + cost match \u2014 engineer pick" },
|
|
371
|
+
{ id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
|
|
372
|
+
{ id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
|
|
373
|
+
{ id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.16: third-provider tail (archetypePerf=7) \u2014 closes mono-Anthropic gap" }
|
|
374
|
+
],
|
|
375
|
+
// ask::sonnet — STARTER_CHAINS calls this "Quality + cost match" but
|
|
376
|
+
// tt-intel s78 prod data showed 27% empty rate. Labeled 'judgment' until
|
|
377
|
+
// evidence either validates or refutes the placement.
|
|
378
|
+
ask: [
|
|
379
|
+
{ 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" },
|
|
380
|
+
{ id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
|
|
381
|
+
{ id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
|
|
382
|
+
{ id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.16: third-provider tail (archetypePerf=7)" }
|
|
383
|
+
],
|
|
384
|
+
// Structured-output archetype — Flash skipped (alpha.8 MAX_TOKENS cliff,
|
|
385
|
+
// capability-fact); DeepSeek skipped (no brain evidence).
|
|
386
|
+
extract: [
|
|
387
|
+
{ id: "claude-sonnet-4-6", grounding: "judgment", reason: "Reliable structured-output anchor \u2014 engineer pick" },
|
|
388
|
+
{ id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down with native structured output" },
|
|
389
|
+
{ id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor with structured-output support" },
|
|
390
|
+
{ id: "gpt-5.4", grounding: "capability-fact", reason: "alpha.16: third-provider floor \u2014 native structured-output capability (archetypePerf=8)" }
|
|
391
|
+
],
|
|
392
|
+
// Forgiving archetype — Sonnet primary but Flash safely floors it.
|
|
393
|
+
transform: [
|
|
394
|
+
{ id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality anchor \u2014 engineer pick" },
|
|
395
|
+
{ id: "claude-haiku-4-5", grounding: "judgment", reason: "Same-provider step-down" },
|
|
396
|
+
{ id: "gemini-2.5-pro", grounding: "judgment", reason: "Cross-provider anchor" },
|
|
397
|
+
{ id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost floor \u2014 forgiving archetype tolerates Flash" },
|
|
398
|
+
{ id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=7) \u2014 closes openai-in-default-fallback-chains" }
|
|
399
|
+
],
|
|
400
|
+
// Parallel-tool throughput champion — Flash leads on the L-040 cliff
|
|
401
|
+
// (capability-fact: Flash 15-75 parallel calls/step vs DeepSeek 7-8).
|
|
402
|
+
hunt: [
|
|
403
|
+
{ id: "gemini-2.5-flash", grounding: "capability-fact", reason: "L-040 parallel-tool throughput champion (15-75 calls/step)" },
|
|
404
|
+
{ id: "gemini-2.5-pro", grounding: "capability-fact", reason: "Cross-provider tier 1 with strong parallel-tool support" },
|
|
405
|
+
{ id: "claude-sonnet-4-6", grounding: "judgment", reason: "Quality safety net for blocked-Flash case" },
|
|
406
|
+
{ id: "claude-haiku-4-5", grounding: "judgment", reason: "Reduced tool budget \u2014 cliff at 16 fires" },
|
|
407
|
+
{ id: "gpt-5.4-mini", grounding: "judgment", reason: "alpha.33: third-provider tail \u2014 OpenAI parallel-tool capable archetype" }
|
|
408
|
+
],
|
|
409
|
+
// Cost-sensitive + tolerant. DeepSeek brain-evidence tier 1.
|
|
410
|
+
summarize: [
|
|
411
|
+
{ id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost-sensitive primary \u2014 engineer pick" },
|
|
412
|
+
{ id: "deepseek-v4-flash", grounding: "measured", reason: "Brain-validated tier 1 for cost-sensitive summarize workloads", n: 169 },
|
|
413
|
+
{ id: "claude-haiku-4-5", grounding: "judgment", reason: "Quality safety net" },
|
|
414
|
+
{ id: "gemini-2.5-flash-lite", grounding: "judgment", reason: "Emergency floor \u2014 onboarded s22, no brain evidence yet" },
|
|
415
|
+
{ id: "gpt-5.4-nano", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=6) \u2014 cheapest OpenAI, matches summarize cost-band" }
|
|
416
|
+
],
|
|
417
|
+
// Brain-validated DeepSeek tier 1 (169 rows, 0% empty rate).
|
|
418
|
+
classify: [
|
|
419
|
+
{ id: "gemini-2.5-flash", grounding: "judgment", reason: "Cost-sensitive primary \u2014 engineer pick" },
|
|
420
|
+
{ id: "deepseek-v4-flash", grounding: "measured", reason: "Brain-validated tier 1 (169 rows, 0% empty rate)", n: 169 },
|
|
421
|
+
{ id: "claude-haiku-4-5", grounding: "judgment", reason: "Quality safety net" },
|
|
422
|
+
{ id: "gemini-2.5-flash-lite", grounding: "judgment", reason: "Cache-discount 10\xD7 floor for repeat-prompt workloads" },
|
|
423
|
+
{ id: "gpt-5.4-nano", grounding: "judgment", reason: "alpha.33: third-provider tail (archetypePerf=6) \u2014 cheapest OpenAI for classify" }
|
|
424
|
+
]
|
|
425
|
+
};
|
|
426
|
+
var STARTER_CHAINS = (() => {
|
|
427
|
+
const out = {};
|
|
428
|
+
for (const [archetype, entries] of Object.entries(STARTER_CHAINS_GROUNDED)) {
|
|
429
|
+
out[archetype] = entries.map((e) => e.id);
|
|
430
|
+
}
|
|
431
|
+
return out;
|
|
432
|
+
})();
|
|
433
|
+
var STARTER_CHAINS_BY_MODE_GROUNDED = {
|
|
434
|
+
hunt: {
|
|
435
|
+
sequential: [
|
|
436
|
+
{
|
|
437
|
+
id: "deepseek-v4-pro",
|
|
438
|
+
grounding: "judgment",
|
|
439
|
+
reason: "alpha.20 E3: cheap + good reasoning at single-step granularity; L-040 cliff silenced when sequential \u2014 hypothesis not yet measured"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
id: "deepseek-v4-flash",
|
|
443
|
+
grounding: "judgment",
|
|
444
|
+
reason: "Cheapest viable; sibling-provider fallback"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
id: "claude-sonnet-4-6",
|
|
448
|
+
grounding: "judgment",
|
|
449
|
+
reason: "Cross-provider safety net \u2014 Sonnet handles sequential agentic loops cleanly"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: "gemini-2.5-pro",
|
|
453
|
+
grounding: "judgment",
|
|
454
|
+
reason: "Third-provider tail when no DeepSeek key reachable"
|
|
455
|
+
}
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
var STARTER_CHAINS_BY_MODE = (() => {
|
|
460
|
+
const out = {};
|
|
461
|
+
for (const [archetype, modes] of Object.entries(STARTER_CHAINS_BY_MODE_GROUNDED)) {
|
|
462
|
+
if (modes?.sequential) {
|
|
463
|
+
out[archetype] = {
|
|
464
|
+
sequential: modes.sequential.map((e) => e.id)
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
return out;
|
|
469
|
+
})();
|
|
470
|
+
function resolveStarterForMode(archetype, toolOrchestration, allChains) {
|
|
471
|
+
if (toolOrchestration === "sequential") {
|
|
472
|
+
const overlay = STARTER_CHAINS_BY_MODE[archetype]?.sequential;
|
|
473
|
+
if (overlay) return [...overlay];
|
|
474
|
+
}
|
|
475
|
+
return allChains[archetype];
|
|
476
|
+
}
|
|
477
|
+
function getDefaultFallbackChain(opts) {
|
|
478
|
+
const { archetype, primary, maxDepth = 4, policy, reachability, toolOrchestration } = opts;
|
|
479
|
+
if (maxDepth < 1) {
|
|
480
|
+
throw new Error(
|
|
481
|
+
`getDefaultFallbackChain: maxDepth must be >= 1, got ${maxDepth}`
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
const allChains = loadChainsFromBrain();
|
|
485
|
+
const starter = resolveStarterForMode(archetype, toolOrchestration, allChains);
|
|
486
|
+
if (!starter) {
|
|
487
|
+
throw new Error(
|
|
488
|
+
`getDefaultFallbackChain: unknown archetype "${archetype}". Known: ${Object.keys(allChains).join(", ")}`
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
let chain;
|
|
492
|
+
if (primary) {
|
|
493
|
+
chain = [primary, ...starter.filter((id) => id !== primary)];
|
|
494
|
+
} else {
|
|
495
|
+
chain = [...starter];
|
|
496
|
+
}
|
|
497
|
+
if (policy?.blockedModels && policy.blockedModels.length > 0) {
|
|
498
|
+
const blocked = new Set(policy.blockedModels);
|
|
499
|
+
chain = chain.filter((id) => !blocked.has(id));
|
|
500
|
+
}
|
|
501
|
+
const seen = /* @__PURE__ */ new Set();
|
|
502
|
+
const deduped = [];
|
|
503
|
+
for (const id of chain) {
|
|
504
|
+
if (!seen.has(id)) {
|
|
505
|
+
seen.add(id);
|
|
506
|
+
deduped.push(id);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
let filtered = deduped;
|
|
510
|
+
if (reachability) {
|
|
511
|
+
filtered = deduped.filter((id) => isModelReachable(id, reachability));
|
|
512
|
+
}
|
|
513
|
+
return filtered.slice(0, maxDepth);
|
|
514
|
+
}
|
|
515
|
+
function getStarterChain(archetype) {
|
|
516
|
+
const chain = STARTER_CHAINS[archetype];
|
|
517
|
+
if (!chain) {
|
|
518
|
+
throw new Error(
|
|
519
|
+
`getStarterChain: unknown archetype "${archetype}"`
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
return [...chain];
|
|
523
|
+
}
|
|
524
|
+
function getAllStarterChains() {
|
|
525
|
+
const out = {};
|
|
526
|
+
for (const [archetype, chain] of Object.entries(STARTER_CHAINS)) {
|
|
527
|
+
out[archetype] = [...chain];
|
|
528
|
+
}
|
|
529
|
+
return out;
|
|
530
|
+
}
|
|
531
|
+
function getSequentialStarterChain(archetype) {
|
|
532
|
+
const overlay = STARTER_CHAINS_BY_MODE[archetype]?.sequential;
|
|
533
|
+
return overlay ? [...overlay] : void 0;
|
|
534
|
+
}
|
|
535
|
+
function copyEntry(e) {
|
|
536
|
+
const out = { id: e.id, grounding: e.grounding };
|
|
537
|
+
if (e.reason !== void 0) out.reason = e.reason;
|
|
538
|
+
if (e.n !== void 0) out.n = e.n;
|
|
539
|
+
return out;
|
|
540
|
+
}
|
|
541
|
+
function lookupStaticEntry(id, archetype) {
|
|
542
|
+
const archetypeEntries = STARTER_CHAINS_GROUNDED[archetype];
|
|
543
|
+
if (archetypeEntries) {
|
|
544
|
+
const hit = archetypeEntries.find((e) => e.id === id);
|
|
545
|
+
if (hit) return hit;
|
|
546
|
+
}
|
|
547
|
+
const seqOverlay = STARTER_CHAINS_BY_MODE_GROUNDED[archetype]?.sequential;
|
|
548
|
+
if (seqOverlay) {
|
|
549
|
+
const hit = seqOverlay.find((e) => e.id === id);
|
|
550
|
+
if (hit) return hit;
|
|
551
|
+
}
|
|
552
|
+
return void 0;
|
|
553
|
+
}
|
|
554
|
+
function resolveGroundedChainForArchetype(archetype, toolOrchestration) {
|
|
555
|
+
if (toolOrchestration === "sequential") {
|
|
556
|
+
const overlay = STARTER_CHAINS_BY_MODE_GROUNDED[archetype]?.sequential;
|
|
557
|
+
if (overlay) return overlay.map(copyEntry);
|
|
558
|
+
}
|
|
559
|
+
const allChains = loadChainsFromBrain();
|
|
560
|
+
const ids = allChains[archetype];
|
|
561
|
+
if (!ids) return void 0;
|
|
562
|
+
return ids.map((id) => {
|
|
563
|
+
const known = lookupStaticEntry(id, archetype);
|
|
564
|
+
if (known) return copyEntry(known);
|
|
565
|
+
return { id, grounding: "judgment" };
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
function getDefaultFallbackChainWithGrounding(opts) {
|
|
569
|
+
const {
|
|
570
|
+
archetype,
|
|
571
|
+
primary,
|
|
572
|
+
maxDepth = 3,
|
|
573
|
+
policy,
|
|
574
|
+
reachability,
|
|
575
|
+
toolOrchestration
|
|
576
|
+
} = opts;
|
|
577
|
+
if (maxDepth < 1) {
|
|
578
|
+
throw new Error(
|
|
579
|
+
`getDefaultFallbackChainWithGrounding: maxDepth must be >= 1, got ${maxDepth}`
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
const starter = resolveGroundedChainForArchetype(archetype, toolOrchestration);
|
|
583
|
+
if (!starter) {
|
|
584
|
+
throw new Error(
|
|
585
|
+
`getDefaultFallbackChainWithGrounding: unknown archetype "${archetype}". Known: ${Object.keys(STARTER_CHAINS_GROUNDED).join(", ")}`
|
|
586
|
+
);
|
|
587
|
+
}
|
|
588
|
+
let chain;
|
|
589
|
+
if (primary) {
|
|
590
|
+
const primaryEntry = (() => {
|
|
591
|
+
const inStarter = starter.find((e) => e.id === primary);
|
|
592
|
+
if (inStarter) return copyEntry(inStarter);
|
|
593
|
+
const knownAnywhere = lookupStaticEntry(primary, archetype);
|
|
594
|
+
if (knownAnywhere) return { ...copyEntry(knownAnywhere), id: primary };
|
|
595
|
+
return { id: primary, grounding: "judgment" };
|
|
596
|
+
})();
|
|
597
|
+
chain = [primaryEntry, ...starter.filter((e) => e.id !== primary)];
|
|
598
|
+
} else {
|
|
599
|
+
chain = [...starter];
|
|
600
|
+
}
|
|
601
|
+
if (policy?.blockedModels && policy.blockedModels.length > 0) {
|
|
602
|
+
const blocked = new Set(policy.blockedModels);
|
|
603
|
+
chain = chain.filter((e) => !blocked.has(e.id));
|
|
604
|
+
}
|
|
605
|
+
const seen = /* @__PURE__ */ new Set();
|
|
606
|
+
const deduped = [];
|
|
607
|
+
for (const e of chain) {
|
|
608
|
+
if (!seen.has(e.id)) {
|
|
609
|
+
seen.add(e.id);
|
|
610
|
+
deduped.push(e);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
let filtered = deduped;
|
|
614
|
+
if (reachability) {
|
|
615
|
+
filtered = deduped.filter((e) => isModelReachable(e.id, reachability));
|
|
616
|
+
}
|
|
617
|
+
return filtered.slice(0, maxDepth);
|
|
618
|
+
}
|
|
619
|
+
function getStarterChainWithGrounding(archetype) {
|
|
620
|
+
const entries = STARTER_CHAINS_GROUNDED[archetype];
|
|
621
|
+
if (!entries) {
|
|
622
|
+
throw new Error(
|
|
623
|
+
`getStarterChainWithGrounding: unknown archetype "${archetype}"`
|
|
624
|
+
);
|
|
625
|
+
}
|
|
626
|
+
return entries.map(copyEntry);
|
|
627
|
+
}
|
|
628
|
+
function getAllStarterChainsWithGrounding() {
|
|
629
|
+
const out = {};
|
|
630
|
+
for (const [archetype, entries] of Object.entries(STARTER_CHAINS_GROUNDED)) {
|
|
631
|
+
out[archetype] = entries.map(copyEntry);
|
|
632
|
+
}
|
|
633
|
+
return out;
|
|
634
|
+
}
|
|
635
|
+
function getSequentialStarterChainWithGrounding(archetype) {
|
|
636
|
+
const overlay = STARTER_CHAINS_BY_MODE_GROUNDED[archetype]?.sequential;
|
|
637
|
+
return overlay ? overlay.map(copyEntry) : void 0;
|
|
638
|
+
}
|
|
639
|
+
function ensureCrossProviderTail(opts) {
|
|
640
|
+
const { chain, archetype, apiKeys, envSource } = opts;
|
|
641
|
+
if (chain.length < 1) return { chain };
|
|
642
|
+
const providers = /* @__PURE__ */ new Set();
|
|
643
|
+
for (const t of chain) {
|
|
644
|
+
const p = tryGetProfile(t);
|
|
645
|
+
if (p) providers.add(p.provider);
|
|
646
|
+
}
|
|
647
|
+
if (providers.size >= 2) return { chain };
|
|
648
|
+
const existingProvider = providers.values().next().value;
|
|
649
|
+
if (!existingProvider) return { chain };
|
|
650
|
+
const allChains = loadChainsFromBrain();
|
|
651
|
+
const fullChain = allChains[archetype];
|
|
652
|
+
if (!fullChain) return { chain };
|
|
653
|
+
for (const candidate of fullChain) {
|
|
654
|
+
if (chain.includes(candidate)) continue;
|
|
655
|
+
const cp = tryGetProfile(candidate);
|
|
656
|
+
if (!cp || cp.provider === existingProvider) continue;
|
|
657
|
+
if (!isModelReachable(candidate, { apiKeys, envSource })) continue;
|
|
658
|
+
return { chain: [...chain, candidate], appended: candidate };
|
|
659
|
+
}
|
|
660
|
+
return { chain };
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
// src/chains-brain.ts
|
|
664
|
+
function isChainsRow(x) {
|
|
665
|
+
if (!x || typeof x !== "object") return false;
|
|
666
|
+
const r = x;
|
|
667
|
+
return typeof r.archetype === "string" && typeof r.tier === "number" && typeof r.model_id === "string";
|
|
668
|
+
}
|
|
669
|
+
function mapRowsToChains(rows) {
|
|
670
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
671
|
+
for (const row of rows) {
|
|
672
|
+
if (!isChainsRow(row)) continue;
|
|
673
|
+
const list = grouped.get(row.archetype) ?? [];
|
|
674
|
+
list.push(row);
|
|
675
|
+
grouped.set(row.archetype, list);
|
|
676
|
+
}
|
|
677
|
+
const out = {};
|
|
678
|
+
for (const [archetype, group] of grouped.entries()) {
|
|
679
|
+
group.sort((a, b) => a.tier - b.tier);
|
|
680
|
+
out[archetype] = group.map((r) => r.model_id);
|
|
681
|
+
}
|
|
682
|
+
const bundled = getAllStarterChains();
|
|
683
|
+
for (const archetype of Object.keys(bundled)) {
|
|
684
|
+
if (!out[archetype]) out[archetype] = bundled[archetype];
|
|
685
|
+
}
|
|
686
|
+
return out;
|
|
687
|
+
}
|
|
688
|
+
var loadChainsFromBrain = createBrainQueryCache({
|
|
689
|
+
table: "kgauto_chains",
|
|
690
|
+
mapRows: mapRowsToChains,
|
|
691
|
+
bundledFallback: getAllStarterChains
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
export {
|
|
695
|
+
configureBrainQuery,
|
|
696
|
+
createBrainQueryCache,
|
|
697
|
+
isBrainQueryActiveFor,
|
|
698
|
+
getPerAxisMetrics,
|
|
699
|
+
ARCHETYPE_FLOOR_DEFAULT,
|
|
700
|
+
ABSOLUTE_FLOOR,
|
|
701
|
+
getModelCompatibility,
|
|
702
|
+
PROVIDER_ENV_KEYS,
|
|
703
|
+
resolveProviderKey,
|
|
704
|
+
isProviderReachable,
|
|
705
|
+
isModelReachable,
|
|
706
|
+
getReachabilityDiagnostic,
|
|
707
|
+
readBrainReadEnv,
|
|
708
|
+
isSameModelRetryEnabledFromEnv,
|
|
709
|
+
loadChainsFromBrain,
|
|
710
|
+
getDefaultFallbackChain,
|
|
711
|
+
getStarterChain,
|
|
712
|
+
getAllStarterChains,
|
|
713
|
+
getSequentialStarterChain,
|
|
714
|
+
getDefaultFallbackChainWithGrounding,
|
|
715
|
+
getStarterChainWithGrounding,
|
|
716
|
+
getAllStarterChainsWithGrounding,
|
|
717
|
+
getSequentialStarterChainWithGrounding,
|
|
718
|
+
ensureCrossProviderTail
|
|
719
|
+
};
|