@omnicross/core 0.1.6 → 0.1.7
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/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-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-SQYVORNP.cjs → chunk-4BB343BI.cjs} +527 -267
- 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-UDCC7EMR.js → chunk-E3COOKUP.js} +307 -47
- 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-SNYBEXLB.cjs → chunk-OJGQKHN5.cjs} +3 -1
- 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-SIZQQD6T.js → chunk-RJ5ZGNI3.js} +42 -5
- package/dist/{chunk-KCVJWJST.cjs → chunk-RJUONLUQ.cjs} +47 -10
- package/dist/{chunk-BPKCU575.js → chunk-SOO562NM.js} +3 -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/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 +26 -22
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -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 +3 -2
- package/dist/outbound-api/routeResolver.d.ts +3 -2
- 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 +2 -1
- package/dist/outbound-api/types.d.ts +2 -1
- package/dist/outbound-api.cjs +23 -19
- package/dist/outbound-api.d.cts +7 -5
- package/dist/outbound-api.d.ts +7 -5
- package/dist/outbound-api.js +22 -18
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +2 -1
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +2 -1
- 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 +1 -1
- package/dist/ports.d.ts +1 -1
- package/dist/provider-proxy/ProviderProxy.cjs +23 -19
- package/dist/provider-proxy/ProviderProxy.d.cts +1 -0
- package/dist/provider-proxy/ProviderProxy.d.ts +1 -0
- 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 +5 -0
- package/dist/provider-proxy/types.d.ts +5 -0
- package/dist/provider-proxy.cjs +23 -19
- package/dist/provider-proxy.d.cts +1 -0
- package/dist/provider-proxy.d.ts +1 -0
- package/dist/provider-proxy.js +22 -18
- package/dist/{routeResolver-CHTv_Bs5.d.ts → routeResolver-BxOfunbm.d.ts} +1 -1
- package/dist/{routeResolver-kepxnfcC.d.cts → routeResolver-D5OzD0iM.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-CqZD77rS.d.ts} +39 -0
- package/dist/{types-H3wGZSOo.d.cts → types-gjJ5lJ5n.d.cts} +39 -0
- 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 +5 -1
- package/dist/usage/usage-recorder.d.ts +5 -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
|
@@ -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-gjJ5lJ5n.cjs';
|
|
4
|
+
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-D5OzD0iM.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';
|
|
@@ -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-CqZD77rS.js';
|
|
4
|
+
export { R as RouteResolveError, b as RouteResolveResult, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from '../routeResolver-BxOfunbm.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';
|
|
@@ -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';
|
|
@@ -9,12 +9,13 @@ import '../ports/provider-config-source.cjs';
|
|
|
9
9
|
import '../ProviderProxy-CnMQYN59.cjs';
|
|
10
10
|
import '../provider-proxy/types.cjs';
|
|
11
11
|
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-
|
|
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-gjJ5lJ5n.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';
|
|
@@ -9,12 +9,13 @@ import '../ports/provider-config-source.js';
|
|
|
9
9
|
import '../ProviderProxy-C-xqrkKi.js';
|
|
10
10
|
import '../provider-proxy/types.js';
|
|
11
11
|
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-
|
|
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-CqZD77rS.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 _chunk4BB343BIcjs = require('./chunk-4BB343BI.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-OJGQKHN5.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 = _chunk4BB343BIcjs.ConcurrencyQueueFullError; exports.ConcurrencyWaitCancelledError = _chunk4BB343BIcjs.ConcurrencyWaitCancelledError; exports.ConcurrencyWaitTimeoutError = _chunk4BB343BIcjs.ConcurrencyWaitTimeoutError; exports.DEFAULT_ACCOUNT_PROBE = _chunk4BB343BIcjs.DEFAULT_ACCOUNT_PROBE; exports.DEFAULT_ALLOWANCE_SCHEDULING = _chunk4BB343BIcjs.DEFAULT_ALLOWANCE_SCHEDULING; exports.DEFAULT_CONCURRENCY_QUEUE = _chunk4BB343BIcjs.DEFAULT_CONCURRENCY_QUEUE; exports.DEFAULT_FINGERPRINT = _chunk4BB343BIcjs.DEFAULT_FINGERPRINT; exports.DEFAULT_OUTBOUND_PORT = _chunk4BB343BIcjs.DEFAULT_OUTBOUND_PORT; exports.DEFAULT_USER_MESSAGE_QUEUE = _chunk4BB343BIcjs.DEFAULT_USER_MESSAGE_QUEUE; exports.ENDPOINT_MODEL_KINDS = _chunk4IH4EL7Mcjs.ENDPOINT_MODEL_KINDS; exports.KeySpendTracker = _chunk4BB343BIcjs.KeySpendTracker; exports.KeyedMutex = _chunk4BB343BIcjs.KeyedMutex; exports.OUTBOUND_API_SERVER_CONFIG_KEY = _chunk4BB343BIcjs.OUTBOUND_API_SERVER_CONFIG_KEY; exports.OutboundApiServer = _chunk4BB343BIcjs.OutboundApiServer; exports.OutboundConcurrencyGate = _chunk4BB343BIcjs.OutboundConcurrencyGate; exports.OutboundRateLimiter = _chunk4BB343BIcjs.OutboundRateLimiter; exports.SUBSCRIPTION_PROVIDER_IDS = _chunk4VZX5F4Tcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SerialQueueTimeoutError = _chunk4BB343BIcjs.SerialQueueTimeoutError; exports.UserMessageSerialQueue = _chunk4BB343BIcjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunk4BB343BIcjs.__resetOutboundApiServerForTests; exports.beginAuditCapture = _chunkXPIOJQS2cjs.beginAuditCapture; exports.beginBillingCapture = _chunkAPYG5QD7cjs.beginBillingCapture; exports.boundAccountSelectionMessage = _chunk25GXJCEZcjs.boundAccountSelectionMessage; exports.candidateBackgroundModelIds = _chunk4BB343BIcjs.candidateBackgroundModelIds; exports.candidateGatewayBindings = _chunk4BB343BIcjs.candidateGatewayBindings; exports.checkKeyQuota = _chunk4BB343BIcjs.checkKeyQuota; exports.classifyModelPrefix = _chunk4VZX5F4Tcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunk4BB343BIcjs.computeKeyExpiry; exports.computeVoucherGrant = _chunk4BB343BIcjs.computeVoucherGrant; exports.createIntegrationKey = _chunk4BB343BIcjs.createIntegrationKey; exports.createNamedKey = _chunk4BB343BIcjs.createNamedKey; exports.defaultServerConfig = _chunk4BB343BIcjs.defaultServerConfig; exports.detectModelKind = _chunk4VZX5F4Tcjs.detectModelKind; exports.detectRequestRole = _chunk4VZX5F4Tcjs.detectRequestRole; exports.endpointSupportsSubscription = _chunk4VZX5F4Tcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunk4VZX5F4Tcjs.endpointToIngressFormat; exports.formatUrls = _chunk4BB343BIcjs.formatUrls; exports.gatewayBindingToEndpointConfig = _chunk4BB343BIcjs.gatewayBindingToEndpointConfig; exports.generateVoucherCode = _chunk4BB343BIcjs.generateVoucherCode; exports.getOutboundApiServer = _chunk4BB343BIcjs.getOutboundApiServer; exports.handleVoucherRedeem = _chunk4BB343BIcjs.handleVoucherRedeem; exports.hashKey = _chunk4BB343BIcjs.hashKey; exports.hashVoucherCode = _chunk4BB343BIcjs.hashVoucherCode; exports.isBoundAccountSelectionError = _chunk25GXJCEZcjs.isBoundAccountSelectionError; exports.isConcurrencyRejection = _chunk4BB343BIcjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunk4VZX5F4Tcjs.isKindMappedEndpoint; exports.isRedeemRequest = _chunk4BB343BIcjs.isRedeemRequest; exports.isSerialQueueTimeout = _chunk4BB343BIcjs.isSerialQueueTimeout; exports.isSubscriptionProviderId = _chunk4VZX5F4Tcjs.isSubscriptionProviderId; exports.isUserMessageRequest = _chunk4BB343BIcjs.isUserMessageRequest; exports.legacyEndpointsToBindings = _chunk4BB343BIcjs.legacyEndpointsToBindings; exports.loadServerConfig = _chunk4BB343BIcjs.loadServerConfig; exports.mergeServerConfig = _chunk4BB343BIcjs.mergeServerConfig; exports.modelKindsForEndpoint = _chunk4VZX5F4Tcjs.modelKindsForEndpoint; exports.newVoucherId = _chunk4BB343BIcjs.newVoucherId; exports.normalizeAccountProbe = _chunk4BB343BIcjs.normalizeAccountProbe; exports.normalizeAllowanceScheduling = _chunk4BB343BIcjs.normalizeAllowanceScheduling; exports.normalizeAudit = _chunk4BB343BIcjs.normalizeAudit; exports.normalizeBilling = _chunk4BB343BIcjs.normalizeBilling; exports.normalizeFingerprint = _chunk4BB343BIcjs.normalizeFingerprint; exports.normalizeGatewayBindings = _chunk4BB343BIcjs.normalizeGatewayBindings; exports.normalizePrefixTargets = _chunk4BB343BIcjs.normalizePrefixTargets; exports.normalizeProxyConfig = _chunk4BB343BIcjs.normalizeProxyConfig; exports.normalizeProxySegment = _chunk4BB343BIcjs.normalizeProxySegment; exports.normalizeQueueSegments = _chunk4BB343BIcjs.normalizeQueueSegments; exports.normalizeServerConfig = _chunk4BB343BIcjs.normalizeServerConfig; exports.normalizeVoucher = _chunk4BB343BIcjs.normalizeVoucher; exports.normalizeWebhookDestination = _chunk4BB343BIcjs.normalizeWebhookDestination; exports.normalizeWebhookSegment = _chunk4BB343BIcjs.normalizeWebhookSegment; exports.parseModelRef = _chunk4VZX5F4Tcjs.parseModelRef; exports.pickModelRefFromList = _chunk4VZX5F4Tcjs.pickModelRefFromList; exports.randomBase62 = _chunk4BB343BIcjs.randomBase62; exports.redactAuditText = _chunkFCR77GYMcjs.redactAuditText; exports.resolveGatewayBinding = _chunk4BB343BIcjs.resolveGatewayBinding; exports.resolvePrefixTarget = _chunk4VZX5F4Tcjs.resolvePrefixTarget; exports.resolveRoute = _chunk4VZX5F4Tcjs.resolveRoute; exports.saveServerConfig = _chunk4BB343BIcjs.saveServerConfig; exports.startOfLocalDay = _chunk4BB343BIcjs.startOfLocalDay; exports.startOfLocalWeek = _chunk4BB343BIcjs.startOfLocalWeek; exports.toVoucherInfo = _chunk4BB343BIcjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunk4VZX5F4Tcjs.validateEndpointModelConfig; exports.verifyKey = _chunk4BB343BIcjs.verifyKey; exports.verifyPresentedKey = _chunk4BB343BIcjs.verifyPresentedKey; exports.voucherCodePrefix = _chunk4BB343BIcjs.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-gjJ5lJ5n.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-gjJ5lJ5n.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-D5OzD0iM.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';
|
|
@@ -22,6 +22,7 @@ import './transformer/types.cjs';
|
|
|
22
22
|
import './transformer/TransformerService.cjs';
|
|
23
23
|
import './ProviderProxy-CnMQYN59.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
|
/**
|
package/dist/outbound-api.d.ts
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-CqZD77rS.js';
|
|
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-CqZD77rS.js';
|
|
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.js';
|
|
13
13
|
import http from 'node:http';
|
|
14
14
|
import { IngressFormat } from './provider-proxy/types.js';
|
|
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-BxOfunbm.js';
|
|
16
16
|
export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.js';
|
|
17
17
|
import '@omnicross/contracts/health-logging-types';
|
|
18
18
|
import './logger-4GvQNzhE.js';
|
|
@@ -22,6 +22,7 @@ import './transformer/types.js';
|
|
|
22
22
|
import './transformer/TransformerService.js';
|
|
23
23
|
import './ProviderProxy-C-xqrkKi.js';
|
|
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.js';
|
|
@@ -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
|
/**
|
package/dist/outbound-api.js
CHANGED
|
@@ -63,29 +63,33 @@ import {
|
|
|
63
63
|
verifyKey,
|
|
64
64
|
verifyPresentedKey,
|
|
65
65
|
voucherCodePrefix
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import "./chunk-WB6PH56J.js";
|
|
66
|
+
} from "./chunk-E3COOKUP.js";
|
|
68
67
|
import "./chunk-VVEHS2LI.js";
|
|
69
68
|
import "./chunk-46RLHI7D.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
72
|
-
import "./chunk-DK4A7DLE.js";
|
|
73
|
-
import "./chunk-VRFBB5DB.js";
|
|
69
|
+
import "./chunk-MYYR3HZL.js";
|
|
70
|
+
import "./chunk-PEGTIPB3.js";
|
|
74
71
|
import "./chunk-LVUCAWMK.js";
|
|
75
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-32O35CIF.js";
|
|
73
|
+
import "./chunk-FU7EAR73.js";
|
|
76
74
|
import "./chunk-LB6EBS6Y.js";
|
|
77
|
-
import "./chunk-6CL5HTPQ.js";
|
|
78
75
|
import "./chunk-7VU7V2E4.js";
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-
|
|
81
|
-
import "./chunk-
|
|
76
|
+
import "./chunk-FXR6N3SR.js";
|
|
77
|
+
import "./chunk-SOO562NM.js";
|
|
78
|
+
import "./chunk-WNKWAEUR.js";
|
|
79
|
+
import "./chunk-MZNPGW5Q.js";
|
|
80
|
+
import "./chunk-DK4A7DLE.js";
|
|
81
|
+
import "./chunk-XXFYLL7R.js";
|
|
82
82
|
import "./chunk-XTEI64OU.js";
|
|
83
83
|
import "./chunk-XX6NQJMA.js";
|
|
84
|
+
import "./chunk-GFIZ6LQI.js";
|
|
85
|
+
import "./chunk-OE6TDIWW.js";
|
|
86
|
+
import "./chunk-DRWHTIIZ.js";
|
|
87
|
+
import "./chunk-JWC6APFQ.js";
|
|
84
88
|
import "./chunk-5ERIZW3D.js";
|
|
85
|
-
import "./chunk-
|
|
89
|
+
import "./chunk-PO3XB56Z.js";
|
|
90
|
+
import "./chunk-N7OOJI5V.js";
|
|
86
91
|
import "./chunk-23S5OPIO.js";
|
|
87
92
|
import "./chunk-AVYJ4YBN.js";
|
|
88
|
-
import "./chunk-OE6TDIWW.js";
|
|
89
93
|
import "./chunk-OPRS4IQZ.js";
|
|
90
94
|
import {
|
|
91
95
|
BoundAccountSelectionError,
|
|
@@ -94,7 +98,6 @@ import {
|
|
|
94
98
|
} from "./chunk-2JYRIADS.js";
|
|
95
99
|
import "./chunk-DE2SRBFZ.js";
|
|
96
100
|
import "./chunk-ZY6KU6P3.js";
|
|
97
|
-
import "./chunk-JWC6APFQ.js";
|
|
98
101
|
import {
|
|
99
102
|
beginBillingCapture
|
|
100
103
|
} from "./chunk-WLYIIEAF.js";
|
|
@@ -123,19 +126,20 @@ import {
|
|
|
123
126
|
import "./chunk-H5JUT3KV.js";
|
|
124
127
|
import {
|
|
125
128
|
beginAuditCapture
|
|
126
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-7C7DET6S.js";
|
|
127
130
|
import {
|
|
128
131
|
AUDIT_REDACTED,
|
|
129
132
|
redactAuditText
|
|
130
133
|
} from "./chunk-K5NM7VAH.js";
|
|
131
134
|
import "./chunk-WNY4WMRF.js";
|
|
132
135
|
import "./chunk-OZFM4X3S.js";
|
|
133
|
-
import "./chunk-
|
|
136
|
+
import "./chunk-5NJLQ6T6.js";
|
|
134
137
|
import "./chunk-N5T4M4GU.js";
|
|
135
138
|
import "./chunk-TOVPMMHM.js";
|
|
136
|
-
import "./chunk-
|
|
137
|
-
import "./chunk-
|
|
139
|
+
import "./chunk-RJ5ZGNI3.js";
|
|
140
|
+
import "./chunk-3WD4HTR2.js";
|
|
138
141
|
import "./chunk-MKF46GNZ.js";
|
|
142
|
+
import "./chunk-GL6XM527.js";
|
|
139
143
|
import "./chunk-CDHS2QDC.js";
|
|
140
144
|
import "./chunk-Y7FO65VT.js";
|
|
141
145
|
import "./chunk-FMOBD2OQ.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
2
|
-
import { a as AllowanceSchedulingConfig } from '../types-
|
|
2
|
+
import { a as AllowanceSchedulingConfig } from '../types-gjJ5lJ5n.cjs';
|
|
3
3
|
import { AccountAllowanceStore } from './AccountAllowanceStore.cjs';
|
|
4
4
|
import '@omnicross/contracts/account-tokens-types';
|
|
5
5
|
import '@omnicross/contracts/audit-types';
|
|
@@ -16,6 +16,7 @@ import '../ProviderProxy-CnMQYN59.cjs';
|
|
|
16
16
|
import '../provider-proxy/types.cjs';
|
|
17
17
|
import 'node:http';
|
|
18
18
|
import '@omnicross/contracts/completion-types';
|
|
19
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
19
20
|
import '@omnicross/contracts/usage-types';
|
|
20
21
|
import '../completion/ApiKeyPoolService.cjs';
|
|
21
22
|
import './AuthSource.cjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
2
|
-
import { a as AllowanceSchedulingConfig } from '../types-
|
|
2
|
+
import { a as AllowanceSchedulingConfig } from '../types-CqZD77rS.js';
|
|
3
3
|
import { AccountAllowanceStore } from './AccountAllowanceStore.js';
|
|
4
4
|
import '@omnicross/contracts/account-tokens-types';
|
|
5
5
|
import '@omnicross/contracts/audit-types';
|
|
@@ -16,6 +16,7 @@ import '../ProviderProxy-C-xqrkKi.js';
|
|
|
16
16
|
import '../provider-proxy/types.js';
|
|
17
17
|
import 'node:http';
|
|
18
18
|
import '@omnicross/contracts/completion-types';
|
|
19
|
+
import '@omnicross/contracts/usage-stats-types';
|
|
19
20
|
import '@omnicross/contracts/usage-types';
|
|
20
21
|
import '../completion/ApiKeyPoolService.js';
|
|
21
22
|
import './AuthSource.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkNKVZ6Z3Ycjs = require('../chunk-NKVZ6Z3Y.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.ACCOUNT_ROUTE_ACTIVITY_LIMIT = _chunkNKVZ6Z3Ycjs.ACCOUNT_ROUTE_ACTIVITY_LIMIT; exports.AccountRouteActivityStore = _chunkNKVZ6Z3Ycjs.AccountRouteActivityStore; exports.getSharedAccountRouteActivity = _chunkNKVZ6Z3Ycjs.getSharedAccountRouteActivity;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded, metadata-only history of subscription account routing decisions.
|
|
3
|
+
*
|
|
4
|
+
* Records are created at the shared upstream fetch seam, after authentication has
|
|
5
|
+
* reported the account that will actually serve the request. The store is
|
|
6
|
+
* intentionally process-local: it is useful for live operator diagnostics without
|
|
7
|
+
* turning session/account affinity into a durable tracking database.
|
|
8
|
+
*/
|
|
9
|
+
declare const ACCOUNT_ROUTE_ACTIVITY_LIMIT = 300;
|
|
10
|
+
type AccountRouteEndpoint = 'responses' | 'messages';
|
|
11
|
+
type AccountRouteSessionSource = 'session-header' | 'thread-header' | 'body-session-id' | 'body-thread-id' | 'prompt-cache-key' | 'content-fingerprint' | 'api-key-fallback' | 'none';
|
|
12
|
+
type AccountRouteAffinity = 'new' | 'sticky' | 'switched' | 'untracked';
|
|
13
|
+
interface AccountRouteActivityInput {
|
|
14
|
+
providerId: string;
|
|
15
|
+
accountId: string;
|
|
16
|
+
endpoint: AccountRouteEndpoint;
|
|
17
|
+
sessionKey?: string;
|
|
18
|
+
sessionSource: AccountRouteSessionSource;
|
|
19
|
+
model: string;
|
|
20
|
+
status: number;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
ts?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Post-hoc error observed AFTER the upstream status was recorded — e.g. a
|
|
25
|
+
* `200` whose SSE body carries a `response.failed` server-overload event.
|
|
26
|
+
* Never known at `record()` time; set later via {@link amend}. Absent on
|
|
27
|
+
* healthy responses.
|
|
28
|
+
*/
|
|
29
|
+
streamError?: string;
|
|
30
|
+
}
|
|
31
|
+
interface AccountRouteActivityRecord extends AccountRouteActivityInput {
|
|
32
|
+
id: string;
|
|
33
|
+
ts: number;
|
|
34
|
+
affinity: AccountRouteAffinity;
|
|
35
|
+
previousAccountId?: string;
|
|
36
|
+
}
|
|
37
|
+
interface AccountRouteActivityQuery {
|
|
38
|
+
providerId?: string;
|
|
39
|
+
accountId?: string;
|
|
40
|
+
sessionKey?: string;
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
declare class AccountRouteActivityStore {
|
|
44
|
+
private readonly records;
|
|
45
|
+
private sequence;
|
|
46
|
+
record(input: AccountRouteActivityInput): AccountRouteActivityRecord;
|
|
47
|
+
list(query?: AccountRouteActivityQuery): AccountRouteActivityRecord[];
|
|
48
|
+
clear(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Backfill a field on an already-recorded entry. Used to annotate a record
|
|
51
|
+
* AFTER the upstream body streams — e.g. a `200` whose SSE body carries a
|
|
52
|
+
* `response.failed` overload event is only detectable mid-relay, long after
|
|
53
|
+
* `record()` stamped the 200 status. `patch` is intentionally narrow: only
|
|
54
|
+
* post-hoc-observable fields belong here, never the routing-decision fields.
|
|
55
|
+
* No-op when the id has already aged out of the bounded ring.
|
|
56
|
+
*/
|
|
57
|
+
amend(id: string, patch: Partial<Pick<AccountRouteActivityRecord, 'streamError'>>): void;
|
|
58
|
+
}
|
|
59
|
+
declare function getSharedAccountRouteActivity(): AccountRouteActivityStore;
|
|
60
|
+
|
|
61
|
+
export { ACCOUNT_ROUTE_ACTIVITY_LIMIT, type AccountRouteActivityInput, type AccountRouteActivityQuery, type AccountRouteActivityRecord, AccountRouteActivityStore, type AccountRouteAffinity, type AccountRouteEndpoint, type AccountRouteSessionSource, getSharedAccountRouteActivity };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded, metadata-only history of subscription account routing decisions.
|
|
3
|
+
*
|
|
4
|
+
* Records are created at the shared upstream fetch seam, after authentication has
|
|
5
|
+
* reported the account that will actually serve the request. The store is
|
|
6
|
+
* intentionally process-local: it is useful for live operator diagnostics without
|
|
7
|
+
* turning session/account affinity into a durable tracking database.
|
|
8
|
+
*/
|
|
9
|
+
declare const ACCOUNT_ROUTE_ACTIVITY_LIMIT = 300;
|
|
10
|
+
type AccountRouteEndpoint = 'responses' | 'messages';
|
|
11
|
+
type AccountRouteSessionSource = 'session-header' | 'thread-header' | 'body-session-id' | 'body-thread-id' | 'prompt-cache-key' | 'content-fingerprint' | 'api-key-fallback' | 'none';
|
|
12
|
+
type AccountRouteAffinity = 'new' | 'sticky' | 'switched' | 'untracked';
|
|
13
|
+
interface AccountRouteActivityInput {
|
|
14
|
+
providerId: string;
|
|
15
|
+
accountId: string;
|
|
16
|
+
endpoint: AccountRouteEndpoint;
|
|
17
|
+
sessionKey?: string;
|
|
18
|
+
sessionSource: AccountRouteSessionSource;
|
|
19
|
+
model: string;
|
|
20
|
+
status: number;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
ts?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Post-hoc error observed AFTER the upstream status was recorded — e.g. a
|
|
25
|
+
* `200` whose SSE body carries a `response.failed` server-overload event.
|
|
26
|
+
* Never known at `record()` time; set later via {@link amend}. Absent on
|
|
27
|
+
* healthy responses.
|
|
28
|
+
*/
|
|
29
|
+
streamError?: string;
|
|
30
|
+
}
|
|
31
|
+
interface AccountRouteActivityRecord extends AccountRouteActivityInput {
|
|
32
|
+
id: string;
|
|
33
|
+
ts: number;
|
|
34
|
+
affinity: AccountRouteAffinity;
|
|
35
|
+
previousAccountId?: string;
|
|
36
|
+
}
|
|
37
|
+
interface AccountRouteActivityQuery {
|
|
38
|
+
providerId?: string;
|
|
39
|
+
accountId?: string;
|
|
40
|
+
sessionKey?: string;
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
declare class AccountRouteActivityStore {
|
|
44
|
+
private readonly records;
|
|
45
|
+
private sequence;
|
|
46
|
+
record(input: AccountRouteActivityInput): AccountRouteActivityRecord;
|
|
47
|
+
list(query?: AccountRouteActivityQuery): AccountRouteActivityRecord[];
|
|
48
|
+
clear(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Backfill a field on an already-recorded entry. Used to annotate a record
|
|
51
|
+
* AFTER the upstream body streams — e.g. a `200` whose SSE body carries a
|
|
52
|
+
* `response.failed` overload event is only detectable mid-relay, long after
|
|
53
|
+
* `record()` stamped the 200 status. `patch` is intentionally narrow: only
|
|
54
|
+
* post-hoc-observable fields belong here, never the routing-decision fields.
|
|
55
|
+
* No-op when the id has already aged out of the bounded ring.
|
|
56
|
+
*/
|
|
57
|
+
amend(id: string, patch: Partial<Pick<AccountRouteActivityRecord, 'streamError'>>): void;
|
|
58
|
+
}
|
|
59
|
+
declare function getSharedAccountRouteActivity(): AccountRouteActivityStore;
|
|
60
|
+
|
|
61
|
+
export { ACCOUNT_ROUTE_ACTIVITY_LIMIT, type AccountRouteActivityInput, type AccountRouteActivityQuery, type AccountRouteActivityRecord, AccountRouteActivityStore, type AccountRouteAffinity, type AccountRouteEndpoint, type AccountRouteSessionSource, getSharedAccountRouteActivity };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunkOTZC4TNHcjs = require('../chunk-OTZC4TNH.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.OVERLOAD_ENTRY_TTL_MS = _chunkOTZC4TNHcjs.OVERLOAD_ENTRY_TTL_MS; exports.OVERLOAD_RECENT_LIMIT = _chunkOTZC4TNHcjs.OVERLOAD_RECENT_LIMIT; exports.ServerOverloadCounterStore = _chunkOTZC4TNHcjs.ServerOverloadCounterStore; exports.__resetSharedOverloadCounterForTests = _chunkOTZC4TNHcjs.__resetSharedOverloadCounterForTests; exports.getSharedOverloadCounter = _chunkOTZC4TNHcjs.getSharedOverloadCounter; exports.setSharedOverloadCounter = _chunkOTZC4TNHcjs.setSharedOverloadCounter;
|