@omnicross/core 0.1.1 → 0.1.3
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/ApiConverter.cjs +3 -778
- package/dist/ApiConverter.js +12 -751
- package/dist/{CompletionService-DtOF_War.d.cts → CompletionService-D3a47vdU.d.cts} +2 -1
- package/dist/{CompletionService-7fCmKAP3.d.ts → CompletionService-DdWaAxq0.d.ts} +2 -1
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +32 -60
- package/dist/auth/GeminiCodeAssistProjectResolver.js +11 -10
- package/dist/builtin-web-fetch-77JZUZGM.cjs +100 -0
- package/dist/builtin-web-fetch-IGLBX2XY.js +100 -0
- package/dist/chunk-2DCNB7DF.cjs +514 -0
- package/dist/chunk-2FMI2B6V.cjs +6196 -0
- package/dist/chunk-3OPYJG76.cjs +266 -0
- package/dist/chunk-3QOSDDNI.cjs +130 -0
- package/dist/chunk-46RLHI7D.js +0 -0
- package/dist/chunk-46ZIFWYG.cjs +277 -0
- package/dist/chunk-4DECIFU7.js +6196 -0
- package/dist/chunk-4IH4EL7M.cjs +9 -0
- package/dist/chunk-4VAVYUZS.cjs +991 -0
- package/dist/chunk-5ENKBSWO.js +311 -0
- package/dist/chunk-5ERIZW3D.js +44 -0
- package/dist/chunk-5HTVET6E.js +514 -0
- package/dist/chunk-5ZQBEOMD.js +764 -0
- package/dist/chunk-6RPZADX3.cjs +92 -0
- package/dist/chunk-7VU7V2E4.js +0 -0
- package/dist/chunk-7YN22L2H.cjs +87 -0
- package/dist/chunk-A2YMUCBT.cjs +105 -0
- package/dist/chunk-AEOZIDEB.cjs +32 -0
- package/dist/chunk-AQ5TNQB7.js +13 -0
- package/dist/chunk-AVYJ4YBN.js +58 -0
- package/dist/chunk-BO4RFWBR.js +89 -0
- package/dist/chunk-C72S6TTV.cjs +49 -0
- package/dist/chunk-C7PSERMH.js +87 -0
- package/dist/chunk-CDHS2QDC.js +179 -0
- package/dist/chunk-CWM2ZDU5.js +130 -0
- package/dist/chunk-CZHZGRU7.js +383 -0
- package/dist/chunk-DK4A7DLE.js +266 -0
- package/dist/chunk-DQ5VAYZ6.cjs +42 -0
- package/dist/chunk-DRWHTIIZ.js +13 -0
- package/dist/chunk-DWKQZ2SK.cjs +254 -0
- package/dist/chunk-EYZYXJTJ.cjs +1 -0
- package/dist/chunk-FFALUUZZ.cjs +235 -0
- package/dist/chunk-FMOBD2OQ.js +39 -0
- package/dist/chunk-FTQ7IQUC.js +991 -0
- package/dist/chunk-FZ46M34D.cjs +1 -0
- package/dist/chunk-G2UTNSGU.js +277 -0
- package/dist/chunk-GBHYAGX3.cjs +26 -0
- package/dist/chunk-GMMT7RVN.cjs +39 -0
- package/dist/chunk-H5JUT3KV.js +105 -0
- package/dist/chunk-HQP3K7PU.cjs +431 -0
- package/dist/chunk-HUZZZ3JL.js +32 -0
- package/dist/chunk-IAXWICZU.js +69 -0
- package/dist/chunk-JMJBSACD.cjs +147 -0
- package/dist/chunk-JO5NLTLY.js +46 -0
- package/dist/chunk-JWC6APFQ.js +23 -0
- package/dist/chunk-KUU2RNG6.cjs +46 -0
- package/dist/chunk-L74VDN4A.cjs +32 -0
- package/dist/chunk-MQNDWYPN.js +235 -0
- package/dist/chunk-MZNPGW5Q.js +26 -0
- package/dist/chunk-N5QFKSDO.js +56 -0
- package/dist/chunk-NYUNU75A.cjs +44 -0
- package/dist/chunk-NZYN7C3P.cjs +179 -0
- package/dist/chunk-Q27JY5RG.cjs +126 -0
- package/dist/chunk-QBZJ7P2T.cjs +13 -0
- package/dist/chunk-QWBWGODS.cjs +69 -0
- package/dist/chunk-QXD4MV2X.cjs +23 -0
- package/dist/chunk-R3HK6R4B.cjs +13 -0
- package/dist/chunk-RPII3E6Z.cjs +145 -0
- package/dist/chunk-RSJ3TWJQ.cjs +186 -0
- package/dist/chunk-S4WBV25P.js +913 -0
- package/dist/chunk-S6JGLF3G.cjs +89 -0
- package/dist/chunk-SUEGJ75D.cjs +764 -0
- package/dist/chunk-SVNDB62D.cjs +58 -0
- package/dist/chunk-SVXC36MU.cjs +383 -0
- package/dist/chunk-TKJMZBAH.js +32 -0
- package/dist/chunk-UBWEBKRC.js +42 -0
- package/dist/chunk-UNEFIWXI.cjs +32 -0
- package/dist/chunk-VQY5W4YW.cjs +311 -0
- package/dist/chunk-VVEHS2LI.js +431 -0
- package/dist/chunk-WNY4WMRF.js +32 -0
- package/dist/chunk-XEKD23J5.js +9 -0
- package/dist/chunk-XTEI64OU.js +145 -0
- package/dist/chunk-XX6NQJMA.js +92 -0
- package/dist/chunk-Y6OM7EV7.cjs +56 -0
- package/dist/chunk-Y7FO65VT.js +147 -0
- package/dist/chunk-YGXJGRFI.cjs +913 -0
- package/dist/chunk-YMFAJFQT.cjs +173 -0
- package/dist/chunk-Z7LUNECE.js +49 -0
- package/dist/chunk-Z7Y2NPHY.js +186 -0
- package/dist/chunk-ZJZAOKI7.js +254 -0
- package/dist/chunk-ZLX3KGXX.js +173 -0
- package/dist/chunk-ZY6KU6P3.js +126 -0
- package/dist/completion/ApiKeyPoolService.cjs +23 -48
- package/dist/completion/ApiKeyPoolService.d.cts +150 -2
- package/dist/completion/ApiKeyPoolService.d.ts +150 -2
- package/dist/completion/BuiltinToolExecutor.cjs +9 -324
- package/dist/completion/BuiltinToolExecutor.js +6 -290
- package/dist/completion/CompletionService.cjs +45 -3487
- package/dist/completion/CompletionService.d.cts +3 -2
- package/dist/completion/CompletionService.d.ts +3 -2
- package/dist/completion/CompletionService.js +41 -3457
- package/dist/completion/NativeSearchInjector.cjs +8 -192
- package/dist/completion/NativeSearchInjector.js +7 -162
- package/dist/completion/ProviderSearchInjector.cjs +12 -39
- package/dist/completion/native-search-types.cjs +13 -66
- package/dist/completion/native-search-types.js +7 -31
- package/dist/completion/openrouter-headers.cjs +12 -71
- package/dist/completion/openrouter-headers.d.cts +9 -12
- package/dist/completion/openrouter-headers.d.ts +9 -12
- package/dist/completion/openrouter-headers.js +7 -36
- package/dist/completion/openrouter-models.cjs +11 -67
- package/dist/completion/openrouter-models.js +5 -34
- package/dist/completion/types.cjs +1 -18
- package/dist/completion/url-builder.cjs +24 -138
- package/dist/completion/url-builder.js +12 -92
- package/dist/completion.cjs +62 -3989
- package/dist/completion.d.cts +3 -2
- package/dist/completion.d.ts +3 -2
- package/dist/completion.js +70 -3953
- package/dist/index.cjs +319 -10429
- package/dist/index.d.cts +49 -12
- package/dist/index.d.ts +49 -12
- package/dist/index.js +248 -10269
- package/dist/logger-4GvQNzhE.d.cts +22 -0
- package/dist/logger-4GvQNzhE.d.ts +22 -0
- package/dist/outbound-api/routeResolver.cjs +10 -217
- package/dist/outbound-api/routeResolver.d.cts +10 -3
- package/dist/outbound-api/routeResolver.d.ts +10 -3
- package/dist/outbound-api/routeResolver.js +9 -187
- package/dist/outbound-api/subscriptionRegistryPort.cjs +7 -37
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +2 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +2 -1
- package/dist/outbound-api/subscriptionRegistryPort.js +4 -8
- package/dist/outbound-api/types.cjs +5 -17
- package/dist/outbound-api/types.d.cts +12 -144
- package/dist/outbound-api/types.d.ts +12 -144
- package/dist/outbound-api/types.js +6 -0
- package/dist/outbound-api.cjs +197 -5265
- package/dist/outbound-api.d.cts +787 -25
- package/dist/outbound-api.d.ts +787 -25
- package/dist/outbound-api.js +173 -5195
- package/dist/pipeline/AuthSource.cjs +1 -18
- package/dist/pipeline/AuthSource.d.cts +23 -1
- package/dist/pipeline/AuthSource.d.ts +23 -1
- package/dist/pipeline/LlmConfigProviderAuth.cjs +5 -166
- package/dist/pipeline/LlmConfigProviderAuth.d.cts +2 -1
- package/dist/pipeline/LlmConfigProviderAuth.d.ts +2 -1
- package/dist/pipeline/LlmConfigProviderAuth.js +5 -139
- package/dist/pipeline/SubscriptionAccountHealth.cjs +22 -0
- package/dist/pipeline/SubscriptionAccountHealth.d.cts +235 -0
- package/dist/pipeline/SubscriptionAccountHealth.d.ts +235 -0
- package/dist/pipeline/SubscriptionAccountHealth.js +22 -0
- package/dist/pipeline/SubscriptionAuthSource.cjs +6 -128
- package/dist/pipeline/SubscriptionAuthSource.d.cts +3 -2
- package/dist/pipeline/SubscriptionAuthSource.d.ts +3 -2
- package/dist/pipeline/SubscriptionAuthSource.js +5 -99
- package/dist/pipeline/SubscriptionAuthStrategy.cjs +1 -18
- package/dist/pipeline/SubscriptionAuthStrategy.d.cts +24 -1
- package/dist/pipeline/SubscriptionAuthStrategy.d.ts +24 -1
- package/dist/pipeline/auditSink.cjs +14 -0
- package/dist/pipeline/auditSink.d.cts +48 -0
- package/dist/pipeline/auditSink.d.ts +48 -0
- package/dist/pipeline/auditSink.js +14 -0
- package/dist/pipeline/billingEmit.cjs +14 -0
- package/dist/pipeline/billingEmit.d.cts +49 -0
- package/dist/pipeline/billingEmit.d.ts +49 -0
- package/dist/pipeline/billingEmit.js +14 -0
- package/dist/pipeline/executeProviderCall.cjs +5 -69
- package/dist/pipeline/executeProviderCall.js +3 -42
- package/dist/pipeline/resolveProviderChain.cjs +5 -46
- package/dist/pipeline/resolveProviderChain.js +3 -19
- package/dist/pipeline/resolveSubscriptionChain.cjs +5 -67
- package/dist/pipeline/resolveSubscriptionChain.js +3 -40
- package/dist/ports/gemini-code-assist-resolver.cjs +7 -37
- package/dist/ports/gemini-code-assist-resolver.js +4 -8
- package/dist/ports/pricing-store.cjs +1 -0
- package/dist/ports/pricing-store.d.cts +50 -0
- package/dist/ports/pricing-store.d.ts +50 -0
- package/dist/ports/pricing-store.js +0 -0
- package/dist/ports/provider-config-source.cjs +1 -18
- package/dist/ports/usage-event-store.cjs +1 -0
- package/dist/ports/usage-event-store.d.cts +54 -0
- package/dist/ports/usage-event-store.d.ts +54 -0
- package/dist/ports/usage-event-store.js +0 -0
- package/dist/ports/web-search-backend.cjs +1 -18
- package/dist/ports.cjs +1 -18
- package/dist/ports.d.cts +13 -2
- package/dist/ports.d.ts +13 -2
- package/dist/provider-proxy/ProviderProxy.cjs +47 -4643
- package/dist/provider-proxy/ProviderProxy.d.cts +2 -1
- package/dist/provider-proxy/ProviderProxy.d.ts +2 -1
- package/dist/provider-proxy/ProviderProxy.js +42 -4613
- package/dist/provider-proxy/identity/SubscriptionIdentityStore.cjs +15 -0
- package/dist/provider-proxy/identity/SubscriptionIdentityStore.d.cts +121 -0
- package/dist/provider-proxy/identity/SubscriptionIdentityStore.d.ts +121 -0
- package/dist/provider-proxy/identity/SubscriptionIdentityStore.js +15 -0
- package/dist/provider-proxy/identity/fingerprintHeaders.cjs +20 -0
- package/dist/provider-proxy/identity/fingerprintHeaders.d.cts +89 -0
- package/dist/provider-proxy/identity/fingerprintHeaders.d.ts +89 -0
- package/dist/provider-proxy/identity/fingerprintHeaders.js +20 -0
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +42 -2941
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +13 -3
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +13 -3
- package/dist/provider-proxy/ingress/providerProxyShared.js +48 -2914
- package/dist/provider-proxy/matchText.cjs +13 -72
- package/dist/provider-proxy/matchText.d.cts +14 -1
- package/dist/provider-proxy/matchText.d.ts +14 -1
- package/dist/provider-proxy/matchText.js +8 -39
- package/dist/provider-proxy/types.cjs +1 -18
- package/dist/provider-proxy/types.d.cts +25 -1
- package/dist/provider-proxy/types.d.ts +25 -1
- package/dist/provider-proxy.cjs +42 -4655
- package/dist/provider-proxy.d.cts +2 -1
- package/dist/provider-proxy.d.ts +2 -1
- package/dist/provider-proxy.js +46 -4628
- package/dist/{routeResolver-HE-ZO0fO.d.ts → routeResolver-B1NglTfe.d.ts} +36 -10
- package/dist/{routeResolver-BrbK6ja9.d.cts → routeResolver-CbG5uBgm.d.cts} +36 -10
- package/dist/serializeError.cjs +5 -81
- package/dist/serializeError.js +3 -54
- package/dist/sse-parser.cjs +7 -455
- package/dist/sse-parser.js +4 -426
- package/dist/transformer/TransformerChainExecutor.cjs +4 -318
- package/dist/transformer/TransformerChainExecutor.js +4 -291
- package/dist/transformer/TransformerService.cjs +5 -289
- package/dist/transformer/TransformerService.js +3 -262
- package/dist/transformer/anthropicBetaInject.cjs +7 -50
- package/dist/transformer/anthropicBetaInject.js +4 -21
- package/dist/transformer/transformers/AnthropicTransformer.cjs +3 -1014
- package/dist/transformer/transformers/AnthropicTransformer.js +3 -987
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.cjs +4 -1106
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.js +7 -1079
- package/dist/transformer/transformers/GeminiTransformer.cjs +4 -1010
- package/dist/transformer/transformers/GeminiTransformer.js +4 -983
- package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +3 -535
- package/dist/transformer/transformers/OpenAIResponseTransformer.js +3 -510
- package/dist/transformer/transformers/OpenCodeGoTransformer.cjs +5 -72
- package/dist/transformer/transformers/OpenCodeGoTransformer.js +3 -45
- package/dist/transformer/transformers/ReasoningTransformer.cjs +3 -270
- package/dist/transformer/transformers/ReasoningTransformer.js +2 -249
- package/dist/transformer/transformers.cjs +10 -3177
- package/dist/transformer/transformers.js +23 -3158
- package/dist/transformer/types.cjs +1 -18
- package/dist/transformer.cjs +13 -3726
- package/dist/transformer.js +17 -3706
- package/dist/types-6OUY_xfA.d.ts +830 -0
- package/dist/types-aBFFXoBz.d.cts +830 -0
- package/dist/usage/pricing-engine.cjs +6 -0
- package/dist/usage/pricing-engine.d.cts +83 -0
- package/dist/usage/pricing-engine.d.ts +83 -0
- package/dist/usage/pricing-engine.js +6 -0
- package/dist/usage/usage-recorder.cjs +6 -0
- package/dist/usage/usage-recorder.d.cts +91 -0
- package/dist/usage/usage-recorder.d.ts +91 -0
- package/dist/usage/usage-recorder.js +6 -0
- package/dist/usage.cjs +11 -0
- package/dist/usage.d.cts +8 -0
- package/dist/usage.d.ts +8 -0
- package/dist/usage.js +11 -0
- package/package.json +4 -2
- package/dist/ApiKeyPoolService-BmMkau07.d.cts +0 -170
- package/dist/ApiKeyPoolService-BmMkau07.d.ts +0 -170
package/dist/index.d.cts
CHANGED
|
@@ -3,35 +3,48 @@ export { SSEEvent, SSEFormat, SSEParserCallbacks, createSSEParser, streamSSEResp
|
|
|
3
3
|
export { A as AnthropicTool, B as BuiltinToolExecutor, G as GeminiTools, M as McpToolProvider, O as OpenAITool, g as getBuiltinSearchTools } from './BuiltinToolExecutor-CS2WpXhM.cjs';
|
|
4
4
|
import { LLMProvider } from '@omnicross/contracts/llm-config';
|
|
5
5
|
export { C as CorePaths, a as CoreUsageEvent, b as CoreUsageTokenCounts, U as UsageEventSink } from './usage-event-sink-BX7FE1NL.cjs';
|
|
6
|
-
export { L as Logger } from './
|
|
6
|
+
export { L as Logger } from './logger-4GvQNzhE.cjs';
|
|
7
|
+
export { PricingStore } from './ports/pricing-store.cjs';
|
|
7
8
|
export { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
9
|
+
export { UsageEventStore } from './ports/usage-event-store.cjs';
|
|
8
10
|
export { WebSearchBackend } from './ports/web-search-backend.cjs';
|
|
9
11
|
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.cjs';
|
|
10
|
-
export { EndpointRoutingConfig, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiKeyInfo, OutboundApiServerConfig, OutboundApiServerStatus,
|
|
12
|
+
export { A as AccountProbeConfig, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, K as KeyCostLimits, c as KeyExpiryInput, d as KeyExpiryResult, e as KeySpend, f as KeySpendReader, g as KeySpendSeeder, h as KeySpendTracker, i as KindMappedEndpoint, M as MessagesModelKind, j as ModelKind, k as ModelPrefixTargets, l as OutboundApiDeps, m as OutboundApiKeyCreated, n as OutboundApiKeyInfo, o as OutboundApiServerConfig, p as OutboundApiServerStatus, O as OutboundCredentialStore, q as OutboundEndpoint, r as OutboundFormatUrls, s as OutboundKeyActivationMode, O as OutboundKeyDb, t as OutboundKeyDbRow, u as OutboundKeyPolicy, v as OutboundProxyConfig, Q as QuotaDecision, R as RequestRole, w as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, x as VoucherDb, y as checkKeyQuota, z as computeKeyExpiry, B as computeVoucherGrant, D as generateVoucherCode, G as hashVoucherCode, H as newVoucherId, I as startOfLocalDay, J as startOfLocalWeek, L as toVoucherInfo, N as voucherCodePrefix } from './types-aBFFXoBz.cjs';
|
|
13
|
+
export { CostCalculation, PricingEngine, PricingEngineOptions } from './usage/pricing-engine.cjs';
|
|
14
|
+
export { UsageRecordInput, UsageRecorder, UsageRecorderOptions } from './usage/usage-recorder.cjs';
|
|
11
15
|
export { A as ApiFormat, C as CompletionOptions, a as CompletionResult, N as NATIVE_SEARCH_TOOL_NAMES, b as NativeSearchAugmentation, c as NativeSearchDetectionResult, d as NativeSearchProvider, e as NativeSearchUserConfig, S as StreamCallbacks } from './types-BScIHmPr.cjs';
|
|
12
|
-
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-
|
|
16
|
+
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-D3a47vdU.cjs';
|
|
13
17
|
export { SimpleChatGeminiMessage, SimpleChatGeminiPart, StreamEvent, StreamEventType, StreamSender, addOpenRouterProviderToRequest, attachStreamEventBuffer, convertMessageToAnthropic, convertMessageToGemini, convertMessageToOpenAI, emitStreamEvent, getOpenRouterProviderConfig, getProviderHeaders, registerStreamEventBuffer, releaseStreamEventBuffer } from './completion.cjs';
|
|
14
18
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.cjs';
|
|
15
19
|
export { applyAugmentation, buildNativeSearchAugmentation, detectNativeSearch } from './completion/NativeSearchInjector.cjs';
|
|
16
20
|
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.cjs';
|
|
17
|
-
export { ApiServerSettingsStore, ApplyConfigInput, DEFAULT_OUTBOUND_PORT, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiServer, OutboundRateLimiter, __resetOutboundApiServerForTests, createNamedKey, defaultServerConfig, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, hashKey, loadServerConfig, mergeServerConfig, normalizeServerConfig, saveServerConfig, verifyPresentedKey } from './outbound-api.cjs';
|
|
21
|
+
export { AUDIT_REDACTED, ApiServerSettingsStore, ApplyConfigInput, AuditCaptureContext, BillingCaptureContext, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, beginAuditCapture, beginBillingCapture, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, redactAuditText, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.cjs';
|
|
18
22
|
export { convertAnthropicRequestToOpenAI, convertAnthropicStreamToOpenAI, convertAnthropicToOpenAI, convertAnthropicToOpenAIWithThinking, convertOpenAIResponseToAnthropic, convertOpenAIStreamToAnthropic, convertOpenAIToAnthropic, convertOpenAIToAnthropicWithThinking, hasImageContent, hasThinkingEnabled } from './ApiConverter.cjs';
|
|
19
23
|
export { ChainExecutionOptions, TransformerChainExecutor } from './transformer/TransformerChainExecutor.cjs';
|
|
20
24
|
export { TransformerService } from './transformer/TransformerService.cjs';
|
|
21
25
|
export { registerBuiltinTransformers } from './transformer/transformers.cjs';
|
|
22
26
|
export { Annotation, ImageContent, MessageContent, ModelRoute, ModelTransformerConfig, ReasoningConfig, RequestConfig, RequestRouteInfo, ResolvedTransformerChain, StreamChunk, TextContent, ThinkLevel, ThinkingContent, ToolCall, ToolChoice, ToolParameterSchema, TransformRequestResult, Transformer, TransformerChainConfig, TransformerConfigEntry, TransformerConstructor, TransformerContext, TransformerLogger, TransformerOptions, TransformerReference, TransformerServiceConfig, UnifiedChatRequest, UnifiedChatResponse, UnifiedMessage, UnifiedTool, UrlCitation } from './transformer/types.cjs';
|
|
23
27
|
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy-CnMQYN59.cjs';
|
|
24
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, r as resolveRoute } from './routeResolver-
|
|
28
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-CbG5uBgm.cjs';
|
|
25
29
|
import '@omnicross/contracts/message-blocks';
|
|
26
30
|
import '@omnicross/contracts/completion-types';
|
|
27
31
|
import '@omnicross/contracts/mcp-types';
|
|
32
|
+
import '@omnicross/contracts/pricing-types';
|
|
33
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
28
34
|
import '@omnicross/contracts/websearch-types';
|
|
29
35
|
import 'node:http';
|
|
30
36
|
import '@omnicross/contracts/subscription-types';
|
|
31
37
|
import '@omnicross/contracts/usage-types';
|
|
38
|
+
import './completion/ApiKeyPoolService.cjs';
|
|
32
39
|
import './pipeline/AuthSource.cjs';
|
|
33
40
|
import './pipeline/SubscriptionAuthSource.cjs';
|
|
34
41
|
import './pipeline/SubscriptionAuthStrategy.cjs';
|
|
42
|
+
import '@omnicross/contracts/account-tokens-types';
|
|
43
|
+
import '@omnicross/contracts/audit-types';
|
|
44
|
+
import '@omnicross/contracts/billing-types';
|
|
45
|
+
import '@omnicross/contracts/health-logging-types';
|
|
46
|
+
import '@omnicross/contracts/voucher-types';
|
|
47
|
+
import '@omnicross/contracts/webhook-types';
|
|
35
48
|
import '@omnicross/contracts/endpoint-resolver';
|
|
36
49
|
import './transformer/transformers/AnthropicTransformer.cjs';
|
|
37
50
|
import './transformer/transformers/GeminiCodeAssistTransformer.cjs';
|
|
@@ -54,12 +67,36 @@ import './transformer/transformers/ReasoningTransformer.cjs';
|
|
|
54
67
|
*/
|
|
55
68
|
declare function isOpenRouterProvider(provider: LLMProvider): boolean;
|
|
56
69
|
/**
|
|
57
|
-
* OpenRouter app attribution
|
|
58
|
-
*
|
|
70
|
+
* OpenRouter "app attribution" identity — the `HTTP-Referer` (the app's URL,
|
|
71
|
+
* the primary attribution key) and `X-Title` (the app's display name) that
|
|
72
|
+
* OpenRouter uses to attribute usage to an app on its public daily/weekly/
|
|
73
|
+
* monthly rankings. See https://openrouter.ai/docs/app-attribution
|
|
59
74
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
interface OpenRouterAppIdentity {
|
|
76
|
+
/** `HTTP-Referer` header — the app's URL. */
|
|
77
|
+
referer: string;
|
|
78
|
+
/** `X-Title` header — the app's display name on OpenRouter rankings. */
|
|
79
|
+
title: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The live OpenRouter app-attribution header set — the SINGLE source of truth
|
|
83
|
+
* for every OpenRouter request the serving core makes. Both the LLM path
|
|
84
|
+
* (`header-builder` / `TransformerHandler`) and the media path
|
|
85
|
+
* (`completion/openrouter-headers.ts` → `buildOpenRouterHeaders`) read this
|
|
86
|
+
* object. `setOpenRouterAppIdentity` mutates it in place; consumers spread it
|
|
87
|
+
* at request time, so a boot-time host override is reflected everywhere without
|
|
88
|
+
* re-importing.
|
|
89
|
+
*/
|
|
90
|
+
declare const OPENROUTER_APP_HEADERS: Record<string, string>;
|
|
91
|
+
/**
|
|
92
|
+
* Override the OpenRouter app-attribution identity. Call once at host boot,
|
|
93
|
+
* before any OpenRouter request. Blank/whitespace-only fields are ignored (the
|
|
94
|
+
* existing value is kept), so a partial override is safe.
|
|
95
|
+
*/
|
|
96
|
+
declare function setOpenRouterAppIdentity(identity: Partial<OpenRouterAppIdentity>): void;
|
|
97
|
+
/**
|
|
98
|
+
* Read the current OpenRouter app-attribution identity.
|
|
99
|
+
*/
|
|
100
|
+
declare function getOpenRouterAppIdentity(): OpenRouterAppIdentity;
|
|
64
101
|
|
|
65
|
-
export { OPENROUTER_APP_HEADERS, isOpenRouterProvider };
|
|
102
|
+
export { OPENROUTER_APP_HEADERS, type OpenRouterAppIdentity, getOpenRouterAppIdentity, isOpenRouterProvider, setOpenRouterAppIdentity };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,35 +3,48 @@ export { SSEEvent, SSEFormat, SSEParserCallbacks, createSSEParser, streamSSEResp
|
|
|
3
3
|
export { A as AnthropicTool, B as BuiltinToolExecutor, G as GeminiTools, M as McpToolProvider, O as OpenAITool, g as getBuiltinSearchTools } from './BuiltinToolExecutor-BluWyeob.js';
|
|
4
4
|
import { LLMProvider } from '@omnicross/contracts/llm-config';
|
|
5
5
|
export { C as CorePaths, a as CoreUsageEvent, b as CoreUsageTokenCounts, U as UsageEventSink } from './usage-event-sink-BX7FE1NL.js';
|
|
6
|
-
export { L as Logger } from './
|
|
6
|
+
export { L as Logger } from './logger-4GvQNzhE.js';
|
|
7
|
+
export { PricingStore } from './ports/pricing-store.js';
|
|
7
8
|
export { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
9
|
+
export { UsageEventStore } from './ports/usage-event-store.js';
|
|
8
10
|
export { WebSearchBackend } from './ports/web-search-backend.js';
|
|
9
11
|
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.js';
|
|
10
|
-
export { EndpointRoutingConfig, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiKeyInfo, OutboundApiServerConfig, OutboundApiServerStatus,
|
|
12
|
+
export { A as AccountProbeConfig, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, K as KeyCostLimits, c as KeyExpiryInput, d as KeyExpiryResult, e as KeySpend, f as KeySpendReader, g as KeySpendSeeder, h as KeySpendTracker, i as KindMappedEndpoint, M as MessagesModelKind, j as ModelKind, k as ModelPrefixTargets, l as OutboundApiDeps, m as OutboundApiKeyCreated, n as OutboundApiKeyInfo, o as OutboundApiServerConfig, p as OutboundApiServerStatus, O as OutboundCredentialStore, q as OutboundEndpoint, r as OutboundFormatUrls, s as OutboundKeyActivationMode, O as OutboundKeyDb, t as OutboundKeyDbRow, u as OutboundKeyPolicy, v as OutboundProxyConfig, Q as QuotaDecision, R as RequestRole, w as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, x as VoucherDb, y as checkKeyQuota, z as computeKeyExpiry, B as computeVoucherGrant, D as generateVoucherCode, G as hashVoucherCode, H as newVoucherId, I as startOfLocalDay, J as startOfLocalWeek, L as toVoucherInfo, N as voucherCodePrefix } from './types-6OUY_xfA.js';
|
|
13
|
+
export { CostCalculation, PricingEngine, PricingEngineOptions } from './usage/pricing-engine.js';
|
|
14
|
+
export { UsageRecordInput, UsageRecorder, UsageRecorderOptions } from './usage/usage-recorder.js';
|
|
11
15
|
export { A as ApiFormat, C as CompletionOptions, a as CompletionResult, N as NATIVE_SEARCH_TOOL_NAMES, b as NativeSearchAugmentation, c as NativeSearchDetectionResult, d as NativeSearchProvider, e as NativeSearchUserConfig, S as StreamCallbacks } from './types-BScIHmPr.js';
|
|
12
|
-
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-
|
|
16
|
+
export { C as CompletionService, V as VisionFallbackProvider } from './CompletionService-DdWaAxq0.js';
|
|
13
17
|
export { SimpleChatGeminiMessage, SimpleChatGeminiPart, StreamEvent, StreamEventType, StreamSender, addOpenRouterProviderToRequest, attachStreamEventBuffer, convertMessageToAnthropic, convertMessageToGemini, convertMessageToOpenAI, emitStreamEvent, getOpenRouterProviderConfig, getProviderHeaders, registerStreamEventBuffer, releaseStreamEventBuffer } from './completion.js';
|
|
14
18
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.js';
|
|
15
19
|
export { applyAugmentation, buildNativeSearchAugmentation, detectNativeSearch } from './completion/NativeSearchInjector.js';
|
|
16
20
|
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.js';
|
|
17
|
-
export { ApiServerSettingsStore, ApplyConfigInput, DEFAULT_OUTBOUND_PORT, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiServer, OutboundRateLimiter, __resetOutboundApiServerForTests, createNamedKey, defaultServerConfig, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, hashKey, loadServerConfig, mergeServerConfig, normalizeServerConfig, saveServerConfig, verifyPresentedKey } from './outbound-api.js';
|
|
21
|
+
export { AUDIT_REDACTED, ApiServerSettingsStore, ApplyConfigInput, AuditCaptureContext, BillingCaptureContext, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, beginAuditCapture, beginBillingCapture, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, redactAuditText, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.js';
|
|
18
22
|
export { convertAnthropicRequestToOpenAI, convertAnthropicStreamToOpenAI, convertAnthropicToOpenAI, convertAnthropicToOpenAIWithThinking, convertOpenAIResponseToAnthropic, convertOpenAIStreamToAnthropic, convertOpenAIToAnthropic, convertOpenAIToAnthropicWithThinking, hasImageContent, hasThinkingEnabled } from './ApiConverter.js';
|
|
19
23
|
export { ChainExecutionOptions, TransformerChainExecutor } from './transformer/TransformerChainExecutor.js';
|
|
20
24
|
export { TransformerService } from './transformer/TransformerService.js';
|
|
21
25
|
export { registerBuiltinTransformers } from './transformer/transformers.js';
|
|
22
26
|
export { Annotation, ImageContent, MessageContent, ModelRoute, ModelTransformerConfig, ReasoningConfig, RequestConfig, RequestRouteInfo, ResolvedTransformerChain, StreamChunk, TextContent, ThinkLevel, ThinkingContent, ToolCall, ToolChoice, ToolParameterSchema, TransformRequestResult, Transformer, TransformerChainConfig, TransformerConfigEntry, TransformerConstructor, TransformerContext, TransformerLogger, TransformerOptions, TransformerReference, TransformerServiceConfig, UnifiedChatRequest, UnifiedChatResponse, UnifiedMessage, UnifiedTool, UrlCitation } from './transformer/types.js';
|
|
23
27
|
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy-C-xqrkKi.js';
|
|
24
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, r as resolveRoute } from './routeResolver-
|
|
28
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-B1NglTfe.js';
|
|
25
29
|
import '@omnicross/contracts/message-blocks';
|
|
26
30
|
import '@omnicross/contracts/completion-types';
|
|
27
31
|
import '@omnicross/contracts/mcp-types';
|
|
32
|
+
import '@omnicross/contracts/pricing-types';
|
|
33
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
28
34
|
import '@omnicross/contracts/websearch-types';
|
|
29
35
|
import 'node:http';
|
|
30
36
|
import '@omnicross/contracts/subscription-types';
|
|
31
37
|
import '@omnicross/contracts/usage-types';
|
|
38
|
+
import './completion/ApiKeyPoolService.js';
|
|
32
39
|
import './pipeline/AuthSource.js';
|
|
33
40
|
import './pipeline/SubscriptionAuthSource.js';
|
|
34
41
|
import './pipeline/SubscriptionAuthStrategy.js';
|
|
42
|
+
import '@omnicross/contracts/account-tokens-types';
|
|
43
|
+
import '@omnicross/contracts/audit-types';
|
|
44
|
+
import '@omnicross/contracts/billing-types';
|
|
45
|
+
import '@omnicross/contracts/health-logging-types';
|
|
46
|
+
import '@omnicross/contracts/voucher-types';
|
|
47
|
+
import '@omnicross/contracts/webhook-types';
|
|
35
48
|
import '@omnicross/contracts/endpoint-resolver';
|
|
36
49
|
import './transformer/transformers/AnthropicTransformer.js';
|
|
37
50
|
import './transformer/transformers/GeminiCodeAssistTransformer.js';
|
|
@@ -54,12 +67,36 @@ import './transformer/transformers/ReasoningTransformer.js';
|
|
|
54
67
|
*/
|
|
55
68
|
declare function isOpenRouterProvider(provider: LLMProvider): boolean;
|
|
56
69
|
/**
|
|
57
|
-
* OpenRouter app attribution
|
|
58
|
-
*
|
|
70
|
+
* OpenRouter "app attribution" identity — the `HTTP-Referer` (the app's URL,
|
|
71
|
+
* the primary attribution key) and `X-Title` (the app's display name) that
|
|
72
|
+
* OpenRouter uses to attribute usage to an app on its public daily/weekly/
|
|
73
|
+
* monthly rankings. See https://openrouter.ai/docs/app-attribution
|
|
59
74
|
*/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
interface OpenRouterAppIdentity {
|
|
76
|
+
/** `HTTP-Referer` header — the app's URL. */
|
|
77
|
+
referer: string;
|
|
78
|
+
/** `X-Title` header — the app's display name on OpenRouter rankings. */
|
|
79
|
+
title: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The live OpenRouter app-attribution header set — the SINGLE source of truth
|
|
83
|
+
* for every OpenRouter request the serving core makes. Both the LLM path
|
|
84
|
+
* (`header-builder` / `TransformerHandler`) and the media path
|
|
85
|
+
* (`completion/openrouter-headers.ts` → `buildOpenRouterHeaders`) read this
|
|
86
|
+
* object. `setOpenRouterAppIdentity` mutates it in place; consumers spread it
|
|
87
|
+
* at request time, so a boot-time host override is reflected everywhere without
|
|
88
|
+
* re-importing.
|
|
89
|
+
*/
|
|
90
|
+
declare const OPENROUTER_APP_HEADERS: Record<string, string>;
|
|
91
|
+
/**
|
|
92
|
+
* Override the OpenRouter app-attribution identity. Call once at host boot,
|
|
93
|
+
* before any OpenRouter request. Blank/whitespace-only fields are ignored (the
|
|
94
|
+
* existing value is kept), so a partial override is safe.
|
|
95
|
+
*/
|
|
96
|
+
declare function setOpenRouterAppIdentity(identity: Partial<OpenRouterAppIdentity>): void;
|
|
97
|
+
/**
|
|
98
|
+
* Read the current OpenRouter app-attribution identity.
|
|
99
|
+
*/
|
|
100
|
+
declare function getOpenRouterAppIdentity(): OpenRouterAppIdentity;
|
|
64
101
|
|
|
65
|
-
export { OPENROUTER_APP_HEADERS, isOpenRouterProvider };
|
|
102
|
+
export { OPENROUTER_APP_HEADERS, type OpenRouterAppIdentity, getOpenRouterAppIdentity, isOpenRouterProvider, setOpenRouterAppIdentity };
|