@omnicross/core 0.1.9 → 0.2.0

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 (176) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +57 -57
  3. package/README.md +22 -15
  4. package/dist/{CompletionService-kNA17cfI.d.cts → CompletionService-BiJqftc-.d.cts} +1 -1
  5. package/dist/{CompletionService-C3BX0Ovy.d.ts → CompletionService-NXN_Av5W.d.ts} +1 -1
  6. package/dist/{ProviderProxy-QdwNV6l1.d.cts → ProviderProxy-CgIcCVwk.d.cts} +1 -1
  7. package/dist/{ProviderProxy--ROec6VI.d.ts → ProviderProxy-DYoY5XoT.d.ts} +1 -1
  8. package/dist/auth/GeminiCodeAssistProjectResolver.cjs +6 -6
  9. package/dist/auth/GeminiCodeAssistProjectResolver.js +4 -4
  10. package/dist/chunk-32SRZFFP.cjs +153 -0
  11. package/dist/chunk-4JOU54M5.js +200 -0
  12. package/dist/{chunk-2UTGX6FM.js → chunk-4VVCXVB7.js} +1 -1
  13. package/dist/{chunk-EPN67EGP.cjs → chunk-5UK3KLE2.cjs} +9 -1
  14. package/dist/chunk-6DDYNS2B.cjs +384 -0
  15. package/dist/{chunk-HKB656B4.js → chunk-6OC3ORW6.js} +55 -287
  16. package/dist/chunk-6OKXH2TW.js +320 -0
  17. package/dist/{chunk-XELFM7KL.cjs → chunk-7B56AJBB.cjs} +6275 -2421
  18. package/dist/{chunk-YWL7YZWS.cjs → chunk-7LRTPNFL.cjs} +5 -0
  19. package/dist/{chunk-CCVRRJOX.js → chunk-7PIUVCKK.js} +9 -2
  20. package/dist/{chunk-IIRPUVPH.cjs → chunk-7ZHBN75N.cjs} +3 -1
  21. package/dist/{chunk-UAPBLNN2.js → chunk-AQDON6MB.js} +8 -0
  22. package/dist/{chunk-RJ5ZGNI3.js → chunk-CFSGYFOZ.js} +1 -1
  23. package/dist/chunk-CTKM773J.cjs +3919 -0
  24. package/dist/chunk-DEIUR2TH.js +3919 -0
  25. package/dist/{chunk-WNKWAEUR.js → chunk-EYGBM2VC.js} +3 -1
  26. package/dist/{chunk-NGYOO5TO.js → chunk-FJNKXOWE.js} +9 -9
  27. package/dist/chunk-FX325I5Q.cjs +320 -0
  28. package/dist/chunk-G4CZIUIB.cjs +200 -0
  29. package/dist/chunk-HCOQQAZE.cjs +123 -0
  30. package/dist/{chunk-55FMGZ3L.js → chunk-HN74IGEO.js} +1 -1
  31. package/dist/{chunk-ZY6KU6P3.js → chunk-HOMUGKHR.js} +8 -5
  32. package/dist/{chunk-AOFWNWLT.cjs → chunk-IUL4VWNU.cjs} +22 -1
  33. package/dist/{chunk-5LNYGCIW.cjs → chunk-KIQ2HA2A.cjs} +5 -5
  34. package/dist/{chunk-MUHWHQVM.cjs → chunk-KQBLZMP6.cjs} +4 -3
  35. package/dist/chunk-LFEH7CEO.js +384 -0
  36. package/dist/chunk-N76KU6F5.js +123 -0
  37. package/dist/{chunk-CMVXX7ON.cjs → chunk-NOITAVHA.cjs} +114 -58
  38. package/dist/{chunk-Q27JY5RG.cjs → chunk-OIKREZVQ.cjs} +7 -4
  39. package/dist/{chunk-RJUONLUQ.cjs → chunk-OST5RJOJ.cjs} +1 -1
  40. package/dist/chunk-QIIAMBTM.js +153 -0
  41. package/dist/{chunk-56QD3YW6.cjs → chunk-QWNUOR7F.cjs} +11 -4
  42. package/dist/{chunk-S3DYFEBE.js → chunk-R4VCO2CB.js} +10 -1
  43. package/dist/{chunk-ZQQUD66M.cjs → chunk-SQMAEDNE.cjs} +63 -295
  44. package/dist/{chunk-4VZX5F4T.cjs → chunk-T6NWPIYZ.cjs} +5 -2
  45. package/dist/{chunk-P7EM6BND.cjs → chunk-TVYA5JSQ.cjs} +10 -10
  46. package/dist/{chunk-EBLFCNPY.js → chunk-U47LQXPB.js} +5 -2
  47. package/dist/{chunk-N7OOJI5V.js → chunk-V2UKUTJ3.js} +5 -0
  48. package/dist/{chunk-45FHEOKW.js → chunk-V53ZEFXC.js} +92 -36
  49. package/dist/{chunk-OC6DOOFX.cjs → chunk-VXRTQZF2.cjs} +5 -5
  50. package/dist/{chunk-CQIJCPMF.js → chunk-WSJE42SG.js} +5149 -1295
  51. package/dist/{chunk-RICPANBY.cjs → chunk-WX2E2G7H.cjs} +13 -4
  52. package/dist/{chunk-DE2SRBFZ.js → chunk-X335TJNS.js} +4 -3
  53. package/dist/{chunk-N2EIM2XJ.js → chunk-ZLNHPUFA.js} +22 -1
  54. package/dist/completion/CompletionService.cjs +30 -27
  55. package/dist/completion/CompletionService.d.cts +3 -2
  56. package/dist/completion/CompletionService.d.ts +3 -2
  57. package/dist/completion/CompletionService.js +29 -26
  58. package/dist/completion.cjs +38 -35
  59. package/dist/completion.d.cts +3 -2
  60. package/dist/completion.d.ts +3 -2
  61. package/dist/completion.js +37 -34
  62. package/dist/image-generation.cjs +52 -0
  63. package/dist/image-generation.d.cts +93 -0
  64. package/dist/image-generation.d.ts +93 -0
  65. package/dist/image-generation.js +52 -0
  66. package/dist/index.cjs +126 -31
  67. package/dist/index.d.cts +11 -7
  68. package/dist/index.d.ts +11 -7
  69. package/dist/index.js +143 -48
  70. package/dist/openai-operation.cjs +18 -0
  71. package/dist/openai-operation.d.cts +19 -0
  72. package/dist/openai-operation.d.ts +19 -0
  73. package/dist/openai-operation.js +18 -0
  74. package/dist/outbound-api/auditCapture.cjs +3 -3
  75. package/dist/outbound-api/auditCapture.d.cts +19 -2
  76. package/dist/outbound-api/auditCapture.d.ts +19 -2
  77. package/dist/outbound-api/auditCapture.js +2 -2
  78. package/dist/outbound-api/auditRedact.cjs +2 -2
  79. package/dist/outbound-api/auditRedact.js +1 -1
  80. package/dist/outbound-api/routeResolver.cjs +2 -2
  81. package/dist/outbound-api/routeResolver.d.cts +7 -4
  82. package/dist/outbound-api/routeResolver.d.ts +7 -4
  83. package/dist/outbound-api/routeResolver.js +1 -1
  84. package/dist/outbound-api/subscriptionRegistryPort.d.cts +2 -1
  85. package/dist/outbound-api/subscriptionRegistryPort.d.ts +2 -1
  86. package/dist/outbound-api/types.d.cts +6 -3
  87. package/dist/outbound-api/types.d.ts +6 -3
  88. package/dist/outbound-api.cjs +49 -32
  89. package/dist/outbound-api.d.cts +97 -10
  90. package/dist/outbound-api.d.ts +97 -10
  91. package/dist/outbound-api.js +48 -31
  92. package/dist/pipeline/AccountAllowanceScheduling.d.cts +18 -15
  93. package/dist/pipeline/AccountAllowanceScheduling.d.ts +18 -15
  94. package/dist/pipeline/LlmConfigProviderAuth.cjs +3 -3
  95. package/dist/pipeline/LlmConfigProviderAuth.js +2 -2
  96. package/dist/pipeline/SubscriptionAccountHealth.cjs +2 -2
  97. package/dist/pipeline/SubscriptionAccountHealth.d.cts +7 -0
  98. package/dist/pipeline/SubscriptionAccountHealth.d.ts +7 -0
  99. package/dist/pipeline/SubscriptionAccountHealth.js +1 -1
  100. package/dist/pipeline/executeProviderCall.cjs +2 -2
  101. package/dist/pipeline/executeProviderCall.d.cts +11 -6
  102. package/dist/pipeline/executeProviderCall.d.ts +11 -6
  103. package/dist/pipeline/executeProviderCall.js +1 -1
  104. package/dist/pipeline/upstreamFetch.cjs +2 -2
  105. package/dist/pipeline/upstreamFetch.d.cts +5 -0
  106. package/dist/pipeline/upstreamFetch.d.ts +5 -0
  107. package/dist/pipeline/upstreamFetch.js +1 -1
  108. package/dist/ports.d.cts +6 -3
  109. package/dist/ports.d.ts +6 -3
  110. package/dist/provider-proxy/ProviderProxy.cjs +30 -27
  111. package/dist/provider-proxy/ProviderProxy.d.cts +3 -2
  112. package/dist/provider-proxy/ProviderProxy.d.ts +3 -2
  113. package/dist/provider-proxy/ProviderProxy.js +29 -26
  114. package/dist/provider-proxy/identity/codexCliHeaders.cjs +4 -2
  115. package/dist/provider-proxy/identity/codexCliHeaders.d.cts +26 -6
  116. package/dist/provider-proxy/identity/codexCliHeaders.d.ts +26 -6
  117. package/dist/provider-proxy/identity/codexCliHeaders.js +5 -3
  118. package/dist/provider-proxy/ingress/providerProxyShared.cjs +32 -27
  119. package/dist/provider-proxy/ingress/providerProxyShared.d.cts +21 -8
  120. package/dist/provider-proxy/ingress/providerProxyShared.d.ts +21 -8
  121. package/dist/provider-proxy/ingress/providerProxyShared.js +31 -26
  122. package/dist/provider-proxy/types.d.cts +14 -483
  123. package/dist/provider-proxy/types.d.ts +14 -483
  124. package/dist/provider-proxy.cjs +44 -27
  125. package/dist/provider-proxy.d.cts +30 -8
  126. package/dist/provider-proxy.d.ts +30 -8
  127. package/dist/provider-proxy.js +43 -26
  128. package/dist/{routeResolver-C0mkkZaM.d.ts → routeResolver-CTCcSHWu.d.ts} +4 -2
  129. package/dist/{routeResolver-CVFE8KKe.d.cts → routeResolver-rpKQLyDO.d.cts} +4 -2
  130. package/dist/transformer/TransformerChainExecutor.cjs +2 -2
  131. package/dist/transformer/TransformerChainExecutor.d.cts +2 -2
  132. package/dist/transformer/TransformerChainExecutor.d.ts +2 -2
  133. package/dist/transformer/TransformerChainExecutor.js +1 -1
  134. package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.cjs +16 -0
  135. package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.d.cts +53 -0
  136. package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.d.ts +53 -0
  137. package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.js +16 -0
  138. package/dist/transformer/transformers/AnthropicTransformer.cjs +4 -3
  139. package/dist/transformer/transformers/AnthropicTransformer.js +3 -2
  140. package/dist/transformer/transformers/GeminiCodeAssistTransformer.cjs +4 -4
  141. package/dist/transformer/transformers/GeminiCodeAssistTransformer.js +3 -3
  142. package/dist/transformer/transformers/GeminiTransformer.cjs +4 -4
  143. package/dist/transformer/transformers/GeminiTransformer.js +3 -3
  144. package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +3 -3
  145. package/dist/transformer/transformers/OpenAIResponseTransformer.js +2 -2
  146. package/dist/transformer/transformers/OpenAITransformer.cjs +3 -3
  147. package/dist/transformer/transformers/OpenAITransformer.js +2 -2
  148. package/dist/transformer/transformers.cjs +10 -9
  149. package/dist/transformer/transformers.js +13 -12
  150. package/dist/transformer/types.d.cts +39 -4
  151. package/dist/transformer/types.d.ts +39 -4
  152. package/dist/transformer.cjs +14 -13
  153. package/dist/transformer.js +14 -13
  154. package/dist/{types-BB8pxk_3.d.ts → types-5T223WYQ.d.ts} +183 -23
  155. package/dist/types-Bd72H4SB.d.ts +196 -0
  156. package/dist/types-CVRge76p.d.ts +1115 -0
  157. package/dist/types-CbglB73l.d.cts +196 -0
  158. package/dist/types-DsHBBk3h.d.cts +1115 -0
  159. package/dist/{types-C2MwkLah.d.cts → types-jjU24eYG.d.cts} +183 -23
  160. package/dist/usage/usage-recorder.cjs +2 -2
  161. package/dist/usage/usage-recorder.d.cts +12 -2
  162. package/dist/usage/usage-recorder.d.ts +12 -2
  163. package/dist/usage/usage-recorder.js +1 -1
  164. package/dist/usage.cjs +20 -3
  165. package/dist/usage.d.cts +154 -0
  166. package/dist/usage.d.ts +154 -0
  167. package/dist/usage.js +20 -3
  168. package/package.json +69 -64
  169. package/dist/chunk-7C7DET6S.js +0 -154
  170. package/dist/chunk-7VU7V2E4.js +0 -0
  171. package/dist/chunk-EYZYXJTJ.cjs +0 -1
  172. package/dist/chunk-FCR77GYM.cjs +0 -33
  173. package/dist/chunk-K5NM7VAH.js +0 -33
  174. package/dist/chunk-XPIOJQS2.cjs +0 -154
  175. /package/dist/{chunk-XXFYLL7R.js → chunk-ECZ3ZE2C.js} +0 -0
  176. /package/dist/{chunk-3SCOLIPT.cjs → chunk-MXI2PWIC.cjs} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk56QD3YW6cjs = require('../../chunk-56QD3YW6.cjs');
