@omnicross/core 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/auth/GeminiCodeAssistProjectResolver.cjs +6 -1
  2. package/dist/auth/GeminiCodeAssistProjectResolver.js +6 -1
  3. package/dist/{chunk-SN3YWBX7.cjs → chunk-2FMI2B6V.cjs} +2329 -533
  4. package/dist/{chunk-XBSYYZIY.cjs → chunk-3QOSDDNI.cjs} +39 -3
  5. package/dist/{chunk-2FEVTJWG.js → chunk-4DECIFU7.js} +2162 -366
  6. package/dist/chunk-4IH4EL7M.cjs +9 -0
  7. package/dist/chunk-5ENKBSWO.js +311 -0
  8. package/dist/chunk-6RPZADX3.cjs +92 -0
  9. package/dist/chunk-AEOZIDEB.cjs +32 -0
  10. package/dist/chunk-BO4RFWBR.js +89 -0
  11. package/dist/{chunk-MNYKI4CI.js → chunk-CWM2ZDU5.js} +36 -0
  12. package/dist/chunk-CZHZGRU7.js +383 -0
  13. package/dist/{chunk-4NBS6KPV.cjs → chunk-DQ5VAYZ6.cjs} +7 -8
  14. package/dist/chunk-HUZZZ3JL.js +32 -0
  15. package/dist/{chunk-QOCNX236.js → chunk-IAXWICZU.js} +24 -1
  16. package/dist/{chunk-V5KPWNYX.cjs → chunk-JMJBSACD.cjs} +3 -3
  17. package/dist/chunk-L74VDN4A.cjs +32 -0
  18. package/dist/{chunk-74TMJA7Z.js → chunk-N5QFKSDO.js} +7 -4
  19. package/dist/{chunk-LKZJEL6E.cjs → chunk-Q27JY5RG.cjs} +6 -4
  20. package/dist/{chunk-SPVWWUHX.cjs → chunk-QWBWGODS.cjs} +24 -1
  21. package/dist/chunk-RPII3E6Z.cjs +145 -0
  22. package/dist/chunk-S6JGLF3G.cjs +89 -0
  23. package/dist/chunk-SVXC36MU.cjs +383 -0
  24. package/dist/chunk-TKJMZBAH.js +32 -0
  25. package/dist/{chunk-ZSVQT3PW.js → chunk-UBWEBKRC.js} +5 -6
  26. package/dist/chunk-UNEFIWXI.cjs +32 -0
  27. package/dist/chunk-VQY5W4YW.cjs +311 -0
  28. package/dist/chunk-WNY4WMRF.js +32 -0
  29. package/dist/chunk-XEKD23J5.js +9 -0
  30. package/dist/chunk-XTEI64OU.js +145 -0
  31. package/dist/chunk-XX6NQJMA.js +92 -0
  32. package/dist/{chunk-N3V2J5ZO.cjs → chunk-Y6OM7EV7.cjs} +7 -4
  33. package/dist/{chunk-745DV5FL.js → chunk-Y7FO65VT.js} +3 -3
  34. package/dist/{chunk-PXUJF5HS.js → chunk-ZY6KU6P3.js} +4 -2
  35. package/dist/completion/CompletionService.cjs +22 -15
  36. package/dist/completion/CompletionService.js +21 -14
  37. package/dist/completion/NativeSearchInjector.cjs +3 -3
  38. package/dist/completion/NativeSearchInjector.js +2 -2
  39. package/dist/completion/openrouter-headers.cjs +3 -6
  40. package/dist/completion/openrouter-headers.d.cts +9 -12
  41. package/dist/completion/openrouter-headers.d.ts +9 -12
  42. package/dist/completion/openrouter-headers.js +2 -5
  43. package/dist/completion/openrouter-models.cjs +4 -3
  44. package/dist/completion/openrouter-models.js +2 -1
  45. package/dist/completion.cjs +22 -15
  46. package/dist/completion.js +21 -14
  47. package/dist/index.cjs +139 -17
  48. package/dist/index.d.cts +40 -10
  49. package/dist/index.d.ts +40 -10
  50. package/dist/index.js +146 -24
  51. package/dist/outbound-api/routeResolver.cjs +5 -2
  52. package/dist/outbound-api/routeResolver.d.cts +8 -2
  53. package/dist/outbound-api/routeResolver.d.ts +8 -2
  54. package/dist/outbound-api/routeResolver.js +4 -1
  55. package/dist/outbound-api/types.cjs +6 -1
  56. package/dist/outbound-api/types.d.cts +11 -144
  57. package/dist/outbound-api/types.d.ts +11 -144
  58. package/dist/outbound-api/types.js +6 -0
  59. package/dist/outbound-api.cjs +133 -15
  60. package/dist/outbound-api.d.cts +786 -25
  61. package/dist/outbound-api.d.ts +786 -25
  62. package/dist/outbound-api.js +137 -19
  63. package/dist/pipeline/AuthSource.d.cts +23 -1
  64. package/dist/pipeline/AuthSource.d.ts +23 -1
  65. package/dist/pipeline/LlmConfigProviderAuth.cjs +3 -3
  66. package/dist/pipeline/LlmConfigProviderAuth.js +2 -2
  67. package/dist/pipeline/SubscriptionAccountHealth.cjs +22 -0
  68. package/dist/pipeline/SubscriptionAccountHealth.d.cts +235 -0
  69. package/dist/pipeline/SubscriptionAccountHealth.d.ts +235 -0
  70. package/dist/pipeline/SubscriptionAccountHealth.js +22 -0
  71. package/dist/pipeline/SubscriptionAuthSource.cjs +2 -2
  72. package/dist/pipeline/SubscriptionAuthSource.d.cts +3 -2
  73. package/dist/pipeline/SubscriptionAuthSource.d.ts +3 -2
  74. package/dist/pipeline/SubscriptionAuthSource.js +1 -1
  75. package/dist/pipeline/SubscriptionAuthStrategy.d.cts +24 -1
  76. package/dist/pipeline/SubscriptionAuthStrategy.d.ts +24 -1
  77. package/dist/pipeline/auditSink.cjs +14 -0
  78. package/dist/pipeline/auditSink.d.cts +48 -0
  79. package/dist/pipeline/auditSink.d.ts +48 -0
  80. package/dist/pipeline/auditSink.js +14 -0
  81. package/dist/pipeline/billingEmit.cjs +14 -0
  82. package/dist/pipeline/billingEmit.d.cts +49 -0
  83. package/dist/pipeline/billingEmit.d.ts +49 -0
  84. package/dist/pipeline/billingEmit.js +14 -0
  85. package/dist/ports/usage-event-store.d.cts +26 -1
  86. package/dist/ports/usage-event-store.d.ts +26 -1
  87. package/dist/ports.d.cts +7 -1
  88. package/dist/ports.d.ts +7 -1
  89. package/dist/provider-proxy/ProviderProxy.cjs +22 -15
  90. package/dist/provider-proxy/ProviderProxy.js +21 -14
  91. package/dist/provider-proxy/identity/SubscriptionIdentityStore.cjs +15 -0
  92. package/dist/provider-proxy/identity/SubscriptionIdentityStore.d.cts +121 -0
  93. package/dist/provider-proxy/identity/SubscriptionIdentityStore.d.ts +121 -0
  94. package/dist/provider-proxy/identity/SubscriptionIdentityStore.js +15 -0
  95. package/dist/provider-proxy/identity/fingerprintHeaders.cjs +20 -0
  96. package/dist/provider-proxy/identity/fingerprintHeaders.d.cts +89 -0
  97. package/dist/provider-proxy/identity/fingerprintHeaders.d.ts +89 -0
  98. package/dist/provider-proxy/identity/fingerprintHeaders.js +20 -0
  99. package/dist/provider-proxy/ingress/providerProxyShared.cjs +22 -15
  100. package/dist/provider-proxy/ingress/providerProxyShared.d.cts +11 -2
  101. package/dist/provider-proxy/ingress/providerProxyShared.d.ts +11 -2
  102. package/dist/provider-proxy/ingress/providerProxyShared.js +21 -14
  103. package/dist/provider-proxy/matchText.cjs +4 -2
  104. package/dist/provider-proxy/matchText.d.cts +14 -1
  105. package/dist/provider-proxy/matchText.d.ts +14 -1
  106. package/dist/provider-proxy/matchText.js +3 -1
  107. package/dist/provider-proxy/types.d.cts +23 -0
  108. package/dist/provider-proxy/types.d.ts +23 -0
  109. package/dist/provider-proxy.cjs +22 -15
  110. package/dist/provider-proxy.js +21 -14
  111. package/dist/{routeResolver-HE-ZO0fO.d.ts → routeResolver-B1NglTfe.d.ts} +36 -10
  112. package/dist/{routeResolver-BrbK6ja9.d.cts → routeResolver-CbG5uBgm.d.cts} +36 -10
  113. package/dist/transformer/transformers.cjs +7 -7
  114. package/dist/transformer/transformers.js +7 -7
  115. package/dist/transformer.cjs +5 -5
  116. package/dist/transformer.js +4 -4
  117. package/dist/types-6OUY_xfA.d.ts +830 -0
  118. package/dist/types-aBFFXoBz.d.cts +830 -0
  119. package/dist/usage/usage-recorder.cjs +2 -2
  120. package/dist/usage/usage-recorder.d.cts +19 -1
  121. package/dist/usage/usage-recorder.d.ts +19 -1
  122. package/dist/usage/usage-recorder.js +1 -1
  123. package/dist/usage.cjs +2 -2
  124. package/dist/usage.js +1 -1
  125. package/package.json +4 -2
  126. package/dist/chunk-3MEACFK3.js +0 -193
  127. package/dist/chunk-6VIXXLMX.cjs +0 -14
  128. package/dist/chunk-E3WHL7CO.js +0 -14
  129. package/dist/chunk-G2FUJNA2.cjs +0 -193
  130. package/dist/{chunk-UYPEN5XE.cjs → chunk-FFALUUZZ.cjs} +5 -5
  131. package/dist/{chunk-O466Y272.js → chunk-MQNDWYPN.js} +6 -6
