@omnicross/core 0.1.3 → 0.1.5
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/LICENSE +21 -21
- package/NOTICE +57 -57
- package/README.md +15 -15
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +6 -5
- package/dist/auth/GeminiCodeAssistProjectResolver.js +6 -5
- package/dist/{chunk-2DCNB7DF.cjs → chunk-3Q6Z6JTO.cjs} +154 -26
- package/dist/chunk-3QFXFCHG.js +33 -0
- package/dist/chunk-3Z5BQZFM.cjs +52 -0
- package/dist/{chunk-4VAVYUZS.cjs → chunk-4XMYPW46.cjs} +9 -9
- package/dist/chunk-4YINUUKQ.cjs +33 -0
- package/dist/{chunk-S4WBV25P.js → chunk-6QZGDLL4.js} +106 -23
- package/dist/{chunk-C72S6TTV.cjs → chunk-7FEBOPJO.cjs} +5 -4
- package/dist/chunk-APYG5QD7.cjs +50 -0
- package/dist/{chunk-5HTVET6E.js → chunk-BODMAL6G.js} +143 -15
- package/dist/{chunk-CWM2ZDU5.js → chunk-BPKCU575.js} +3 -10
- package/dist/{chunk-2FMI2B6V.cjs → chunk-CGKLE6IW.cjs} +350 -461
- package/dist/{chunk-BO4RFWBR.js → chunk-D3TDKWRP.js} +84 -3
- package/dist/{chunk-RSJ3TWJQ.cjs → chunk-DDMRUL76.cjs} +5 -5
- package/dist/chunk-FCR77GYM.cjs +33 -0
- package/dist/{chunk-4DECIFU7.js → chunk-FH2P4OCD.js} +178 -289
- package/dist/{chunk-N5QFKSDO.js → chunk-HRRYG2AX.js} +2 -1
- package/dist/{chunk-KUU2RNG6.cjs → chunk-HYN75H6G.cjs} +3 -0
- package/dist/{chunk-Z7LUNECE.js → chunk-IB3FDI4O.js} +5 -4
- package/dist/chunk-IFXJ2BG7.js +109 -0
- package/dist/{chunk-JO5NLTLY.js → chunk-IK3KE3AU.js} +3 -0
- package/dist/{chunk-C7PSERMH.js → chunk-IWQAX3CS.js} +1 -1
- package/dist/{chunk-YGXJGRFI.cjs → chunk-JWVTXXPX.cjs} +106 -23
- package/dist/{chunk-7YN22L2H.cjs → chunk-K52THW2C.cjs} +5 -5
- package/dist/chunk-K5NM7VAH.js +33 -0
- package/dist/{chunk-Y6OM7EV7.cjs → chunk-KFI44N2R.cjs} +2 -1
- package/dist/{chunk-Z7Y2NPHY.js → chunk-MFZ5437A.js} +1 -1
- package/dist/chunk-OE6TDIWW.js +22 -0
- package/dist/{chunk-MQNDWYPN.js → chunk-OQWKZCXP.js} +13 -6
- package/dist/chunk-OZFM4X3S.js +18 -0
- package/dist/chunk-PG7PS2NN.cjs +170 -0
- package/dist/{chunk-3QOSDDNI.cjs → chunk-SNYBEXLB.cjs} +6 -13
- package/dist/chunk-SYQF7OIR.js +52 -0
- package/dist/{chunk-CZHZGRU7.js → chunk-UHGVBFU3.js} +2 -0
- package/dist/chunk-UIBD2YY5.cjs +22 -0
- package/dist/chunk-UNWKG6EI.cjs +109 -0
- package/dist/{chunk-SVXC36MU.cjs → chunk-VACWOIRE.cjs} +2 -0
- package/dist/chunk-WLYIIEAF.js +50 -0
- package/dist/chunk-XSVNC2UD.cjs +18 -0
- package/dist/{chunk-FFALUUZZ.cjs → chunk-ZCIQ3L3R.cjs} +18 -11
- package/dist/completion/CompletionService.cjs +26 -19
- package/dist/completion/CompletionService.js +25 -18
- package/dist/completion.cjs +28 -21
- package/dist/completion.js +27 -20
- package/dist/index.cjs +35 -25
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +44 -34
- package/dist/keyPolicy-Cp0FntZl.d.cts +90 -0
- package/dist/keyPolicy-Cp0FntZl.d.ts +90 -0
- package/dist/outbound-api/auditCapture.cjs +9 -0
- package/dist/outbound-api/auditCapture.d.cts +54 -0
- package/dist/outbound-api/auditCapture.d.ts +54 -0
- package/dist/outbound-api/auditCapture.js +9 -0
- package/dist/outbound-api/auditRedact.cjs +8 -0
- package/dist/outbound-api/auditRedact.d.cts +30 -0
- package/dist/outbound-api/auditRedact.d.ts +30 -0
- package/dist/outbound-api/auditRedact.js +8 -0
- package/dist/outbound-api/billingCapture.cjs +8 -0
- package/dist/outbound-api/billingCapture.d.cts +61 -0
- package/dist/outbound-api/billingCapture.d.ts +61 -0
- package/dist/outbound-api/billingCapture.js +8 -0
- package/dist/outbound-api/quotaWarn.cjs +12 -0
- package/dist/outbound-api/quotaWarn.d.cts +43 -0
- package/dist/outbound-api/quotaWarn.d.ts +43 -0
- package/dist/outbound-api/quotaWarn.js +12 -0
- package/dist/outbound-api/routeResolver.cjs +2 -2
- package/dist/outbound-api/routeResolver.d.cts +3 -2
- package/dist/outbound-api/routeResolver.d.ts +3 -2
- package/dist/outbound-api/routeResolver.js +1 -1
- package/dist/outbound-api/types.d.cts +2 -1
- package/dist/outbound-api/types.d.ts +2 -1
- package/dist/outbound-api.cjs +33 -23
- package/dist/outbound-api.d.cts +9 -140
- package/dist/outbound-api.d.ts +9 -140
- package/dist/outbound-api.js +32 -22
- package/dist/pipeline/AuthSource.d.cts +6 -0
- package/dist/pipeline/AuthSource.d.ts +6 -0
- package/dist/pipeline/SubscriptionAuthSource.cjs +2 -2
- package/dist/pipeline/SubscriptionAuthSource.js +1 -1
- package/dist/pipeline/SubscriptionAuthStrategy.d.cts +6 -0
- package/dist/pipeline/SubscriptionAuthStrategy.d.ts +6 -0
- package/dist/pipeline/auditUsageStash.cjs +10 -0
- package/dist/pipeline/auditUsageStash.d.cts +37 -0
- package/dist/pipeline/auditUsageStash.d.ts +37 -0
- package/dist/pipeline/auditUsageStash.js +10 -0
- package/dist/pipeline/executeProviderCall.cjs +2 -2
- package/dist/pipeline/executeProviderCall.js +1 -1
- package/dist/pipeline/upstreamFetch.cjs +15 -0
- package/dist/pipeline/upstreamFetch.d.cts +89 -0
- package/dist/pipeline/upstreamFetch.d.ts +89 -0
- package/dist/pipeline/upstreamFetch.js +15 -0
- package/dist/pipeline/upstreamTrace.cjs +14 -0
- package/dist/pipeline/upstreamTrace.d.cts +85 -0
- package/dist/pipeline/upstreamTrace.d.ts +85 -0
- package/dist/pipeline/upstreamTrace.js +14 -0
- package/dist/pipeline/webhookEmit.cjs +10 -0
- package/dist/pipeline/webhookEmit.d.cts +36 -0
- package/dist/pipeline/webhookEmit.d.ts +36 -0
- package/dist/pipeline/webhookEmit.js +10 -0
- package/dist/ports.d.cts +2 -1
- package/dist/ports.d.ts +2 -1
- package/dist/provider-proxy/ProviderProxy.cjs +26 -19
- package/dist/provider-proxy/ProviderProxy.js +25 -18
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +28 -19
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +17 -1
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +17 -1
- package/dist/provider-proxy/ingress/providerProxyShared.js +27 -18
- package/dist/provider-proxy/types.d.cts +7 -0
- package/dist/provider-proxy/types.d.ts +7 -0
- package/dist/provider-proxy.cjs +26 -19
- package/dist/provider-proxy.js +25 -18
- package/dist/{routeResolver-B1NglTfe.d.ts → routeResolver-C4T7yClx.d.ts} +1 -1
- package/dist/{routeResolver-CbG5uBgm.d.cts → routeResolver-CB3tvJKy.d.cts} +1 -1
- package/dist/transformer/transformers/AnthropicTransformer.cjs +2 -2
- package/dist/transformer/transformers/AnthropicTransformer.js +1 -1
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.cjs +3 -3
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.js +2 -2
- package/dist/transformer/transformers/GeminiTransformer.cjs +3 -3
- package/dist/transformer/transformers/GeminiTransformer.js +2 -2
- package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +2 -2
- package/dist/transformer/transformers/OpenAIResponseTransformer.js +1 -1
- package/dist/transformer/transformers/OpenCodeGoTransformer.cjs +2 -2
- package/dist/transformer/transformers/OpenCodeGoTransformer.js +1 -1
- package/dist/transformer/transformers.cjs +8 -8
- package/dist/transformer/transformers.js +7 -7
- package/dist/transformer.cjs +8 -8
- package/dist/transformer.js +7 -7
- package/dist/{types-aBFFXoBz.d.cts → types-B8Arpxn0.d.cts} +14 -90
- package/dist/{types-6OUY_xfA.d.ts → types-lgPYQuZS.d.ts} +14 -90
- package/dist/usage/usage-recorder.cjs +3 -2
- package/dist/usage/usage-recorder.js +2 -1
- package/dist/usage.cjs +3 -2
- package/dist/usage.js +2 -1
- package/package.json +64 -64
- package/dist/chunk-S6JGLF3G.cjs +0 -89
- package/dist/{chunk-FTQ7IQUC.js → chunk-C6OV7GCC.js} +8 -8
package/dist/completion.js
CHANGED
|
@@ -9,36 +9,41 @@ import {
|
|
|
9
9
|
getOpenRouterProviderConfig,
|
|
10
10
|
register,
|
|
11
11
|
release
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FH2P4OCD.js";
|
|
13
13
|
import "./chunk-VVEHS2LI.js";
|
|
14
14
|
import "./chunk-46RLHI7D.js";
|
|
15
15
|
import "./chunk-G2UTNSGU.js";
|
|
16
16
|
import "./chunk-DK4A7DLE.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OQWKZCXP.js";
|
|
18
|
+
import "./chunk-IB3FDI4O.js";
|
|
19
19
|
import "./chunk-ZJZAOKI7.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-C6OV7GCC.js";
|
|
21
|
+
import "./chunk-IWQAX3CS.js";
|
|
22
|
+
import "./chunk-BODMAL6G.js";
|
|
23
23
|
import "./chunk-7VU7V2E4.js";
|
|
24
24
|
import "./chunk-ZLX3KGXX.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-BPKCU575.js";
|
|
26
26
|
import "./chunk-MZNPGW5Q.js";
|
|
27
27
|
import "./chunk-XTEI64OU.js";
|
|
28
28
|
import "./chunk-XX6NQJMA.js";
|
|
29
29
|
import "./chunk-IAXWICZU.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-5ENKBSWO.js";
|
|
32
|
-
import "./chunk-N5QFKSDO.js";
|
|
33
|
-
import "./chunk-AVYJ4YBN.js";
|
|
30
|
+
import "./chunk-OE6TDIWW.js";
|
|
34
31
|
import "./chunk-DRWHTIIZ.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-TKJMZBAH.js";
|
|
37
|
-
import "./chunk-JO5NLTLY.js";
|
|
32
|
+
import "./chunk-IK3KE3AU.js";
|
|
38
33
|
import {
|
|
39
34
|
getProviderHeaders
|
|
40
35
|
} from "./chunk-ZY6KU6P3.js";
|
|
41
36
|
import "./chunk-JWC6APFQ.js";
|
|
37
|
+
import "./chunk-5ERIZW3D.js";
|
|
38
|
+
import "./chunk-5ENKBSWO.js";
|
|
39
|
+
import "./chunk-HRRYG2AX.js";
|
|
40
|
+
import "./chunk-AVYJ4YBN.js";
|
|
41
|
+
import "./chunk-WLYIIEAF.js";
|
|
42
|
+
import "./chunk-TKJMZBAH.js";
|
|
43
|
+
import "./chunk-3QFXFCHG.js";
|
|
44
|
+
import "./chunk-UHGVBFU3.js";
|
|
45
|
+
import "./chunk-AQ5TNQB7.js";
|
|
46
|
+
import "./chunk-XEKD23J5.js";
|
|
42
47
|
import {
|
|
43
48
|
buildAnthropicApiUrl,
|
|
44
49
|
buildAzureOpenAIApiUrl,
|
|
@@ -50,13 +55,15 @@ import {
|
|
|
50
55
|
resolveApiFormat,
|
|
51
56
|
resolveProviderEndpoint
|
|
52
57
|
} from "./chunk-H5JUT3KV.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-IFXJ2BG7.js";
|
|
59
|
+
import "./chunk-K5NM7VAH.js";
|
|
60
|
+
import "./chunk-WNY4WMRF.js";
|
|
61
|
+
import "./chunk-OZFM4X3S.js";
|
|
56
62
|
import "./chunk-5ZQBEOMD.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-MFZ5437A.js";
|
|
64
|
+
import "./chunk-6QZGDLL4.js";
|
|
65
|
+
import "./chunk-D3TDKWRP.js";
|
|
66
|
+
import "./chunk-SYQF7OIR.js";
|
|
60
67
|
import {
|
|
61
68
|
BuiltinToolExecutor,
|
|
62
69
|
getBuiltinSearchTools
|
package/dist/index.cjs
CHANGED
|
@@ -71,11 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var _chunk2FMI2B6Vcjs = require('./chunk-2FMI2B6V.cjs');
|
|
74
|
+
var _chunkCGKLE6IWcjs = require('./chunk-CGKLE6IW.cjs');
|
|
79
75
|
|
|
80
76
|
|
|
81
77
|
|
|
@@ -89,37 +85,43 @@ var _chunk46ZIFWYGcjs = require('./chunk-46ZIFWYG.cjs');
|
|
|
89
85
|
var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
|
|
90
86
|
|
|
91
87
|
|
|
92
|
-
var
|
|
93
|
-
require('./chunk-
|
|
88
|
+
var _chunkZCIQ3L3Rcjs = require('./chunk-ZCIQ3L3R.cjs');
|
|
89
|
+
require('./chunk-7FEBOPJO.cjs');
|
|
94
90
|
require('./chunk-DWKQZ2SK.cjs');
|
|
95
|
-
require('./chunk-
|
|
96
|
-
require('./chunk-
|
|
97
|
-
require('./chunk-
|
|
91
|
+
require('./chunk-4XMYPW46.cjs');
|
|
92
|
+
require('./chunk-K52THW2C.cjs');
|
|
93
|
+
require('./chunk-3Q6Z6JTO.cjs');
|
|
98
94
|
require('./chunk-EYZYXJTJ.cjs');
|
|
99
95
|
|
|
100
96
|
|
|
101
97
|
var _chunkYMFAJFQTcjs = require('./chunk-YMFAJFQT.cjs');
|
|
102
98
|
|
|
103
99
|
|
|
104
|
-
var
|
|
100
|
+
var _chunkSNYBEXLBcjs = require('./chunk-SNYBEXLB.cjs');
|
|
105
101
|
require('./chunk-GBHYAGX3.cjs');
|
|
106
102
|
require('./chunk-RPII3E6Z.cjs');
|
|
107
103
|
require('./chunk-6RPZADX3.cjs');
|
|
108
104
|
require('./chunk-QWBWGODS.cjs');
|
|
105
|
+
require('./chunk-UIBD2YY5.cjs');
|
|
106
|
+
require('./chunk-R3HK6R4B.cjs');
|
|
107
|
+
require('./chunk-HYN75H6G.cjs');
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
var _chunkQ27JY5RGcjs = require('./chunk-Q27JY5RG.cjs');
|
|
111
|
+
require('./chunk-QXD4MV2X.cjs');
|
|
109
112
|
require('./chunk-NYUNU75A.cjs');
|
|
110
113
|
require('./chunk-VQY5W4YW.cjs');
|
|
111
|
-
require('./chunk-
|
|
114
|
+
require('./chunk-KFI44N2R.cjs');
|
|
112
115
|
|
|
113
116
|
|
|
114
117
|
var _chunkSVNDB62Dcjs = require('./chunk-SVNDB62D.cjs');
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
var _chunkAPYG5QD7cjs = require('./chunk-APYG5QD7.cjs');
|
|
117
121
|
require('./chunk-L74VDN4A.cjs');
|
|
118
|
-
require('./chunk-
|
|
122
|
+
require('./chunk-4YINUUKQ.cjs');
|
|
119
123
|
|
|
120
124
|
|
|
121
|
-
var _chunkQ27JY5RGcjs = require('./chunk-Q27JY5RG.cjs');
|
|
122
|
-
require('./chunk-QXD4MV2X.cjs');
|
|
123
125
|
|
|
124
126
|
|
|
125
127
|
|
|
@@ -130,13 +132,15 @@ require('./chunk-QXD4MV2X.cjs');
|
|
|
130
132
|
|
|
131
133
|
|
|
132
134
|
|
|
133
|
-
var _chunkA2YMUCBTcjs = require('./chunk-A2YMUCBT.cjs');
|
|
134
135
|
|
|
135
136
|
|
|
136
137
|
|
|
137
138
|
|
|
139
|
+
var _chunkVACWOIREcjs = require('./chunk-VACWOIRE.cjs');
|
|
140
|
+
require('./chunk-QBZJ7P2T.cjs');
|
|
138
141
|
|
|
139
142
|
|
|
143
|
+
var _chunk4IH4EL7Mcjs = require('./chunk-4IH4EL7M.cjs');
|
|
140
144
|
|
|
141
145
|
|
|
142
146
|
|
|
@@ -147,11 +151,16 @@ var _chunkA2YMUCBTcjs = require('./chunk-A2YMUCBT.cjs');
|
|
|
147
151
|
|
|
148
152
|
|
|
149
153
|
|
|
150
|
-
var
|
|
151
|
-
require('./chunk-QBZJ7P2T.cjs');
|
|
154
|
+
var _chunkA2YMUCBTcjs = require('./chunk-A2YMUCBT.cjs');
|
|
152
155
|
|
|
153
156
|
|
|
154
|
-
var
|
|
157
|
+
var _chunkUNWKG6EIcjs = require('./chunk-UNWKG6EI.cjs');
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
var _chunkFCR77GYMcjs = require('./chunk-FCR77GYM.cjs');
|
|
162
|
+
require('./chunk-AEOZIDEB.cjs');
|
|
163
|
+
require('./chunk-XSVNC2UD.cjs');
|
|
155
164
|
|
|
156
165
|
|
|
157
166
|
|
|
@@ -164,9 +173,10 @@ var _chunk4IH4EL7Mcjs = require('./chunk-4IH4EL7M.cjs');
|
|
|
164
173
|
|
|
165
174
|
|
|
166
175
|
var _chunkSUEGJ75Dcjs = require('./chunk-SUEGJ75D.cjs');
|
|
167
|
-
require('./chunk-
|
|
168
|
-
require('./chunk-
|
|
169
|
-
require('./chunk-
|
|
176
|
+
require('./chunk-DDMRUL76.cjs');
|
|
177
|
+
require('./chunk-JWVTXXPX.cjs');
|
|
178
|
+
require('./chunk-PG7PS2NN.cjs');
|
|
179
|
+
require('./chunk-3Z5BQZFM.cjs');
|
|
170
180
|
|
|
171
181
|
|
|
172
182
|
|
|
@@ -316,4 +326,4 @@ var _chunkUNEFIWXIcjs = require('./chunk-UNEFIWXI.cjs');
|
|
|
316
326
|
|
|
317
327
|
|
|
318
328
|
|
|
319
|
-
exports.AUDIT_REDACTED =
|
|
329
|
+
exports.AUDIT_REDACTED = _chunkFCR77GYMcjs.AUDIT_REDACTED; exports.BuiltinToolExecutor = _chunkNZYN7C3Pcjs.BuiltinToolExecutor; exports.CompletionService = _chunkCGKLE6IWcjs.CompletionService; exports.ConcurrencyQueueFullError = _chunkCGKLE6IWcjs.ConcurrencyQueueFullError; exports.ConcurrencyWaitCancelledError = _chunkCGKLE6IWcjs.ConcurrencyWaitCancelledError; exports.ConcurrencyWaitTimeoutError = _chunkCGKLE6IWcjs.ConcurrencyWaitTimeoutError; exports.DEFAULT_ACCOUNT_PROBE = _chunkCGKLE6IWcjs.DEFAULT_ACCOUNT_PROBE; exports.DEFAULT_CONCURRENCY_QUEUE = _chunkCGKLE6IWcjs.DEFAULT_CONCURRENCY_QUEUE; exports.DEFAULT_FINGERPRINT = _chunkCGKLE6IWcjs.DEFAULT_FINGERPRINT; exports.DEFAULT_OUTBOUND_PORT = _chunkCGKLE6IWcjs.DEFAULT_OUTBOUND_PORT; exports.DEFAULT_ROUTE_IDLE_MS = _chunkCGKLE6IWcjs.DEFAULT_ROUTE_IDLE_MS; exports.DEFAULT_USER_MESSAGE_QUEUE = _chunkCGKLE6IWcjs.DEFAULT_USER_MESSAGE_QUEUE; exports.ENDPOINT_MODEL_KINDS = _chunk4IH4EL7Mcjs.ENDPOINT_MODEL_KINDS; exports.KeySpendTracker = _chunkCGKLE6IWcjs.KeySpendTracker; exports.KeyedMutex = _chunkCGKLE6IWcjs.KeyedMutex; exports.NATIVE_SEARCH_TOOL_NAMES = _chunkGMMT7RVNcjs.NATIVE_SEARCH_TOOL_NAMES; exports.OPENROUTER_APP_HEADERS = _chunkUNEFIWXIcjs.OPENROUTER_APP_HEADERS; exports.OUTBOUND_API_SERVER_CONFIG_KEY = _chunkCGKLE6IWcjs.OUTBOUND_API_SERVER_CONFIG_KEY; exports.OutboundApiConfigError = _chunkCGKLE6IWcjs.OutboundApiConfigError; exports.OutboundApiServer = _chunkCGKLE6IWcjs.OutboundApiServer; exports.OutboundConcurrencyGate = _chunkCGKLE6IWcjs.OutboundConcurrencyGate; exports.OutboundRateLimiter = _chunkCGKLE6IWcjs.OutboundRateLimiter; exports.PricingEngine = _chunkYMFAJFQTcjs.PricingEngine; exports.ProviderProxy = _chunkCGKLE6IWcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunkCGKLE6IWcjs.ProviderProxyRouteMap; exports.SUBSCRIPTION_PROVIDER_IDS = _chunkVACWOIREcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SerialQueueTimeoutError = _chunkCGKLE6IWcjs.SerialQueueTimeoutError; exports.TransformerChainExecutor = _chunk46ZIFWYGcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.UsageRecorder = _chunkSNYBEXLBcjs.UsageRecorder; exports.UserMessageSerialQueue = _chunkCGKLE6IWcjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunkCGKLE6IWcjs.__resetOutboundApiServerForTests; exports.__resetProviderProxyForTests = _chunkCGKLE6IWcjs.__resetProviderProxyForTests; exports.addOpenRouterProviderToRequest = _chunkCGKLE6IWcjs.addOpenRouterProviderToRequest; exports.applyAugmentation = _chunkJMJBSACDcjs.applyAugmentation; exports.attachStreamEventBuffer = _chunkCGKLE6IWcjs.attach; exports.beginAuditCapture = _chunkUNWKG6EIcjs.beginAuditCapture; exports.beginBillingCapture = _chunkAPYG5QD7cjs.beginBillingCapture; exports.buildAnthropicApiUrl = _chunkA2YMUCBTcjs.buildAnthropicApiUrl; exports.buildAzureOpenAIApiUrl = _chunkA2YMUCBTcjs.buildAzureOpenAIApiUrl; exports.buildGeminiApiUrl = _chunkA2YMUCBTcjs.buildGeminiApiUrl; exports.buildNativeSearchAugmentation = _chunkJMJBSACDcjs.buildNativeSearchAugmentation; exports.buildOpenAIApiUrl = _chunkA2YMUCBTcjs.buildOpenAIApiUrl; exports.buildOpenAIResponseApiUrl = _chunkA2YMUCBTcjs.buildOpenAIResponseApiUrl; exports.buildProviderApiUrl = _chunkA2YMUCBTcjs.buildProviderApiUrl; exports.checkKeyQuota = _chunkCGKLE6IWcjs.checkKeyQuota; exports.classifyModelPrefix = _chunkVACWOIREcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunkCGKLE6IWcjs.computeKeyExpiry; exports.computeVoucherGrant = _chunkCGKLE6IWcjs.computeVoucherGrant; exports.convertAnthropicRequestToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicRequestToOpenAI; exports.convertAnthropicStreamToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicStreamToOpenAI; exports.convertAnthropicToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicToOpenAI; exports.convertAnthropicToOpenAIWithThinking = _chunkSUEGJ75Dcjs.convertAnthropicToOpenAIWithThinking; exports.convertMessageToAnthropic = _chunkCGKLE6IWcjs.convertMessageToAnthropic; exports.convertMessageToGemini = _chunkCGKLE6IWcjs.convertMessageToGemini; exports.convertMessageToOpenAI = _chunkCGKLE6IWcjs.convertMessageToOpenAI; exports.convertOpenAIResponseToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIResponseToAnthropic; exports.convertOpenAIStreamToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIStreamToAnthropic; exports.convertOpenAIToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIToAnthropic; exports.convertOpenAIToAnthropicWithThinking = _chunkSUEGJ75Dcjs.convertOpenAIToAnthropicWithThinking; exports.createNamedKey = _chunkCGKLE6IWcjs.createNamedKey; exports.createSSEParser = _chunkHQP3K7PUcjs.createSSEParser; exports.defaultServerConfig = _chunkCGKLE6IWcjs.defaultServerConfig; exports.detectModelKind = _chunkVACWOIREcjs.detectModelKind; exports.detectNativeSearch = _chunkJMJBSACDcjs.detectNativeSearch; exports.detectRequestRole = _chunkVACWOIREcjs.detectRequestRole; exports.emitStreamEvent = _chunkCGKLE6IWcjs.emit; exports.endpointSupportsSubscription = _chunkVACWOIREcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunkVACWOIREcjs.endpointToIngressFormat; exports.extractRouteToken = _chunkCGKLE6IWcjs.extractRouteToken; exports.formatUrls = _chunkCGKLE6IWcjs.formatUrls; exports.generateVoucherCode = _chunkCGKLE6IWcjs.generateVoucherCode; exports.getBuiltinSearchTools = _chunkNZYN7C3Pcjs.getBuiltinSearchTools; exports.getOpenRouterAppIdentity = _chunkUNEFIWXIcjs.getOpenRouterAppIdentity; exports.getOpenRouterProviderConfig = _chunkCGKLE6IWcjs.getOpenRouterProviderConfig; exports.getOutboundApiServer = _chunkCGKLE6IWcjs.getOutboundApiServer; exports.getProviderHeaders = _chunkQ27JY5RGcjs.getProviderHeaders; exports.getProviderProxy = _chunkCGKLE6IWcjs.getProviderProxy; exports.handleVoucherRedeem = _chunkCGKLE6IWcjs.handleVoucherRedeem; exports.hasImageContent = _chunkSUEGJ75Dcjs.hasImageContent; exports.hasThinkingEnabled = _chunkSUEGJ75Dcjs.hasThinkingEnabled; exports.hashKey = _chunkCGKLE6IWcjs.hashKey; exports.hashVoucherCode = _chunkCGKLE6IWcjs.hashVoucherCode; exports.isConcurrencyRejection = _chunkCGKLE6IWcjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunkVACWOIREcjs.isKindMappedEndpoint; exports.isOpenRouterProvider = _chunkUNEFIWXIcjs.isOpenRouterProvider; exports.isRedeemRequest = _chunkCGKLE6IWcjs.isRedeemRequest; exports.isSerialQueueTimeout = _chunkCGKLE6IWcjs.isSerialQueueTimeout; exports.isSubscriptionProviderId = _chunkVACWOIREcjs.isSubscriptionProviderId; exports.isUserMessageRequest = _chunkCGKLE6IWcjs.isUserMessageRequest; exports.loadServerConfig = _chunkCGKLE6IWcjs.loadServerConfig; exports.mergeServerConfig = _chunkCGKLE6IWcjs.mergeServerConfig; exports.modelKindsForEndpoint = _chunkVACWOIREcjs.modelKindsForEndpoint; exports.newVoucherId = _chunkCGKLE6IWcjs.newVoucherId; exports.normalizeAccountProbe = _chunkCGKLE6IWcjs.normalizeAccountProbe; exports.normalizeAudit = _chunkCGKLE6IWcjs.normalizeAudit; exports.normalizeAzureEndpoint = _chunkA2YMUCBTcjs.normalizeAzureEndpoint; exports.normalizeBilling = _chunkCGKLE6IWcjs.normalizeBilling; exports.normalizeFingerprint = _chunkCGKLE6IWcjs.normalizeFingerprint; exports.normalizePrefixTargets = _chunkCGKLE6IWcjs.normalizePrefixTargets; exports.normalizeProxyConfig = _chunkCGKLE6IWcjs.normalizeProxyConfig; exports.normalizeProxySegment = _chunkCGKLE6IWcjs.normalizeProxySegment; exports.normalizeQueueSegments = _chunkCGKLE6IWcjs.normalizeQueueSegments; exports.normalizeServerConfig = _chunkCGKLE6IWcjs.normalizeServerConfig; exports.normalizeVoucher = _chunkCGKLE6IWcjs.normalizeVoucher; exports.normalizeWebhookDestination = _chunkCGKLE6IWcjs.normalizeWebhookDestination; exports.normalizeWebhookSegment = _chunkCGKLE6IWcjs.normalizeWebhookSegment; exports.parseModelRef = _chunkVACWOIREcjs.parseModelRef; exports.pickModelRefFromList = _chunkVACWOIREcjs.pickModelRefFromList; exports.randomBase62 = _chunkCGKLE6IWcjs.randomBase62; exports.redactAuditText = _chunkFCR77GYMcjs.redactAuditText; exports.registerBuiltinTransformers = _chunkZCIQ3L3Rcjs.registerBuiltinTransformers; exports.registerStreamEventBuffer = _chunkCGKLE6IWcjs.register; exports.releaseStreamEventBuffer = _chunkCGKLE6IWcjs.release; exports.resolveApiFormat = _chunkA2YMUCBTcjs.resolveApiFormat; exports.resolvePrefixTarget = _chunkVACWOIREcjs.resolvePrefixTarget; exports.resolveProviderEndpoint = _chunkA2YMUCBTcjs.resolveProviderEndpoint; exports.resolveRoute = _chunkVACWOIREcjs.resolveRoute; exports.saveServerConfig = _chunkCGKLE6IWcjs.saveServerConfig; exports.serializeError = _chunkSVNDB62Dcjs.serializeError; exports.setOpenRouterAppIdentity = _chunkUNEFIWXIcjs.setOpenRouterAppIdentity; exports.startOfLocalDay = _chunkCGKLE6IWcjs.startOfLocalDay; exports.startOfLocalWeek = _chunkCGKLE6IWcjs.startOfLocalWeek; exports.streamSSEResponse = _chunkHQP3K7PUcjs.streamSSEResponse; exports.toVoucherInfo = _chunkCGKLE6IWcjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunkVACWOIREcjs.validateEndpointModelConfig; exports.validateServerModelConfig = _chunkVACWOIREcjs.validateServerModelConfig; exports.verifyKey = _chunkCGKLE6IWcjs.verifyKey; exports.verifyPresentedKey = _chunkCGKLE6IWcjs.verifyPresentedKey; exports.voucherCodePrefix = _chunkCGKLE6IWcjs.voucherCodePrefix;
|
package/dist/index.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ export { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
|
9
9
|
export { UsageEventStore } from './ports/usage-event-store.cjs';
|
|
10
10
|
export { WebSearchBackend } from './ports/web-search-backend.cjs';
|
|
11
11
|
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, IngressFormat, ProviderProxyDeps, ProxyAttribution, RetryCallback, RouteAuthMode, RouteContext, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat, UsageRecorderImport, UsageRecorderImport as UsageSink } from './provider-proxy/types.cjs';
|
|
12
|
-
export { A as AccountProbeConfig, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, K as
|
|
12
|
+
export { A as AccountProbeConfig, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, K as KeySpendReader, c as KeySpendSeeder, d as KeySpendTracker, e as KindMappedEndpoint, M as MessagesModelKind, f as ModelKind, g as ModelPrefixTargets, h as OutboundApiDeps, i as OutboundApiKeyCreated, j as OutboundApiKeyInfo, k as OutboundApiServerConfig, l as OutboundApiServerStatus, O as OutboundCredentialStore, m as OutboundEndpoint, n as OutboundFormatUrls, o as OutboundKeyActivationMode, O as OutboundKeyDb, p as OutboundKeyDbRow, q as OutboundKeyPolicy, r as OutboundProxyConfig, R as RequestRole, s as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, t as VoucherDb, u as computeVoucherGrant, v as generateVoucherCode, w as hashVoucherCode, x as newVoucherId, y as startOfLocalDay, z as startOfLocalWeek, B as toVoucherInfo, D as voucherCodePrefix } from './types-B8Arpxn0.cjs';
|
|
13
13
|
export { CostCalculation, PricingEngine, PricingEngineOptions } from './usage/pricing-engine.cjs';
|
|
14
14
|
export { UsageRecordInput, UsageRecorder, UsageRecorderOptions } from './usage/usage-recorder.cjs';
|
|
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.cjs';
|
|
@@ -18,14 +18,18 @@ export { SimpleChatGeminiMessage, SimpleChatGeminiPart, StreamEvent, StreamEvent
|
|
|
18
18
|
export { buildAnthropicApiUrl, buildAzureOpenAIApiUrl, buildGeminiApiUrl, buildOpenAIApiUrl, buildOpenAIResponseApiUrl, buildProviderApiUrl, normalizeAzureEndpoint, resolveApiFormat, resolveProviderEndpoint } from './completion/url-builder.cjs';
|
|
19
19
|
export { applyAugmentation, buildNativeSearchAugmentation, detectNativeSearch } from './completion/NativeSearchInjector.cjs';
|
|
20
20
|
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.cjs';
|
|
21
|
-
export {
|
|
21
|
+
export { ApiServerSettingsStore, ApplyConfigInput, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.cjs';
|
|
22
22
|
export { convertAnthropicRequestToOpenAI, convertAnthropicStreamToOpenAI, convertAnthropicToOpenAI, convertAnthropicToOpenAIWithThinking, convertOpenAIResponseToAnthropic, convertOpenAIStreamToAnthropic, convertOpenAIToAnthropic, convertOpenAIToAnthropicWithThinking, hasImageContent, hasThinkingEnabled } from './ApiConverter.cjs';
|
|
23
23
|
export { ChainExecutionOptions, TransformerChainExecutor } from './transformer/TransformerChainExecutor.cjs';
|
|
24
24
|
export { TransformerService } from './transformer/TransformerService.cjs';
|
|
25
25
|
export { registerBuiltinTransformers } from './transformer/transformers.cjs';
|
|
26
26
|
export { Annotation, ImageContent, MessageContent, ModelRoute, ModelTransformerConfig, ReasoningConfig, RequestConfig, RequestRouteInfo, ResolvedTransformerChain, StreamChunk, TextContent, ThinkLevel, ThinkingContent, ToolCall, ToolChoice, ToolParameterSchema, TransformRequestResult, Transformer, TransformerChainConfig, TransformerConfigEntry, TransformerConstructor, TransformerContext, TransformerLogger, TransformerOptions, TransformerReference, TransformerServiceConfig, UnifiedChatRequest, UnifiedChatResponse, UnifiedMessage, UnifiedTool, UrlCitation } from './transformer/types.cjs';
|
|
27
|
+
export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.cjs';
|
|
28
|
+
export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.cjs';
|
|
29
|
+
export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.cjs';
|
|
27
30
|
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy-CnMQYN59.cjs';
|
|
28
|
-
export {
|
|
31
|
+
export { K as KeyCostLimits, a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-Cp0FntZl.cjs';
|
|
32
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-CB3tvJKy.cjs';
|
|
29
33
|
import '@omnicross/contracts/message-blocks';
|
|
30
34
|
import '@omnicross/contracts/completion-types';
|
|
31
35
|
import '@omnicross/contracts/mcp-types';
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ 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
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, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, K as
|
|
12
|
+
export { A as AccountProbeConfig, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, K as KeySpendReader, c as KeySpendSeeder, d as KeySpendTracker, e as KindMappedEndpoint, M as MessagesModelKind, f as ModelKind, g as ModelPrefixTargets, h as OutboundApiDeps, i as OutboundApiKeyCreated, j as OutboundApiKeyInfo, k as OutboundApiServerConfig, l as OutboundApiServerStatus, O as OutboundCredentialStore, m as OutboundEndpoint, n as OutboundFormatUrls, o as OutboundKeyActivationMode, O as OutboundKeyDb, p as OutboundKeyDbRow, q as OutboundKeyPolicy, r as OutboundProxyConfig, R as RequestRole, s as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, t as VoucherDb, u as computeVoucherGrant, v as generateVoucherCode, w as hashVoucherCode, x as newVoucherId, y as startOfLocalDay, z as startOfLocalWeek, B as toVoucherInfo, D as voucherCodePrefix } from './types-lgPYQuZS.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';
|
|
@@ -18,14 +18,18 @@ export { SimpleChatGeminiMessage, SimpleChatGeminiPart, StreamEvent, StreamEvent
|
|
|
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
20
|
export { __resetProviderProxyForTests, extractRouteToken, getProviderProxy } from './provider-proxy.js';
|
|
21
|
-
export {
|
|
21
|
+
export { ApiServerSettingsStore, ApplyConfigInput, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, 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';
|
|
24
24
|
export { TransformerService } from './transformer/TransformerService.js';
|
|
25
25
|
export { registerBuiltinTransformers } from './transformer/transformers.js';
|
|
26
26
|
export { Annotation, ImageContent, MessageContent, ModelRoute, ModelTransformerConfig, ReasoningConfig, RequestConfig, RequestRouteInfo, ResolvedTransformerChain, StreamChunk, TextContent, ThinkLevel, ThinkingContent, ToolCall, ToolChoice, ToolParameterSchema, TransformRequestResult, Transformer, TransformerChainConfig, TransformerConfigEntry, TransformerConstructor, TransformerContext, TransformerLogger, TransformerOptions, TransformerReference, TransformerServiceConfig, UnifiedChatRequest, UnifiedChatResponse, UnifiedMessage, UnifiedTool, UrlCitation } from './transformer/types.js';
|
|
27
|
+
export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.js';
|
|
28
|
+
export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.js';
|
|
29
|
+
export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.js';
|
|
27
30
|
export { D as DEFAULT_ROUTE_IDLE_MS, P as ProviderProxy, a as ProviderProxyRouteMap } from './ProviderProxy-C-xqrkKi.js';
|
|
28
|
-
export {
|
|
31
|
+
export { K as KeyCostLimits, a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-Cp0FntZl.js';
|
|
32
|
+
export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-C4T7yClx.js';
|
|
29
33
|
import '@omnicross/contracts/message-blocks';
|
|
30
34
|
import '@omnicross/contracts/completion-types';
|
|
31
35
|
import '@omnicross/contracts/mcp-types';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AUDIT_REDACTED,
|
|
3
2
|
CompletionService,
|
|
4
3
|
ConcurrencyQueueFullError,
|
|
5
4
|
ConcurrencyWaitCancelledError,
|
|
@@ -25,8 +24,6 @@ import {
|
|
|
25
24
|
__resetProviderProxyForTests,
|
|
26
25
|
addOpenRouterProviderToRequest,
|
|
27
26
|
attach,
|
|
28
|
-
beginAuditCapture,
|
|
29
|
-
beginBillingCapture,
|
|
30
27
|
checkKeyQuota,
|
|
31
28
|
computeKeyExpiry,
|
|
32
29
|
computeVoucherGrant,
|
|
@@ -65,7 +62,6 @@ import {
|
|
|
65
62
|
normalizeWebhookDestination,
|
|
66
63
|
normalizeWebhookSegment,
|
|
67
64
|
randomBase62,
|
|
68
|
-
redactAuditText,
|
|
69
65
|
register,
|
|
70
66
|
release,
|
|
71
67
|
saveServerConfig,
|
|
@@ -75,7 +71,7 @@ import {
|
|
|
75
71
|
verifyKey,
|
|
76
72
|
verifyPresentedKey,
|
|
77
73
|
voucherCodePrefix
|
|
78
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-FH2P4OCD.js";
|
|
79
75
|
import {
|
|
80
76
|
createSSEParser,
|
|
81
77
|
streamSSEResponse
|
|
@@ -89,48 +85,41 @@ import {
|
|
|
89
85
|
} from "./chunk-DK4A7DLE.js";
|
|
90
86
|
import {
|
|
91
87
|
registerBuiltinTransformers
|
|
92
|
-
} from "./chunk-
|
|
93
|
-
import "./chunk-
|
|
88
|
+
} from "./chunk-OQWKZCXP.js";
|
|
89
|
+
import "./chunk-IB3FDI4O.js";
|
|
94
90
|
import "./chunk-ZJZAOKI7.js";
|
|
95
|
-
import "./chunk-
|
|
96
|
-
import "./chunk-
|
|
97
|
-
import "./chunk-
|
|
91
|
+
import "./chunk-C6OV7GCC.js";
|
|
92
|
+
import "./chunk-IWQAX3CS.js";
|
|
93
|
+
import "./chunk-BODMAL6G.js";
|
|
98
94
|
import "./chunk-7VU7V2E4.js";
|
|
99
95
|
import {
|
|
100
96
|
PricingEngine
|
|
101
97
|
} from "./chunk-ZLX3KGXX.js";
|
|
102
98
|
import {
|
|
103
99
|
UsageRecorder
|
|
104
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-BPKCU575.js";
|
|
105
101
|
import "./chunk-MZNPGW5Q.js";
|
|
106
102
|
import "./chunk-XTEI64OU.js";
|
|
107
103
|
import "./chunk-XX6NQJMA.js";
|
|
108
104
|
import "./chunk-IAXWICZU.js";
|
|
109
|
-
import "./chunk-
|
|
110
|
-
import "./chunk-5ENKBSWO.js";
|
|
111
|
-
import "./chunk-N5QFKSDO.js";
|
|
112
|
-
import {
|
|
113
|
-
serializeError
|
|
114
|
-
} from "./chunk-AVYJ4YBN.js";
|
|
105
|
+
import "./chunk-OE6TDIWW.js";
|
|
115
106
|
import "./chunk-DRWHTIIZ.js";
|
|
116
|
-
import "./chunk-
|
|
117
|
-
import "./chunk-TKJMZBAH.js";
|
|
118
|
-
import "./chunk-JO5NLTLY.js";
|
|
107
|
+
import "./chunk-IK3KE3AU.js";
|
|
119
108
|
import {
|
|
120
109
|
getProviderHeaders
|
|
121
110
|
} from "./chunk-ZY6KU6P3.js";
|
|
122
111
|
import "./chunk-JWC6APFQ.js";
|
|
112
|
+
import "./chunk-5ERIZW3D.js";
|
|
113
|
+
import "./chunk-5ENKBSWO.js";
|
|
114
|
+
import "./chunk-HRRYG2AX.js";
|
|
123
115
|
import {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
resolveApiFormat,
|
|
132
|
-
resolveProviderEndpoint
|
|
133
|
-
} from "./chunk-H5JUT3KV.js";
|
|
116
|
+
serializeError
|
|
117
|
+
} from "./chunk-AVYJ4YBN.js";
|
|
118
|
+
import {
|
|
119
|
+
beginBillingCapture
|
|
120
|
+
} from "./chunk-WLYIIEAF.js";
|
|
121
|
+
import "./chunk-TKJMZBAH.js";
|
|
122
|
+
import "./chunk-3QFXFCHG.js";
|
|
134
123
|
import {
|
|
135
124
|
SUBSCRIPTION_PROVIDER_IDS,
|
|
136
125
|
classifyModelPrefix,
|
|
@@ -147,11 +136,31 @@ import {
|
|
|
147
136
|
resolveRoute,
|
|
148
137
|
validateEndpointModelConfig,
|
|
149
138
|
validateServerModelConfig
|
|
150
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-UHGVBFU3.js";
|
|
151
140
|
import "./chunk-AQ5TNQB7.js";
|
|
152
141
|
import {
|
|
153
142
|
ENDPOINT_MODEL_KINDS
|
|
154
143
|
} from "./chunk-XEKD23J5.js";
|
|
144
|
+
import {
|
|
145
|
+
buildAnthropicApiUrl,
|
|
146
|
+
buildAzureOpenAIApiUrl,
|
|
147
|
+
buildGeminiApiUrl,
|
|
148
|
+
buildOpenAIApiUrl,
|
|
149
|
+
buildOpenAIResponseApiUrl,
|
|
150
|
+
buildProviderApiUrl,
|
|
151
|
+
normalizeAzureEndpoint,
|
|
152
|
+
resolveApiFormat,
|
|
153
|
+
resolveProviderEndpoint
|
|
154
|
+
} from "./chunk-H5JUT3KV.js";
|
|
155
|
+
import {
|
|
156
|
+
beginAuditCapture
|
|
157
|
+
} from "./chunk-IFXJ2BG7.js";
|
|
158
|
+
import {
|
|
159
|
+
AUDIT_REDACTED,
|
|
160
|
+
redactAuditText
|
|
161
|
+
} from "./chunk-K5NM7VAH.js";
|
|
162
|
+
import "./chunk-WNY4WMRF.js";
|
|
163
|
+
import "./chunk-OZFM4X3S.js";
|
|
155
164
|
import {
|
|
156
165
|
convertAnthropicRequestToOpenAI,
|
|
157
166
|
convertAnthropicStreamToOpenAI,
|
|
@@ -164,9 +173,10 @@ import {
|
|
|
164
173
|
hasImageContent,
|
|
165
174
|
hasThinkingEnabled
|
|
166
175
|
} from "./chunk-5ZQBEOMD.js";
|
|
167
|
-
import "./chunk-
|
|
168
|
-
import "./chunk-
|
|
169
|
-
import "./chunk-
|
|
176
|
+
import "./chunk-MFZ5437A.js";
|
|
177
|
+
import "./chunk-6QZGDLL4.js";
|
|
178
|
+
import "./chunk-D3TDKWRP.js";
|
|
179
|
+
import "./chunk-SYQF7OIR.js";
|
|
170
180
|
import {
|
|
171
181
|
BuiltinToolExecutor,
|
|
172
182
|
getBuiltinSearchTools
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* keyPolicy — PURE decision helpers for the outbound key-policy envelope
|
|
3
|
+
* (`outbound-key-policy`, design D2/D4). Expiry/activation resolution +
|
|
4
|
+
* cost-quota decision. No I/O, no clock ownership (the caller passes `now`), so
|
|
5
|
+
* these are trivially unit-testable and reused by both the auth path
|
|
6
|
+
* (`verifyKey`) and the wire path (`outboundApiRouter`).
|
|
7
|
+
*
|
|
8
|
+
* The #6 (`restrictedModels`) and #9 (voucher) children EXTEND the key-policy
|
|
9
|
+
* schema; they must not change the shapes frozen here.
|
|
10
|
+
*
|
|
11
|
+
* @module outbound-api/keyPolicy
|
|
12
|
+
*/
|
|
13
|
+
/** The expiry/activation subset of a key row `computeKeyExpiry` reads. */
|
|
14
|
+
interface KeyExpiryInput {
|
|
15
|
+
/** Fixed-mode absolute expiry (epoch ms). */
|
|
16
|
+
expiresAt?: number | null;
|
|
17
|
+
/** Expiry mode; absent ⇒ `'fixed'`. */
|
|
18
|
+
activationMode?: 'fixed' | 'activation';
|
|
19
|
+
/** Activation-mode lifetime in days (absent/null ⇒ never expires). */
|
|
20
|
+
activationDays?: number | null;
|
|
21
|
+
/** First-use activation stamp (epoch ms); null ⇒ not yet activated. */
|
|
22
|
+
activatedAt?: number | null;
|
|
23
|
+
}
|
|
24
|
+
/** Result of {@link computeKeyExpiry}. */
|
|
25
|
+
interface KeyExpiryResult {
|
|
26
|
+
expired: boolean;
|
|
27
|
+
/** The resolved absolute expiry (epoch ms), when the key has one. */
|
|
28
|
+
effectiveExpiresAt?: number;
|
|
29
|
+
/**
|
|
30
|
+
* True when this is an activation-mode key that has NOT been activated yet, so
|
|
31
|
+
* the caller SHOULD stamp the activation (best-effort) on a successful verify.
|
|
32
|
+
*/
|
|
33
|
+
needsActivation?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Resolve whether a key is past its effective expiry (design D2).
|
|
37
|
+
* - `fixed`: expired when `expiresAt != null && now >= expiresAt`.
|
|
38
|
+
* - `activation`: while `activatedAt == null` the key is NOT expired (it
|
|
39
|
+
* activates on THIS use → `needsActivation`); once activated, expired when
|
|
40
|
+
* `now >= activatedAt + activationDays*DAY`. A null `activationDays` never
|
|
41
|
+
* expires.
|
|
42
|
+
* A key with no expiry configured never expires.
|
|
43
|
+
*/
|
|
44
|
+
declare function computeKeyExpiry(row: KeyExpiryInput, now: number): KeyExpiryResult;
|
|
45
|
+
/** Per-key USD cost limits carried on the verified key (absent scope ⇒ no cap). */
|
|
46
|
+
interface KeyCostLimits {
|
|
47
|
+
dailyUsd?: number;
|
|
48
|
+
totalUsd?: number;
|
|
49
|
+
weeklyUsd?: number;
|
|
50
|
+
}
|
|
51
|
+
/** In-memory per-key accumulated spend snapshot (see `keySpendTracker`). */
|
|
52
|
+
interface KeySpend {
|
|
53
|
+
dailyUsd: number;
|
|
54
|
+
/** Local-midnight boundary the `dailyUsd` window opened at (epoch ms). */
|
|
55
|
+
dailyWindowStart: number;
|
|
56
|
+
weeklyUsd: number;
|
|
57
|
+
/** Local week-start boundary the `weeklyUsd` window opened at (epoch ms). */
|
|
58
|
+
weeklyWindowStart: number;
|
|
59
|
+
totalUsd: number;
|
|
60
|
+
}
|
|
61
|
+
/** Decision returned by {@link checkKeyQuota}. */
|
|
62
|
+
type QuotaDecision = {
|
|
63
|
+
allowed: true;
|
|
64
|
+
} | {
|
|
65
|
+
allowed: false;
|
|
66
|
+
scope: 'daily' | 'weekly' | 'total';
|
|
67
|
+
limitUsd: number;
|
|
68
|
+
spentUsd: number;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Decide whether the key's accumulated spend already meets/exceeds any
|
|
72
|
+
* configured cost limit (design D4). `allowed:false` when a scope's PRIOR spend
|
|
73
|
+
* is `>= limit` (the triggering request's own cost is unknown pre-flight →
|
|
74
|
+
* bounded one-request overage, CRS-equivalent). An unconfigured scope is never
|
|
75
|
+
* gated; a `limits`-less key always passes.
|
|
76
|
+
*/
|
|
77
|
+
declare function checkKeyQuota(limits: KeyCostLimits | undefined, spend: KeySpend): QuotaDecision;
|
|
78
|
+
/**
|
|
79
|
+
* Per-key model restriction carried on the verified key (outbound-key-policy #6).
|
|
80
|
+
* Present ONLY when the key has `enableModelRestriction === true` — so the wire
|
|
81
|
+
* layer's presence check (`if (key.modelRestriction) …`) is the zero-regression
|
|
82
|
+
* gate.
|
|
83
|
+
*/
|
|
84
|
+
interface ModelRestriction {
|
|
85
|
+
mode: 'blacklist' | 'allowlist';
|
|
86
|
+
/** Bare modelIds the mode acts on. Empty allowlist denies every model. */
|
|
87
|
+
models: string[];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { type KeyCostLimits as K, type ModelRestriction as M, type QuotaDecision as Q, type KeyExpiryInput as a, type KeyExpiryResult as b, type KeySpend as c, checkKeyQuota as d, computeKeyExpiry as e };
|