4
- require('../../chunk-AOFWNWLT.cjs');
3
+ var _chunkQWNUOR7Fcjs = require('../../chunk-QWNUOR7F.cjs');
4
+ require('../../chunk-IUL4VWNU.cjs');
5
5
 
6
6
 
7
- exports.OpenAITransformer = _chunk56QD3YW6cjs.OpenAITransformer;
7
+ exports.OpenAITransformer = _chunkQWNUOR7Fcjs.OpenAITransformer;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  OpenAITransformer
3
- } from "../../chunk-CCVRRJOX.js";
4
- import "../../chunk-N2EIM2XJ.js";
3
+ } from "../../chunk-7PIUVCKK.js";
4
+ import "../../chunk-ZLNHPUFA.js";
5
5
  export {
6
6
  OpenAITransformer
7
7
  };
@@ -3,26 +3,27 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkP7EM6BNDcjs = require('../chunk-P7EM6BND.cjs');
6
+ var _chunkTVYA5JSQcjs = require('../chunk-TVYA5JSQ.cjs');
7
7
 
8
8
 
9
- var _chunkZQQUD66Mcjs = require('../chunk-ZQQUD66M.cjs');
9
+ var _chunkNOITAVHAcjs = require('../chunk-NOITAVHA.cjs');
10
10
 