package/dist/index.cjs CHANGED
@@ -32,8 +32,50 @@
32
32
 
33
33
 
34
34
 
35
- var _chunkSN3YWBX7cjs = require('./chunk-SN3YWBX7.cjs');
36
- require('./chunk-SPVWWUHX.cjs');
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+ var _chunk2FMI2B6Vcjs = require('./chunk-2FMI2B6V.cjs');
37
79
 
38
80
 
39
81
 
@@ -42,36 +84,53 @@ require('./chunk-FZ46M34D.cjs');
42
84
 
43
85
 
44
86
  var _chunk46ZIFWYGcjs = require('./chunk-46ZIFWYG.cjs');
45
- require('./chunk-GBHYAGX3.cjs');
46
87
 
47
88
 
48
89
  var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
49
90
 
50
91
 
51
- var _chunkUYPEN5XEcjs = require('./chunk-UYPEN5XE.cjs');
52
- require('./chunk-7YN22L2H.cjs');
53
- require('./chunk-2DCNB7DF.cjs');
92
+ var _chunkFFALUUZZcjs = require('./chunk-FFALUUZZ.cjs');
54
93
  require('./chunk-C72S6TTV.cjs');
55
94
  require('./chunk-DWKQZ2SK.cjs');
56
95
  require('./chunk-4VAVYUZS.cjs');
