@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
@@ -8,7 +8,7 @@ import '../logger-4GvQNzhE.js';
8
8
  import '../ports/provider-config-source.js';
9
9
  import '../ProviderProxy-C-xqrkKi.js';
10
10
  import '../provider-proxy/types.js';
11
- export { T as AccountHealthConfig, A as AccountProbeConfig, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, i as KindMappedEndpoint, M as MessagesModelKind, j as ModelKind, k as ModelPrefixTargets, P as ModelRef, l as OutboundApiDeps, m as OutboundApiKeyCreated, n as OutboundApiKeyInfo, o as OutboundApiServerConfig, p as OutboundApiServerStatus, q as OutboundEndpoint, r as OutboundFormatUrls, s as OutboundKeyActivationMode, O as OutboundKeyDb, t as OutboundKeyDbRow, W as OutboundKeyModelRestrictionMode, u as OutboundKeyPolicy, v as OutboundProxyConfig, R as RequestRole, w as ResponsesModelKind, U as UserMessageQueueConfig } from '../types-6OUY_xfA.js';
11
+ export { H as AccountHealthConfig, A as AccountProbeConfig, C as ChatDispatchMode, a as ConcurrencyQueueConfig, E as ENDPOINT_MODEL_KINDS, b as EndpointRoutingConfig, F as FingerprintConfig, e as KindMappedEndpoint, M as MessagesModelKind, f as ModelKind, g as ModelPrefixTargets, G as ModelRef, h as OutboundApiDeps, i as OutboundApiKeyCreated, j as OutboundApiKeyInfo, k as OutboundApiServerConfig, l as OutboundApiServerStatus, m as OutboundEndpoint, n as OutboundFormatUrls, o as OutboundKeyActivationMode, O as OutboundKeyDb, p as OutboundKeyDbRow, I as OutboundKeyModelRestrictionMode, q as OutboundKeyPolicy, r as OutboundProxyConfig, R as RequestRole, s as ResponsesModelKind, U as UserMessageQueueConfig } from '../types-lgPYQuZS.js';
12
12
  import '@omnicross/contracts/llm-config';
13
13
  import '../transformer/types.js';
14
14
  import '../transformer/TransformerService.js';
@@ -22,3 +22,4 @@ import '../pipeline/SubscriptionAuthSource.js';
22
22
  import '../pipeline/SubscriptionAuthStrategy.js';
23
23
  import '../ports/web-search-backend.js';
24
24
  import '@omnicross/contracts/websearch-types';
25
+ import '../keyPolicy-Cp0FntZl.js';
@@ -55,39 +55,38 @@
55
55
 
56
56
 
57
57
 
58
-
59
-
60
-
61
-
62
- var _chunk2FMI2B6Vcjs = require('./chunk-2FMI2B6V.cjs');
58
+ var _chunkCGKLE6IWcjs = require('./chunk-CGKLE6IW.cjs');
63
59
  require('./chunk-HQP3K7PU.cjs');
64
60
  require('./chunk-FZ46M34D.cjs');
65
61
  require('./chunk-46ZIFWYG.cjs');
66
62
  require('./chunk-3OPYJG76.cjs');
67
- require('./chunk-FFALUUZZ.cjs');
68
- require('./chunk-C72S6TTV.cjs');
63
+ require('./chunk-ZCIQ3L3R.cjs');
64
+ require('./chunk-7FEBOPJO.cjs');
69
65
  require('./chunk-DWKQZ2SK.cjs');
70
- require('./chunk-4VAVYUZS.cjs');
71
- require('./chunk-7YN22L2H.cjs');
72
- require('./chunk-2DCNB7DF.cjs');
66
+ require('./chunk-4XMYPW46.cjs');
67
+ require('./chunk-K52THW2C.cjs');
68
+ require('./chunk-3Q6Z6JTO.cjs');
73
69
  require('./chunk-EYZYXJTJ.cjs');
74
70
  require('./chunk-YMFAJFQT.cjs');
75
- require('./chunk-3QOSDDNI.cjs');
71
+ require('./chunk-SNYBEXLB.cjs');
76
72
  require('./chunk-GBHYAGX3.cjs');
77
73
  require('./chunk-RPII3E6Z.cjs');
78
74
  require('./chunk-6RPZADX3.cjs');
79
75
  require('./chunk-QWBWGODS.cjs');
76
+ require('./chunk-UIBD2YY5.cjs');
77
+ require('./chunk-R3HK6R4B.cjs');
78
+ require('./chunk-HYN75H6G.cjs');
79
+ require('./chunk-Q27JY5RG.cjs');
80
+ require('./chunk-QXD4MV2X.cjs');
80
81
  require('./chunk-NYUNU75A.cjs');
81
82
  require('./chunk-VQY5W4YW.cjs');
82
- require('./chunk-Y6OM7EV7.cjs');
83
+ require('./chunk-KFI44N2R.cjs');
83
84
  require('./chunk-SVNDB62D.cjs');
84
- require('./chunk-R3HK6R4B.cjs');
85
- require('./chunk-AEOZIDEB.cjs');
85
+
86
+
87
+ var _chunkAPYG5QD7cjs = require('./chunk-APYG5QD7.cjs');
86
88
  require('./chunk-L74VDN4A.cjs');
87
- require('./chunk-KUU2RNG6.cjs');
88
- require('./chunk-Q27JY5RG.cjs');
89
- require('./chunk-QXD4MV2X.cjs');
90
- require('./chunk-A2YMUCBT.cjs');
89
+ require('./chunk-4YINUUKQ.cjs');
91
90
 
92
91
 
93
92
 
