@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/cron.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './run-TMdc7gmo.cjs';
|
|
2
|
-
export { K as Cron } from './cron-
|
|
2
|
+
export { K as Cron } from './cron-CpxLdAXc.cjs';
|
package/dist/cron.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './run-TMdc7gmo.js';
|
|
2
|
-
export { K as Cron } from './cron-
|
|
2
|
+
export { K as Cron } from './cron-CL_9nfhQ.js';
|
package/dist/cron.js
CHANGED
|
@@ -10977,7 +10977,7 @@ function parseHermesParams(inner) {
|
|
|
10977
10977
|
const key = param[1];
|
|
10978
10978
|
const value = param[2];
|
|
10979
10979
|
if (key === void 0 || value === void 0) continue;
|
|
10980
|
-
input[key.trim()] = value;
|
|
10980
|
+
input[key.trim()] = value.trim();
|
|
10981
10981
|
}
|
|
10982
10982
|
return input;
|
|
10983
10983
|
}
|
|
@@ -10993,6 +10993,14 @@ var OpenAIClient = class {
|
|
|
10993
10993
|
name = "openai";
|
|
10994
10994
|
baseUrl;
|
|
10995
10995
|
fetchImpl;
|
|
10996
|
+
/**
|
|
10997
|
+
* Whether this client recovers leaked Hermes tool-call dialect from assistant
|
|
10998
|
+
* text (theokit#58 follow-up). Observability for the route→client wiring of
|
|
10999
|
+
* `extractToolCallsFromContent`. @internal
|
|
11000
|
+
*/
|
|
11001
|
+
get recoversLeakedToolCalls() {
|
|
11002
|
+
return this.options.extractToolCallsFromContent ?? false;
|
|
11003
|
+
}
|
|
10996
11004
|
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: HTTP+SSE handshake + accumulator is intentionally one block
|
|
10997
11005
|
async *stream(request, signal) {
|
|
10998
11006
|
const headers = {
|
|
@@ -11643,8 +11651,9 @@ function buildChain(options) {
|
|
|
11643
11651
|
return clients;
|
|
11644
11652
|
}
|
|
11645
11653
|
function buildClient(name, routerOptions) {
|
|
11646
|
-
const
|
|
11647
|
-
if (
|
|
11654
|
+
const baseProfile = getProviderProfile(name);
|
|
11655
|
+
if (baseProfile === void 0) return void 0;
|
|
11656
|
+
const profile = routerOptions.extractToolCallsFromContent === true && baseProfile.extractToolCallsFromContent !== true ? { ...baseProfile, extractToolCallsFromContent: true } : baseProfile;
|
|
11648
11657
|
const ambient = currentCredentialPool(name);
|
|
11649
11658
|
if (ambient !== void 0) {
|
|
11650
11659
|
return new PoolAwareLlmClient(ambient, (apiKey) => selectTransport(profile, apiKey));
|
|
@@ -12045,11 +12054,13 @@ function buildLoopInputs(options, runId, userText) {
|
|
|
12045
12054
|
const fallback = options.agentOptions.providers?.fallback;
|
|
12046
12055
|
const apiKeys = options.agentOptions.providers?.apiKeys;
|
|
12047
12056
|
const credentialPoolStrategy = options.agentOptions.providers?.credentialPoolStrategy;
|
|
12057
|
+
const extractToolCallsFromContent = options.agentOptions.providers?.routes?.[0]?.extractToolCallsFromContent;
|
|
12048
12058
|
const chain = resolveProviderChain({
|
|
12049
12059
|
primary,
|
|
12050
12060
|
...fallback !== void 0 ? { fallback } : {},
|
|
12051
12061
|
...apiKeys !== void 0 ? { apiKeys } : {},
|
|
12052
|
-
...credentialPoolStrategy !== void 0 ? { credentialPoolStrategy } : {}
|
|
12062
|
+
...credentialPoolStrategy !== void 0 ? { credentialPoolStrategy } : {},
|
|
12063
|
+
...extractToolCallsFromContent === true ? { extractToolCallsFromContent: true } : {}
|
|
12053
12064
|
});
|
|
12054
12065
|
const llm = chain.length === 1 ? chain[0] : new FallbackLlmClient(chain);
|
|
12055
12066
|
return {
|