96
+ require('./chunk-7YN22L2H.cjs');
97
+ require('./chunk-2DCNB7DF.cjs');
57
98
  require('./chunk-EYZYXJTJ.cjs');
58
99
 
59
100
 
60
101
  var _chunkYMFAJFQTcjs = require('./chunk-YMFAJFQT.cjs');
61
102
 
62
103
 
63
- var _chunkXBSYYZIYcjs = require('./chunk-XBSYYZIY.cjs');
104
+ var _chunk3QOSDDNIcjs = require('./chunk-3QOSDDNI.cjs');
105
+ require('./chunk-GBHYAGX3.cjs');
106
+ require('./chunk-RPII3E6Z.cjs');
107
+ require('./chunk-6RPZADX3.cjs');
108
+ require('./chunk-QWBWGODS.cjs');
109
+ require('./chunk-NYUNU75A.cjs');
110
+ require('./chunk-VQY5W4YW.cjs');
111
+ require('./chunk-Y6OM7EV7.cjs');
112
+
113
+
114
+ var _chunkSVNDB62Dcjs = require('./chunk-SVNDB62D.cjs');
64
115
  require('./chunk-R3HK6R4B.cjs');
116
+ require('./chunk-AEOZIDEB.cjs');
117
+ require('./chunk-L74VDN4A.cjs');
65
118
  require('./chunk-KUU2RNG6.cjs');
