@theokit/sdk 4.51.1 → 4.52.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 +44 -0
- package/dist/{agent-QWNWBCQZ.js → agent-RDHK6MVT.js} +6 -5
- package/dist/{agent-QWNWBCQZ.js.map → agent-RDHK6MVT.js.map} +1 -1
- package/dist/{agent-2KSLHB6B.cjs → agent-U2R2R5JP.cjs} +7 -6
- package/dist/{agent-2KSLHB6B.cjs.map → agent-U2R2R5JP.cjs.map} +1 -1
- package/dist/auth/index.cjs +5 -0
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +15 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/index.js.map +1 -1
- package/dist/{chunk-DRRSUUI5.js → chunk-42PLABFU.js} +3 -3
- package/dist/{chunk-DRRSUUI5.js.map → chunk-42PLABFU.js.map} +1 -1
- package/dist/{chunk-XI4L45SS.cjs → chunk-6GS7JI64.cjs} +43 -43
- package/dist/{chunk-XI4L45SS.cjs.map → chunk-6GS7JI64.cjs.map} +1 -1
- package/dist/{chunk-3BKWFISQ.cjs → chunk-CY7MIMI4.cjs} +3 -3
- package/dist/{chunk-3BKWFISQ.cjs.map → chunk-CY7MIMI4.cjs.map} +1 -1
- package/dist/chunk-FRITRLZQ.cjs +24 -0
- package/dist/chunk-FRITRLZQ.cjs.map +1 -0
- package/dist/{chunk-BVT6LFQ3.js → chunk-GNPI5IWZ.js} +3 -3
- package/dist/{chunk-BVT6LFQ3.js.map → chunk-GNPI5IWZ.js.map} +1 -1
- package/dist/{chunk-6CSIUJ5W.js → chunk-KELIQH7K.js} +6 -6
- package/dist/{chunk-6CSIUJ5W.js.map → chunk-KELIQH7K.js.map} +1 -1
- package/dist/{chunk-QVIUICFM.js → chunk-M5EK7N6R.js} +6 -14
- package/dist/chunk-M5EK7N6R.js.map +1 -0
- package/dist/chunk-NAF4L3T6.js +22 -0
- package/dist/chunk-NAF4L3T6.js.map +1 -0
- package/dist/{chunk-N6NUMXAJ.cjs → chunk-WLESQ3ZQ.cjs} +8 -16
- package/dist/chunk-WLESQ3ZQ.cjs.map +1 -0
- package/dist/{chunk-2S7IB4O3.cjs → chunk-ZNEE4WWQ.cjs} +5 -5
- package/dist/{chunk-2S7IB4O3.cjs.map → chunk-ZNEE4WWQ.cjs.map} +1 -1
- package/dist/{compact-session-AAFICMPQ.cjs → compact-session-FBVWO6B3.cjs} +12 -11
- package/dist/{compact-session-AAFICMPQ.cjs.map → compact-session-FBVWO6B3.cjs.map} +1 -1
- package/dist/{compact-session-LR73ESZX.js → compact-session-XLXC2CZN.js} +4 -3
- package/dist/{compact-session-LR73ESZX.js.map → compact-session-XLXC2CZN.js.map} +1 -1
- package/dist/cron.cjs +6 -5
- package/dist/cron.js +5 -4
- package/dist/eval.cjs +5 -4
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +4 -3
- package/dist/eval.js.map +1 -1
- package/dist/index.cjs +28 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-KOGUD6KM.cjs → inject-session-UBAQ7I3G.cjs} +4 -4
- package/dist/{inject-session-KOGUD6KM.cjs.map → inject-session-UBAQ7I3G.cjs.map} +1 -1
- package/dist/{inject-session-6ZAFN7F7.js → inject-session-UEH5MAKU.js} +3 -3
- package/dist/{inject-session-6ZAFN7F7.js.map → inject-session-UEH5MAKU.js.map} +1 -1
- package/dist/internal/auth/api-key-prefix.d.ts +23 -0
- package/package.json +1 -1
- package/dist/chunk-N6NUMXAJ.cjs.map +0 -1
- package/dist/chunk-QVIUICFM.js.map +0 -1
|
@@ -2,6 +2,7 @@ import { invalidateSessionCache } from './chunk-4QEC4CCS.js';
|
|
|
2
2
|
import { currentCredentialPool, computeBackoffMs, sleepWithAbort, newPooledCredential, CredentialPool } from './chunk-DHVNJYTO.js';
|
|
3
3
|
import { buildErrorMetadata, mapOpenAICompatibleError } from './chunk-OZXPA3ME.js';
|
|
4
4
|
import { tryJson, isPlainObject, sanitizeToolInput } from './chunk-U54XCYG3.js';
|
|
5
|
+
import { providerFromApiKeyPrefix } from './chunk-NAF4L3T6.js';
|
|
5
6
|
import { reconstructMessages, SessionTranscript } from './chunk-C4EU627W.js';
|
|
6
7
|
import { estimateTokens } from './chunk-KIX45IKP.js';
|
|
7
8
|
import { globalSingleton, registerProvider, registerBuiltins, getProviderProfile, inferModelDialect, inferRegionFromModelId, stripBedrockPrefix, resolveBedrockBaseUrl, resolveVertexBaseUrl, stripVertexPrefix } from './chunk-V2EJLKGA.js';
|
|
@@ -2765,18 +2766,9 @@ function selectTransport(profile, apiKey) {
|
|
|
2765
2766
|
|
|
2766
2767
|
// src/internal/local-agent/real-local-run-provider.ts
|
|
2767
2768
|
function inferProviderFromApiKey(apiKey) {
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
{ provider: "anthropic", prefix: "sk-ant-" },
|
|
2772
|
-
{ provider: "openai", prefix: "sk-" }
|
|
2773
|
-
];
|
|
2774
|
-
for (const { provider, prefix } of byPrefix) {
|
|
2775
|
-
if (apiKey.startsWith(prefix) && getProviderProfile(provider) !== void 0) {
|
|
2776
|
-
return provider;
|
|
2777
|
-
}
|
|
2778
|
-
}
|
|
2779
|
-
return void 0;
|
|
2769
|
+
const provider = providerFromApiKeyPrefix(apiKey);
|
|
2770
|
+
if (provider === void 0) return void 0;
|
|
2771
|
+
return getProviderProfile(provider) === void 0 ? void 0 : provider;
|
|
2780
2772
|
}
|
|
2781
2773
|
function detectPrimaryProvider() {
|
|
2782
2774
|
if (process.env.ANTHROPIC_API_KEY !== void 0 && process.env.ANTHROPIC_API_KEY.length > 0) {
|
|
@@ -3040,5 +3032,5 @@ async function autoCompactIfNeeded(opts) {
|
|
|
3040
3032
|
}
|
|
3041
3033
|
|
|
3042
3034
|
export { COMPACT_SUMMARY_MARKER, COMPACT_USER_MESSAGE_MAX_TOKENS, CircuitBreaker, autoCompactIfNeeded, buildDefaultSummarizer, compactSessionTranscript, detectPrimaryProvider, discoverProviderPlugins, getConfiguredBaseUrl, httpRequest, inferProviderFromApiKey, isCompactSummary, isFixtureApiKey, mapOllamaHttpError, mapOllamaTransportError, parseSseStream, readErrorResponseBody, relayStream, renderToolResultContentText, resolveProviderChain, resolveSummarizerRoute, shouldAutoCompact, shouldUseFixtureMode, shouldUseRealLocalRuntime, tryFirstEvent };
|
|
3043
|
-
//# sourceMappingURL=chunk-
|
|
3044
|
-
//# sourceMappingURL=chunk-
|
|
3035
|
+
//# sourceMappingURL=chunk-M5EK7N6R.js.map
|
|
3036
|
+
//# sourceMappingURL=chunk-M5EK7N6R.js.map
|