@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.
Files changed (141) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +57 -57
  3. package/README.md +15 -15
  4. package/dist/auth/GeminiCodeAssistProjectResolver.cjs +6 -5
  5. package/dist/auth/GeminiCodeAssistProjectResolver.js +6 -5
  6. package/dist/{chunk-2DCNB7DF.cjs → chunk-3Q6Z6JTO.cjs} +154 -26
  7. package/dist/chunk-3QFXFCHG.js +33 -0
  8. package/dist/chunk-3Z5BQZFM.cjs +52 -0
  9. package/dist/{chunk-4VAVYUZS.cjs → chunk-4XMYPW46.cjs} +9 -9
  10. package/dist/chunk-4YINUUKQ.cjs +33 -0
  11. package/dist/{chunk-S4WBV25P.js → chunk-6QZGDLL4.js} +106 -23
  12. package/dist/{chunk-C72S6TTV.cjs → chunk-7FEBOPJO.cjs} +5 -4
  13. package/dist/chunk-APYG5QD7.cjs +50 -0
  14. package/dist/{chunk-5HTVET6E.js → chunk-BODMAL6G.js} +143 -15
  15. package/dist/{chunk-CWM2ZDU5.js → chunk-BPKCU575.js} +3 -10
  16. package/dist/{chunk-2FMI2B6V.cjs → chunk-CGKLE6IW.cjs} +350 -461
  17. package/dist/{chunk-BO4RFWBR.js → chunk-D3TDKWRP.js} +84 -3
  18. package/dist/{chunk-RSJ3TWJQ.cjs → chunk-DDMRUL76.cjs} +5 -5
  19. package/dist/chunk-FCR77GYM.cjs +33 -0
  20. package/dist/{chunk-4DECIFU7.js → chunk-FH2P4OCD.js} +178 -289
  21. package/dist/{chunk-N5QFKSDO.js → chunk-HRRYG2AX.js} +2 -1
  22. package/dist/{chunk-KUU2RNG6.cjs → chunk-HYN75H6G.cjs} +3 -0
  23. package/dist/{chunk-Z7LUNECE.js → chunk-IB3FDI4O.js} +5 -4
  24. package/dist/chunk-IFXJ2BG7.js +109 -0
  25. package/dist/{chunk-JO5NLTLY.js → chunk-IK3KE3AU.js} +3 -0
  26. package/dist/{chunk-C7PSERMH.js → chunk-IWQAX3CS.js} +1 -1
  27. package/dist/{chunk-YGXJGRFI.cjs → chunk-JWVTXXPX.cjs} +106 -23
  28. package/dist/{chunk-7YN22L2H.cjs → chunk-K52THW2C.cjs} +5 -5
  29. package/dist/chunk-K5NM7VAH.js +33 -0
  30. package/dist/{chunk-Y6OM7EV7.cjs → chunk-KFI44N2R.cjs} +2 -1
  31. package/dist/{chunk-Z7Y2NPHY.js → chunk-MFZ5437A.js} +1 -1
  32. package/dist/chunk-OE6TDIWW.js +22 -0
  33. package/dist/{chunk-MQNDWYPN.js → chunk-OQWKZCXP.js} +13 -6
  34. package/dist/chunk-OZFM4X3S.js +18 -0
  35. package/dist/chunk-PG7PS2NN.cjs +170 -0
  36. package/dist/{chunk-3QOSDDNI.cjs → chunk-SNYBEXLB.cjs} +6 -13
  37. package/dist/chunk-SYQF7OIR.js +52 -0
  38. package/dist/{chunk-CZHZGRU7.js → chunk-UHGVBFU3.js} +2 -0
  39. package/dist/chunk-UIBD2YY5.cjs +22 -0
  40. package/dist/chunk-UNWKG6EI.cjs +109 -0
  41. package/dist/{chunk-SVXC36MU.cjs → chunk-VACWOIRE.cjs} +2 -0
  42. package/dist/chunk-WLYIIEAF.js +50 -0
  43. package/dist/chunk-XSVNC2UD.cjs +18 -0
  44. package/dist/{chunk-FFALUUZZ.cjs → chunk-ZCIQ3L3R.cjs} +18 -11
  45. package/dist/completion/CompletionService.cjs +26 -19
  46. package/dist/completion/CompletionService.js +25 -18
  47. package/dist/completion.cjs +28 -21
  48. package/dist/completion.js +27 -20
  49. package/dist/index.cjs +35 -25
  50. package/dist/index.d.cts +7 -3
  51. package/dist/index.d.ts +7 -3
  52. package/dist/index.js +44 -34
  53. package/dist/keyPolicy-Cp0FntZl.d.cts +90 -0
  54. package/dist/keyPolicy-Cp0FntZl.d.ts +90 -0
  55. package/dist/outbound-api/auditCapture.cjs +9 -0
  56. package/dist/outbound-api/auditCapture.d.cts +54 -0
  57. package/dist/outbound-api/auditCapture.d.ts +54 -0
  58. package/dist/outbound-api/auditCapture.js +9 -0
  59. package/dist/outbound-api/auditRedact.cjs +8 -0
  60. package/dist/outbound-api/auditRedact.d.cts +30 -0
  61. package/dist/outbound-api/auditRedact.d.ts +30 -0
  62. package/dist/outbound-api/auditRedact.js +8 -0
  63. package/dist/outbound-api/billingCapture.cjs +8 -0
  64. package/dist/outbound-api/billingCapture.d.cts +61 -0
  65. package/dist/outbound-api/billingCapture.d.ts +61 -0
  66. package/dist/outbound-api/billingCapture.js +8 -0
  67. package/dist/outbound-api/quotaWarn.cjs +12 -0
  68. package/dist/outbound-api/quotaWarn.d.cts +43 -0
  69. package/dist/outbound-api/quotaWarn.d.ts +43 -0
  70. package/dist/outbound-api/quotaWarn.js +12 -0
  71. package/dist/outbound-api/routeResolver.cjs +2 -2
  72. package/dist/outbound-api/routeResolver.d.cts +3 -2
  73. package/dist/outbound-api/routeResolver.d.ts +3 -2
  74. package/dist/outbound-api/routeResolver.js +1 -1
  75. package/dist/outbound-api/types.d.cts +2 -1
  76. package/dist/outbound-api/types.d.ts +2 -1
  77. package/dist/outbound-api.cjs +33 -23
  78. package/dist/outbound-api.d.cts +9 -140
  79. package/dist/outbound-api.d.ts +9 -140
  80. package/dist/outbound-api.js +32 -22
  81. package/dist/pipeline/AuthSource.d.cts +6 -0
  82. package/dist/pipeline/AuthSource.d.ts +6 -0
  83. package/dist/pipeline/SubscriptionAuthSource.cjs +2 -2
  84. package/dist/pipeline/SubscriptionAuthSource.js +1 -1
  85. package/dist/pipeline/SubscriptionAuthStrategy.d.cts +6 -0
  86. package/dist/pipeline/SubscriptionAuthStrategy.d.ts +6 -0
  87. package/dist/pipeline/auditUsageStash.cjs +10 -0
  88. package/dist/pipeline/auditUsageStash.d.cts +37 -0
  89. package/dist/pipeline/auditUsageStash.d.ts +37 -0
  90. package/dist/pipeline/auditUsageStash.js +10 -0
  91. package/dist/pipeline/executeProviderCall.cjs +2 -2
  92. package/dist/pipeline/executeProviderCall.js +1 -1
  93. package/dist/pipeline/upstreamFetch.cjs +15 -0
  94. package/dist/pipeline/upstreamFetch.d.cts +89 -0
  95. package/dist/pipeline/upstreamFetch.d.ts +89 -0
  96. package/dist/pipeline/upstreamFetch.js +15 -0
  97. package/dist/pipeline/upstreamTrace.cjs +14 -0
  98. package/dist/pipeline/upstreamTrace.d.cts +85 -0
  99. package/dist/pipeline/upstreamTrace.d.ts +85 -0
  100. package/dist/pipeline/upstreamTrace.js +14 -0
  101. package/dist/pipeline/webhookEmit.cjs +10 -0
  102. package/dist/pipeline/webhookEmit.d.cts +36 -0
  103. package/dist/pipeline/webhookEmit.d.ts +36 -0
  104. package/dist/pipeline/webhookEmit.js +10 -0
  105. package/dist/ports.d.cts +2 -1
  106. package/dist/ports.d.ts +2 -1
  107. package/dist/provider-proxy/ProviderProxy.cjs +26 -19
  108. package/dist/provider-proxy/ProviderProxy.js +25 -18
  109. package/dist/provider-proxy/ingress/providerProxyShared.cjs +28 -19
  110. package/dist/provider-proxy/ingress/providerProxyShared.d.cts +17 -1
  111. package/dist/provider-proxy/ingress/providerProxyShared.d.ts +17 -1
  112. package/dist/provider-proxy/ingress/providerProxyShared.js +27 -18
  113. package/dist/provider-proxy/types.d.cts +7 -0
  114. package/dist/provider-proxy/types.d.ts +7 -0
  115. package/dist/provider-proxy.cjs +26 -19
  116. package/dist/provider-proxy.js +25 -18
  117. package/dist/{routeResolver-B1NglTfe.d.ts → routeResolver-C4T7yClx.d.ts} +1 -1
  118. package/dist/{routeResolver-CbG5uBgm.d.cts → routeResolver-CB3tvJKy.d.cts} +1 -1
  119. package/dist/transformer/transformers/AnthropicTransformer.cjs +2 -2
  120. package/dist/transformer/transformers/AnthropicTransformer.js +1 -1
  121. package/dist/transformer/transformers/GeminiCodeAssistTransformer.cjs +3 -3
  122. package/dist/transformer/transformers/GeminiCodeAssistTransformer.js +2 -2
  123. package/dist/transformer/transformers/GeminiTransformer.cjs +3 -3
  124. package/dist/transformer/transformers/GeminiTransformer.js +2 -2
  125. package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +2 -2
  126. package/dist/transformer/transformers/OpenAIResponseTransformer.js +1 -1
  127. package/dist/transformer/transformers/OpenCodeGoTransformer.cjs +2 -2
  128. package/dist/transformer/transformers/OpenCodeGoTransformer.js +1 -1
  129. package/dist/transformer/transformers.cjs +8 -8
  130. package/dist/transformer/transformers.js +7 -7
  131. package/dist/transformer.cjs +8 -8
  132. package/dist/transformer.js +7 -7
  133. package/dist/{types-aBFFXoBz.d.cts → types-B8Arpxn0.d.cts} +14 -90
  134. package/dist/{types-6OUY_xfA.d.ts → types-lgPYQuZS.d.ts} +14 -90
  135. package/dist/usage/usage-recorder.cjs +3 -2
  136. package/dist/usage/usage-recorder.js +2 -1
  137. package/dist/usage.cjs +3 -2
  138. package/dist/usage.js +2 -1
  139. package/package.json +64 -64
  140. package/dist/chunk-S6JGLF3G.cjs +0 -89
  141. package/dist/{chunk-FTQ7IQUC.js → chunk-C6OV7GCC.js} +8 -8