66
119
 
67
120
 
68
- var _chunkLKZJEL6Ecjs = require('./chunk-LKZJEL6E.cjs');
121
+ var _chunkQ27JY5RGcjs = require('./chunk-Q27JY5RG.cjs');
69
122
  require('./chunk-QXD4MV2X.cjs');
70
- require('./chunk-NYUNU75A.cjs');
71
- require('./chunk-N3V2J5ZO.cjs');
72
123
 
73
124
 
74
- var _chunkSVNDB62Dcjs = require('./chunk-SVNDB62D.cjs');
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+ var _chunkA2YMUCBTcjs = require('./chunk-A2YMUCBT.cjs');
75
134
 
76
135
 
77
136
 
@@ -82,16 +141,19 @@ var _chunkSVNDB62Dcjs = require('./chunk-SVNDB62D.cjs');
82
141
 
83
142
 
84
143
 
85
- var _chunkA2YMUCBTcjs = require('./chunk-A2YMUCBT.cjs');
86
144
 
87
145
 
88
146
 
89
147
 
90
148
 
91
- var _chunkG2FUJNA2cjs = require('./chunk-G2FUJNA2.cjs');
149
+
150
+ var _chunkSVXC36MUcjs = require('./chunk-SVXC36MU.cjs');
92
151
  require('./chunk-QBZJ7P2T.cjs');
93
152
 
94
153
 
154
+ var _chunk4IH4EL7Mcjs = require('./chunk-4IH4EL7M.cjs');
155
+
156
+
95
157
 
96
158
 
97
159
 
@@ -102,6 +164,7 @@ require('./chunk-QBZJ7P2T.cjs');
102
164
 
103
165
 
104
166
  var _chunkSUEGJ75Dcjs = require('./chunk-SUEGJ75D.cjs');
167
+ require('./chunk-S6JGLF3G.cjs');
105
168
  require('./chunk-RSJ3TWJQ.cjs');
106
169
  require('./chunk-YGXJGRFI.cjs');
107
170
 
@@ -112,14 +175,73 @@ var _chunkNZYN7C3Pcjs = require('./chunk-NZYN7C3P.cjs');
112
175
 
113
176
 
114
177
 
115
- var _chunkV5KPWNYXcjs = require('./chunk-V5KPWNYX.cjs');
178
+ var _chunkJMJBSACDcjs = require('./chunk-JMJBSACD.cjs');
179
+
180
+
181
+ var _chunkGMMT7RVNcjs = require('./chunk-GMMT7RVN.cjs');
182
+
183
+
184
+
185
+
186
+
187
+ var _chunkUNEFIWXIcjs = require('./chunk-UNEFIWXI.cjs');
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
116
240
 
117
241
 
118
242
 
119
- var _chunk6VIXXLMXcjs = require('./chunk-6VIXXLMX.cjs');
120
243
 
121
244
 
122
- var _chunkGMMT7RVNcjs = require('./chunk-GMMT7RVN.cjs');
123
245
 
124
246
 
125
247
 
@@ -194,4 +316,4 @@ var _chunkGMMT7RVNcjs = require('./chunk-GMMT7RVN.cjs');
194
316
 
195
317
 
196
318
 