11
11
 
12
- var _chunk5LNYGCIWcjs = require('../chunk-5LNYGCIW.cjs');
12
+ var _chunkQWNUOR7Fcjs = require('../chunk-QWNUOR7F.cjs');
13
13
 
14
14
 
15
- var _chunkCMVXX7ONcjs = require('../chunk-CMVXX7ON.cjs');
15
+ var _chunkSQMAEDNEcjs = require('../chunk-SQMAEDNE.cjs');
16
16
  require('../chunk-5RSZYQJH.cjs');
17
+ require('../chunk-6DDYNS2B.cjs');
17
18
 
18
19
 
19
- var _chunk56QD3YW6cjs = require('../chunk-56QD3YW6.cjs');
20
+ var _chunkKIQ2HA2Acjs = require('../chunk-KIQ2HA2A.cjs');
20
21
 
21
22
 
22
- var _chunkOC6DOOFXcjs = require('../chunk-OC6DOOFX.cjs');
23
- require('../chunk-RICPANBY.cjs');
23
+ var _chunkVXRTQZF2cjs = require('../chunk-VXRTQZF2.cjs');
24
+ require('../chunk-WX2E2G7H.cjs');
24
25
  require('../chunk-77USGNRW.cjs');
25
- require('../chunk-AOFWNWLT.cjs');
26
+ require('../chunk-IUL4VWNU.cjs');
26
27
 
27
28
 
28
29
 
@@ -33,4 +34,4 @@ require('../chunk-AOFWNWLT.cjs');
33
34
 
34
35
 
35
36
 
36
- exports.AnthropicTransformer = _chunkZQQUD66Mcjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunkP7EM6BNDcjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunkP7EM6BNDcjs.BuiltinTransformers; exports.GeminiCodeAssistTransformer = _chunkOC6DOOFXcjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunk5LNYGCIWcjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunkCMVXX7ONcjs.OpenAIResponseTransformer; exports.OpenAITransformer = _chunk56QD3YW6cjs.OpenAITransformer; exports.getBuiltinTransformers = _chunkP7EM6BNDcjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunkP7EM6BNDcjs.registerBuiltinTransformers;
37
+ exports.AnthropicTransformer = _chunkSQMAEDNEcjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunkTVYA5JSQcjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunkTVYA5JSQcjs.BuiltinTransformers; exports.GeminiCodeAssistTransformer = _chunkVXRTQZF2cjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunkKIQ2HA2Acjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunkNOITAVHAcjs.OpenAIResponseTransformer; exports.OpenAITransformer = _chunkQWNUOR7Fcjs.OpenAITransformer; exports.getBuiltinTransformers = _chunkTVYA5JSQcjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunkTVYA5JSQcjs.registerBuiltinTransformers;
@@ -3,26 +3,27 @@ import {
3
3
  BuiltinTransformers,
4
4
  getBuiltinTransformers,
5
5
  registerBuiltinTransformers
6
- } from "../chunk-NGYOO5TO.js";
6
+ } from "../chunk-FJNKXOWE.js";
7
7
  import {
8
- AnthropicTransformer
9
- } from "../chunk-HKB656B4.js";
8
+ OpenAIResponseTransformer
9
+ } from "../chunk-V53ZEFXC.js";
10
10
  import {
11
- GeminiTransformer
12
- } from "../chunk-55FMGZ3L.js";
11
+ OpenAITransformer
12
+ } from "../chunk-7PIUVCKK.js";
13
13
  import {
14
- OpenAIResponseTransformer
15
- } from "../chunk-45FHEOKW.js";
14
+ AnthropicTransformer
15
+ } from "../chunk-6OC3ORW6.js";
16
16
  import "../chunk-FU7EAR73.js";
17
+ import "../chunk-LFEH7CEO.js";
17
18
  import {
18
- OpenAITransformer
19
- } from "../chunk-CCVRRJOX.js";
19
+ GeminiTransformer
20
+ } from "../chunk-HN74IGEO.js";
20
21
  import {
21
22
  GeminiCodeAssistTransformer
22
- } from "../chunk-2UTGX6FM.js";
23
- import "../chunk-S3DYFEBE.js";
23
+ } from "../chunk-4VVCXVB7.js";
24
+ import "../chunk-R4VCO2CB.js";
24
25
  import "../chunk-WYVGULTQ.js";