@@ -9,36 +9,41 @@ import {
9
9
  getOpenRouterProviderConfig,
10
10
  register,
11
11
  release
12
- } from "./chunk-4DECIFU7.js";
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-MQNDWYPN.js";
18
- import "./chunk-Z7LUNECE.js";
17
+ import "./chunk-OQWKZCXP.js";
18
+ import "./chunk-IB3FDI4O.js";
19
19
  import "./chunk-ZJZAOKI7.js";
20
- import "./chunk-FTQ7IQUC.js";
21
- import "./chunk-C7PSERMH.js";
22
- import "./chunk-5HTVET6E.js";
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-CWM2ZDU5.js";
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-5ERIZW3D.js";
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-WNY4WMRF.js";
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-CZHZGRU7.js";
54
- import "./chunk-AQ5TNQB7.js";
55
- import "./chunk-XEKD23J5.js";
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-BO4RFWBR.js";
58
- import "./chunk-Z7Y2NPHY.js";
59
- import "./chunk-S4WBV25P.js";
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 _chunkFFALUUZZcjs = require('./chunk-FFALUUZZ.cjs');
93
- require('./chunk-C72S6TTV.cjs');
88
+ var _chunkZCIQ3L3Rcjs = require('./chunk-ZCIQ3L3R.cjs');
89
+ require('./chunk-7FEBOPJO.cjs');
94
90
  require('./chunk-DWKQZ2SK.cjs');