197
- exports.BuiltinToolExecutor = _chunkNZYN7C3Pcjs.BuiltinToolExecutor; exports.CompletionService = _chunkSN3YWBX7cjs.CompletionService; exports.DEFAULT_OUTBOUND_PORT = _chunkSN3YWBX7cjs.DEFAULT_OUTBOUND_PORT; exports.DEFAULT_ROUTE_IDLE_MS = _chunkSN3YWBX7cjs.DEFAULT_ROUTE_IDLE_MS; exports.NATIVE_SEARCH_TOOL_NAMES = _chunkGMMT7RVNcjs.NATIVE_SEARCH_TOOL_NAMES; exports.OPENROUTER_APP_HEADERS = _chunk6VIXXLMXcjs.OPENROUTER_APP_HEADERS; exports.OUTBOUND_API_SERVER_CONFIG_KEY = _chunkSN3YWBX7cjs.OUTBOUND_API_SERVER_CONFIG_KEY; exports.OutboundApiServer = _chunkSN3YWBX7cjs.OutboundApiServer; exports.OutboundRateLimiter = _chunkSN3YWBX7cjs.OutboundRateLimiter; exports.PricingEngine = _chunkYMFAJFQTcjs.PricingEngine; exports.ProviderProxy = _chunkSN3YWBX7cjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunkSN3YWBX7cjs.ProviderProxyRouteMap; exports.SUBSCRIPTION_PROVIDER_IDS = _chunkG2FUJNA2cjs.SUBSCRIPTION_PROVIDER_IDS; exports.TransformerChainExecutor = _chunk46ZIFWYGcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.UsageRecorder = _chunkXBSYYZIYcjs.UsageRecorder; exports.__resetOutboundApiServerForTests = _chunkSN3YWBX7cjs.__resetOutboundApiServerForTests; exports.__resetProviderProxyForTests = _chunkSN3YWBX7cjs.__resetProviderProxyForTests; exports.addOpenRouterProviderToRequest = _chunkSN3YWBX7cjs.addOpenRouterProviderToRequest; exports.applyAugmentation = _chunkV5KPWNYXcjs.applyAugmentation; exports.attachStreamEventBuffer = _chunkSN3YWBX7cjs.attach; exports.buildAnthropicApiUrl = _chunkA2YMUCBTcjs.buildAnthropicApiUrl; exports.buildAzureOpenAIApiUrl = _chunkA2YMUCBTcjs.buildAzureOpenAIApiUrl; exports.buildGeminiApiUrl = _chunkA2YMUCBTcjs.buildGeminiApiUrl; exports.buildNativeSearchAugmentation = _chunkV5KPWNYXcjs.buildNativeSearchAugmentation; exports.buildOpenAIApiUrl = _chunkA2YMUCBTcjs.buildOpenAIApiUrl; exports.buildOpenAIResponseApiUrl = _chunkA2YMUCBTcjs.buildOpenAIResponseApiUrl; exports.buildProviderApiUrl = _chunkA2YMUCBTcjs.buildProviderApiUrl; exports.convertAnthropicRequestToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicRequestToOpenAI; exports.convertAnthropicStreamToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicStreamToOpenAI; exports.convertAnthropicToOpenAI = _chunkSUEGJ75Dcjs.convertAnthropicToOpenAI; exports.convertAnthropicToOpenAIWithThinking = _chunkSUEGJ75Dcjs.convertAnthropicToOpenAIWithThinking; exports.convertMessageToAnthropic = _chunkSN3YWBX7cjs.convertMessageToAnthropic; exports.convertMessageToGemini = _chunkSN3YWBX7cjs.convertMessageToGemini; exports.convertMessageToOpenAI = _chunkSN3YWBX7cjs.convertMessageToOpenAI; exports.convertOpenAIResponseToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIResponseToAnthropic; exports.convertOpenAIStreamToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIStreamToAnthropic; exports.convertOpenAIToAnthropic = _chunkSUEGJ75Dcjs.convertOpenAIToAnthropic; exports.convertOpenAIToAnthropicWithThinking = _chunkSUEGJ75Dcjs.convertOpenAIToAnthropicWithThinking; exports.createNamedKey = _chunkSN3YWBX7cjs.createNamedKey; exports.createSSEParser = _chunkHQP3K7PUcjs.createSSEParser; exports.defaultServerConfig = _chunkSN3YWBX7cjs.defaultServerConfig; exports.detectNativeSearch = _chunkV5KPWNYXcjs.detectNativeSearch; exports.detectRequestRole = _chunkSN3YWBX7cjs.detectRequestRole; exports.emitStreamEvent = _chunkSN3YWBX7cjs.emit; exports.endpointSupportsSubscription = _chunkG2FUJNA2cjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunkSN3YWBX7cjs.endpointToIngressFormat; exports.extractRouteToken = _chunkSN3YWBX7cjs.extractRouteToken; exports.formatUrls = _chunkSN3YWBX7cjs.formatUrls; exports.getBuiltinSearchTools = _chunkNZYN7C3Pcjs.getBuiltinSearchTools; exports.getOpenRouterProviderConfig = _chunkSN3YWBX7cjs.getOpenRouterProviderConfig; exports.getOutboundApiServer = _chunkSN3YWBX7cjs.getOutboundApiServer; exports.getProviderHeaders = _chunkLKZJEL6Ecjs.getProviderHeaders; exports.getProviderProxy = _chunkSN3YWBX7cjs.getProviderProxy; exports.hasImageContent = _chunkSUEGJ75Dcjs.hasImageContent; exports.hasThinkingEnabled = _chunkSUEGJ75Dcjs.hasThinkingEnabled; exports.hashKey = _chunkSN3YWBX7cjs.hashKey; exports.isOpenRouterProvider = _chunk6VIXXLMXcjs.isOpenRouterProvider; exports.isSubscriptionProviderId = _chunkG2FUJNA2cjs.isSubscriptionProviderId; exports.loadServerConfig = _chunkSN3YWBX7cjs.loadServerConfig; exports.mergeServerConfig = _chunkSN3YWBX7cjs.mergeServerConfig; exports.normalizeAzureEndpoint = _chunkA2YMUCBTcjs.normalizeAzureEndpoint; exports.normalizeServerConfig = _chunkSN3YWBX7cjs.normalizeServerConfig; exports.registerBuiltinTransformers = _chunkUYPEN5XEcjs.registerBuiltinTransformers; exports.registerStreamEventBuffer = _chunkSN3YWBX7cjs.register; exports.releaseStreamEventBuffer = _chunkSN3YWBX7cjs.release; exports.resolveApiFormat = _chunkA2YMUCBTcjs.resolveApiFormat; exports.resolveProviderEndpoint = _chunkA2YMUCBTcjs.resolveProviderEndpoint; exports.resolveRoute = _chunkG2FUJNA2cjs.resolveRoute; exports.saveServerConfig = _chunkSN3YWBX7cjs.saveServerConfig; exports.serializeError = _chunkSVNDB62Dcjs.serializeError; exports.streamSSEResponse = _chunkHQP3K7PUcjs.streamSSEResponse; exports.verifyPresentedKey = _chunkSN3YWBX7cjs.verifyPresentedKey;
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;
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 { EndpointRoutingConfig, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiKeyInfo, OutboundApiServerConfig, OutboundApiServerStatus, OutboundKeyDb as OutboundCredentialStore, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundKeyDbRow, RequestRole } from './outbound-api/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';
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,14 @@ 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 { ApiServerSettingsStore, ApplyConfigInput, DEFAULT_OUTBOUND_PORT, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiServer, OutboundRateLimiter, __resetOutboundApiServerForTests, createNamedKey, defaultServerConfig, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, hashKey, loadServerConfig, mergeServerConfig, normalizeServerConfig, saveServerConfig, verifyPresentedKey } from './outbound-api.cjs';
21
+ export { AUDIT_REDACTED, ApiServerSettingsStore, ApplyConfigInput, AuditCaptureContext, BillingCaptureContext, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, beginAuditCapture, beginBillingCapture, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, redactAuditText, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.cjs';
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
27
  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, r as resolveRoute } from './routeResolver-BrbK6ja9.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';