@@ -104,15 +103,26 @@ require('./chunk-A2YMUCBT.cjs');
104
103
 
105
104
 
106
105
 
107
- var _chunkSVXC36MUcjs = require('./chunk-SVXC36MU.cjs');
106
+ var _chunkVACWOIREcjs = require('./chunk-VACWOIRE.cjs');
108
107
  require('./chunk-QBZJ7P2T.cjs');
109
108
 
110
109
 
111
110
  var _chunk4IH4EL7Mcjs = require('./chunk-4IH4EL7M.cjs');
111
+ require('./chunk-A2YMUCBT.cjs');
112
+
113
+
114
+ var _chunkUNWKG6EIcjs = require('./chunk-UNWKG6EI.cjs');
115
+
116
+
117
+
118
+ var _chunkFCR77GYMcjs = require('./chunk-FCR77GYM.cjs');
119
+ require('./chunk-AEOZIDEB.cjs');
120
+ require('./chunk-XSVNC2UD.cjs');
112
121
  require('./chunk-SUEGJ75D.cjs');
113
- require('./chunk-S6JGLF3G.cjs');
114
- require('./chunk-RSJ3TWJQ.cjs');
115
- require('./chunk-YGXJGRFI.cjs');
122
+ require('./chunk-DDMRUL76.cjs');
123
+ require('./chunk-JWVTXXPX.cjs');
124
+ require('./chunk-PG7PS2NN.cjs');
125
+ require('./chunk-3Z5BQZFM.cjs');
116
126
  require('./chunk-NZYN7C3P.cjs');
117
127
  require('./chunk-JMJBSACD.cjs');
118
128
  require('./chunk-GMMT7RVN.cjs');
@@ -194,4 +204,4 @@ require('./chunk-UNEFIWXI.cjs');
194
204
 
195
205
 
196
206
 
197
- exports.AUDIT_REDACTED = _chunk2FMI2B6Vcjs.AUDIT_REDACTED; 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_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.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.SUBSCRIPTION_PROVIDER_IDS = _chunkSVXC36MUcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SerialQueueTimeoutError = _chunk2FMI2B6Vcjs.SerialQueueTimeoutError; exports.UserMessageSerialQueue = _chunk2FMI2B6Vcjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunk2FMI2B6Vcjs.__resetOutboundApiServerForTests; exports.beginAuditCapture = _chunk2FMI2B6Vcjs.beginAuditCapture; exports.beginBillingCapture = _chunk2FMI2B6Vcjs.beginBillingCapture; exports.checkKeyQuota = _chunk2FMI2B6Vcjs.checkKeyQuota; exports.classifyModelPrefix = _chunkSVXC36MUcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunk2FMI2B6Vcjs.computeKeyExpiry; exports.computeVoucherGrant = _chunk2FMI2B6Vcjs.computeVoucherGrant; exports.createNamedKey = _chunk2FMI2B6Vcjs.createNamedKey; exports.defaultServerConfig = _chunk2FMI2B6Vcjs.defaultServerConfig; exports.detectModelKind = _chunkSVXC36MUcjs.detectModelKind; exports.detectRequestRole = _chunkSVXC36MUcjs.detectRequestRole; exports.endpointSupportsSubscription = _chunkSVXC36MUcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunkSVXC36MUcjs.endpointToIngressFormat; exports.formatUrls = _chunk2FMI2B6Vcjs.formatUrls; exports.generateVoucherCode = _chunk2FMI2B6Vcjs.generateVoucherCode; exports.getOutboundApiServer = _chunk2FMI2B6Vcjs.getOutboundApiServer; exports.handleVoucherRedeem = _chunk2FMI2B6Vcjs.handleVoucherRedeem; exports.hashKey = _chunk2FMI2B6Vcjs.hashKey; exports.hashVoucherCode = _chunk2FMI2B6Vcjs.hashVoucherCode; exports.isConcurrencyRejection = _chunk2FMI2B6Vcjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunkSVXC36MUcjs.isKindMappedEndpoint; 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.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.resolvePrefixTarget = _chunkSVXC36MUcjs.resolvePrefixTarget; exports.resolveRoute = _chunkSVXC36MUcjs.resolveRoute; exports.saveServerConfig = _chunk2FMI2B6Vcjs.saveServerConfig; exports.startOfLocalDay = _chunk2FMI2B6Vcjs.startOfLocalDay; exports.startOfLocalWeek = _chunk2FMI2B6Vcjs.startOfLocalWeek; exports.toVoucherInfo = _chunk2FMI2B6Vcjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunkSVXC36MUcjs.validateEndpointModelConfig; exports.validateServerModelConfig = _chunkSVXC36MUcjs.validateServerModelConfig; exports.verifyKey = _chunk2FMI2B6Vcjs.verifyKey; exports.verifyPresentedKey = _chunk2FMI2B6Vcjs.verifyPresentedKey; exports.voucherCodePrefix = _chunk2FMI2B6Vcjs.voucherCodePrefix;
207
+ exports.AUDIT_REDACTED = _chunkFCR77GYMcjs.AUDIT_REDACTED; 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_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.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.SUBSCRIPTION_PROVIDER_IDS = _chunkVACWOIREcjs.SUBSCRIPTION_PROVIDER_IDS; exports.SerialQueueTimeoutError = _chunkCGKLE6IWcjs.SerialQueueTimeoutError; exports.UserMessageSerialQueue = _chunkCGKLE6IWcjs.UserMessageSerialQueue; exports.__resetOutboundApiServerForTests = _chunkCGKLE6IWcjs.__resetOutboundApiServerForTests; exports.beginAuditCapture = _chunkUNWKG6EIcjs.beginAuditCapture; exports.beginBillingCapture = _chunkAPYG5QD7cjs.beginBillingCapture; exports.checkKeyQuota = _chunkCGKLE6IWcjs.checkKeyQuota; exports.classifyModelPrefix = _chunkVACWOIREcjs.classifyModelPrefix; exports.computeKeyExpiry = _chunkCGKLE6IWcjs.computeKeyExpiry; exports.computeVoucherGrant = _chunkCGKLE6IWcjs.computeVoucherGrant; exports.createNamedKey = _chunkCGKLE6IWcjs.createNamedKey; exports.defaultServerConfig = _chunkCGKLE6IWcjs.defaultServerConfig; exports.detectModelKind = _chunkVACWOIREcjs.detectModelKind; exports.detectRequestRole = _chunkVACWOIREcjs.detectRequestRole; exports.endpointSupportsSubscription = _chunkVACWOIREcjs.endpointSupportsSubscription; exports.endpointToIngressFormat = _chunkVACWOIREcjs.endpointToIngressFormat; exports.formatUrls = _chunkCGKLE6IWcjs.formatUrls; exports.generateVoucherCode = _chunkCGKLE6IWcjs.generateVoucherCode; exports.getOutboundApiServer = _chunkCGKLE6IWcjs.getOutboundApiServer; exports.handleVoucherRedeem = _chunkCGKLE6IWcjs.handleVoucherRedeem; exports.hashKey = _chunkCGKLE6IWcjs.hashKey; exports.hashVoucherCode = _chunkCGKLE6IWcjs.hashVoucherCode; exports.isConcurrencyRejection = _chunkCGKLE6IWcjs.isConcurrencyRejection; exports.isKindMappedEndpoint = _chunkVACWOIREcjs.isKindMappedEndpoint; 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.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.resolvePrefixTarget = _chunkVACWOIREcjs.resolvePrefixTarget; exports.resolveRoute = _chunkVACWOIREcjs.resolveRoute; exports.saveServerConfig = _chunkCGKLE6IWcjs.saveServerConfig; exports.startOfLocalDay = _chunkCGKLE6IWcjs.startOfLocalDay; exports.startOfLocalWeek = _chunkCGKLE6IWcjs.startOfLocalWeek; exports.toVoucherInfo = _chunkCGKLE6IWcjs.toVoucherInfo; exports.validateEndpointModelConfig = _chunkVACWOIREcjs.validateEndpointModelConfig; exports.validateServerModelConfig = _chunkVACWOIREcjs.validateServerModelConfig; exports.verifyKey = _chunkCGKLE6IWcjs.verifyKey; exports.verifyPresentedKey = _chunkCGKLE6IWcjs.verifyPresentedKey; exports.voucherCodePrefix = _chunkCGKLE6IWcjs.voucherCodePrefix;
@@ -1,13 +1,18 @@
1
1
  import { VoucherConfig } from '@omnicross/contracts/voucher-types';
