@omnicross/core 0.1.6 → 0.1.8
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 +2 -2
- package/dist/ApiConverter.js +1 -1
- package/dist/{ProviderProxy-C-xqrkKi.d.ts → ProviderProxy--ROec6VI.d.ts} +22 -3
- package/dist/{ProviderProxy-CnMQYN59.d.cts → ProviderProxy-QdwNV6l1.d.cts} +22 -3
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +4 -3
- package/dist/auth/GeminiCodeAssistProjectResolver.js +3 -2
- package/dist/{chunk-3Z5BQZFM.cjs → chunk-235MXAGX.cjs} +3 -1
- package/dist/{chunk-SQYVORNP.cjs → chunk-26K6T2YS.cjs} +1520 -523
- package/dist/{chunk-DLXZEZWO.cjs → chunk-2E42SAW3.cjs} +42 -4
- package/dist/{chunk-7AK7B36B.cjs → chunk-2Z4XM3H5.cjs} +6 -6
- package/dist/{chunk-OEWZUX4G.js → chunk-32O35CIF.js} +9 -20
- package/dist/chunk-3SCOLIPT.cjs +63 -0
- package/dist/{chunk-SYQF7OIR.js → chunk-3WD4HTR2.js} +2 -0
- package/dist/{chunk-AT7B7SOZ.js → chunk-5NJLQ6T6.js} +21 -10
- package/dist/chunk-5RSZYQJH.cjs +62 -0
- package/dist/{chunk-IFXJ2BG7.js → chunk-7C7DET6S.js} +51 -6
- package/dist/{chunk-SNYBEXLB.cjs → chunk-EPN67EGP.cjs} +6 -1
- package/dist/chunk-FU7EAR73.js +62 -0
- package/dist/{chunk-UX7VWA46.js → chunk-FXR6N3SR.js} +39 -1
- package/dist/{chunk-WYTEQ4Q5.cjs → chunk-GDIXXKF2.cjs} +21 -10
- package/dist/{chunk-WB6PH56J.js → chunk-GFIZ6LQI.js} +12 -8
- package/dist/chunk-GL6XM527.js +61 -0
- package/dist/{chunk-EJLH6NFT.cjs → chunk-J3QQ6JS5.cjs} +12 -8
- package/dist/{chunk-VRFBB5DB.js → chunk-MYYR3HZL.js} +4 -4
- package/dist/{chunk-YJVHCHQX.js → chunk-N7OOJI5V.js} +46 -2
- package/dist/chunk-NKVZ6Z3Y.cjs +61 -0
- package/dist/chunk-OTZC4TNH.cjs +79 -0
- package/dist/{chunk-6VUQPOV3.cjs → chunk-OVQBNVSV.cjs} +10 -21
- package/dist/{chunk-4VLRHHFE.cjs → chunk-OXHNSZ53.cjs} +9 -11
- package/dist/{chunk-6CL5HTPQ.js → chunk-PEGTIPB3.js} +8 -10
- package/dist/chunk-PO3XB56Z.js +79 -0
- package/dist/{chunk-UDCC7EMR.js → chunk-QYC54PMG.js} +1242 -245
- package/dist/{chunk-SIZQQD6T.js → chunk-RJ5ZGNI3.js} +42 -5
- package/dist/{chunk-KCVJWJST.cjs → chunk-RJUONLUQ.cjs} +47 -10
- package/dist/{chunk-BPKCU575.js → chunk-UAPBLNN2.js} +6 -1
- package/dist/{chunk-UNWKG6EI.cjs → chunk-XPIOJQS2.cjs} +51 -6
- package/dist/chunk-XXFYLL7R.js +63 -0
- package/dist/{chunk-YK57NMIF.cjs → chunk-YWL7YZWS.cjs} +47 -3
- package/dist/completion/ApiKeyPoolService.cjs +32 -1
- package/dist/completion/ApiKeyPoolService.d.cts +17 -1
- package/dist/completion/ApiKeyPoolService.d.ts +17 -1
- package/dist/completion/ApiKeyPoolService.js +31 -0
- package/dist/completion/CompletionService.cjs +23 -19
- package/dist/completion/CompletionService.d.cts +1 -0
- package/dist/completion/CompletionService.d.ts +1 -0
- package/dist/completion/CompletionService.js +22 -18
- package/dist/completion.cjs +23 -19
- package/dist/completion.d.cts +1 -0
- package/dist/completion.d.ts +1 -0
- package/dist/completion.js +22 -18
- package/dist/index.cjs +81 -21
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +82 -22
- package/dist/outbound-api/auditCapture.cjs +2 -2
- package/dist/outbound-api/auditCapture.d.cts +3 -4
- package/dist/outbound-api/auditCapture.d.ts +3 -4
- package/dist/outbound-api/auditCapture.js +1 -1
- package/dist/outbound-api/routeResolver.d.cts +4 -3
- package/dist/outbound-api/routeResolver.d.ts +4 -3
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +1 -0
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +1 -0
- package/dist/outbound-api/types.d.cts +3 -2
- package/dist/outbound-api/types.d.ts +3 -2
- package/dist/outbound-api.cjs +23 -19
- package/dist/outbound-api.d.cts +8 -6
- package/dist/outbound-api.d.ts +8 -6
- package/dist/outbound-api.js +22 -18
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +3 -2
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +3 -2
- package/dist/pipeline/AccountRouteActivity.cjs +10 -0
- package/dist/pipeline/AccountRouteActivity.d.cts +61 -0
- package/dist/pipeline/AccountRouteActivity.d.ts +61 -0
- package/dist/pipeline/AccountRouteActivity.js +10 -0
- package/dist/pipeline/ServerOverloadCounter.cjs +16 -0
- package/dist/pipeline/ServerOverloadCounter.d.cts +77 -0
- package/dist/pipeline/ServerOverloadCounter.d.ts +77 -0
- package/dist/pipeline/ServerOverloadCounter.js +16 -0
- package/dist/pipeline/SubscriptionAccountHealth.cjs +4 -2
- package/dist/pipeline/SubscriptionAccountHealth.d.cts +32 -3
- package/dist/pipeline/SubscriptionAccountHealth.d.ts +32 -3
- package/dist/pipeline/SubscriptionAccountHealth.js +3 -1
- package/dist/pipeline/upstreamFetch.cjs +4 -3
- package/dist/pipeline/upstreamFetch.d.cts +35 -6
- package/dist/pipeline/upstreamFetch.d.ts +35 -6
- package/dist/pipeline/upstreamFetch.js +3 -2
- package/dist/pipeline/upstreamTrace.cjs +4 -2
- package/dist/pipeline/upstreamTrace.d.cts +22 -8
- package/dist/pipeline/upstreamTrace.d.ts +22 -8
- package/dist/pipeline/upstreamTrace.js +3 -1
- package/dist/ports.d.cts +2 -2
- package/dist/ports.d.ts +2 -2
- package/dist/provider-proxy/ProviderProxy.cjs +23 -19
- package/dist/provider-proxy/ProviderProxy.d.cts +2 -1
- package/dist/provider-proxy/ProviderProxy.d.ts +2 -1
- package/dist/provider-proxy/ProviderProxy.js +22 -18
- package/dist/provider-proxy/identity/codexCliHeaders.cjs +10 -0
- package/dist/provider-proxy/identity/codexCliHeaders.d.cts +45 -0
- package/dist/provider-proxy/identity/codexCliHeaders.d.ts +45 -0
- package/dist/provider-proxy/identity/codexCliHeaders.js +10 -0
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +23 -19
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +11 -1
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +11 -1
- package/dist/provider-proxy/ingress/providerProxyShared.js +22 -18
- package/dist/provider-proxy/matchText.cjs +2 -2
- package/dist/provider-proxy/matchText.d.cts +1 -3
- package/dist/provider-proxy/matchText.d.ts +1 -3
- package/dist/provider-proxy/matchText.js +1 -1
- package/dist/provider-proxy/types.d.cts +20 -1
- package/dist/provider-proxy/types.d.ts +20 -1
- package/dist/provider-proxy.cjs +79 -19
- package/dist/provider-proxy.d.cts +255 -8
- package/dist/provider-proxy.d.ts +255 -8
- package/dist/provider-proxy.js +80 -20
- package/dist/{routeResolver-CHTv_Bs5.d.ts → routeResolver-C0mkkZaM.d.ts} +1 -1
- package/dist/{routeResolver-kepxnfcC.d.cts → routeResolver-CVFE8KKe.d.cts} +1 -1
- package/dist/transformer/transformers/AnthropicTransformer.cjs +3 -2
- package/dist/transformer/transformers/AnthropicTransformer.js +2 -1
- package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +3 -2
- package/dist/transformer/transformers/OpenAIResponseTransformer.js +2 -1
- package/dist/transformer/transformers.cjs +7 -6
- package/dist/transformer/transformers.js +6 -5
- package/dist/transformer.cjs +9 -8
- package/dist/transformer.js +8 -7
- package/dist/{types-hsoKrVQS.d.ts → types-BB8pxk_3.d.ts} +40 -1
- package/dist/{types-H3wGZSOo.d.cts → types-C2MwkLah.d.cts} +40 -1
- package/dist/usage/pricing-engine.cjs +2 -2
- package/dist/usage/pricing-engine.d.cts +20 -0
- package/dist/usage/pricing-engine.d.ts +20 -0
- package/dist/usage/pricing-engine.js +1 -1
- package/dist/usage/usage-recorder.cjs +2 -2
- package/dist/usage/usage-recorder.d.cts +11 -1
- package/dist/usage/usage-recorder.d.ts +11 -1
- package/dist/usage/usage-recorder.js +1 -1
- package/dist/usage.cjs +3 -3
- package/dist/usage.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export { AutomaticPricingSource, PricingStore } from './ports/pricing-store.js';
|
|
|
8
8
|
export { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
9
9
|
export { UsageEventStore } from './ports/usage-event-store.js';
|
|
10
10
|
export { WebSearchBackend } from './ports/web-search-backend.js';
|
|
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';
|
|
12
|
-
export { A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, O as OutboundCredentialStore, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-
|
|
11
|
+
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, RouteLeaseUsageAttribution, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.js';
|
|
12
|
+
export { A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, O as OutboundCredentialStore, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-BB8pxk_3.js';
|
|
13
13
|
export { CostCalculation, PricingEngine, PricingEngineOptions } from './usage/pricing-engine.js';
|
|
14
14
|
export { UsageRecordInput, UsageRecorder, UsageRecorderOptions } from './usage/usage-recorder.js';
|
|
15
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';
|
|
@@ -17,7 +17,7 @@ export { C as CompletionService, V as VisionFallbackProvider } from './Completio
|
|
|
17
17
|
export { SimpleChatGeminiMessage, SimpleChatGeminiPart, StreamEvent, StreamEventType, StreamSender, addOpenRouterProviderToRequest, attachStreamEventBuffer, convertMessageToAnthropic, convertMessageToGemini, convertMessageToOpenAI, emitStreamEvent, getOpenRouterProviderConfig, getProviderHeaders, registerStreamEventBuffer, releaseStreamEventBuffer } from './completion.js';
|
|
18
18
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.js';
|
|
19
19
|
export { applyAugmentation, buildNativeSearchAugmentation, detectNativeSearch } from './completion/NativeSearchInjector.js';
|
|
20
|
-
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.js';
|
|
20
|
+
export { NormalizedRouteLeaseCreate, NormalizedRouteLeaseRequest, ROUTE_LEASE_API_VERSION, ROUTE_LEASE_CAPABILITIES, ROUTE_LEASE_CAPABILITIES_SCHEMA, ROUTE_LEASE_CODEX_TOKEN_ENV, ROUTE_LEASE_DEFAULT_TTL_SECONDS, ROUTE_LEASE_MAX_CONSUMER_BYTES, ROUTE_LEASE_MAX_EXECUTION_ID_BYTES, ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES, ROUTE_LEASE_MAX_MODEL_BYTES, ROUTE_LEASE_MAX_SESSION_ID_BYTES, ROUTE_LEASE_MAX_TTL_SECONDS, ROUTE_LEASE_REQUEST_SCHEMA, ROUTE_LEASE_RESULT_SCHEMA, ROUTE_LEASE_RUNTIMES, ROUTE_LEASE_RUNTIME_TABLE, ROUTE_LEASE_SESSION_HASH_DOMAIN, RouteLeaseCapabilities, RouteLeaseClock, RouteLeaseCreateOutcome, RouteLeaseCreateResult, RouteLeaseDescriptorPort, RouteLeaseError, RouteLeaseErrorCode, RouteLeaseExecutionMetadata, RouteLeaseExecutionRequest, RouteLeaseLogger, RouteLeaseManager, RouteLeaseManagerOptions, RouteLeaseMetadata, RouteLeaseProviderKeyPreflight, RouteLeaseReleaseResult, RouteLeaseRenewResult, RouteLeaseRequest, RouteLeaseRoutePort, RouteLeaseRuntime, RouteLeaseStatus, RouteLeaseSubscriptionPreflight, RouteLeaseTargetResolver, RouteLeaseTargetResolverOptions, RouteLeaseTargetResolverPort, RouteLeaseUpstream, RuntimeLaunchDescriptor, SYSTEM_ROUTE_LEASE_CLOCK, __resetProviderProxyForTests, canonicalizeRouteLeasePayload, extractRouteToken, getProviderProxy, hashRouteLeasePayload, hashRouteLeaseSessionId, normalizeRouteLeaseIdempotencyKey, normalizeRouteLeaseTtl, parseRouteLeaseCreate, routeLeaseRuntime } from './provider-proxy.js';
|
|
21
21
|
export { ApiServerSettingsStore, ApplyConfigInput, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_ALLOWANCE_SCHEDULING, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, GatewayBindingResolution, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, ResolveGatewayBindingInput, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, candidateBackgroundModelIds, candidateGatewayBindings, classifyModelPrefix, createIntegrationKey, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, gatewayBindingToEndpointConfig, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, legacyEndpointsToBindings, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAllowanceScheduling, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizeGatewayBindings, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolveGatewayBinding, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.js';
|
|
22
22
|
export { convertAnthropicRequestToOpenAI, convertAnthropicStreamToOpenAI, convertAnthropicToOpenAI, convertAnthropicToOpenAIWithThinking, convertOpenAIResponseToAnthropic, convertOpenAIStreamToAnthropic, convertOpenAIToAnthropic, convertOpenAIToAnthropicWithThinking, hasImageContent, hasThinkingEnabled } from './ApiConverter.js';
|
|
23
23
|
export { ChainExecutionOptions, TransformerChainExecutor } from './transformer/TransformerChainExecutor.js';
|
|
@@ -28,9 +28,9 @@ export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.js';
|
|
|
28
28
|
export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.js';
|
|
29
29
|
export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.js';
|
|
30
30
|
export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.js';
|
|
31
|
-
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy
|
|
31
|
+
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap, R as RouteEvictionReason, b as RouteRegistrationOptions, i as isLoopbackAddress } from './ProviderProxy--ROec6VI.js';
|
|
32
32
|
export { K as KeyCostLimits, a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.js';
|
|
33
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-
|
|
33
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-C0mkkZaM.js';
|
|
34
34
|
import '@omnicross/contracts/message-blocks';
|
|
35
35
|
import '@omnicross/contracts/completion-types';
|
|
36
36
|
import '@omnicross/contracts/mcp-types';
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,26 @@ import {
|
|
|
18
18
|
OutboundRateLimiter,
|
|
19
19
|
ProviderProxy,
|
|
20
20
|
ProviderProxyRouteMap,
|
|
21
|
+
ROUTE_LEASE_API_VERSION,
|
|
22
|
+
ROUTE_LEASE_CAPABILITIES,
|
|
23
|
+
ROUTE_LEASE_CAPABILITIES_SCHEMA,
|
|
24
|
+
ROUTE_LEASE_CODEX_TOKEN_ENV,
|
|
25
|
+
ROUTE_LEASE_DEFAULT_TTL_SECONDS,
|
|
26
|
+
ROUTE_LEASE_MAX_CONSUMER_BYTES,
|
|
27
|
+
ROUTE_LEASE_MAX_EXECUTION_ID_BYTES,
|
|
28
|
+
ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES,
|
|
29
|
+
ROUTE_LEASE_MAX_MODEL_BYTES,
|
|
30
|
+
ROUTE_LEASE_MAX_SESSION_ID_BYTES,
|
|
31
|
+
ROUTE_LEASE_MAX_TTL_SECONDS,
|
|
32
|
+
ROUTE_LEASE_REQUEST_SCHEMA,
|
|
33
|
+
ROUTE_LEASE_RESULT_SCHEMA,
|
|
34
|
+
ROUTE_LEASE_RUNTIMES,
|
|
35
|
+
ROUTE_LEASE_RUNTIME_TABLE,
|
|
36
|
+
ROUTE_LEASE_SESSION_HASH_DOMAIN,
|
|
37
|
+
RouteLeaseError,
|
|
38
|
+
RouteLeaseManager,
|
|
39
|
+
RouteLeaseTargetResolver,
|
|
40
|
+
SYSTEM_ROUTE_LEASE_CLOCK,
|
|
21
41
|
SerialQueueTimeoutError,
|
|
22
42
|
UserMessageSerialQueue,
|
|
23
43
|
__resetOutboundApiServerForTests,
|
|
@@ -26,6 +46,7 @@ import {
|
|
|
26
46
|
attach,
|
|
27
47
|
candidateBackgroundModelIds,
|
|
28
48
|
candidateGatewayBindings,
|
|
49
|
+
canonicalizeRouteLeasePayload,
|
|
29
50
|
checkKeyQuota,
|
|
30
51
|
computeKeyExpiry,
|
|
31
52
|
computeVoucherGrant,
|
|
@@ -45,8 +66,11 @@ import {
|
|
|
45
66
|
getProviderProxy,
|
|
46
67
|
handleVoucherRedeem,
|
|
47
68
|
hashKey,
|
|
69
|
+
hashRouteLeasePayload,
|
|
70
|
+
hashRouteLeaseSessionId,
|
|
48
71
|
hashVoucherCode,
|
|
49
72
|
isConcurrencyRejection,
|
|
73
|
+
isLoopbackAddress,
|
|
50
74
|
isRedeemRequest,
|
|
51
75
|
isSerialQueueTimeout,
|
|
52
76
|
isUserMessageRequest,
|
|
@@ -64,14 +88,18 @@ import {
|
|
|
64
88
|
normalizeProxyConfig,
|
|
65
89
|
normalizeProxySegment,
|
|
66
90
|
normalizeQueueSegments,
|
|
91
|
+
normalizeRouteLeaseIdempotencyKey,
|
|
92
|
+
normalizeRouteLeaseTtl,
|
|
67
93
|
normalizeServerConfig,
|
|
68
94
|
normalizeVoucher,
|
|
69
95
|
normalizeWebhookDestination,
|
|
70
96
|
normalizeWebhookSegment,
|
|
97
|
+
parseRouteLeaseCreate,
|
|
71
98
|
randomBase62,
|
|
72
99
|
register,
|
|
73
100
|
release,
|
|
74
101
|
resolveGatewayBinding,
|
|
102
|
+
routeLeaseRuntime,
|
|
75
103
|
saveServerConfig,
|
|
76
104
|
startOfLocalDay,
|
|
77
105
|
startOfLocalWeek,
|
|
@@ -79,44 +107,48 @@ import {
|
|
|
79
107
|
verifyKey,
|
|
80
108
|
verifyPresentedKey,
|
|
81
109
|
voucherCodePrefix
|
|
82
|
-
} from "./chunk-
|
|
83
|
-
import "./chunk-WB6PH56J.js";
|
|
110
|
+
} from "./chunk-QYC54PMG.js";
|
|
84
111
|
import {
|
|
85
112
|
createSSEParser,
|
|
86
113
|
streamSSEResponse
|
|
87
114
|
} from "./chunk-VVEHS2LI.js";
|
|
88
115
|
import "./chunk-46RLHI7D.js";
|
|
89
|
-
import {
|
|
90
|
-
TransformerChainExecutor
|
|
91
|
-
} from "./chunk-WNKWAEUR.js";
|
|
92
|
-
import "./chunk-MZNPGW5Q.js";
|
|
93
|
-
import {
|
|
94
|
-
TransformerService
|
|
95
|
-
} from "./chunk-DK4A7DLE.js";
|
|
96
116
|
import {
|
|
97
117
|
registerBuiltinTransformers
|
|
98
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-MYYR3HZL.js";
|
|
119
|
+
import "./chunk-PEGTIPB3.js";
|
|
99
120
|
import "./chunk-LVUCAWMK.js";
|
|
100
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-32O35CIF.js";
|
|
122
|
+
import "./chunk-FU7EAR73.js";
|
|
101
123
|
import "./chunk-LB6EBS6Y.js";
|
|
102
|
-
import "./chunk-6CL5HTPQ.js";
|
|
103
124
|
import "./chunk-7VU7V2E4.js";
|
|
104
125
|
import {
|
|
105
126
|
PricingEngine
|
|
106
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-FXR6N3SR.js";
|
|
107
128
|
import {
|
|
108
129
|
UsageRecorder
|
|
109
|
-
} from "./chunk-
|
|
110
|
-
import
|
|
130
|
+
} from "./chunk-UAPBLNN2.js";
|
|
131
|
+
import {
|
|
132
|
+
TransformerChainExecutor
|
|
133
|
+
} from "./chunk-WNKWAEUR.js";
|
|
134
|
+
import "./chunk-MZNPGW5Q.js";
|
|
135
|
+
import {
|
|
136
|
+
TransformerService
|
|
137
|
+
} from "./chunk-DK4A7DLE.js";
|
|
138
|
+
import "./chunk-XXFYLL7R.js";
|
|
111
139
|
import "./chunk-XTEI64OU.js";
|
|
112
140
|
import "./chunk-XX6NQJMA.js";
|
|
141
|
+
import "./chunk-GFIZ6LQI.js";
|
|
142
|
+
import "./chunk-OE6TDIWW.js";
|
|
143
|
+
import "./chunk-DRWHTIIZ.js";
|
|
144
|
+
import "./chunk-JWC6APFQ.js";
|
|
113
145
|
import "./chunk-5ERIZW3D.js";
|
|
114
|
-
import "./chunk-
|
|
146
|
+
import "./chunk-PO3XB56Z.js";
|
|
147
|
+
import "./chunk-N7OOJI5V.js";
|
|
115
148
|
import "./chunk-23S5OPIO.js";
|
|
116
149
|
import {
|
|
117
150
|
serializeError
|
|
118
151
|
} from "./chunk-AVYJ4YBN.js";
|
|
119
|
-
import "./chunk-OE6TDIWW.js";
|
|
120
152
|
import "./chunk-OPRS4IQZ.js";
|
|
121
153
|
import {
|
|
122
154
|
BoundAccountSelectionError,
|
|
@@ -127,7 +159,6 @@ import "./chunk-DE2SRBFZ.js";
|
|
|
127
159
|
import {
|
|
128
160
|
getProviderHeaders
|
|
129
161
|
} from "./chunk-ZY6KU6P3.js";
|
|
130
|
-
import "./chunk-JWC6APFQ.js";
|
|
131
162
|
import {
|
|
132
163
|
beginBillingCapture
|
|
133
164
|
} from "./chunk-WLYIIEAF.js";
|
|
@@ -166,7 +197,7 @@ import {
|
|
|
166
197
|
} from "./chunk-H5JUT3KV.js";
|
|
167
198
|
import {
|
|
168
199
|
beginAuditCapture
|
|
169
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-7C7DET6S.js";
|
|
170
201
|
import {
|
|
171
202
|
AUDIT_REDACTED,
|
|
172
203
|
redactAuditText
|
|
@@ -184,12 +215,13 @@ import {
|
|
|
184
215
|
convertOpenAIToAnthropicWithThinking,
|
|
185
216
|
hasImageContent,
|
|
186
217
|
hasThinkingEnabled
|
|
187
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-5NJLQ6T6.js";
|
|
188
219
|
import "./chunk-N5T4M4GU.js";
|
|
189
220
|
import "./chunk-TOVPMMHM.js";
|
|
190
|
-
import "./chunk-
|
|
191
|
-
import "./chunk-
|
|
221
|
+
import "./chunk-RJ5ZGNI3.js";
|
|
222
|
+
import "./chunk-3WD4HTR2.js";
|
|
192
223
|
import "./chunk-MKF46GNZ.js";
|
|
224
|
+
import "./chunk-GL6XM527.js";
|
|
193
225
|
import {
|
|
194
226
|
BuiltinToolExecutor,
|
|
195
227
|
getBuiltinSearchTools
|
|
@@ -235,7 +267,27 @@ export {
|
|
|
235
267
|
PricingEngine,
|
|
236
268
|
ProviderProxy,
|
|
237
269
|
ProviderProxyRouteMap,
|
|
270
|
+
ROUTE_LEASE_API_VERSION,
|
|
271
|
+
ROUTE_LEASE_CAPABILITIES,
|
|
272
|
+
ROUTE_LEASE_CAPABILITIES_SCHEMA,
|
|
273
|
+
ROUTE_LEASE_CODEX_TOKEN_ENV,
|
|
274
|
+
ROUTE_LEASE_DEFAULT_TTL_SECONDS,
|
|
275
|
+
ROUTE_LEASE_MAX_CONSUMER_BYTES,
|
|
276
|
+
ROUTE_LEASE_MAX_EXECUTION_ID_BYTES,
|
|
277
|
+
ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES,
|
|
278
|
+
ROUTE_LEASE_MAX_MODEL_BYTES,
|
|
279
|
+
ROUTE_LEASE_MAX_SESSION_ID_BYTES,
|
|
280
|
+
ROUTE_LEASE_MAX_TTL_SECONDS,
|
|
281
|
+
ROUTE_LEASE_REQUEST_SCHEMA,
|
|
282
|
+
ROUTE_LEASE_RESULT_SCHEMA,
|
|
283
|
+
ROUTE_LEASE_RUNTIMES,
|
|
284
|
+
ROUTE_LEASE_RUNTIME_TABLE,
|
|
285
|
+
ROUTE_LEASE_SESSION_HASH_DOMAIN,
|
|
286
|
+
RouteLeaseError,
|
|
287
|
+
RouteLeaseManager,
|
|
288
|
+
RouteLeaseTargetResolver,
|
|
238
289
|
SUBSCRIPTION_PROVIDER_IDS,
|
|
290
|
+
SYSTEM_ROUTE_LEASE_CLOCK,
|
|
239
291
|
SerialQueueTimeoutError,
|
|
240
292
|
TransformerChainExecutor,
|
|
241
293
|
TransformerService,
|
|
@@ -258,6 +310,7 @@ export {
|
|
|
258
310
|
buildProviderApiUrl,
|
|
259
311
|
candidateBackgroundModelIds,
|
|
260
312
|
candidateGatewayBindings,
|
|
313
|
+
canonicalizeRouteLeasePayload,
|
|
261
314
|
checkKeyQuota,
|
|
262
315
|
classifyModelPrefix,
|
|
263
316
|
computeKeyExpiry,
|
|
@@ -297,10 +350,13 @@ export {
|
|
|
297
350
|
hasImageContent,
|
|
298
351
|
hasThinkingEnabled,
|
|
299
352
|
hashKey,
|
|
353
|
+
hashRouteLeasePayload,
|
|
354
|
+
hashRouteLeaseSessionId,
|
|
300
355
|
hashVoucherCode,
|
|
301
356
|
isBoundAccountSelectionError,
|
|
302
357
|
isConcurrencyRejection,
|
|
303
358
|
isKindMappedEndpoint,
|
|
359
|
+
isLoopbackAddress,
|
|
304
360
|
isOpenRouterProvider,
|
|
305
361
|
isRedeemRequest,
|
|
306
362
|
isSerialQueueTimeout,
|
|
@@ -322,11 +378,14 @@ export {
|
|
|
322
378
|
normalizeProxyConfig,
|
|
323
379
|
normalizeProxySegment,
|
|
324
380
|
normalizeQueueSegments,
|
|
381
|
+
normalizeRouteLeaseIdempotencyKey,
|
|
382
|
+
normalizeRouteLeaseTtl,
|
|
325
383
|
normalizeServerConfig,
|
|
326
384
|
normalizeVoucher,
|
|
327
385
|
normalizeWebhookDestination,
|
|
328
386
|
normalizeWebhookSegment,
|
|
329
387
|
parseModelRef,
|
|
388
|
+
parseRouteLeaseCreate,
|
|
330
389
|
pickModelRefFromList,
|
|
331
390
|
randomBase62,
|
|
332
391
|
redactAuditText,
|
|
@@ -338,6 +397,7 @@ export {
|
|
|
338
397
|
resolvePrefixTarget,
|
|
339
398
|
resolveProviderEndpoint,
|
|
340
399
|
resolveRoute,
|
|
400
|
+
routeLeaseRuntime,
|
|
341
401
|
saveServerConfig,
|
|
342
402
|
serializeError,
|
|
343
403
|
setOpenRouterAppIdentity,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXPIOJQS2cjs = require('../chunk-XPIOJQS2.cjs');
|
|
4
4
|
require('../chunk-FCR77GYM.cjs');
|
|
5
5
|
require('../chunk-AEOZIDEB.cjs');
|
|
6
6
|
require('../chunk-XSVNC2UD.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.beginAuditCapture =
|
|
9
|
+
exports.beginAuditCapture = _chunkXPIOJQS2cjs.beginAuditCapture;
|
|
@@ -15,10 +15,9 @@ import http from 'node:http';
|
|
|
15
15
|
* elapsed ms, and the fields the handler fills in (keyId / model / provider /
|
|
16
16
|
* error / bodies) — then hands it to the fire-and-forget `recordAudit`;
|
|
17
17
|
* - when `captureBodies` is ALSO on, wraps `res.write`/`res.end` to accumulate
|
|
18
|
-
* the response body
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* which defeated debugging. See `upstreamTrace.ts` for the upstream leg.
|
|
18
|
+
* the response body, including a streaming `text/event-stream`. The default
|
|
19
|
+
* `maxBodyBytes:-1` captures the full body; a non-negative limit retains only
|
|
20
|
+
* a bounded UTF-8 prefix.
|
|
22
21
|
*
|
|
23
22
|
* Request HEADERS are NEVER read into a record (Authorization / x-api-key live
|
|
24
23
|
* there). Every stored body passes through {@link redactAuditText}. The assembly
|
|
@@ -15,10 +15,9 @@ import http from 'node:http';
|
|
|
15
15
|
* elapsed ms, and the fields the handler fills in (keyId / model / provider /
|
|
16
16
|
* error / bodies) — then hands it to the fire-and-forget `recordAudit`;
|
|
17
17
|
* - when `captureBodies` is ALSO on, wraps `res.write`/`res.end` to accumulate
|
|
18
|
-
* the response body
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* which defeated debugging. See `upstreamTrace.ts` for the upstream leg.
|
|
18
|
+
* the response body, including a streaming `text/event-stream`. The default
|
|
19
|
+
* `maxBodyBytes:-1` captures the full body; a non-negative limit retains only
|
|
20
|
+
* a bounded UTF-8 prefix.
|
|
22
21
|
*
|
|
23
22
|
* Request HEADERS are NEVER read into a record (Authorization / x-api-key live
|
|
24
23
|
* there). Every stored body passes through {@link redactAuditText}. The assembly
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import '../ports/provider-config-source.cjs';
|
|
2
2
|
import '../provider-proxy/types.cjs';
|
|
3
|
-
import '../types-
|
|
4
|
-
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-
|
|
3
|
+
import '../types-C2MwkLah.cjs';
|
|
4
|
+
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-CVFE8KKe.cjs';
|
|
5
5
|
import '@omnicross/contracts/llm-config';
|
|
6
6
|
import '../transformer/types.cjs';
|
|
7
7
|
import '../transformer/TransformerService.cjs';
|
|
8
8
|
import 'node:http';
|
|
9
9
|
import '@omnicross/contracts/completion-types';
|
|
10
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
10
11
|
import '@omnicross/contracts/subscription-types';
|
|
11
12
|
import '@omnicross/contracts/usage-types';
|
|
12
13
|
import '../completion/ApiKeyPoolService.cjs';
|
|
@@ -23,5 +24,5 @@ import '@omnicross/contracts/billing-types';
|
|
|
23
24
|
import '@omnicross/contracts/health-logging-types';
|
|
24
25
|
import '@omnicross/contracts/voucher-types';
|
|
25
26
|
import '@omnicross/contracts/webhook-types';
|
|
26
|
-
import '../ProviderProxy-
|
|
27
|
+
import '../ProviderProxy-QdwNV6l1.cjs';
|
|
27
28
|
import '../keyPolicy-zdWTu3CQ.cjs';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import '../ports/provider-config-source.js';
|
|
2
2
|
import '../provider-proxy/types.js';
|
|
3
|
-
import '../types-
|
|
4
|
-
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-
|
|
3
|
+
import '../types-BB8pxk_3.js';
|
|
4
|
+
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-C0mkkZaM.js';
|
|
5
5
|
import '@omnicross/contracts/llm-config';
|
|
6
6
|
import '../transformer/types.js';
|
|
7
7
|
import '../transformer/TransformerService.js';
|
|
8
8
|
import 'node:http';
|
|
9
9
|
import '@omnicross/contracts/completion-types';
|
|
10
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
10
11
|
import '@omnicross/contracts/subscription-types';
|
|
11
12
|
import '@omnicross/contracts/usage-types';
|
|
12
13
|
import '../completion/ApiKeyPoolService.js';
|
|
@@ -23,5 +24,5 @@ import '@omnicross/contracts/billing-types';
|
|
|
23
24
|
import '@omnicross/contracts/health-logging-types';
|
|
24
25
|
import '@omnicross/contracts/voucher-types';
|
|
25
26
|
import '@omnicross/contracts/webhook-types';
|
|
26
|
-
import '../ProviderProxy
|
|
27
|
+
import '../ProviderProxy--ROec6VI.js';
|
|
27
28
|
import '../keyPolicy-zdWTu3CQ.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SubscriptionDispatchProfile } from '../provider-proxy/types.cjs';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import '@omnicross/contracts/completion-types';
|
|
4
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
4
5
|
import '@omnicross/contracts/subscription-types';
|
|
5
6
|
import '@omnicross/contracts/usage-types';
|
|
6
7
|
import '../completion/ApiKeyPoolService.cjs';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SubscriptionDispatchProfile } from '../provider-proxy/types.js';
|
|
2
2
|
import 'node:http';
|
|
3
3
|
import '@omnicross/contracts/completion-types';
|
|
4
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
4
5
|
import '@omnicross/contracts/subscription-types';
|
|
5
6
|
import '@omnicross/contracts/usage-types';
|
|
6
7
|
import '../completion/ApiKeyPoolService.js';
|
|
@@ -6,15 +6,16 @@ import '@omnicross/contracts/voucher-types';
|
|
|
6
6
|
import '@omnicross/contracts/webhook-types';
|
|
7
7
|
import '../logger-4GvQNzhE.cjs';
|
|
8
8
|
import '../ports/provider-config-source.cjs';
|
|
9
|
-
import '../ProviderProxy-
|
|
9
|
+
import '../ProviderProxy-QdwNV6l1.cjs';
|
|
10
10
|
import '../provider-proxy/types.cjs';
|
|
11
|
+
export { S as AccountHealthConfig, A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, Q as ModelRef, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, T as OutboundKeyModelRestrictionMode, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig } from '../types-C2MwkLah.cjs';
|
|
11
12
|
import '../pipeline/BoundAccountSelectionError.cjs';
|
|
12
|
-
export { S as AccountHealthConfig, A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, Q as ModelRef, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, T as OutboundKeyModelRestrictionMode, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig } from '../types-H3wGZSOo.cjs';
|
|
13
13
|
import '@omnicross/contracts/llm-config';
|
|
14
14
|
import '../transformer/types.cjs';
|
|
15
15
|
import '../transformer/TransformerService.cjs';
|
|
16
16
|
import 'node:http';
|
|
17
17
|
import '@omnicross/contracts/completion-types';
|
|
18
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
18
19
|
import '@omnicross/contracts/subscription-types';
|
|
19
20
|
import '@omnicross/contracts/usage-types';
|
|
20
21
|
import '../completion/ApiKeyPoolService.cjs';
|
|
@@ -6,15 +6,16 @@ import '@omnicross/contracts/voucher-types';
|
|
|
6
6
|
import '@omnicross/contracts/webhook-types';
|
|
7
7
|
import '../logger-4GvQNzhE.js';
|
|
8
8
|
import '../ports/provider-config-source.js';
|
|
9
|
-
import '../ProviderProxy
|
|
9
|
+
import '../ProviderProxy--ROec6VI.js';
|
|
10
10
|
import '../provider-proxy/types.js';
|
|
11
|
+
export { S as AccountHealthConfig, A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, Q as ModelRef, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, T as OutboundKeyModelRestrictionMode, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig } from '../types-BB8pxk_3.js';
|
|
11
12
|
import '../pipeline/BoundAccountSelectionError.js';
|
|
12
|
-
export { S as AccountHealthConfig, A as AccountProbeConfig, a as AllowanceSchedulingConfig, C as ChatDispatchMode, b as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, c as EndpointRoutingConfig, F as FingerprintConfig, G as GatewayBinding, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, k as KindMappedEndpoint, M as MessagesModelKind, l as ModelKind, m as ModelPrefixTargets, Q as ModelRef, n as OutboundApiDeps, o as OutboundApiKeyCreated, p as OutboundApiKeyInfo, q as OutboundApiServerConfig, r as OutboundApiServerStatus, s as OutboundEndpoint, t as OutboundFormatUrls, u as OutboundKeyActivationMode, O as OutboundKeyDb, v as OutboundKeyDbRow, T as OutboundKeyModelRestrictionMode, w as OutboundKeyPolicy, x as OutboundProxyConfig, R as RequestRole, y as ResponsesModelKind, U as UserMessageQueueConfig } from '../types-hsoKrVQS.js';
|
|
13
13
|
import '@omnicross/contracts/llm-config';
|
|
14
14
|
import '../transformer/types.js';
|
|
15
15
|
import '../transformer/TransformerService.js';
|
|
16
16
|
import 'node:http';
|
|
17
17
|
import '@omnicross/contracts/completion-types';
|
|
18
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
18
19
|
import '@omnicross/contracts/subscription-types';
|
|
19
20
|
import '@omnicross/contracts/usage-types';
|
|
20
21
|
import '../completion/ApiKeyPoolService.js';
|
package/dist/outbound-api.cjs
CHANGED
|
@@ -63,29 +63,33 @@
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
var
|
|
67
|
-
require('./chunk-EJLH6NFT.cjs');
|
|
66
|
+
var _chunk26K6T2YScjs = require('./chunk-26K6T2YS.cjs');
|
|
68
67
|
require('./chunk-HQP3K7PU.cjs');
|
|
69
68
|
require('./chunk-FZ46M34D.cjs');
|
|
70
|
-
require('./chunk-
|
|
71
|
-
require('./chunk-
|
|
72
|
-
require('./chunk-3OPYJG76.cjs');
|
|
73
|
-
require('./chunk-7AK7B36B.cjs');
|
|
69
|
+
require('./chunk-2Z4XM3H5.cjs');
|
|
70
|
+
require('./chunk-OXHNSZ53.cjs');
|
|
74
71
|
require('./chunk-V4TXMEJS.cjs');
|
|
75
|
-
require('./chunk-
|
|
72
|
+
require('./chunk-OVQBNVSV.cjs');
|
|
73
|
+
require('./chunk-5RSZYQJH.cjs');
|
|
76
74
|
require('./chunk-OF3BECU2.cjs');
|
|
77
|
-
require('./chunk-4VLRHHFE.cjs');
|
|
78
75
|
require('./chunk-EYZYXJTJ.cjs');
|
|
79
|
-
require('./chunk-
|
|
80
|
-
require('./chunk-
|
|
81
|
-
require('./chunk-
|
|
76
|
+
require('./chunk-2E42SAW3.cjs');
|
|
77
|
+
require('./chunk-EPN67EGP.cjs');
|
|
78
|
+
require('./chunk-IIRPUVPH.cjs');
|
|
79
|
+
require('./chunk-GBHYAGX3.cjs');
|
|
80
|
+
require('./chunk-3OPYJG76.cjs');
|
|
81
|
+
require('./chunk-3SCOLIPT.cjs');
|
|
82
82
|
require('./chunk-RPII3E6Z.cjs');
|
|
83
83
|
require('./chunk-6RPZADX3.cjs');
|
|
84
|
+
require('./chunk-J3QQ6JS5.cjs');
|
|
85
|
+
require('./chunk-UIBD2YY5.cjs');
|
|
86
|
+
require('./chunk-R3HK6R4B.cjs');
|
|
87
|
+
require('./chunk-QXD4MV2X.cjs');
|
|
84
88
|
require('./chunk-NYUNU75A.cjs');
|
|
85
|
-
require('./chunk-
|
|
89
|
+
require('./chunk-OTZC4TNH.cjs');
|
|
90
|
+
require('./chunk-YWL7YZWS.cjs');
|
|
86
91
|
require('./chunk-YNJNTCSQ.cjs');
|
|
87
92
|
require('./chunk-SVNDB62D.cjs');
|
|
88
|
-
require('./chunk-UIBD2YY5.cjs');
|
|
89
93
|
require('./chunk-6QQG7YG3.cjs');
|
|
90
94
|
|
|
91
95
|
|
|
@@ -94,7 +98,6 @@ require('./chunk-6QQG7YG3.cjs');
|
|
|
94
98
|
var _chunk25GXJCEZcjs = require('./chunk-25GXJCEZ.cjs');
|
|
95
99
|
require('./chunk-MUHWHQVM.cjs');
|
|
96
100
|
require('./chunk-Q27JY5RG.cjs');
|
|
97
|
-
require('./chunk-QXD4MV2X.cjs');
|
|
98
101
|
|
|
99
102
|
|
|
100
103
|
var _chunkAPYG5QD7cjs = require('./chunk-APYG5QD7.cjs');
|
|
@@ -123,19 +126,20 @@ var _chunk4IH4EL7Mcjs = require('./chunk-4IH4EL7M.cjs');
|
|
|
123
126
|
require('./chunk-A2YMUCBT.cjs');
|
|
124
127
|
|
|
125
128
|
|
|
126
|
-
var
|
|
129
|
+
var _chunkXPIOJQS2cjs = require('./chunk-XPIOJQS2.cjs');
|
|
127
130
|
|
|
128
131
|
|
|
129
132
|
|
|
130
133
|
var _chunkFCR77GYMcjs = require('./chunk-FCR77GYM.cjs');
|
|
131
134
|
require('./chunk-AEOZIDEB.cjs');
|
|
132
135
|
require('./chunk-XSVNC2UD.cjs');
|
|
133
|
-
require('./chunk-
|
|
136
|
+
require('./chunk-GDIXXKF2.cjs');
|
|
134
137
|
require('./chunk-OKMJLEXX.cjs');
|
|
135
138
|
require('./chunk-KBM2W6UY.cjs');
|
|
136
|
-
require('./chunk-
|
|
137
|
-
require('./chunk-
|
|
139
|
+
require('./chunk-RJUONLUQ.cjs');
|
|
140
|
+
require('./chunk-235MXAGX.cjs');
|
|
138
141
|
require('./chunk-HVBBDBS3.cjs');
|
|
142
|
+
require('./chunk-NKVZ6Z3Y.cjs');
|
|
139
143
|
require('./chunk-NZYN7C3P.cjs');
|
|
140
144
|
require('./chunk-JMJBSACD.cjs');
|
|
141
145
|
require('./chunk-GMMT7RVN.cjs');
|
|
@@ -227,4 +231,4 @@ require('./chunk-UNEFIWXI.cjs');
|
|
|
227
231
|
|
|
228
232
|
|
|
229
233
|
|
|
230
|
-
exports.AUDIT_REDACTED = _chunkFCR77GYMcjs.AUDIT_REDACTED; exports.BoundAccountSelectionError = _chunk25GXJCEZcjs.BoundAccountSelectionError; exports.ConcurrencyQueueFullError =
|
|
234
|
+
exports.AUDIT_REDACTED = _chunkFCR77GYMcjs.AUDIT_REDACTED; exports.BoundAccountSelectionError = _chunk25GXJCEZcjs.BoundAccountSelectionError; exports.ConcurrencyQueueFullError = _chunk26K6T2YScjs.ConcurrencyQueueFullError; exports.ConcurrencyWaitCancelledError = _chunk26K6T2YScjs.ConcurrencyWaitCancelledError; exports.ConcurrencyWaitTimeoutError = _chunk26K6T2YScjs.ConcurrencyWaitTimeoutError; exports.DEFAULT_ACCOUNT_PROBE = _chunk26K6T2YScjs.DEFAULT_ACCOUNT_PROBE; exports.DEFAULT_ALLOWANCE_SCHEDULING = _chunk26K6T2YScjs.DEFAULT_ALLOWANCE_SCHEDULING; exports.DEFAULT_CONCURRENCY_QUEUE = _chunk26K6T2YScjs.DEFAULT_CONCURRENCY_QUEUE; exports.DEFAULT_FINGERPRINT = _chunk26K6T2YScjs.DEFAULT_FINGERPRINT; exports.DEFAULT_OUTBOUND_PORT = _chunk26K6T2YScjs.DEFAULT_OUTBOUND_PORT; exports.DEFAULT_USER_MESSAGE_QUEUE = _chunk26K6T2YScjs.DEFAULT_USER_MESSAGE_QUEUE; exports.ENDPOINT_MODEL_KINDS = _chunk4IH4EL7Mcjs.ENDPOINT_MODEL_KINDS; exports.KeySpendTracker = _chunk26K6T2YScjs.KeySpendTracker; exports.KeyedMutex = _chunk26K6T2YScjs.KeyedMutex; exports.OUTBOUND_API_SERVER_CONFIG_KEY = _chunk26K6T2YScjs.OUTBOUND_API_SERVER_CONFIG_KEY; exports.OutboundApiServer = _chunk26K6T2YScjs.OutboundApiServer; exports.OutboundConcurrencyGate = _chunk26K6T2YScjs.OutboundConcurrencyGate; exports.OutboundRateLimiter = _chunk26K6T2YScjs.OutboundRateLimiter; exports.SUBSCRIPTION_PROVIDER_IDS = _chunk4VZX5F4Tcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SerialQueueTimeoutError = _chunk26K6T2YScjs.SerialQueueTimeoutError; exports.UserMessageSerialQueue = _chunk26K6T2YScjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunk26K6T2YScjs.__resetOutboundApiServerForTests; exports.beginAuditCapture = _chunkXPIOJQS2cjs.beginAuditCapture; exports.beginBillingCapture = _chunkAPYG5QD7cjs.beginBillingCapture; exports.boundAccountSelectionMessage = _chunk25GXJCEZcjs.boundAccountSelectionMessage; exports.candidateBackgroundModelIds = _chunk26K6T2YScjs.candidateBackgroundModelIds; exports.candidateGatewayBindings = _chunk26K6T2YScjs.candidateGatewayBindings; exports.checkKeyQuota = _chunk26K6T2YScjs.checkKeyQuota; exports.classifyModelPrefix = _chunk4VZX5F4Tcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunk26K6T2YScjs.computeKeyExpiry; exports.computeVoucherGrant = _chunk26K6T2YScjs.computeVoucherGrant; exports.createIntegrationKey = _chunk26K6T2YScjs.createIntegrationKey; exports.createNamedKey = _chunk26K6T2YScjs.createNamedKey; exports.defaultServerConfig = _chunk26K6T2YScjs.defaultServerConfig; exports.detectModelKind = _chunk4VZX5F4Tcjs.detectModelKind; exports.detectRequestRole = _chunk4VZX5F4Tcjs.detectRequestRole; exports.endpointSupportsSubscription = _chunk4VZX5F4Tcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunk4VZX5F4Tcjs.endpointToIngressFormat; exports.formatUrls = _chunk26K6T2YScjs.formatUrls; exports.gatewayBindingToEndpointConfig = _chunk26K6T2YScjs.gatewayBindingToEndpointConfig; exports.generateVoucherCode = _chunk26K6T2YScjs.generateVoucherCode; exports.getOutboundApiServer = _chunk26K6T2YScjs.getOutboundApiServer; exports.handleVoucherRedeem = _chunk26K6T2YScjs.handleVoucherRedeem; exports.hashKey = _chunk26K6T2YScjs.hashKey; exports.hashVoucherCode = _chunk26K6T2YScjs.hashVoucherCode; exports.isBoundAccountSelectionError = _chunk25GXJCEZcjs.isBoundAccountSelectionError; exports.isConcurrencyRejection = _chunk26K6T2YScjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunk4VZX5F4Tcjs.isKindMappedEndpoint; exports.isRedeemRequest = _chunk26K6T2YScjs.isRedeemRequest; exports.isSerialQueueTimeout = _chunk26K6T2YScjs.isSerialQueueTimeout; exports.isSubscriptionProviderId = _chunk4VZX5F4Tcjs.isSubscriptionProviderId; exports.isUserMessageRequest = _chunk26K6T2YScjs.isUserMessageRequest; exports.legacyEndpointsToBindings = _chunk26K6T2YScjs.legacyEndpointsToBindings; exports.loadServerConfig = _chunk26K6T2YScjs.loadServerConfig; exports.mergeServerConfig = _chunk26K6T2YScjs.mergeServerConfig; exports.modelKindsForEndpoint = _chunk4VZX5F4Tcjs.modelKindsForEndpoint; exports.newVoucherId = _chunk26K6T2YScjs.newVoucherId; exports.normalizeAccountProbe = _chunk26K6T2YScjs.normalizeAccountProbe; exports.normalizeAllowanceScheduling = _chunk26K6T2YScjs.normalizeAllowanceScheduling; exports.normalizeAudit = _chunk26K6T2YScjs.normalizeAudit; exports.normalizeBilling = _chunk26K6T2YScjs.normalizeBilling; exports.normalizeFingerprint = _chunk26K6T2YScjs.normalizeFingerprint; exports.normalizeGatewayBindings = _chunk26K6T2YScjs.normalizeGatewayBindings; exports.normalizePrefixTargets = _chunk26K6T2YScjs.normalizePrefixTargets; exports.normalizeProxyConfig = _chunk26K6T2YScjs.normalizeProxyConfig; exports.normalizeProxySegment = _chunk26K6T2YScjs.normalizeProxySegment; exports.normalizeQueueSegments = _chunk26K6T2YScjs.normalizeQueueSegments; exports.normalizeServerConfig = _chunk26K6T2YScjs.normalizeServerConfig; exports.normalizeVoucher = _chunk26K6T2YScjs.normalizeVoucher; exports.normalizeWebhookDestination = _chunk26K6T2YScjs.normalizeWebhookDestination; exports.normalizeWebhookSegment = _chunk26K6T2YScjs.normalizeWebhookSegment; exports.parseModelRef = _chunk4VZX5F4Tcjs.parseModelRef; exports.pickModelRefFromList = _chunk4VZX5F4Tcjs.pickModelRefFromList; exports.randomBase62 = _chunk26K6T2YScjs.randomBase62; exports.redactAuditText = _chunkFCR77GYMcjs.redactAuditText; exports.resolveGatewayBinding = _chunk26K6T2YScjs.resolveGatewayBinding; exports.resolvePrefixTarget = _chunk4VZX5F4Tcjs.resolvePrefixTarget; exports.resolveRoute = _chunk4VZX5F4Tcjs.resolveRoute; exports.saveServerConfig = _chunk26K6T2YScjs.saveServerConfig; exports.startOfLocalDay = _chunk26K6T2YScjs.startOfLocalDay; exports.startOfLocalWeek = _chunk26K6T2YScjs.startOfLocalWeek; exports.toVoucherInfo = _chunk26K6T2YScjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunk4VZX5F4Tcjs.validateEndpointModelConfig; exports.verifyKey = _chunk26K6T2YScjs.verifyKey; exports.verifyPresentedKey = _chunk26K6T2YScjs.verifyPresentedKey; exports.voucherCodePrefix = _chunk26K6T2YScjs.voucherCodePrefix;
|
package/dist/outbound-api.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VoucherConfig } from '@omnicross/contracts/voucher-types';
|
|
2
|
-
import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, n as OutboundApiDeps, r as OutboundApiServerStatus, t as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, q as OutboundApiServerConfig, m as ModelPrefixTargets, x as OutboundProxyConfig, s as OutboundEndpoint, R as RequestRole, Q as ModelRef, k as KindMappedEndpoint, l as ModelKind, O as OutboundKeyDb, o as OutboundApiKeyCreated } from './types-
|
|
3
|
-
export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, M as MessagesModelKind, p as OutboundApiKeyInfo, u as OutboundKeyActivationMode, v as OutboundKeyDbRow, w as OutboundKeyPolicy, y as ResponsesModelKind, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-
|
|
2
|
+
import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, n as OutboundApiDeps, r as OutboundApiServerStatus, t as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, q as OutboundApiServerConfig, m as ModelPrefixTargets, x as OutboundProxyConfig, s as OutboundEndpoint, R as RequestRole, Q as ModelRef, k as KindMappedEndpoint, l as ModelKind, O as OutboundKeyDb, o as OutboundApiKeyCreated } from './types-C2MwkLah.cjs';
|
|
3
|
+
export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, M as MessagesModelKind, p as OutboundApiKeyInfo, u as OutboundKeyActivationMode, v as OutboundKeyDbRow, w as OutboundKeyPolicy, y as ResponsesModelKind, V as VoucherCreateInput, z as VoucherDb, B as computeVoucherGrant, D as generateVoucherCode, H as hashVoucherCode, I as newVoucherId, J as startOfLocalDay, L as startOfLocalWeek, N as toVoucherInfo, P as voucherCodePrefix } from './types-C2MwkLah.cjs';
|
|
4
4
|
import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
|
|
5
5
|
import { AuditConfig } from '@omnicross/contracts/audit-types';
|
|
6
6
|
import { BillingConfig } from '@omnicross/contracts/billing-types';
|
|
@@ -12,7 +12,7 @@ import { K as KeyCostLimits, M as ModelRestriction } from './keyPolicy-zdWTu3CQ.
|
|
|
12
12
|
export { a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.cjs';
|
|
13
13
|
import http from 'node:http';
|
|
14
14
|
import { IngressFormat } from './provider-proxy/types.cjs';
|
|
15
|
-
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-
|
|
15
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-CVFE8KKe.cjs';
|
|
16
16
|
export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.cjs';
|
|
17
17
|
import '@omnicross/contracts/health-logging-types';
|
|
18
18
|
import './logger-4GvQNzhE.cjs';
|
|
@@ -20,8 +20,9 @@ import './ports/provider-config-source.cjs';
|
|
|
20
20
|
import '@omnicross/contracts/llm-config';
|
|
21
21
|
import './transformer/types.cjs';
|
|
22
22
|
import './transformer/TransformerService.cjs';
|
|
23
|
-
import './ProviderProxy-
|
|
23
|
+
import './ProviderProxy-QdwNV6l1.cjs';
|
|
24
24
|
import '@omnicross/contracts/completion-types';
|
|
25
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
25
26
|
import '@omnicross/contracts/subscription-types';
|
|
26
27
|
import '@omnicross/contracts/usage-types';
|
|
27
28
|
import './completion/ApiKeyPoolService.cjs';
|
|
@@ -195,8 +196,9 @@ declare function normalizeAccountProbe(raw: Partial<OutboundApiServerConfig> | u
|
|
|
195
196
|
* Fill + range-CLAMP the request-audit segment to the frozen defaults
|
|
196
197
|
* (request-audit-log, design D2). Lenient like the other segment normalizers:
|
|
197
198
|
* `enabled`/`captureBodies`/`trustForwardedFor` coerce to booleans (default
|
|
198
|
-
* false)
|
|
199
|
-
* `[1, 365]`. Default (all-off) ⇒
|
|
199
|
+
* false). `maxBodyBytes:-1` means unlimited; other finite values clamp to
|
|
200
|
+
* `[0, 1_048_576]`. `retentionDays` clamps to `[1, 365]`. Default (all-off) ⇒
|
|
201
|
+
* no capture ⇒ zero regression.
|
|
200
202
|
*/
|
|
201
203
|
declare function normalizeAudit(raw: Partial<OutboundApiServerConfig> | undefined | null): AuditConfig;
|
|
202
204
|
/**
|