29
29
  import '@omnicross/contracts/message-blocks';
30
30
  import '@omnicross/contracts/completion-types';
31
31
  import '@omnicross/contracts/mcp-types';
@@ -39,6 +39,12 @@ import './completion/ApiKeyPoolService.cjs';
39
39
  import './pipeline/AuthSource.cjs';
40
40
  import './pipeline/SubscriptionAuthSource.cjs';
41
41
  import './pipeline/SubscriptionAuthStrategy.cjs';
42
+ import '@omnicross/contracts/account-tokens-types';
43
+ import '@omnicross/contracts/audit-types';
44
+ import '@omnicross/contracts/billing-types';
45
+ import '@omnicross/contracts/health-logging-types';
46
+ import '@omnicross/contracts/voucher-types';
47
+ import '@omnicross/contracts/webhook-types';
42
48
  import '@omnicross/contracts/endpoint-resolver';
43
49
  import './transformer/transformers/AnthropicTransformer.cjs';
44
50
  import './transformer/transformers/GeminiCodeAssistTransformer.cjs';
@@ -61,12 +67,36 @@ import './transformer/transformers/ReasoningTransformer.cjs';
61
67
  */
62
68
  declare function isOpenRouterProvider(provider: LLMProvider): boolean;
63
69
  /**
64
- * OpenRouter app attribution headers
65
- * See: https://openrouter.ai/docs/app-attribution
70
+ * OpenRouter "app attribution" identity — the `HTTP-Referer` (the app's URL,
71
+ * the primary attribution key) and `X-Title` (the app's display name) that
72
+ * OpenRouter uses to attribute usage to an app on its public daily/weekly/
73
+ * monthly rankings. See https://openrouter.ai/docs/app-attribution
66
74
  */
