@theokit/sdk 2.12.0 → 2.13.1
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/CHANGELOG.md +12 -0
- package/dist/a2a/index.cjs +15 -4
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +15 -4
- package/dist/a2a/index.js.map +1 -1
- package/dist/{cron-BchPdvs2.d.ts → cron-CL_9nfhQ.d.ts} +11 -0
- package/dist/{cron-Dv94Lgat.d.cts → cron-CpxLdAXc.d.cts} +11 -0
- package/dist/cron.cjs +15 -4
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +1 -1
- package/dist/cron.d.ts +1 -1
- package/dist/cron.js +15 -4
- package/dist/cron.js.map +1 -1
- package/dist/eval.cjs +15 -4
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +15 -4
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +15 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/llm/router.d.ts +8 -0
- package/dist/types/providers.d.ts +11 -0
- package/package.json +1 -1
package/dist/a2a/index.js
CHANGED
|
@@ -10116,7 +10116,7 @@ function parseHermesParams(inner) {
|
|
|
10116
10116
|
const key = param[1];
|
|
10117
10117
|
const value = param[2];
|
|
10118
10118
|
if (key === void 0 || value === void 0) continue;
|
|
10119
|
-
input[key.trim()] = value;
|
|
10119
|
+
input[key.trim()] = value.trim();
|
|
10120
10120
|
}
|
|
10121
10121
|
return input;
|
|
10122
10122
|
}
|
|
@@ -10252,6 +10252,14 @@ var init_openai2 = __esm({
|
|
|
10252
10252
|
name = "openai";
|
|
10253
10253
|
baseUrl;
|
|
10254
10254
|
fetchImpl;
|
|
10255
|
+
/**
|
|
10256
|
+
* Whether this client recovers leaked Hermes tool-call dialect from assistant
|
|
10257
|
+
* text (theokit#58 follow-up). Observability for the route→client wiring of
|
|
10258
|
+
* `extractToolCallsFromContent`. @internal
|
|
10259
|
+
*/
|
|
10260
|
+
get recoversLeakedToolCalls() {
|
|
10261
|
+
return this.options.extractToolCallsFromContent ?? false;
|
|
10262
|
+
}
|
|
10255
10263
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: HTTP+SSE handshake + accumulator is intentionally one block
|
|
10256
10264
|
async *stream(request, signal) {
|
|
10257
10265
|
const headers = {
|
|
@@ -10837,8 +10845,9 @@ function buildChain(options) {
|
|
|
10837
10845
|
return clients;
|
|
10838
10846
|
}
|
|
10839
10847
|
function buildClient(name, routerOptions) {
|
|
10840
|
-
const
|
|
10841
|
-
if (
|
|
10848
|
+
const baseProfile = getProviderProfile(name);
|
|
10849
|
+
if (baseProfile === void 0) return void 0;
|
|
10850
|
+
const profile = routerOptions.extractToolCallsFromContent === true && baseProfile.extractToolCallsFromContent !== true ? { ...baseProfile, extractToolCallsFromContent: true } : baseProfile;
|
|
10842
10851
|
const ambient = currentCredentialPool(name);
|
|
10843
10852
|
if (ambient !== void 0) {
|
|
10844
10853
|
return new PoolAwareLlmClient(ambient, (apiKey) => selectTransport(profile, apiKey));
|
|
@@ -11267,11 +11276,13 @@ function buildLoopInputs(options, runId, userText) {
|
|
|
11267
11276
|
const fallback = options.agentOptions.providers?.fallback;
|
|
11268
11277
|
const apiKeys = options.agentOptions.providers?.apiKeys;
|
|
11269
11278
|
const credentialPoolStrategy = options.agentOptions.providers?.credentialPoolStrategy;
|
|
11279
|
+
const extractToolCallsFromContent = options.agentOptions.providers?.routes?.[0]?.extractToolCallsFromContent;
|
|
11270
11280
|
const chain = resolveProviderChain({
|
|
11271
11281
|
primary,
|
|
11272
11282
|
...fallback !== void 0 ? { fallback } : {},
|
|
11273
11283
|
...apiKeys !== void 0 ? { apiKeys } : {},
|
|
11274
|
-
...credentialPoolStrategy !== void 0 ? { credentialPoolStrategy } : {}
|
|
11284
|
+
...credentialPoolStrategy !== void 0 ? { credentialPoolStrategy } : {},
|
|
11285
|
+
...extractToolCallsFromContent === true ? { extractToolCallsFromContent: true } : {}
|
|
11275
11286
|
});
|
|
11276
11287
|
const llm = chain.length === 1 ? chain[0] : new FallbackLlmClient(chain);
|
|
11277
11288
|
return {
|