25
- import "../chunk-N2EIM2XJ.js";
26
+ import "../chunk-ZLNHPUFA.js";
26
27
  export {
27
28
  AnthropicTransformer,
28
29
  BUILTIN_TRANSFORMER_NAMES,
@@ -3,14 +3,34 @@ import { ThinkLevel } from '@omnicross/contracts/completion-types';
3
3
  export { ThinkLevel } from '@omnicross/contracts/completion-types';
4
4
 
5
5
  /**
6
- * TransformerService Types
6
+ * transformWarnings — the `_transformWarnings` audit side-channel
7
+ * (`claude-api-transform-fidelity`, R7 / design D2).
7
8
  *
8
- * Type definitions for the Transformer system, providing unified
9
- * request/response formats and transformer chain configuration.
9
+ * When a decoded ingress field (top_k, metadata_user_id, stop on Responses,
10
+ * redacted_thinking, …) has NO representation on the target wire, the encoder
11
+ * records it here instead of silently dropping it: the entry carries the FIELD
12
+ * NAME and target only — NEVER the value (values may carry user content), so
13
+ * the channel is safe to log.
10
14
  *
11
- * @module transformer/types
15
+ * The channel rides the Unified request (the `_serverSideTools` precedent) and
16
+ * is stripped at every encoder boundary — the OpenAI-chat blacklist lists it
17
+ * and the Responses/Gemini/Anthropic builders construct their bodies
18
+ * field-by-field — so it can never serialize into an upstream request.
19
+ *
20
+ * §9's `dropped_field{field}` metric is a module-level counter (no metrics
21
+ * registry in this repo — the same minimal-observability precedent as B's
22
+ * stop_reason counter) plus a once-per-field console.warn so a hot loop of
23
+ * dropping requests doesn't spam the log.
24
+ *
25
+ * @module transformer/transformWarnings
12
26
  */
13
27
 
28
+ /** One dropped-field audit entry. `field`/`target` names only — never values. */
29
+ interface DroppedFieldEntry {
30
+ field: string;
31
+ target: string;
32
+ }
33
+
14
34
  /**
15
35
  * Thinking content with optional signature for extended context
16
36
  */
@@ -121,6 +141,19 @@ interface UnifiedChatRequest {
121
141
  reasoning?: ReasoningConfig;
122
142
  /** Native OpenAI Chat field retained by the identity-shaped ingress. */
123
143
  reasoning_effort?: string;
144
+ /** Anthropic `stop_sequences` → the OpenAI chat `stop` / Gemini `stopSequences`. */
145
+ stop?: string[];
146
+ top_p?: number;
147
+ /** Anthropic-only sampling knob; Gemini `topK`, OpenAI wires have none. */
148
+ top_k?: number;
149
+ /** Anthropic `metadata.user_id` → OpenAI chat `user`. */
150
+ metadata_user_id?: string;
151
+ /**
152
+ * Internal-only transform audit side channel (R7): field names dropped for a
153
+ * target wire, never values. Stripped at every encoder boundary — must never
154
+ * serialize into an upstream body. See `transformer/transformWarnings`.
155
+ */
156
+ _transformWarnings?: DroppedFieldEntry[];
124
157
  /**
125
158
  * Internal-only routing metadata. Populated by callers (CompletionService /
126
159
  * the host's engine adapters and proxy servers) so the usage-capture hook can attribute
@@ -398,6 +431,8 @@ interface ResolvedTransformerChain {
398
431
  interface TransformRequestResult {
399
432
  /** Transformed request body */
400
433
  requestBody: unknown;
434
+ /** Post-endpoint, pre-target Unified request, when an endpoint decoder ran. */
435
+ endpointRequest?: UnifiedChatRequest;
401
436
  /** Additional request configuration */
402
437
  config: RequestConfig;
403
438
  /** Whether to bypass further transformations */
@@ -3,14 +3,34 @@ import { ThinkLevel } from '@omnicross/contracts/completion-types';
3
3
  export { ThinkLevel } from '@omnicross/contracts/completion-types';
4
4
 
5
5
  /**
6
- * TransformerService Types
6
+ * transformWarnings — the `_transformWarnings` audit side-channel
7
+ * (`claude-api-transform-fidelity`, R7 / design D2).
7
8
  *
8
- * Type definitions for the Transformer system, providing unified
9
- * request/response formats and transformer chain configuration.
9
+ * When a decoded ingress field (top_k, metadata_user_id, stop on Responses,
10
+ * redacted_thinking, …) has NO representation on the target wire, the encoder
11
+ * records it here instead of silently dropping it: the entry carries the FIELD
12
+ * NAME and target only — NEVER the value (values may carry user content), so
13
+ * the channel is safe to log.
10
14
  *
11
- * @module transformer/types
15
+ * The channel rides the Unified request (the `_serverSideTools` precedent) and
16
+ * is stripped at every encoder boundary — the OpenAI-chat blacklist lists it
17
+ * and the Responses/Gemini/Anthropic builders construct their bodies
18
+ * field-by-field — so it can never serialize into an upstream request.
19
+ *
20
+ * §9's `dropped_field{field}` metric is a module-level counter (no metrics
21
+ * registry in this repo — the same minimal-observability precedent as B's
22
+ * stop_reason counter) plus a once-per-field console.warn so a hot loop of
23
+ * dropping requests doesn't spam the log.
24
+ *
25
+ * @module transformer/transformWarnings
12
26
  */
13
27
 
28
+ /** One dropped-field audit entry. `field`/`target` names only — never values. */
29
+ interface DroppedFieldEntry {
30
+ field: string;
31
+ target: string;
32
+ }
33
+
14
34
  /**
15
35
  * Thinking content with optional signature for extended context
16
36
  */
@@ -121,6 +141,19 @@ interface UnifiedChatRequest {
121
141
  reasoning?: ReasoningConfig;
122
142
  /** Native OpenAI Chat field retained by the identity-shaped ingress. */
123
143
  reasoning_effort?: string;
144
+ /** Anthropic `stop_sequences` → the OpenAI chat `stop` / Gemini `stopSequences`. */
145
+ stop?: string[];
146
+ top_p?: number;
147
+ /** Anthropic-only sampling knob; Gemini `topK`, OpenAI wires have none. */
148
+ top_k?: number;
149
+ /** Anthropic `metadata.user_id` → OpenAI chat `user`. */
150
+ metadata_user_id?: string;
151
+ /**
152
+ * Internal-only transform audit side channel (R7): field names dropped for a
153
+ * target wire, never values. Stripped at every encoder boundary — must never
154
+ * serialize into an upstream body. See `transformer/transformWarnings`.
155
+ */
156
+ _transformWarnings?: DroppedFieldEntry[];
124
157
  /**
125
158
  * Internal-only routing metadata. Populated by callers (CompletionService /
126
159
  * the host's engine adapters and proxy servers) so the usage-capture hook can attribute
@@ -398,6 +431,8 @@ interface ResolvedTransformerChain {
398
431
  interface TransformRequestResult {
399
432
  /** Transformed request body */
400
433
  requestBody: unknown;
434
+ /** Post-endpoint, pre-target Unified request, when an endpoint decoder ran. */
435
+ endpointRequest?: UnifiedChatRequest;
401
436
  /** Additional request configuration */
402
437
  config: RequestConfig;
403
438
  /** Whether to bypass further transformations */
@@ -1,21 +1,22 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-QVOB2DNX.cjs');
2
2
 
3
3
 
4
- var _chunkP7EM6BNDcjs = require('./chunk-P7EM6BND.cjs');
5
- require('./chunk-ZQQUD66M.cjs');
6
- require('./chunk-5LNYGCIW.cjs');
7
- require('./chunk-CMVXX7ON.cjs');
8
- require('./chunk-5RSZYQJH.cjs');
9
- require('./chunk-56QD3YW6.cjs');
4
+ var _chunk7ZHBN75Ncjs = require('./chunk-7ZHBN75N.cjs');
10
5
 
11
6
 
12
- var _chunkIIRPUVPHcjs = require('./chunk-IIRPUVPH.cjs');
13
- require('./chunk-GBHYAGX3.cjs');
7
+ var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
14
8
 
15
9
 
16
- var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
17
- require('./chunk-OC6DOOFX.cjs');
18
- require('./chunk-RICPANBY.cjs');
10
+ var _chunkTVYA5JSQcjs = require('./chunk-TVYA5JSQ.cjs');
11
+ require('./chunk-NOITAVHA.cjs');
12
+ require('./chunk-QWNUOR7F.cjs');
13
+ require('./chunk-SQMAEDNE.cjs');
14
+ require('./chunk-5RSZYQJH.cjs');
15
+ require('./chunk-6DDYNS2B.cjs');
16
+ require('./chunk-KIQ2HA2A.cjs');
17
+ require('./chunk-GBHYAGX3.cjs');
18
+ require('./chunk-VXRTQZF2.cjs');
19
+ require('./chunk-WX2E2G7H.cjs');
19
20
  require('./chunk-77USGNRW.cjs');
20
21
 
21
22
 
@@ -26,7 +27,7 @@ require('./chunk-77USGNRW.cjs');
26
27
 
27
28
 
28
29
 
29
- var _chunkAOFWNWLTcjs = require('./chunk-AOFWNWLT.cjs');
30
+ var _chunkIUL4VWNUcjs = require('./chunk-IUL4VWNU.cjs');
30
31
 
31
32
 
32
33
 
@@ -39,4 +40,4 @@ var _chunkAOFWNWLTcjs = require('./chunk-AOFWNWLT.cjs');
39
40
 
40
41
 
41
42
 
42
- exports.THINK_LEVELS = _chunkAOFWNWLTcjs.THINK_LEVELS; exports.TransformerChainExecutor = _chunkIIRPUVPHcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.extractReasoningIntent = _chunkAOFWNWLTcjs.extractReasoningIntent; exports.normalizeThinkLevel = _chunkAOFWNWLTcjs.normalizeThinkLevel; exports.registerBuiltinTransformers = _chunkP7EM6BNDcjs.registerBuiltinTransformers; exports.resolveReasoningEffort = _chunkAOFWNWLTcjs.resolveReasoningEffort; exports.resolveReasoningPlan = _chunkAOFWNWLTcjs.resolveReasoningPlan; exports.resolveReasoningTokenLimit = _chunkAOFWNWLTcjs.resolveReasoningTokenLimit; exports.resolveRequestReasoning = _chunkAOFWNWLTcjs.resolveRequestReasoning; exports.resolveTargetModelCapabilities = _chunkAOFWNWLTcjs.resolveTargetModelCapabilities;
43
+ exports.THINK_LEVELS = _chunkIUL4VWNUcjs.THINK_LEVELS; exports.TransformerChainExecutor = _chunk7ZHBN75Ncjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.extractReasoningIntent = _chunkIUL4VWNUcjs.extractReasoningIntent; exports.normalizeThinkLevel = _chunkIUL4VWNUcjs.normalizeThinkLevel; exports.registerBuiltinTransformers = _chunkTVYA5JSQcjs.registerBuiltinTransformers; exports.resolveReasoningEffort = _chunkIUL4VWNUcjs.resolveReasoningEffort; exports.resolveReasoningPlan = _chunkIUL4VWNUcjs.resolveReasoningPlan; exports.resolveReasoningTokenLimit = _chunkIUL4VWNUcjs.resolveReasoningTokenLimit; exports.resolveRequestReasoning = _chunkIUL4VWNUcjs.resolveRequestReasoning; exports.resolveTargetModelCapabilities = _chunkIUL4VWNUcjs.resolveTargetModelCapabilities;
@@ -1,21 +1,22 @@
1
1
  import "./chunk-WTQMX2Q6.js";
2
- import {
3
- registerBuiltinTransformers
4
- } from "./chunk-NGYOO5TO.js";
5
- import "./chunk-HKB656B4.js";
6
- import "./chunk-55FMGZ3L.js";
7
- import "./chunk-45FHEOKW.js";
8
- import "./chunk-FU7EAR73.js";
9
- import "./chunk-CCVRRJOX.js";
10
2
  import {
11
3
  TransformerChainExecutor
12
- } from "./chunk-WNKWAEUR.js";
13
- import "./chunk-MZNPGW5Q.js";
4
+ } from "./chunk-EYGBM2VC.js";
14
5
  import {
15
6
  TransformerService
16
7
  } from "./chunk-DK4A7DLE.js";
17
- import "./chunk-2UTGX6FM.js";
18
- import "./chunk-S3DYFEBE.js";
8
+ import {
9
+ registerBuiltinTransformers
10
+ } from "./chunk-FJNKXOWE.js";
11
+ import "./chunk-V53ZEFXC.js";
12
+ import "./chunk-7PIUVCKK.js";
13
+ import "./chunk-6OC3ORW6.js";
14
+ import "./chunk-FU7EAR73.js";
15
+ import "./chunk-LFEH7CEO.js";
16
+ import "./chunk-HN74IGEO.js";
17
+ import "./chunk-MZNPGW5Q.js";
18
+ import "./chunk-4VVCXVB7.js";
19
+ import "./chunk-R4VCO2CB.js";
19
20
  import "./chunk-WYVGULTQ.js";
20
21
  import {
21
22
  THINK_LEVELS,
@@ -26,7 +27,7 @@ import {
26
27
  resolveReasoningTokenLimit,
27
28
  resolveRequestReasoning,
28
29
  resolveTargetModelCapabilities
29
- } from "./chunk-N2EIM2XJ.js";
30
+ } from "./chunk-ZLNHPUFA.js";
30
31
  export {
31
32
  THINK_LEVELS,
32
33
  TransformerChainExecutor,
@@ -1,3 +1,4 @@
1
+ import { e as ImageApiLimits } from './types-Bd72H4SB.js';
1
2
  import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
2
3
  import { AuditConfig } from '@omnicross/contracts/audit-types';
3
4
  import { BillingConfig } from '@omnicross/contracts/billing-types';
@@ -6,11 +7,49 @@ import { VoucherRecord, VoucherGrant, VoucherInfo, VoucherConfig } from '@omnicr
6
7
  import { WebhookConfig } from '@omnicross/contracts/webhook-types';
7
8
  import { L as Logger } from './logger-4GvQNzhE.js';
8
9
  import { ProviderConfigSource } from './ports/provider-config-source.js';
9
- import { P as ProviderProxy } from './ProviderProxy--ROec6VI.js';
10
- import { ProviderProxyDeps } from './provider-proxy/types.js';
10
+ import { P as ProviderProxy } from './ProviderProxy-DYoY5XoT.js';
11
+ import { W as ProviderProxyDeps } from './types-CVRge76p.js';
11
12
  import { BoundAccountFallbackPolicy } from './pipeline/BoundAccountSelectionError.js';
12
13
  import { c as KeySpend } from './keyPolicy-zdWTu3CQ.js';
13
14
 
15
+ /**
16
+ * anthropicCountTokens — the `POST /v1/messages/count_tokens` handler
17
+ * (`claude-api-routing-errors`, R2 passthrough+reject subset).
18
+ *
19
+ * Before this module, the substring `/v1/messages` match routed count_tokens
20
+ * into the FULL generation pipeline — every context-stats call burned a real
21
+ * upstream inference (BYO money, subscription 5h-window quota) and returned a
22
+ * Message JSON instead of `{"input_tokens":N}` (audit F-1, P0).
23
+ *
24
+ * Strategies (portfolio-locked default: `'auto'`):
25
+ * - **passthrough** (Anthropic-wire upstream — `plan.sameFormat`): strip the
26
+ * generation-only fields the count_tokens endpoint rejects (`stream`,
27
+ * `max_tokens`), rewrite `model` to the resolved upstream model, and POST to
28
+ * `<upstream>/v1/messages/count_tokens` via the SAME same-format fetches the
29
+ * generation path uses (credential injection, beta merge, claude header
30
+ * baseline all inherited). The response — success OR failure — relays
31
+ * verbatim with its real status (an Anthropic-wire error body already IS
32
+ * the official shape; wrapping it would violate the verbatim moat).
33
+ * - **estimate** (Change B; explicit config, or `auto` on a translation
34
+ * upstream): a PURE-LOCAL heuristic estimate (`anthropicCountEstimate.ts`)
35
+ * answered as `{"input_tokens":N}` with the `x-omnicross-count-estimate:
36
+ * true` marker header — zero upstream calls, never recorded as usage.
37
+ * - **reject** (explicit config, or `passthrough` degraded on a translation
38
+ * upstream): a clean Anthropic 404 `not_found_error` with ZERO upstream
39
+ * calls — Claude Code treats it as "endpoint absent" and falls back to its
40
+ * local usage estimation.
41
+ *
42
+ * A free endpoint: no usage recording, no concurrency gate (the outbound face
43
+ * bypasses its gate before dispatch), single attempt — no 401 refresh retry,
44
+ * no subscription health marking (a failed count_tokens must not cool an
45
+ * account that serves inference; the inference path drives those itself).
46
+ *
47
+ * @module provider-proxy/ingress/anthropicCountTokens
48
+ */
49
+
50
+ /** The operator-facing strategy config (§10 `anthropic.countTokens.mode`). */
51
+ type CountTokensMode = 'auto' | 'passthrough' | 'estimate' | 'reject';
52
+
14
53
  /**
15
54
  * keySpendTracker — a cheap in-memory per-key accumulated-spend cache
16
55
  * (`outbound-key-policy`, design D3).
@@ -201,23 +240,56 @@ interface VoucherDb {
201
240
  voucherList(): Promise<VoucherRecord[]>;
202
241
  }
203
242
 
204
- /**
205
- * Shared contract types for the outbound API server (`outbound-api-server`).
206
- *
207
- * The outbound server is a SEPARATE long-lived HTTP listener (distinct from the
208
- * resident loopback `ProviderProxy`) that authenticates external callers via
209
- * named API keys and routes their requests through the EXISTING `provider-proxy`
210
- * ingress parsers + transformer — there is exactly one conversion stack.
211
- *
212
- * These types are kept in their own module so the server, router, auth, rate
213
- * limiter, role detection, and route resolver can share shapes without circular
214
- * imports.
215
- *
216
- * @module outbound-api/types
217
- */
218
-
219
243
  /** The four endpoints, 1:1 with the four wire-format ingress parsers. */
220
244
  type OutboundEndpoint = 'chat' | 'responses' | 'messages' | 'gemini';
245
+ /** Named-key authorization vocabulary. Images is deliberately not a text route. */
246
+ type OutboundPermission = OutboundEndpoint | 'images';
247
+ interface ImagesServerConfig {
248
+ enabled: boolean;
249
+ provider: 'codex-subscription';
250
+ defaultModel: string;
251
+ modelAliases: Record<string, string>;
252
+ account: {
253
+ id?: string;
254
+ group?: string;
255
+ fallback: 'strict' | 'pool';
256
+ };
257
+ queue: {
258
+ maxConcurrentJobsPerAccount: number;
259
+ maxQueuedJobs: number;
260
+ queueTimeoutMs: number;
261
+ generationTimeoutMs: number;
262
+ };
263
+ temporary: {
264
+ maxActiveScopes: number;
265
+ maxTotalBytes: number;
266
+ maxTenantBytes: number;
267
+ staleAfterMs: number;
268
+ cleanupIntervalMs: number;
269
+ };
270
+ limits: ImageApiLimits;
271
+ references: {
272
+ ttlMs: number;
273
+ maxArtifactBytes: number;
274
+ maxTotalBytes: number;
275
+ maxTenantBytes: number;
276
+ maxEntries: number;
277
+ maxCalls: number;
278
+ maxResponses: number;
279
+ maxTombstones: number;
280
+ tombstoneTtlMs: number;
281
+ cleanupIntervalMs: number;
282
+ storageRoot?: string;
283
+ };
284
+ remote: {
285
+ enabled: boolean;
286
+ };
287
+ evidenceTtlMs: number;
288
+ }
289
+ /** Non-consuming, account-bound image model discovery injected by the daemon. */
290
+ interface ImageModelCatalogReader {
291
+ listAvailableModels(apiKeyId: string): Promise<readonly string[]>;
292
+ }
221
293
  /** A `"providerId,modelId"` model reference (mirrors `RouterConfig` vocab). */
222
294
  type ModelRef = string;
223
295
  /** The detected request role; precedence background > default. */
@@ -513,6 +585,69 @@ interface FingerprintConfig {
513
585
  /** Operator UA baseline for un-captured accounts (piece 4). Absent ⇒ none. */
514
586
  ua?: string;
515
587
  }
588
+ /**
589
+ * count_tokens strategy mode (§10 `anthropic.countTokens.mode`). ONE canonical
590
+ * union lives with the handler (`provider-proxy/ingress/anthropicCountTokens`);
591
+ * this alias re-exports it so the config-segment types and the runtime
592
+ * resolver can never drift apart (review B-M2).
593
+ */
594
+ type AnthropicCountTokensMode = CountTokensMode;
595
+ /** `GET /v1/models` response shape selector (§10 `anthropic.modelsShape`). */
596
+ type AnthropicModelsShape = 'auto' | 'anthropic' | 'openai';
597
+ /**
598
+ * Anthropic-protocol tuning segment (`claude-api-protocol-fidelity`, §10
599
+ * skeleton — count_tokens strategy/budget, /v1/models shape, synthetic-SSE
600
+ * heartbeat). Persisted + normalized like the other segments; read live per
601
+ * request (count_tokens/models) or hot-applied via the module setter
602
+ * (heartbeat). `proxyOauthUsage` / `apiHello` land in the follow-up change.
603
+ */
604
+ interface AnthropicConfigSegment {
605
+ /**
606
+ * `/v1/messages/count_tokens` strategy. `mode` absent ⇒ `'auto'`
607
+ * (Anthropic-wire upstream → passthrough; translation upstream → local
608
+ * estimate). `estimateBudgetMs` bounds the local estimator walk (default
609
+ * 2000; a pathological input degrades to a coarser estimate, never fails).
610
+ */
611
+ countTokens?: {
612
+ mode?: AnthropicCountTokensMode;
613
+ estimateBudgetMs?: number;
614
+ };
615
+ /**
616
+ * `GET /v1/models` response shape. `'auto'` (default): a key authorized for
617
+ * the messages endpoint gets the Anthropic list shape, everyone else keeps
618
+ * the OpenAI shape; `'anthropic'` / `'openai'` force one shape (escape
619
+ * hatch for dual-protocol consumers).
620
+ */
621
+ modelsShape?: AnthropicModelsShape;
622
+ /**
623
+ * Synthetic-SSE ping heartbeat interval (ms) for the TRANSLATION path only.
624
+ * Default 20000; ≤0 disables. Hot-applied at `applyConfig` — in-flight
625
+ * streams pick the new value at their next timer arm.
626
+ */
627
+ heartbeatIntervalMs?: number;
628
+ /**
629
+ * Translate-path PDF text extraction budget (`claude-api-transform-fidelity`,
630
+ * R7). `budgetMs` default 2000 — bounds the synchronous zero-dependency
631
+ * text-layer walk; over-budget documents 400 explicitly (never silently
632
+ * dropped, never unbounded work).
633
+ */
634
+ pdfTextExtraction?: {
635
+ budgetMs?: number;
636
+ };
637
+ /**
638
+ * Serve `GET /api/oauth/usage` on the outbound listener as a PURE-CACHE read
639
+ * of the shared Claude allowance store (R9). Default FALSE — off, the path
640
+ * keeps its current generic 404 byte-for-byte. When on, a messages-authorized
641
+ * key bound to a Claude subscription receives the api.anthropic.com usage
642
+ * wire shape; NO upstream call or refresh is ever triggered by the query.
643
+ */
644
+ proxyOauthUsage?: boolean;
645
+ /**
646
+ * Answer `HEAD /api/hello` with a bare 200 at the listener level (R10 —
647
+ * clients probe "can this endpoint be safely rejected"). Default TRUE.
648
+ */
649
+ apiHello?: boolean;
650
+ }
516
651
  /**
517
652
  * Layered upstream-proxy segment (upstream-proxy). Global + per-provider proxy
518
653
  * config for outbound EGRESS to upstreams (NOT the inbound listener). Resolved
@@ -627,6 +762,14 @@ interface OutboundApiServerConfig {
627
762
  * byte-identical zero regression, purely additive on the #4 key-policy.
628
763
  */
629
764
  voucher?: VoucherConfig;
765
+ /**
766
+ * Anthropic-protocol tuning segment (claude-api-protocol-fidelity, §10).
767
+ * Optional in the persisted shape; `normalizeServerConfig` always fills it
768
+ * with the frozen defaults (auto/auto/20000).
769
+ */
770
+ anthropic?: AnthropicConfigSegment;
771
+ /** Default-off Images serving policy; capability still requires fresh evidence. */
772
+ images?: ImagesServerConfig;
630
773
  }
631
774
  /** A live status snapshot the Settings tab renders. */
632
775
  interface OutboundApiServerStatus {
@@ -641,6 +784,15 @@ interface OutboundApiServerStatus {
641
784
  formats: OutboundFormatUrls | null;
642
785
  /** The four format endpoint URLs over the LAN (only when network binding on). */
643
786
  lanFormats: OutboundFormatUrls | null;
787
+ /** Additive Images endpoints; absent while Images is disabled. */
788
+ images?: {
789
+ generations: string;
790
+ edits: string;
791
+ } | null;
792
+ lanImages?: {
793
+ generations: string;
794
+ edits: string;
795
+ } | null;
644
796
  }
645
797
  /** The four format endpoint URLs for one base. */
646
798
  interface OutboundFormatUrls {
@@ -667,8 +819,10 @@ interface OutboundApiKeyInfo {
667
819
  revoked: boolean;
668
820
  /** Intended consumer. Existing rows default to a general client key. */
669
821
  kind?: 'client' | 'integration';
670
- /** Optional endpoint allow-list. Absent means every outbound endpoint. */
671
- allowedEndpoints?: OutboundEndpoint[];
822
+ /** Exact effective permission list; legacy absent rows project to text-only permissions. */
823
+ allowedEndpoints: OutboundPermission[];
824
+ /** True when the stored row omitted permissions and compatibility defaults were projected. */
825
+ legacyPermissions: boolean;
672
826
  /** When true the key is rejected unless the TCP peer is loopback. */
673
827
  loopbackOnly?: boolean;
674
828
  /**
@@ -746,6 +900,8 @@ interface OutboundApiKeyCreated {
746
900
  name: string;
747
901
  keyPrefix: string;
748
902
  createdAt: number;
903
+ /** Exact effective permission list assigned to the new key. */
904
+ allowedEndpoints: OutboundPermission[];
749
905
  plaintextOnce: string;
750
906
  }
751
907
  /**
@@ -773,8 +929,8 @@ interface OutboundKeyDbRow {
773
929
  revokedAt: number | null;
774
930
  /** Intended consumer. Existing rows without this field remain client keys. */
775
931
  kind?: 'client' | 'integration';
776
- /** Optional endpoint allow-list for least-privilege integration keys. */
777
- allowedEndpoints?: OutboundEndpoint[];
932
+ /** Persisted exact permission list. Absent is a legacy text-only row. */
933
+ allowedEndpoints?: OutboundPermission[];
778
934
  /** Restrict use to requests whose direct socket peer is loopback. */
779
935
  loopbackOnly?: boolean;
780
936
  /**
@@ -817,7 +973,7 @@ interface OutboundKeyDb {
817
973
  keyPrefix: string;
818
974
  createdAt?: number;
819
975
  kind?: 'client' | 'integration';
820
- allowedEndpoints?: OutboundEndpoint[];
976
+ allowedEndpoints?: OutboundPermission[];
821
977
  loopbackOnly?: boolean;
822
978
  /**
823
979
  * The generated plaintext secret. When the DB holds a `SecretBox` it
@@ -831,6 +987,8 @@ interface OutboundKeyDb {
831
987
  outboundApiKeysRevoke(id: string): Promise<boolean>;
832
988
  outboundApiKeysTouchLastUsed(id: string): Promise<boolean>;
833
989
  outboundApiKeysSetEnabled(id: string, enabled: boolean): Promise<boolean>;
990
+ /** Atomically replace the exact key permission list. */
991
+ outboundApiKeysSetPermissions(id: string, permissions: OutboundPermission[]): Promise<boolean>;
834
992
  /**
835
993
  * Set (or clear) a key's per-key concurrency ceiling. `null` clears the field
836
994
  * → unlimited (gate bypassed). Mirrors `outboundApiKeysSetEnabled`; returns
@@ -890,6 +1048,8 @@ interface OutboundApiDeps {
890
1048
  readonly providerProxy: ProviderProxy;
891
1049
  /** The proxy's app-session deps (reused verbatim for `routeRequest`). */
892
1050
  readonly proxyDeps: ProviderProxyDeps;
1051
+ /** Optional fail-closed Images catalog; absent means no image model is advertised. */
1052
+ readonly imageModelCatalog?: ImageModelCatalogReader;
893
1053
  /**
894
1054
  * OPTIONAL unauthenticated `/health` provider (daemon-health-endpoint, D1
895
1055
  * secondary mount). When wired (by the daemon bootstrap — core NEVER imports
@@ -917,4 +1077,4 @@ interface OutboundApiDeps {
917
1077
  readonly logger?: Logger;
918
1078
  }
919
1079
 
920
- export { type AccountProbeConfig as A, computeVoucherGrant as B, type ChatDispatchMode as C, generateVoucherCode as D, ENDPOINT_MODEL_KINDS as E, type FingerprintConfig as F, type GatewayBinding as G, hashVoucherCode as H, newVoucherId as I, startOfLocalDay as J, type KeySpendReader as K, startOfLocalWeek as L, type MessagesModelKind as M, toVoucherInfo as N, type OutboundKeyDb as O, voucherCodePrefix as P, type ModelRef as Q, type RequestRole as R, type AccountHealthConfig as S, type OutboundKeyModelRestrictionMode as T, type UserMessageQueueConfig as U, type VoucherCreateInput as V, type AllowanceSchedulingConfig as a, type ConcurrencyQueueConfig as b, type EndpointRoutingConfig as c, type GatewayBindingFallback as d, type GatewayBindingKeyScope as e, type GatewayBindingModelMode as f, type GatewayBindingTarget as g, type GatewayModelMapping as h, type KeySpendSeeder as i, KeySpendTracker as j, type KindMappedEndpoint as k, type ModelKind as l, type ModelPrefixTargets as m, type OutboundApiDeps as n, type OutboundApiKeyCreated as o, type OutboundApiKeyInfo as p, type OutboundApiServerConfig as q, type OutboundApiServerStatus as r, type OutboundEndpoint as s, type OutboundFormatUrls as t, type OutboundKeyActivationMode as u, type OutboundKeyDbRow as v, type OutboundKeyPolicy as w, type OutboundProxyConfig as x, type ResponsesModelKind as y, type VoucherDb as z };
1080
+ export { type OutboundKeyModelRestrictionMode as $, type AccountProbeConfig as A, type VoucherDb as B, type ChatDispatchMode as C, computeVoucherGrant as D, ENDPOINT_MODEL_KINDS as E, type FingerprintConfig as F, type GatewayBinding as G, generateVoucherCode as H, type ImagesServerConfig as I, hashVoucherCode as J, type KeySpendReader as K, newVoucherId as L, type MessagesModelKind as M, startOfLocalDay as N, type OutboundKeyDb as O, startOfLocalWeek as P, toVoucherInfo as Q, type RequestRole as R, voucherCodePrefix as S, type ModelRef as T, type UserMessageQueueConfig as U, type VoucherCreateInput as V, type AnthropicConfigSegment as W, type AccountHealthConfig as X, type AnthropicCountTokensMode as Y, type AnthropicModelsShape as Z, type ImageModelCatalogReader as _, type AllowanceSchedulingConfig as a, type ConcurrencyQueueConfig as b, type EndpointRoutingConfig as c, type GatewayBindingFallback as d, type GatewayBindingKeyScope as e, type GatewayBindingModelMode as f, type GatewayBindingTarget as g, type GatewayModelMapping as h, type KeySpendSeeder as i, KeySpendTracker as j, type KindMappedEndpoint as k, type ModelKind as l, type ModelPrefixTargets as m, type OutboundApiDeps as n, type OutboundApiKeyCreated as o, type OutboundApiKeyInfo as p, type OutboundApiServerConfig as q, type OutboundApiServerStatus as r, type OutboundEndpoint as s, type OutboundFormatUrls as t, type OutboundKeyActivationMode as u, type OutboundKeyDbRow as v, type OutboundKeyPolicy as w, type OutboundPermission as x, type OutboundProxyConfig as y, type ResponsesModelKind as z };