2
- import { i as KindMappedEndpoint, j as ModelKind, q as OutboundEndpoint, b as EndpointRoutingConfig, o as OutboundApiServerConfig, U as UserMessageQueueConfig, a as ConcurrencyQueueConfig, l as OutboundApiDeps, p as OutboundApiServerStatus, r as OutboundFormatUrls, A as AccountProbeConfig, F as FingerprintConfig, k as ModelPrefixTargets, v as OutboundProxyConfig, P as ModelRef, K as KeyCostLimits, S as ModelRestriction, O as OutboundKeyDb, m as OutboundApiKeyCreated, R as RequestRole } from './types-aBFFXoBz.cjs';
3
- export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, c as KeyExpiryInput, d as KeyExpiryResult, e as KeySpend, f as KeySpendReader, g as KeySpendSeeder, h as KeySpendTracker, M as MessagesModelKind, n as OutboundApiKeyInfo, s as OutboundKeyActivationMode, t as OutboundKeyDbRow, u as OutboundKeyPolicy, Q as QuotaDecision, w as ResponsesModelKind, 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';
2
+ import { e as KindMappedEndpoint, f as ModelKind, m as OutboundEndpoint, b as EndpointRoutingConfig, k as OutboundApiServerConfig, U as UserMessageQueueConfig, a as ConcurrencyQueueConfig, h as OutboundApiDeps, l as OutboundApiServerStatus, n as OutboundFormatUrls, A as AccountProbeConfig, F as FingerprintConfig, g as ModelPrefixTargets, r as OutboundProxyConfig, G as ModelRef, O as OutboundKeyDb, i as OutboundApiKeyCreated, R as RequestRole } from './types-B8Arpxn0.cjs';
3
+ export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, K as KeySpendReader, c as KeySpendSeeder, d as KeySpendTracker, M as MessagesModelKind, j as OutboundApiKeyInfo, o as OutboundKeyActivationMode, p as OutboundKeyDbRow, q as OutboundKeyPolicy, s as ResponsesModelKind, 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';
4
4
  import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
5
5
  import { AuditConfig } from '@omnicross/contracts/audit-types';
6
6
  import { BillingConfig } from '@omnicross/contracts/billing-types';
7
7
  import { WebhookDestination, WebhookConfig } from '@omnicross/contracts/webhook-types';