67
- declare const OPENROUTER_APP_HEADERS: {
68
- 'HTTP-Referer': string;
69
- 'X-Title': string;
70
- };
75
+ interface OpenRouterAppIdentity {
76
+ /** `HTTP-Referer` header — the app's URL. */
77
+ referer: string;
78
+ /** `X-Title` header — the app's display name on OpenRouter rankings. */
79
+ title: string;
80
+ }
81
+ /**
82
+ * The live OpenRouter app-attribution header set — the SINGLE source of truth
83
+ * for every OpenRouter request the serving core makes. Both the LLM path
84
+ * (`header-builder` / `TransformerHandler`) and the media path
85
+ * (`completion/openrouter-headers.ts` → `buildOpenRouterHeaders`) read this
86
+ * object. `setOpenRouterAppIdentity` mutates it in place; consumers spread it
87
+ * at request time, so a boot-time host override is reflected everywhere without
88
+ * re-importing.
89
+ */
90
+ declare const OPENROUTER_APP_HEADERS: Record<string, string>;
91
+ /**
92
+ * Override the OpenRouter app-attribution identity. Call once at host boot,
93
+ * before any OpenRouter request. Blank/whitespace-only fields are ignored (the
94
+ * existing value is kept), so a partial override is safe.
95
+ */
96
+ declare function setOpenRouterAppIdentity(identity: Partial<OpenRouterAppIdentity>): void;
97
+ /**
98
+ * Read the current OpenRouter app-attribution identity.
99
+ */
100
+ declare function getOpenRouterAppIdentity(): OpenRouterAppIdentity;
71
101
 
72
- export { OPENROUTER_APP_HEADERS, isOpenRouterProvider };
102
+ export { OPENROUTER_APP_HEADERS, type OpenRouterAppIdentity, getOpenRouterAppIdentity, isOpenRouterProvider, setOpenRouterAppIdentity };
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 { EndpointRoutingConfig, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiKeyInfo, OutboundApiServerConfig, OutboundApiServerStatus, OutboundKeyDb as OutboundCredentialStore, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundKeyDbRow, RequestRole } from './outbound-api/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';
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,14 @@ 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 { ApiServerSettingsStore, ApplyConfigInput, DEFAULT_OUTBOUND_PORT, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiServer, OutboundRateLimiter, __resetOutboundApiServerForTests, createNamedKey, defaultServerConfig, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, hashKey, loadServerConfig, mergeServerConfig, normalizeServerConfig, saveServerConfig, verifyPresentedKey } from './outbound-api.js';
21
+ export { AUDIT_REDACTED, ApiServerSettingsStore, ApplyConfigInput, AuditCaptureContext, BillingCaptureContext, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointModelConfigError, GateAcquireOptions, GateAcquisition, GateSlot, GateStatusEntry, KeyVerification, KeyedMutex, ModelPrefixKind, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiServer, OutboundConcurrencyGate, OutboundRateLimiter, SerialAcquireOptions, SerialQueueStatusEntry, SerialQueueTimeoutError, SerialSlot, UserMessageSerialQueue, VerifiedKey, __resetOutboundApiServerForTests, beginAuditCapture, beginBillingCapture, classifyModelPrefix, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, endpointToIngressFormat, formatUrls, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, redactAuditText, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateServerModelConfig, verifyKey, verifyPresentedKey } from './outbound-api.js';
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
27
  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, r as resolveRoute } from './routeResolver-HE-ZO0fO.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';