95
- require('./chunk-4VAVYUZS.cjs');
96
- require('./chunk-7YN22L2H.cjs');
97
- require('./chunk-2DCNB7DF.cjs');
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 _chunk3QOSDDNIcjs = require('./chunk-3QOSDDNI.cjs');
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-Y6OM7EV7.cjs');
114
+ require('./chunk-KFI44N2R.cjs');
112
115
 
113
116
 
114
117
  var _chunkSVNDB62Dcjs = require('./chunk-SVNDB62D.cjs');
115
- require('./chunk-R3HK6R4B.cjs');
116
- require('./chunk-AEOZIDEB.cjs');
118
+
119
+
120
+ var _chunkAPYG5QD7cjs = require('./chunk-APYG5QD7.cjs');
117
121
  require('./chunk-L74VDN4A.cjs');
118
- require('./chunk-KUU2RNG6.cjs');
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 _chunkSVXC36MUcjs = require('./chunk-SVXC36MU.cjs');
151
- require('./chunk-QBZJ7P2T.cjs');
154
+ var _chunkA2YMUCBTcjs = require('./chunk-A2YMUCBT.cjs');
152
155
 
153
156
 
154
- var _chunk4IH4EL7Mcjs = require('./chunk-4IH4EL7M.cjs');
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-S6JGLF3G.cjs');
168
- require('./chunk-RSJ3TWJQ.cjs');
169
- require('./chunk-YGXJGRFI.cjs');
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 = _chunk2FMI2B6Vcjs.AUDIT_REDACTED; exports.BuiltinToolExecutor = _chunkNZYN7C3Pcjs.BuiltinToolExecutor; exports.CompletionService = _chunk2FMI2B6Vcjs.CompletionService; exports.ConcurrencyQueueFullError = _chunk2FMI2B6Vcjs.ConcurrencyQueueFullError; exports.ConcurrencyWaitCancelledError = _chunk2FMI2B6Vcjs.ConcurrencyWaitCancelledError; exports.ConcurrencyWaitTimeoutError = _chunk2FMI2B6Vcjs.ConcurrencyWaitTimeoutError; exports.DEFAULT_ACCOUNT_PROBE = _chunk2FMI2B6Vcjs.DEFAULT_ACCOUNT_PROBE; exports.DEFAULT_CONCURRENCY_QUEUE = _chunk2FMI2B6Vcjs.DEFAULT_CONCURRENCY_QUEUE; exports.DEFAULT_FINGERPRINT = _chunk2FMI2B6Vcjs.DEFAULT_FINGERPRINT; exports.DEFAULT_OUTBOUND_PORT = _chunk2FMI2B6Vcjs.DEFAULT_OUTBOUND_PORT; exports.DEFAULT_ROUTE_IDLE_MS = _chunk2FMI2B6Vcjs.DEFAULT_ROUTE_IDLE_MS; exports.DEFAULT_USER_MESSAGE_QUEUE = _chunk2FMI2B6Vcjs.DEFAULT_USER_MESSAGE_QUEUE; exports.ENDPOINT_MODEL_KINDS = _chunk4IH4EL7Mcjs.ENDPOINT_MODEL_KINDS; exports.KeySpendTracker = _chunk2FMI2B6Vcjs.KeySpendTracker; exports.KeyedMutex = _chunk2FMI2B6Vcjs.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 = _chunk2FMI2B6Vcjs.OUTBOUND_API_SERVER_CONFIG_KEY; exports.OutboundApiConfigError = _chunk2FMI2B6Vcjs.OutboundApiConfigError; exports.OutboundApiServer = _chunk2FMI2B6Vcjs.OutboundApiServer; exports.OutboundConcurrencyGate = _chunk2FMI2B6Vcjs.OutboundConcurrencyGate; exports.OutboundRateLimiter = _chunk2FMI2B6Vcjs.OutboundRateLimiter; exports.PricingEngine = _chunkYMFAJFQTcjs.PricingEngine; exports.ProviderProxy = _chunk2FMI2B6Vcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunk2FMI2B6Vcjs.ProviderProxyRouteMap; exports.SUBSCRIPTION_PROVIDER_IDS = _chunkSVXC36MUcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SerialQueueTimeoutError = _chunk2FMI2B6Vcjs.SerialQueueTimeoutError; exports.TransformerChainExecutor = _chunk46ZIFWYGcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.UsageRecorder = _chunk3QOSDDNIcjs.UsageRecorder; exports.UserMessageSerialQueue = _chunk2FMI2B6Vcjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunk2FMI2B6Vcjs.__resetOutboundApiServerForTests; exports.__resetProviderProxyForTests = _chunk2FMI2B6Vcjs.__resetProviderProxyForTests; exports.addOpenRouterProviderToRequest = _chunk2FMI2B6Vcjs.addOpenRouterProviderToRequest; exports.applyAugmentation = _chunkJMJBSACDcjs.applyAugmentation; exports.attachStreamEventBuffer = _chunk2FMI2B6Vcjs.attach; exports.beginAuditCapture = _chunk2FMI2B6Vcjs.beginAuditCapture; exports.beginBillingCapture = _chunk2FMI2B6Vcjs.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 = _chunk2FMI2B6Vcjs.checkKeyQuota; exports.classifyModelPrefix = _chunkSVXC36MUcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunk2FMI2B6Vcjs.computeKeyExpiry; exports.computeVoucherGrant = _chunk2FMI2B6Vcjs.computeVoucherGrant; exports.convertAnthropicRequestToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicRequestToOpenAI; exports.convertAnthropicStreamToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicStreamToOpenAI; exports.convertAnthropicToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicToOpenAI; exports.convertAnthropicToOpenAIWithThinking = _chunkSUEGJ75Dcjs.convertAnthropicToOpenAIWithThinking; exports.convertMessageToAnthropic = _chunk2FMI2B6Vcjs.convertMessageToAnthropic; exports.convertMessageToGemini = _chunk2FMI2B6Vcjs.convertMessageToGemini; exports.convertMessageToOpenAI = _chunk2FMI2B6Vcjs.convertMessageToOpenAI; exports.convertOpenAIResponseToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIResponseToAnthropic; exports.convertOpenAIStreamToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIStreamToAnthropic; exports.convertOpenAIToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIToAnthropic; exports.convertOpenAIToAnthropicWithThinking = _chunkSUEGJ75Dcjs.convertOpenAIToAnthropicWithThinking; exports.createNamedKey = _chunk2FMI2B6Vcjs.createNamedKey; exports.createSSEParser = _chunkHQP3K7PUcjs.createSSEParser; exports.defaultServerConfig = _chunk2FMI2B6Vcjs.defaultServerConfig; exports.detectModelKind = _chunkSVXC36MUcjs.detectModelKind; exports.detectNativeSearch = _chunkJMJBSACDcjs.detectNativeSearch; exports.detectRequestRole = _chunkSVXC36MUcjs.detectRequestRole; exports.emitStreamEvent = _chunk2FMI2B6Vcjs.emit; exports.endpointSupportsSubscription = _chunkSVXC36MUcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunkSVXC36MUcjs.endpointToIngressFormat; exports.extractRouteToken = _chunk2FMI2B6Vcjs.extractRouteToken; exports.formatUrls = _chunk2FMI2B6Vcjs.formatUrls; exports.generateVoucherCode = _chunk2FMI2B6Vcjs.generateVoucherCode; exports.getBuiltinSearchTools = _chunkNZYN7C3Pcjs.getBuiltinSearchTools; exports.getOpenRouterAppIdentity = _chunkUNEFIWXIcjs.getOpenRouterAppIdentity; exports.getOpenRouterProviderConfig = _chunk2FMI2B6Vcjs.getOpenRouterProviderConfig; exports.getOutboundApiServer = _chunk2FMI2B6Vcjs.getOutboundApiServer; exports.getProviderHeaders = _chunkQ27JY5RGcjs.getProviderHeaders; exports.getProviderProxy = _chunk2FMI2B6Vcjs.getProviderProxy; exports.handleVoucherRedeem = _chunk2FMI2B6Vcjs.handleVoucherRedeem; exports.hasImageContent = _chunkSUEGJ75Dcjs.hasImageContent; exports.hasThinkingEnabled = _chunkSUEGJ75Dcjs.hasThinkingEnabled; exports.hashKey = _chunk2FMI2B6Vcjs.hashKey; exports.hashVoucherCode = _chunk2FMI2B6Vcjs.hashVoucherCode; exports.isConcurrencyRejection = _chunk2FMI2B6Vcjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunkSVXC36MUcjs.isKindMappedEndpoint; exports.isOpenRouterProvider = _chunkUNEFIWXIcjs.isOpenRouterProvider; exports.isRedeemRequest = _chunk2FMI2B6Vcjs.isRedeemRequest; exports.isSerialQueueTimeout = _chunk2FMI2B6Vcjs.isSerialQueueTimeout; exports.isSubscriptionProviderId = _chunkSVXC36MUcjs.isSubscriptionProviderId; exports.isUserMessageRequest = _chunk2FMI2B6Vcjs.isUserMessageRequest; exports.loadServerConfig = _chunk2FMI2B6Vcjs.loadServerConfig; exports.mergeServerConfig = _chunk2FMI2B6Vcjs.mergeServerConfig; exports.modelKindsForEndpoint = _chunkSVXC36MUcjs.modelKindsForEndpoint; exports.newVoucherId = _chunk2FMI2B6Vcjs.newVoucherId; exports.normalizeAccountProbe = _chunk2FMI2B6Vcjs.normalizeAccountProbe; exports.normalizeAudit = _chunk2FMI2B6Vcjs.normalizeAudit; exports.normalizeAzureEndpoint = _chunkA2YMUCBTcjs.normalizeAzureEndpoint; exports.normalizeBilling = _chunk2FMI2B6Vcjs.normalizeBilling; exports.normalizeFingerprint = _chunk2FMI2B6Vcjs.normalizeFingerprint; exports.normalizePrefixTargets = _chunk2FMI2B6Vcjs.normalizePrefixTargets; exports.normalizeProxyConfig = _chunk2FMI2B6Vcjs.normalizeProxyConfig; exports.normalizeProxySegment = _chunk2FMI2B6Vcjs.normalizeProxySegment; exports.normalizeQueueSegments = _chunk2FMI2B6Vcjs.normalizeQueueSegments; exports.normalizeServerConfig = _chunk2FMI2B6Vcjs.normalizeServerConfig; exports.normalizeVoucher = _chunk2FMI2B6Vcjs.normalizeVoucher; exports.normalizeWebhookDestination = _chunk2FMI2B6Vcjs.normalizeWebhookDestination; exports.normalizeWebhookSegment = _chunk2FMI2B6Vcjs.normalizeWebhookSegment; exports.parseModelRef = _chunkSVXC36MUcjs.parseModelRef; exports.pickModelRefFromList = _chunkSVXC36MUcjs.pickModelRefFromList; exports.randomBase62 = _chunk2FMI2B6Vcjs.randomBase62; exports.redactAuditText = _chunk2FMI2B6Vcjs.redactAuditText; exports.registerBuiltinTransformers = _chunkFFALUUZZcjs.registerBuiltinTransformers; exports.registerStreamEventBuffer = _chunk2FMI2B6Vcjs.register; exports.releaseStreamEventBuffer = _chunk2FMI2B6Vcjs.release; exports.resolveApiFormat = _chunkA2YMUCBTcjs.resolveApiFormat; exports.resolvePrefixTarget = _chunkSVXC36MUcjs.resolvePrefixTarget; exports.resolveProviderEndpoint = _chunkA2YMUCBTcjs.resolveProviderEndpoint; exports.resolveRoute = _chunkSVXC36MUcjs.resolveRoute; exports.saveServerConfig = _chunk2FMI2B6Vcjs.saveServerConfig; exports.serializeError = _chunkSVNDB62Dcjs.serializeError; exports.setOpenRouterAppIdentity = _chunkUNEFIWXIcjs.setOpenRouterAppIdentity; exports.startOfLocalDay = _chunk2FMI2B6Vcjs.startOfLocalDay; exports.startOfLocalWeek = _chunk2FMI2B6Vcjs.startOfLocalWeek; exports.streamSSEResponse = _chunkHQP3K7PUcjs.streamSSEResponse; exports.toVoucherInfo = _chunk2FMI2B6Vcjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunkSVXC36MUcjs.validateEndpointModelConfig; exports.validateServerModelConfig = _chunkSVXC36MUcjs.validateServerModelConfig; exports.verifyKey = _chunk2FMI2B6Vcjs.verifyKey; exports.verifyPresentedKey = _chunk2FMI2B6Vcjs.verifyPresentedKey; exports.voucherCodePrefix = _chunk2FMI2B6Vcjs.voucherCodePrefix;
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 KeyCostLimits, c as KeyExpiryInput, d as KeyExpiryResult, e as KeySpend, f as KeySpendReader, g as KeySpendSeeder, h as KeySpendTracker, i as KindMappedEndpoint, M as MessagesModelKind, j as ModelKind, k as ModelPrefixTargets, l as OutboundApiDeps, m as OutboundApiKeyCreated, n as OutboundApiKeyInfo, o as OutboundApiServerConfig, p as OutboundApiServerStatus, O as OutboundCredentialStore, q as OutboundEndpoint, r as OutboundFormatUrls, s as OutboundKeyActivationMode, O as OutboundKeyDb, t as OutboundKeyDbRow, u as OutboundKeyPolicy, v as OutboundProxyConfig, Q as QuotaDecision, R as RequestRole, w as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, x as VoucherDb, y as checkKeyQuota, z as computeKeyExpiry, B as computeVoucherGrant, D as generateVoucherCode, G as hashVoucherCode, H as newVoucherId, I as startOfLocalDay, J as startOfLocalWeek, L as toVoucherInfo, N as voucherCodePrefix } from './types-aBFFXoBz.cjs';
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 { AUDIT_REDACTED, ApiServerSettingsStore, ApplyConfigInput, AuditCaptureContext, BillingCaptureContext, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, beginAuditCapture, beginBillingCapture, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, redactAuditText, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.cjs';
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 { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-CbG5uBgm.cjs';
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 KeyCostLimits, c as KeyExpiryInput, d as KeyExpiryResult, e as KeySpend, f as KeySpendReader, g as KeySpendSeeder, h as KeySpendTracker, i as KindMappedEndpoint, M as MessagesModelKind, j as ModelKind, k as ModelPrefixTargets, l as OutboundApiDeps, m as OutboundApiKeyCreated, n as OutboundApiKeyInfo, o as OutboundApiServerConfig, p as OutboundApiServerStatus, O as OutboundCredentialStore, q as OutboundEndpoint, r as OutboundFormatUrls, s as OutboundKeyActivationMode, O as OutboundKeyDb, t as OutboundKeyDbRow, u as OutboundKeyPolicy, v as OutboundProxyConfig, Q as QuotaDecision, R as RequestRole, w as ResponsesModelKind, U as UserMessageQueueConfig, V as VoucherCreateInput, x as VoucherDb, y as checkKeyQuota, z as computeKeyExpiry, B as computeVoucherGrant, D as generateVoucherCode, G as hashVoucherCode, H as newVoucherId, I as startOfLocalDay, J as startOfLocalWeek, L as toVoucherInfo, N as voucherCodePrefix } from './types-6OUY_xfA.js';
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 { AUDIT_REDACTED, ApiServerSettingsStore, ApplyConfigInput, AuditCaptureContext, BillingCaptureContext, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, beginAuditCapture, beginBillingCapture, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, redactAuditText, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.js';
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 { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-B1NglTfe.js';
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-4DECIFU7.js";
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-MQNDWYPN.js";
93
- import "./chunk-Z7LUNECE.js";
88
+ } from "./chunk-OQWKZCXP.js";
89
+ import "./chunk-IB3FDI4O.js";
94
90
  import "./chunk-ZJZAOKI7.js";
95
- import "./chunk-FTQ7IQUC.js";
96
- import "./chunk-C7PSERMH.js";
97
- import "./chunk-5HTVET6E.js";
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-CWM2ZDU5.js";
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-5ERIZW3D.js";
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-WNY4WMRF.js";
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
- buildAnthropicApiUrl,
125
- buildAzureOpenAIApiUrl,
126
- buildGeminiApiUrl,
127
- buildOpenAIApiUrl,
128
- buildOpenAIResponseApiUrl,
129
- buildProviderApiUrl,
130
- normalizeAzureEndpoint,
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-CZHZGRU7.js";
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-BO4RFWBR.js";
168
- import "./chunk-Z7Y2NPHY.js";
169
- import "./chunk-S4WBV25P.js";
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 };