8
+ export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.cjs';
9
+ export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.cjs';
10
+ export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.cjs';
11
+ import { K as KeyCostLimits, M as ModelRestriction } from './keyPolicy-Cp0FntZl.cjs';
12
+ export { a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-Cp0FntZl.cjs';
8
13
  import http from 'node:http';
9
14
  import { IngressFormat } from './provider-proxy/types.cjs';
10
- 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';
15
+ 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';
11
16
  import '@omnicross/contracts/health-logging-types';
12
17
  import './logger-4GvQNzhE.cjs';
13
18
  import './ports/provider-config-source.cjs';
@@ -369,142 +374,6 @@ declare function saveServerConfig(store: ApiServerSettingsStore, config: Outboun
369
374
  /** Apply a partial patch to a config, returning the merged whole. */
370
375
  declare function mergeServerConfig(current: OutboundApiServerConfig, patch: Partial<OutboundApiServerConfig>): OutboundApiServerConfig;
371
376
 
372
- /**
373
- * auditRedact — the pure secret-redaction pass for captured audit bodies
374
- * (request-audit-log, design D3/D7).
375
- *
376
- * Body capture is opt-in and inherently sensitive: a prompt or tool argument can
377
- * embed a secret. {@link redactAuditText} is run over EVERY captured body (and
378
- * any other free text stored in a record) BEFORE it is persisted — defense in
379
- * depth on top of "request headers are NEVER captured" (so an Authorization /
380
- * x-api-key HEADER value never enters a record in the first place).
381
- *
382
- * It masks the obvious, high-confidence secret shapes ONLY (frozen list) — never
383
- * a broad heuristic that would gut a legitimate prompt:
384
- * - `sk-…` API keys (covers `sk-ant-…`, `sk-omnicross-…`, `sk-proj-…`, OpenAI).
385
- * - `Bearer <token>` authorization values.
386
- * - `x-api-key` / `api-key` / `authorization` values written inline as text.
387
- * - Google `AIza…` API keys.
388
- *
389
- * Pure + allocation-light + never throws.
390
- *
391
- * @module @omnicross/core/outbound-api/auditRedact
392
- */
393
- /** The sentinel a masked secret is replaced with. */
394
- declare const AUDIT_REDACTED = "***REDACTED***";
395
- /**
396
- * Mask obvious secrets in `text`. Pure; returns the input unchanged when it holds
397
- * no recognized secret shape. Never throws (a bad input returns `''`).
398
- */
399
- declare function redactAuditText(text: string): string;
400
-
401
- /**
402
- * auditCapture — the outbound server's post-response audit capture hook
403
- * (request-audit-log, design D1/D3/D5).
404
- *
405
- * {@link beginAuditCapture} is called at the TOP of `handleOutboundRequest`. It
406
- * reads the active capture config from the core slot; when audit is DISABLED it
407
- * returns `null` immediately (one slot read — no assembly, no listener, zero
408
- * regression). When enabled it:
409
- * - registers a one-shot `res.on('close')` listener that, at response end,
410
- * assembles the {@link AuditRecord} from the http `req` (IP via the socket, or
411
- * a trusted `X-Forwarded-For` only when configured — LEAD OQ1 anti-spoof; UA;
412
- * method; path with the query string DROPPED), the response `statusCode`, the
413
- * elapsed ms, and the fields the handler fills in (keyId / model / provider /
414
- * error / bodies) — then hands it to the fire-and-forget `recordAudit`;
415
- * - when `captureBodies` is ALSO on, wraps `res.write`/`res.end` to accumulate a
416
- * BOUNDED response body (metadata-only for a streaming `text/event-stream`
417
- * response — a full stream is unbounded), and truncates+redacts both bodies.
418
- *
419
- * Request HEADERS are NEVER read into a record (Authorization / x-api-key live
420
- * there). Every stored body passes through {@link redactAuditText}. The assembly
421
- * is wrapped so a capture failure can never surface into the relay path.
422
- *
423
- * @module @omnicross/core/outbound-api/auditCapture
424
- */
425
-
426
- /**
427
- * The mutable context the request handler enriches as it progresses. `null` is
428
- * returned by {@link beginAuditCapture} when audit is disabled — the handler
429
- * guards every write with `if (audit)`.
430
- */
431
- interface AuditCaptureContext {
432
- /** Outbound key id (set after auth). NEVER the key material. */
433
- keyId?: string | null;
434
- /** Resolved upstream model (set after route resolution). */
435
- model?: string;
436
- /** Upstream provider id (set after route resolution). */
437
- provider?: string;
438
- /** Sanitized error message (set on a relay/dispatch failure). */
439
- error?: string;
440
- /** Stash the raw request body for capture (a no-op unless `captureBodies`). */
441
- setRequestBody(raw: string): void;
442
- }
443
- /**
444
- * Begin audit capture for one request. Returns a mutable context the handler
445
- * enriches, or `null` when audit is disabled (zero-cost path). The record is
446
- * emitted on response `close` via the fire-and-forget sink.
447
- */
448
- declare function beginAuditCapture(req: http.IncomingMessage, res: http.ServerResponse, now: number): AuditCaptureContext | null;
449
-
450
- /**
451
- * billingCapture — the outbound server's post-response billing capture hook
452
- * (billing-event-stream, design D1/D4).
453
- *
454
- * {@link beginBillingCapture} is called at the TOP of `handleOutboundRequest`. It
455
- * reads the active billing config from the core slot; when billing is DISABLED it
456
- * returns `null` immediately (one slot read — no assembly, no listener, zero
457
- * regression). When enabled it registers a one-shot `res.close` listener that
458
- * assembles a {@link BillingEvent} from the handler-filled context (keyId / model
459
- * / provider / authMode), the response `statusCode`, and this request's METERED
460
- * FACTS (token counts + the ALREADY-COMPUTED cost) — then hands it to the
461
- * no-throw {@link publishBillingEvent}.
462
- *
463
- * COST REUSE (design D3 — no double pricing): the metered facts are read from the
464
- * per-request usage stash the usage tap populates ({@link readAuditUsage} — the
465
- * SAME stash `usage-events.jsonl` correlation uses, populated UNCONDITIONALLY by
466
- * the taps, independent of whether request-audit is enabled). Token counts are
467
- * stashed SYNCHRONOUSLY at `record()`; the cost lands on the recorder's deferred
468
- * pricing tick (scheduled BEFORE the response closes). So the assembly is deferred
469
- * one macrotask past `close` — by then the earlier-scheduled pricing tick has run
470
- * and stashed the computed cost we REUSE (we never re-price).
471
- *
472
- * BILLABLE-ONLY: an event is emitted ONLY when the request produced usage (an
473
- * upstream call was billed). Auth failures / rate-limit / model-restriction
474
- * rejections return before dispatch, stash no usage, and emit NO billing event.
475
- *
476
- * @module @omnicross/core/outbound-api/billingCapture
477
- */
478
-
479
- /**
480
- * The mutable context the request handler enriches as it progresses. `null` is
481
- * returned by {@link beginBillingCapture} when billing is disabled — the handler
482
- * guards every write with `if (billing)`.
483
- */
484
- interface BillingCaptureContext {
485
- /** Outbound key id (set after auth). NEVER the key material. */
486
- keyId?: string | null;
487
- /** Resolved upstream model (set after route resolution). */
488
- model?: string;
489
- /** Upstream provider id (set after route resolution). */
490
- provider?: string;
491
- /** Re-auth mode the request billed under (set after route resolution). */
492
- authMode?: 'byo' | 'subscription';
493
- }
494
- /**
495
- * Deferral used to schedule the event assembly one macrotask past `close`, so the
496
- * usage tap's earlier-scheduled pricing tick has stashed the cost we reuse.
497
- * Injectable ONLY for deterministic tests; production uses a zero-delay timer.
498
- */
499
- type BillingDefer = (fn: () => void) => void;
500
- /**
501
- * Begin billing capture for one request. Returns a mutable context the handler
502
- * enriches, or `null` when billing is disabled (zero-cost path). The event is
503
- * emitted on response `close` via the no-throw sink — but ONLY when the request
504
- * produced usage (a billable request).
505
- */
506
- declare function beginBillingCapture(_req: http.IncomingMessage, res: http.ServerResponse, now: number, defer?: BillingDefer): BillingCaptureContext | null;
507
-
508
377
  /**
509
378
  * modelPrefixDispatch — pure model-name PREFIX classification for the `chat`
510
379
  * endpoint's opt-in `dispatchMode: 'prefix'` (openai-chat-bridge #11, design D2).
@@ -1006,4 +875,4 @@ declare function getOutboundApiServer(deps?: OutboundApiDeps, onPortChange?: (po
1006
875
  /** Reset the singleton (tests / teardown only). */
1007
876
  declare function __resetOutboundApiServerForTests(): void;
1008
877
 
1009
- export { AUDIT_REDACTED, AccountProbeConfig, type ApiServerSettingsStore, type ApplyConfigInput, type AuditCaptureContext, type BillingCaptureContext, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, type EndpointModelConfigError, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundProxyConfig, OutboundRateLimiter, RequestRole, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type 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 };
878
+ export { AccountProbeConfig, type ApiServerSettingsStore, type ApplyConfigInput, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, type EndpointModelConfigError, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundProxyConfig, OutboundRateLimiter, RequestRole, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type 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 };
@@ -1,13 +1,18 @@
1
1
  import { VoucherConfig } from '@omnicross/contracts/voucher-types';
2
- import { i as KindMappedEndpoint, j as ModelKind, q as OutboundEndpoint, b as EndpointRoutingConfig, o as OutboundApiServerConfig, U as UserMessageQueueConfig, a as ConcurrencyQueueConfig, l as OutboundApiDeps, p as OutboundApiServerStatus, r as OutboundFormatUrls, A as AccountProbeConfig, F as FingerprintConfig, k as ModelPrefixTargets, v as OutboundProxyConfig, P as ModelRef, K as KeyCostLimits, S as ModelRestriction, O as OutboundKeyDb, m as OutboundApiKeyCreated, R as RequestRole } from './types-6OUY_xfA.js';
3
- export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, c as KeyExpiryInput, d as KeyExpiryResult, e as KeySpend, f as KeySpendReader, g as KeySpendSeeder, h as KeySpendTracker, M as MessagesModelKind, n as OutboundApiKeyInfo, s as OutboundKeyActivationMode, t as OutboundKeyDbRow, u as OutboundKeyPolicy, Q as QuotaDecision, w as ResponsesModelKind, 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';
2
+ import { e as KindMappedEndpoint, f as ModelKind, m as OutboundEndpoint, b as EndpointRoutingConfig, k as OutboundApiServerConfig, U as UserMessageQueueConfig, a as ConcurrencyQueueConfig, h as OutboundApiDeps, l as OutboundApiServerStatus, n as OutboundFormatUrls, A as AccountProbeConfig, F as FingerprintConfig, g as ModelPrefixTargets, r as OutboundProxyConfig, G as ModelRef, O as OutboundKeyDb, i as OutboundApiKeyCreated, R as RequestRole } from './types-lgPYQuZS.js';
3
+ export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, K as KeySpendReader, c as KeySpendSeeder, d as KeySpendTracker, M as MessagesModelKind, j as OutboundApiKeyInfo, o as OutboundKeyActivationMode, p as OutboundKeyDbRow, q as OutboundKeyPolicy, s as ResponsesModelKind, 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';
4
4
  import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
5
5
  import { AuditConfig } from '@omnicross/contracts/audit-types';
6
6
  import { BillingConfig } from '@omnicross/contracts/billing-types';
7
7
  import { WebhookDestination, WebhookConfig } from '@omnicross/contracts/webhook-types';
8
+ export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.js';
9
+ export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.js';
10
+ export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.js';
11
+ import { K as KeyCostLimits, M as ModelRestriction } from './keyPolicy-Cp0FntZl.js';
12
+ export { a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-Cp0FntZl.js';
8
13
  import http from 'node:http';
9
14
  import { IngressFormat } from './provider-proxy/types.js';
10
- 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';
15
+ 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';
11
16
  import '@omnicross/contracts/health-logging-types';
12
17
  import './logger-4GvQNzhE.js';
13
18
  import './ports/provider-config-source.js';
@@ -369,142 +374,6 @@ declare function saveServerConfig(store: ApiServerSettingsStore, config: Outboun
369
374
  /** Apply a partial patch to a config, returning the merged whole. */
370
375
  declare function mergeServerConfig(current: OutboundApiServerConfig, patch: Partial<OutboundApiServerConfig>): OutboundApiServerConfig;
371
376
 
372
- /**
373
- * auditRedact — the pure secret-redaction pass for captured audit bodies
374
- * (request-audit-log, design D3/D7).
375
- *
376
- * Body capture is opt-in and inherently sensitive: a prompt or tool argument can
377
- * embed a secret. {@link redactAuditText} is run over EVERY captured body (and
378
- * any other free text stored in a record) BEFORE it is persisted — defense in
379
- * depth on top of "request headers are NEVER captured" (so an Authorization /
380
- * x-api-key HEADER value never enters a record in the first place).
381
- *
382
- * It masks the obvious, high-confidence secret shapes ONLY (frozen list) — never
383
- * a broad heuristic that would gut a legitimate prompt:
384
- * - `sk-…` API keys (covers `sk-ant-…`, `sk-omnicross-…`, `sk-proj-…`, OpenAI).
385
- * - `Bearer <token>` authorization values.
386
- * - `x-api-key` / `api-key` / `authorization` values written inline as text.
387
- * - Google `AIza…` API keys.
388
- *
389
- * Pure + allocation-light + never throws.
390
- *
391
- * @module @omnicross/core/outbound-api/auditRedact
392
- */
393
- /** The sentinel a masked secret is replaced with. */
394
- declare const AUDIT_REDACTED = "***REDACTED***";
395
- /**
396
- * Mask obvious secrets in `text`. Pure; returns the input unchanged when it holds
397
- * no recognized secret shape. Never throws (a bad input returns `''`).
398
- */
399
- declare function redactAuditText(text: string): string;
400
-
401
- /**
402
- * auditCapture — the outbound server's post-response audit capture hook
403
- * (request-audit-log, design D1/D3/D5).
404
- *
405
- * {@link beginAuditCapture} is called at the TOP of `handleOutboundRequest`. It
406
- * reads the active capture config from the core slot; when audit is DISABLED it
407
- * returns `null` immediately (one slot read — no assembly, no listener, zero
408
- * regression). When enabled it:
409
- * - registers a one-shot `res.on('close')` listener that, at response end,
410
- * assembles the {@link AuditRecord} from the http `req` (IP via the socket, or
411
- * a trusted `X-Forwarded-For` only when configured — LEAD OQ1 anti-spoof; UA;
412
- * method; path with the query string DROPPED), the response `statusCode`, the
413
- * elapsed ms, and the fields the handler fills in (keyId / model / provider /
414
- * error / bodies) — then hands it to the fire-and-forget `recordAudit`;
415
- * - when `captureBodies` is ALSO on, wraps `res.write`/`res.end` to accumulate a
416
- * BOUNDED response body (metadata-only for a streaming `text/event-stream`
417
- * response — a full stream is unbounded), and truncates+redacts both bodies.
418
- *
419
- * Request HEADERS are NEVER read into a record (Authorization / x-api-key live
420
- * there). Every stored body passes through {@link redactAuditText}. The assembly
421
- * is wrapped so a capture failure can never surface into the relay path.
422
- *
423
- * @module @omnicross/core/outbound-api/auditCapture
424
- */
425
-
426
- /**
427
- * The mutable context the request handler enriches as it progresses. `null` is
428
- * returned by {@link beginAuditCapture} when audit is disabled — the handler
429
- * guards every write with `if (audit)`.
430
- */
431
- interface AuditCaptureContext {
432
- /** Outbound key id (set after auth). NEVER the key material. */
433
- keyId?: string | null;
434
- /** Resolved upstream model (set after route resolution). */
435
- model?: string;
436
- /** Upstream provider id (set after route resolution). */
437
- provider?: string;
438
- /** Sanitized error message (set on a relay/dispatch failure). */
439
- error?: string;
440
- /** Stash the raw request body for capture (a no-op unless `captureBodies`). */
441
- setRequestBody(raw: string): void;
442
- }
443
- /**
444
- * Begin audit capture for one request. Returns a mutable context the handler
445
- * enriches, or `null` when audit is disabled (zero-cost path). The record is
446
- * emitted on response `close` via the fire-and-forget sink.
447
- */
448
- declare function beginAuditCapture(req: http.IncomingMessage, res: http.ServerResponse, now: number): AuditCaptureContext | null;
449
-
450
- /**
451
- * billingCapture — the outbound server's post-response billing capture hook
452
- * (billing-event-stream, design D1/D4).
453
- *
454
- * {@link beginBillingCapture} is called at the TOP of `handleOutboundRequest`. It
455
- * reads the active billing config from the core slot; when billing is DISABLED it
456
- * returns `null` immediately (one slot read — no assembly, no listener, zero
457
- * regression). When enabled it registers a one-shot `res.close` listener that
458
- * assembles a {@link BillingEvent} from the handler-filled context (keyId / model
459
- * / provider / authMode), the response `statusCode`, and this request's METERED
460
- * FACTS (token counts + the ALREADY-COMPUTED cost) — then hands it to the
461
- * no-throw {@link publishBillingEvent}.
462
- *
463
- * COST REUSE (design D3 — no double pricing): the metered facts are read from the
464
- * per-request usage stash the usage tap populates ({@link readAuditUsage} — the
465
- * SAME stash `usage-events.jsonl` correlation uses, populated UNCONDITIONALLY by
466
- * the taps, independent of whether request-audit is enabled). Token counts are
467
- * stashed SYNCHRONOUSLY at `record()`; the cost lands on the recorder's deferred
468
- * pricing tick (scheduled BEFORE the response closes). So the assembly is deferred
469
- * one macrotask past `close` — by then the earlier-scheduled pricing tick has run
470
- * and stashed the computed cost we REUSE (we never re-price).
471
- *
472
- * BILLABLE-ONLY: an event is emitted ONLY when the request produced usage (an
473
- * upstream call was billed). Auth failures / rate-limit / model-restriction
474
- * rejections return before dispatch, stash no usage, and emit NO billing event.
475
- *
476
- * @module @omnicross/core/outbound-api/billingCapture
477
- */
478
-
479
- /**
480
- * The mutable context the request handler enriches as it progresses. `null` is
481
- * returned by {@link beginBillingCapture} when billing is disabled — the handler
482
- * guards every write with `if (billing)`.
483
- */
484
- interface BillingCaptureContext {
485
- /** Outbound key id (set after auth). NEVER the key material. */
486
- keyId?: string | null;
487
- /** Resolved upstream model (set after route resolution). */
488
- model?: string;
489
- /** Upstream provider id (set after route resolution). */
490
- provider?: string;
491
- /** Re-auth mode the request billed under (set after route resolution). */
492
- authMode?: 'byo' | 'subscription';
493
- }
494
- /**
495
- * Deferral used to schedule the event assembly one macrotask past `close`, so the
496
- * usage tap's earlier-scheduled pricing tick has stashed the cost we reuse.
497
- * Injectable ONLY for deterministic tests; production uses a zero-delay timer.
498
- */
499
- type BillingDefer = (fn: () => void) => void;
500
- /**
501
- * Begin billing capture for one request. Returns a mutable context the handler
502
- * enriches, or `null` when billing is disabled (zero-cost path). The event is
503
- * emitted on response `close` via the no-throw sink — but ONLY when the request
504
- * produced usage (a billable request).
505
- */
506
- declare function beginBillingCapture(_req: http.IncomingMessage, res: http.ServerResponse, now: number, defer?: BillingDefer): BillingCaptureContext | null;
507
-
508
377
  /**
509
378
  * modelPrefixDispatch — pure model-name PREFIX classification for the `chat`
510
379
  * endpoint's opt-in `dispatchMode: 'prefix'` (openai-chat-bridge #11, design D2).
@@ -1006,4 +875,4 @@ declare function getOutboundApiServer(deps?: OutboundApiDeps, onPortChange?: (po
1006
875
  /** Reset the singleton (tests / teardown only). */
1007
876
  declare function __resetOutboundApiServerForTests(): void;
1008
877
 
1009
- export { AUDIT_REDACTED, AccountProbeConfig, type ApiServerSettingsStore, type ApplyConfigInput, type AuditCaptureContext, type BillingCaptureContext, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, type EndpointModelConfigError, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundProxyConfig, OutboundRateLimiter, RequestRole, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type 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 };
878
+ export { AccountProbeConfig, type ApiServerSettingsStore, type ApplyConfigInput, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, type EndpointModelConfigError, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiConfigError, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundProxyConfig, OutboundRateLimiter, RequestRole, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type 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 };
@@ -1,5 +1,4 @@
1
1
  import {
2
- AUDIT_REDACTED,
3
2
  ConcurrencyQueueFullError,
4
3
  ConcurrencyWaitCancelledError,
5
4
  ConcurrencyWaitTimeoutError,
@@ -18,8 +17,6 @@ import {
18
17
  SerialQueueTimeoutError,
19
18
  UserMessageSerialQueue,
20
19
  __resetOutboundApiServerForTests,
21
- beginAuditCapture,
22
- beginBillingCapture,
23
20
  checkKeyQuota,
24
21
  computeKeyExpiry,
25
22
  computeVoucherGrant,
@@ -51,7 +48,6 @@ import {
51
48
  normalizeWebhookDestination,
52
49
  normalizeWebhookSegment,
53
50
  randomBase62,
54
- redactAuditText,
55
51
  saveServerConfig,
56
52
  startOfLocalDay,
57
53
  startOfLocalWeek,
@@ -59,35 +55,38 @@ import {
59
55
  verifyKey,
60
56
  verifyPresentedKey,
61
57
  voucherCodePrefix
62
- } from "./chunk-4DECIFU7.js";
58
+ } from "./chunk-FH2P4OCD.js";
63
59
  import "./chunk-VVEHS2LI.js";
64
60
  import "./chunk-46RLHI7D.js";
65
61
  import "./chunk-G2UTNSGU.js";
66
62
  import "./chunk-DK4A7DLE.js";
67
- import "./chunk-MQNDWYPN.js";
68
- import "./chunk-Z7LUNECE.js";
63
+ import "./chunk-OQWKZCXP.js";
64
+ import "./chunk-IB3FDI4O.js";
69
65
  import "./chunk-ZJZAOKI7.js";
70
- import "./chunk-FTQ7IQUC.js";
71
- import "./chunk-C7PSERMH.js";
72
- import "./chunk-5HTVET6E.js";
66
+ import "./chunk-C6OV7GCC.js";
67
+ import "./chunk-IWQAX3CS.js";
68
+ import "./chunk-BODMAL6G.js";
73
69
  import "./chunk-7VU7V2E4.js";
74
70
  import "./chunk-ZLX3KGXX.js";
75
- import "./chunk-CWM2ZDU5.js";
71
+ import "./chunk-BPKCU575.js";
76
72
  import "./chunk-MZNPGW5Q.js";
77
73
  import "./chunk-XTEI64OU.js";
78
74
  import "./chunk-XX6NQJMA.js";
79
75
  import "./chunk-IAXWICZU.js";
76
+ import "./chunk-OE6TDIWW.js";
77
+ import "./chunk-DRWHTIIZ.js";
78
+ import "./chunk-IK3KE3AU.js";
79
+ import "./chunk-ZY6KU6P3.js";
80
+ import "./chunk-JWC6APFQ.js";
80
81
  import "./chunk-5ERIZW3D.js";
81
82
  import "./chunk-5ENKBSWO.js";
82
- import "./chunk-N5QFKSDO.js";
83
+ import "./chunk-HRRYG2AX.js";
83
84
  import "./chunk-AVYJ4YBN.js";
84
- import "./chunk-DRWHTIIZ.js";
85
- import "./chunk-WNY4WMRF.js";
85
+ import {
86
+ beginBillingCapture
87
+ } from "./chunk-WLYIIEAF.js";
86
88
  import "./chunk-TKJMZBAH.js";
87
- import "./chunk-JO5NLTLY.js";
88
- import "./chunk-ZY6KU6P3.js";
89
- import "./chunk-JWC6APFQ.js";
90
- import "./chunk-H5JUT3KV.js";
89
+ import "./chunk-3QFXFCHG.js";
91
90
  import {
92
91
  SUBSCRIPTION_PROVIDER_IDS,
93
92
  classifyModelPrefix,
@@ -104,15 +103,26 @@ import {
104
103
  resolveRoute,
105
104
  validateEndpointModelConfig,
106
105
  validateServerModelConfig
107
- } from "./chunk-CZHZGRU7.js";
106
+ } from "./chunk-UHGVBFU3.js";
108
107
  import "./chunk-AQ5TNQB7.js";
109
108
  import {
110
109
  ENDPOINT_MODEL_KINDS
111
110
  } from "./chunk-XEKD23J5.js";
111
+ import "./chunk-H5JUT3KV.js";
112
+ import {
113
+ beginAuditCapture
114
+ } from "./chunk-IFXJ2BG7.js";
115
+ import {
116
+ AUDIT_REDACTED,
117
+ redactAuditText
118
+ } from "./chunk-K5NM7VAH.js";
119
+ import "./chunk-WNY4WMRF.js";
120
+ import "./chunk-OZFM4X3S.js";
112
121
  import "./chunk-5ZQBEOMD.js";
113
- import "./chunk-BO4RFWBR.js";
114
- import "./chunk-Z7Y2NPHY.js";
115
- import "./chunk-S4WBV25P.js";
122
+ import "./chunk-MFZ5437A.js";
123
+ import "./chunk-6QZGDLL4.js";
124
+ import "./chunk-D3TDKWRP.js";
125
+ import "./chunk-SYQF7OIR.js";
116
126
  import "./chunk-CDHS2QDC.js";
117
127
  import "./chunk-Y7FO65VT.js";
118
128
  import "./chunk-FMOBD2OQ.js";
@@ -52,6 +52,12 @@ interface AuthApplyHints {
52
52
  * (no cross-request race). BYO auth sources ignore it.
53
53
  */
54
54
  reportSelection?: (accountId: string, isActive: boolean, remappedModel?: string) => void;
55
+ /**
56
+ * OPTIONAL preferred subscription account id (provider/subscription duality).
57
+ * When set and schedulable the account picker resolves it directly; absent or
58
+ * unschedulable ⇒ pool auto-schedule. BYO auth sources ignore it.
59
+ */
60
+ preferredAccountId?: string;
55
61
  }
56
62
  /**
57
63
  * Result of {@link AuthSource.onResult}.
@@ -52,6 +52,12 @@ interface AuthApplyHints {
52
52
  * (no cross-request race). BYO auth sources ignore it.
53
53
  */
54
54
  reportSelection?: (accountId: string, isActive: boolean, remappedModel?: string) => void;
55
+ /**
56
+ * OPTIONAL preferred subscription account id (provider/subscription duality).
57
+ * When set and schedulable the account picker resolves it directly; absent or
58
+ * unschedulable ⇒ pool auto-schedule. BYO auth sources ignore it.
59
+ */
60
+ preferredAccountId?: string;
55
61
  }
56
62
  /**
57
63
  * Result of {@link AuthSource.onResult}.
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkY6OM7EV7cjs = require('../chunk-Y6OM7EV7.cjs');
4
+ var _chunkKFI44N2Rcjs = require('../chunk-KFI44N2R.cjs');
5
5
  require('../chunk-SVNDB62D.cjs');
6
6
 
7
7
 
8
8
 
9
- exports.SubscriptionAuthSource = _chunkY6OM7EV7cjs.SubscriptionAuthSource; exports.stripAuthHeaders = _chunkY6OM7EV7cjs.stripAuthHeaders;
9
+ exports.SubscriptionAuthSource = _chunkKFI44N2Rcjs.SubscriptionAuthSource; exports.stripAuthHeaders = _chunkKFI44N2Rcjs.stripAuthHeaders;