29
29
  import '@omnicross/contracts/message-blocks';
30
30
  import '@omnicross/contracts/completion-types';
31
31
  import '@omnicross/contracts/mcp-types';
@@ -39,6 +39,12 @@ import './completion/ApiKeyPoolService.js';
39
39
  import './pipeline/AuthSource.js';
40
40
  import './pipeline/SubscriptionAuthSource.js';
41
41
  import './pipeline/SubscriptionAuthStrategy.js';
42
+ import '@omnicross/contracts/account-tokens-types';
43
+ import '@omnicross/contracts/audit-types';
44
+ import '@omnicross/contracts/billing-types';
45
+ import '@omnicross/contracts/health-logging-types';
46
+ import '@omnicross/contracts/voucher-types';
47
+ import '@omnicross/contracts/webhook-types';
42
48
  import '@omnicross/contracts/endpoint-resolver';
43
49
  import './transformer/transformers/AnthropicTransformer.js';
44
50
  import './transformer/transformers/GeminiCodeAssistTransformer.js';
@@ -61,12 +67,36 @@ import './transformer/transformers/ReasoningTransformer.js';
61
67
  */
62
68
  declare function isOpenRouterProvider(provider: LLMProvider): boolean;
63
69
  /**
64
- * OpenRouter app attribution headers
65
- * See: https://openrouter.ai/docs/app-attribution
70
+ * OpenRouter "app attribution" identity — the `HTTP-Referer` (the app's URL,
71
+ * the primary attribution key) and `X-Title` (the app's display name) that
72
+ * OpenRouter uses to attribute usage to an app on its public daily/weekly/
73
+ * monthly rankings. See https://openrouter.ai/docs/app-attribution
66
74
  */
67
- declare const OPENROUTER_APP_HEADERS: {
68
- 'HTTP-Referer': string;
69
- 'X-Title': string;
70
- };
75
+ interface OpenRouterAppIdentity {
76
+ /** `HTTP-Referer` header — the app's URL. */
77
+ referer: string;
78
+ /** `X-Title` header — the app's display name on OpenRouter rankings. */
79
+ title: string;
80
+ }
81
+ /**
82
+ * The live OpenRouter app-attribution header set — the SINGLE source of truth
83
+ * for every OpenRouter request the serving core makes. Both the LLM path
84
+ * (`header-builder` / `TransformerHandler`) and the media path
85
+ * (`completion/openrouter-headers.ts` → `buildOpenRouterHeaders`) read this
86
+ * object. `setOpenRouterAppIdentity` mutates it in place; consumers spread it
87
+ * at request time, so a boot-time host override is reflected everywhere without
88
+ * re-importing.
89
+ */
90
+ declare const OPENROUTER_APP_HEADERS: Record<string, string>;
91
+ /**
92
+ * Override the OpenRouter app-attribution identity. Call once at host boot,
93
+ * before any OpenRouter request. Blank/whitespace-only fields are ignored (the
94
+ * existing value is kept), so a partial override is safe.
95
+ */
96
+ declare function setOpenRouterAppIdentity(identity: Partial<OpenRouterAppIdentity>): void;
97
+ /**
98
+ * Read the current OpenRouter app-attribution identity.
99
+ */
100
+ declare function getOpenRouterAppIdentity(): OpenRouterAppIdentity;
71
101
 
72
- export { OPENROUTER_APP_HEADERS, isOpenRouterProvider };
102
+ export { OPENROUTER_APP_HEADERS, type OpenRouterAppIdentity, getOpenRouterAppIdentity, isOpenRouterProvider, setOpenRouterAppIdentity };