@omnicross/core 0.1.3 → 0.1.4

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 (114) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +57 -57
  3. package/README.md +15 -15
  4. package/dist/auth/GeminiCodeAssistProjectResolver.cjs +4 -4
  5. package/dist/auth/GeminiCodeAssistProjectResolver.js +3 -3
  6. package/dist/chunk-3QFXFCHG.js +33 -0
  7. package/dist/chunk-4YINUUKQ.cjs +33 -0
  8. package/dist/chunk-7Y47UCF2.js +142 -0
  9. package/dist/chunk-APYG5QD7.cjs +50 -0
  10. package/dist/{chunk-CWM2ZDU5.js → chunk-BPKCU575.js} +3 -10
  11. package/dist/{chunk-2FMI2B6V.cjs → chunk-DKPXN34V.cjs} +222 -448
  12. package/dist/chunk-E3UCVHLP.cjs +142 -0
  13. package/dist/chunk-FCR77GYM.cjs +33 -0
  14. package/dist/{chunk-N5QFKSDO.js → chunk-HRRYG2AX.js} +2 -1
  15. package/dist/{chunk-KUU2RNG6.cjs → chunk-HYN75H6G.cjs} +3 -0
  16. package/dist/{chunk-JO5NLTLY.js → chunk-IK3KE3AU.js} +3 -0
  17. package/dist/chunk-K5NM7VAH.js +33 -0
  18. package/dist/{chunk-Y6OM7EV7.cjs → chunk-KFI44N2R.cjs} +2 -1
  19. package/dist/{chunk-S6JGLF3G.cjs → chunk-OCEUVQHW.cjs} +27 -4
  20. package/dist/chunk-OE6TDIWW.js +22 -0
  21. package/dist/chunk-OZFM4X3S.js +18 -0
  22. package/dist/{chunk-4DECIFU7.js → chunk-QYTT6GE3.js} +62 -288
  23. package/dist/{chunk-FFALUUZZ.cjs → chunk-RGTR7CIO.cjs} +5 -5
  24. package/dist/{chunk-3QOSDDNI.cjs → chunk-SNYBEXLB.cjs} +6 -13
  25. package/dist/{chunk-2DCNB7DF.cjs → chunk-SU2GCLAC.cjs} +30 -10
  26. package/dist/{chunk-5HTVET6E.js → chunk-TIER4SUC.js} +24 -4
  27. package/dist/{chunk-CZHZGRU7.js → chunk-UHGVBFU3.js} +2 -0
  28. package/dist/chunk-UIBD2YY5.cjs +22 -0
  29. package/dist/{chunk-SVXC36MU.cjs → chunk-VACWOIRE.cjs} +2 -0
  30. package/dist/{chunk-MQNDWYPN.js → chunk-VPBAUQ2M.js} +4 -4
  31. package/dist/chunk-WLYIIEAF.js +50 -0
  32. package/dist/{chunk-BO4RFWBR.js → chunk-XK5CIRMQ.js} +24 -1
  33. package/dist/chunk-XSVNC2UD.cjs +18 -0
  34. package/dist/completion/CompletionService.cjs +22 -16
  35. package/dist/completion/CompletionService.js +21 -15
  36. package/dist/completion.cjs +24 -18
  37. package/dist/completion.js +23 -17
  38. package/dist/index.cjs +33 -24
  39. package/dist/index.d.cts +7 -3
  40. package/dist/index.d.ts +7 -3
  41. package/dist/index.js +42 -33
  42. package/dist/keyPolicy-Cp0FntZl.d.cts +90 -0
  43. package/dist/keyPolicy-Cp0FntZl.d.ts +90 -0
  44. package/dist/outbound-api/auditCapture.cjs +9 -0
  45. package/dist/outbound-api/auditCapture.d.cts +52 -0
  46. package/dist/outbound-api/auditCapture.d.ts +52 -0
  47. package/dist/outbound-api/auditCapture.js +9 -0
  48. package/dist/outbound-api/auditRedact.cjs +8 -0
  49. package/dist/outbound-api/auditRedact.d.cts +30 -0
  50. package/dist/outbound-api/auditRedact.d.ts +30 -0
  51. package/dist/outbound-api/auditRedact.js +8 -0
  52. package/dist/outbound-api/billingCapture.cjs +8 -0
  53. package/dist/outbound-api/billingCapture.d.cts +61 -0
  54. package/dist/outbound-api/billingCapture.d.ts +61 -0
  55. package/dist/outbound-api/billingCapture.js +8 -0
  56. package/dist/outbound-api/quotaWarn.cjs +12 -0
  57. package/dist/outbound-api/quotaWarn.d.cts +43 -0
  58. package/dist/outbound-api/quotaWarn.d.ts +43 -0
  59. package/dist/outbound-api/quotaWarn.js +12 -0
  60. package/dist/outbound-api/routeResolver.cjs +2 -2
  61. package/dist/outbound-api/routeResolver.d.cts +3 -2
  62. package/dist/outbound-api/routeResolver.d.ts +3 -2
  63. package/dist/outbound-api/routeResolver.js +1 -1
  64. package/dist/outbound-api/types.d.cts +2 -1
  65. package/dist/outbound-api/types.d.ts +2 -1
  66. package/dist/outbound-api.cjs +29 -20
  67. package/dist/outbound-api.d.cts +9 -140
  68. package/dist/outbound-api.d.ts +9 -140
  69. package/dist/outbound-api.js +28 -19
  70. package/dist/pipeline/AuthSource.d.cts +6 -0
  71. package/dist/pipeline/AuthSource.d.ts +6 -0
  72. package/dist/pipeline/SubscriptionAuthSource.cjs +2 -2
  73. package/dist/pipeline/SubscriptionAuthSource.js +1 -1
  74. package/dist/pipeline/SubscriptionAuthStrategy.d.cts +6 -0
  75. package/dist/pipeline/SubscriptionAuthStrategy.d.ts +6 -0
  76. package/dist/pipeline/auditUsageStash.cjs +10 -0
  77. package/dist/pipeline/auditUsageStash.d.cts +37 -0
  78. package/dist/pipeline/auditUsageStash.d.ts +37 -0
  79. package/dist/pipeline/auditUsageStash.js +10 -0
  80. package/dist/pipeline/executeProviderCall.cjs +2 -2
  81. package/dist/pipeline/executeProviderCall.js +1 -1
  82. package/dist/pipeline/upstreamFetch.cjs +14 -0
  83. package/dist/pipeline/upstreamFetch.d.cts +83 -0
  84. package/dist/pipeline/upstreamFetch.d.ts +83 -0
  85. package/dist/pipeline/upstreamFetch.js +14 -0
  86. package/dist/pipeline/webhookEmit.cjs +10 -0
  87. package/dist/pipeline/webhookEmit.d.cts +36 -0
  88. package/dist/pipeline/webhookEmit.d.ts +36 -0
  89. package/dist/pipeline/webhookEmit.js +10 -0
  90. package/dist/ports.d.cts +2 -1
  91. package/dist/ports.d.ts +2 -1
  92. package/dist/provider-proxy/ProviderProxy.cjs +22 -16
  93. package/dist/provider-proxy/ProviderProxy.js +21 -15
  94. package/dist/provider-proxy/ingress/providerProxyShared.cjs +22 -16
  95. package/dist/provider-proxy/ingress/providerProxyShared.js +21 -15
  96. package/dist/provider-proxy/types.d.cts +7 -0
  97. package/dist/provider-proxy/types.d.ts +7 -0
  98. package/dist/provider-proxy.cjs +22 -16
  99. package/dist/provider-proxy.js +21 -15
  100. package/dist/{routeResolver-B1NglTfe.d.ts → routeResolver-C4T7yClx.d.ts} +1 -1
  101. package/dist/{routeResolver-CbG5uBgm.d.cts → routeResolver-CB3tvJKy.d.cts} +1 -1
  102. package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +2 -2
  103. package/dist/transformer/transformers/OpenAIResponseTransformer.js +1 -1
  104. package/dist/transformer/transformers.cjs +6 -6
  105. package/dist/transformer/transformers.js +5 -5
  106. package/dist/transformer.cjs +7 -7
  107. package/dist/transformer.js +6 -6
  108. package/dist/{types-aBFFXoBz.d.cts → types-B8Arpxn0.d.cts} +14 -90
  109. package/dist/{types-6OUY_xfA.d.ts → types-lgPYQuZS.d.ts} +14 -90
  110. package/dist/usage/usage-recorder.cjs +3 -2
  111. package/dist/usage/usage-recorder.js +2 -1
  112. package/dist/usage.cjs +3 -2
  113. package/dist/usage.js +2 -1
  114. package/package.json +64 -64
@@ -5,42 +5,48 @@
5
5
 
6
6
 
7
7
 
8
- var _chunk2FMI2B6Vcjs = require('./chunk-2FMI2B6V.cjs');
8
+ var _chunkDKPXN34Vcjs = require('./chunk-DKPXN34V.cjs');
9
9
  require('./chunk-HQP3K7PU.cjs');
10
10
  require('./chunk-FZ46M34D.cjs');
11
- require('./chunk-46ZIFWYG.cjs');
12
11
  require('./chunk-3OPYJG76.cjs');
13
- require('./chunk-FFALUUZZ.cjs');
14
- require('./chunk-C72S6TTV.cjs');
12
+ require('./chunk-RGTR7CIO.cjs');
15
13
  require('./chunk-DWKQZ2SK.cjs');
16
14
  require('./chunk-4VAVYUZS.cjs');
17
15
  require('./chunk-7YN22L2H.cjs');
18
- require('./chunk-2DCNB7DF.cjs');
16
+ require('./chunk-SU2GCLAC.cjs');
17
+ require('./chunk-C72S6TTV.cjs');
19
18
  require('./chunk-EYZYXJTJ.cjs');
20
19
  require('./chunk-YMFAJFQT.cjs');
21
- require('./chunk-3QOSDDNI.cjs');
20
+ require('./chunk-SNYBEXLB.cjs');
21
+ require('./chunk-46ZIFWYG.cjs');
22
22
  require('./chunk-GBHYAGX3.cjs');
23
23
  require('./chunk-RPII3E6Z.cjs');
24
24
  require('./chunk-6RPZADX3.cjs');
25
25
  require('./chunk-QWBWGODS.cjs');
26
+ require('./chunk-UIBD2YY5.cjs');
27
+ require('./chunk-R3HK6R4B.cjs');
28
+ require('./chunk-HYN75H6G.cjs');
29
+ require('./chunk-Q27JY5RG.cjs');
30
+ require('./chunk-QXD4MV2X.cjs');
26
31
  require('./chunk-NYUNU75A.cjs');
27
32
  require('./chunk-VQY5W4YW.cjs');
28
- require('./chunk-Y6OM7EV7.cjs');
33
+ require('./chunk-KFI44N2R.cjs');
29
34
  require('./chunk-SVNDB62D.cjs');
30
- require('./chunk-R3HK6R4B.cjs');
31
- require('./chunk-AEOZIDEB.cjs');
35
+ require('./chunk-APYG5QD7.cjs');
32
36
  require('./chunk-L74VDN4A.cjs');
33
- require('./chunk-KUU2RNG6.cjs');
34
- require('./chunk-Q27JY5RG.cjs');
35
- require('./chunk-QXD4MV2X.cjs');
36
- require('./chunk-A2YMUCBT.cjs');
37
- require('./chunk-SVXC36MU.cjs');
37
+ require('./chunk-4YINUUKQ.cjs');
38
+ require('./chunk-VACWOIRE.cjs');
38
39
  require('./chunk-QBZJ7P2T.cjs');
39
40
  require('./chunk-4IH4EL7M.cjs');
41
+ require('./chunk-A2YMUCBT.cjs');
42
+ require('./chunk-E3UCVHLP.cjs');
43
+ require('./chunk-FCR77GYM.cjs');
44
+ require('./chunk-AEOZIDEB.cjs');
45
+ require('./chunk-XSVNC2UD.cjs');
40
46
  require('./chunk-SUEGJ75D.cjs');
41
- require('./chunk-S6JGLF3G.cjs');
42
47
  require('./chunk-RSJ3TWJQ.cjs');
43
48
  require('./chunk-YGXJGRFI.cjs');
49
+ require('./chunk-OCEUVQHW.cjs');
44
50
  require('./chunk-NZYN7C3P.cjs');
45
51
  require('./chunk-JMJBSACD.cjs');
46
52
  require('./chunk-GMMT7RVN.cjs');
@@ -52,4 +58,4 @@ require('./chunk-UNEFIWXI.cjs');
52
58
 
53
59
 
54
60
 
55
- exports.DEFAULT_ROUTE_IDLE_MS = _chunk2FMI2B6Vcjs.DEFAULT_ROUTE_IDLE_MS; exports.ProviderProxy = _chunk2FMI2B6Vcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunk2FMI2B6Vcjs.ProviderProxyRouteMap; exports.__resetProviderProxyForTests = _chunk2FMI2B6Vcjs.__resetProviderProxyForTests; exports.extractRouteToken = _chunk2FMI2B6Vcjs.extractRouteToken; exports.getProviderProxy = _chunk2FMI2B6Vcjs.getProviderProxy;
61
+ exports.DEFAULT_ROUTE_IDLE_MS = _chunkDKPXN34Vcjs.DEFAULT_ROUTE_IDLE_MS; exports.ProviderProxy = _chunkDKPXN34Vcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunkDKPXN34Vcjs.ProviderProxyRouteMap; exports.__resetProviderProxyForTests = _chunkDKPXN34Vcjs.__resetProviderProxyForTests; exports.extractRouteToken = _chunkDKPXN34Vcjs.extractRouteToken; exports.getProviderProxy = _chunkDKPXN34Vcjs.getProviderProxy;
@@ -5,42 +5,48 @@ import {
5
5
  __resetProviderProxyForTests,
6
6
  extractRouteToken,
7
7
  getProviderProxy
8
- } from "./chunk-4DECIFU7.js";
8
+ } from "./chunk-QYTT6GE3.js";
9
9
  import "./chunk-VVEHS2LI.js";
10
10
  import "./chunk-46RLHI7D.js";
11
- import "./chunk-G2UTNSGU.js";
12
11
  import "./chunk-DK4A7DLE.js";
13
- import "./chunk-MQNDWYPN.js";
14
- import "./chunk-Z7LUNECE.js";
12
+ import "./chunk-VPBAUQ2M.js";
15
13
  import "./chunk-ZJZAOKI7.js";
16
14
  import "./chunk-FTQ7IQUC.js";
17
15
  import "./chunk-C7PSERMH.js";
18
- import "./chunk-5HTVET6E.js";
16
+ import "./chunk-TIER4SUC.js";
17
+ import "./chunk-Z7LUNECE.js";
19
18
  import "./chunk-7VU7V2E4.js";
20
19
  import "./chunk-ZLX3KGXX.js";
21
- import "./chunk-CWM2ZDU5.js";
20
+ import "./chunk-BPKCU575.js";
21
+ import "./chunk-G2UTNSGU.js";
22
22
  import "./chunk-MZNPGW5Q.js";
23
23
  import "./chunk-XTEI64OU.js";
24
24
  import "./chunk-XX6NQJMA.js";
25
25
  import "./chunk-IAXWICZU.js";
26
+ import "./chunk-OE6TDIWW.js";
27
+ import "./chunk-DRWHTIIZ.js";
28
+ import "./chunk-IK3KE3AU.js";
29
+ import "./chunk-ZY6KU6P3.js";
30
+ import "./chunk-JWC6APFQ.js";
26
31
  import "./chunk-5ERIZW3D.js";
27
32
  import "./chunk-5ENKBSWO.js";
28
- import "./chunk-N5QFKSDO.js";
33
+ import "./chunk-HRRYG2AX.js";
29
34
  import "./chunk-AVYJ4YBN.js";
30
- import "./chunk-DRWHTIIZ.js";
31
- import "./chunk-WNY4WMRF.js";
35
+ import "./chunk-WLYIIEAF.js";
32
36
  import "./chunk-TKJMZBAH.js";
33
- import "./chunk-JO5NLTLY.js";
34
- import "./chunk-ZY6KU6P3.js";
35
- import "./chunk-JWC6APFQ.js";
36
- import "./chunk-H5JUT3KV.js";
37
- import "./chunk-CZHZGRU7.js";
37
+ import "./chunk-3QFXFCHG.js";
38
+ import "./chunk-UHGVBFU3.js";
38
39
  import "./chunk-AQ5TNQB7.js";
39
40
  import "./chunk-XEKD23J5.js";
41
+ import "./chunk-H5JUT3KV.js";
42
+ import "./chunk-7Y47UCF2.js";
43
+ import "./chunk-K5NM7VAH.js";
44
+ import "./chunk-WNY4WMRF.js";
45
+ import "./chunk-OZFM4X3S.js";
40
46
  import "./chunk-5ZQBEOMD.js";
41
- import "./chunk-BO4RFWBR.js";
42
47
  import "./chunk-Z7Y2NPHY.js";
43
48
  import "./chunk-S4WBV25P.js";
49
+ import "./chunk-XK5CIRMQ.js";
44
50
  import "./chunk-CDHS2QDC.js";
45
51
  import "./chunk-Y7FO65VT.js";
46
52
  import "./chunk-FMOBD2OQ.js";
@@ -1,6 +1,6 @@
1
1
  import { ProviderConfigSource } from './ports/provider-config-source.js';
2
2
  import { IngressFormat, RouteContext } from './provider-proxy/types.js';
3
- import { q as OutboundEndpoint, P as ModelRef, b as EndpointRoutingConfig, R as RequestRole } from './types-6OUY_xfA.js';
3
+ import { m as OutboundEndpoint, G as ModelRef, b as EndpointRoutingConfig, R as RequestRole } from './types-lgPYQuZS.js';
4
4
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { ProviderConfigSource } from './ports/provider-config-source.cjs';
2
2
  import { IngressFormat, RouteContext } from './provider-proxy/types.cjs';
3
- import { q as OutboundEndpoint, P as ModelRef, b as EndpointRoutingConfig, R as RequestRole } from './types-aBFFXoBz.cjs';
3
+ import { m as OutboundEndpoint, G as ModelRef, b as EndpointRoutingConfig, R as RequestRole } from './types-B8Arpxn0.cjs';
4
4
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk2DCNB7DFcjs = require('../../chunk-2DCNB7DF.cjs');
3
+ var _chunkSU2GCLACcjs = require('../../chunk-SU2GCLAC.cjs');
4
4
 
5
5
 
6
- exports.OpenAIResponseTransformer = _chunk2DCNB7DFcjs.OpenAIResponseTransformer;
6
+ exports.OpenAIResponseTransformer = _chunkSU2GCLACcjs.OpenAIResponseTransformer;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  OpenAIResponseTransformer
3
- } from "../../chunk-5HTVET6E.js";
3
+ } from "../../chunk-TIER4SUC.js";
4
4
  export {
5
5
  OpenAIResponseTransformer
6
6
  };
@@ -4,10 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkFFALUUZZcjs = require('../chunk-FFALUUZZ.cjs');
8
-
9
-
10
- var _chunkC72S6TTVcjs = require('../chunk-C72S6TTV.cjs');
7
+ var _chunkRGTR7CIOcjs = require('../chunk-RGTR7CIO.cjs');
11
8
 
12
9
 
13
10
  var _chunkDWKQZ2SKcjs = require('../chunk-DWKQZ2SK.cjs');
@@ -19,7 +16,10 @@ var _chunk4VAVYUZScjs = require('../chunk-4VAVYUZS.cjs');
19
16
  var _chunk7YN22L2Hcjs = require('../chunk-7YN22L2H.cjs');
20
17
 
21
18
 
22
- var _chunk2DCNB7DFcjs = require('../chunk-2DCNB7DF.cjs');
19
+ var _chunkSU2GCLACcjs = require('../chunk-SU2GCLAC.cjs');
20
+
21
+
22
+ var _chunkC72S6TTVcjs = require('../chunk-C72S6TTV.cjs');
23
23
 
24
24
 
25
25
  var _chunkRSJ3TWJQcjs = require('../chunk-RSJ3TWJQ.cjs');
@@ -36,4 +36,4 @@ require('../chunk-YGXJGRFI.cjs');
36
36
 
37
37
 
38
38
 
39
- exports.AnthropicTransformer = _chunk4VAVYUZScjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunkFFALUUZZcjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunkFFALUUZZcjs.BuiltinTransformers; exports.DeepseekTransformer = _chunkFFALUUZZcjs.DeepseekTransformer; exports.GeminiCodeAssistTransformer = _chunkRSJ3TWJQcjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunk7YN22L2Hcjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunk2DCNB7DFcjs.OpenAIResponseTransformer; exports.OpenCodeGoTransformer = _chunkC72S6TTVcjs.OpenCodeGoTransformer; exports.ReasoningTransformer = _chunkDWKQZ2SKcjs.ReasoningTransformer; exports.getBuiltinTransformers = _chunkFFALUUZZcjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunkFFALUUZZcjs.registerBuiltinTransformers;
39
+ exports.AnthropicTransformer = _chunk4VAVYUZScjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunkRGTR7CIOcjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunkRGTR7CIOcjs.BuiltinTransformers; exports.DeepseekTransformer = _chunkRGTR7CIOcjs.DeepseekTransformer; exports.GeminiCodeAssistTransformer = _chunkRSJ3TWJQcjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunk7YN22L2Hcjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunkSU2GCLACcjs.OpenAIResponseTransformer; exports.OpenCodeGoTransformer = _chunkC72S6TTVcjs.OpenCodeGoTransformer; exports.ReasoningTransformer = _chunkDWKQZ2SKcjs.ReasoningTransformer; exports.getBuiltinTransformers = _chunkRGTR7CIOcjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunkRGTR7CIOcjs.registerBuiltinTransformers;
@@ -4,10 +4,7 @@ import {
4
4
  DeepseekTransformer,
5
5
  getBuiltinTransformers,
6
6
  registerBuiltinTransformers
7
- } from "../chunk-MQNDWYPN.js";
8
- import {
9
- OpenCodeGoTransformer
10
- } from "../chunk-Z7LUNECE.js";
7
+ } from "../chunk-VPBAUQ2M.js";
11
8
  import {
12
9
  ReasoningTransformer
13
10
  } from "../chunk-ZJZAOKI7.js";
@@ -19,7 +16,10 @@ import {
19
16
  } from "../chunk-C7PSERMH.js";
20
17
  import {
21
18
  OpenAIResponseTransformer
22
- } from "../chunk-5HTVET6E.js";
19
+ } from "../chunk-TIER4SUC.js";
20
+ import {
21
+ OpenCodeGoTransformer
22
+ } from "../chunk-Z7LUNECE.js";
23
23
  import {
24
24
  GeminiCodeAssistTransformer
25
25
  } from "../chunk-Z7Y2NPHY.js";
@@ -1,18 +1,18 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-FZ46M34D.cjs');
2
2
 
3
3
 
4
- var _chunk46ZIFWYGcjs = require('./chunk-46ZIFWYG.cjs');
5
-
6
-
7
4
  var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
8
5
 
9
6
 
10
- var _chunkFFALUUZZcjs = require('./chunk-FFALUUZZ.cjs');
11
- require('./chunk-C72S6TTV.cjs');
7
+ var _chunkRGTR7CIOcjs = require('./chunk-RGTR7CIO.cjs');
12
8
  require('./chunk-DWKQZ2SK.cjs');
13
9
  require('./chunk-4VAVYUZS.cjs');
14
10
  require('./chunk-7YN22L2H.cjs');
15
- require('./chunk-2DCNB7DF.cjs');
11
+ require('./chunk-SU2GCLAC.cjs');
12
+ require('./chunk-C72S6TTV.cjs');
13
+
14
+
15
+ var _chunk46ZIFWYGcjs = require('./chunk-46ZIFWYG.cjs');
16
16
  require('./chunk-GBHYAGX3.cjs');
17
17
  require('./chunk-RSJ3TWJQ.cjs');
18
18
  require('./chunk-YGXJGRFI.cjs');
@@ -20,4 +20,4 @@ require('./chunk-YGXJGRFI.cjs');
20
20
 
21
21
 
22
22
 
23
- exports.TransformerChainExecutor = _chunk46ZIFWYGcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.registerBuiltinTransformers = _chunkFFALUUZZcjs.registerBuiltinTransformers;
23
+ exports.TransformerChainExecutor = _chunk46ZIFWYGcjs.TransformerChainExecutor; exports.TransformerService = _chunk3OPYJG76cjs.TransformerService; exports.registerBuiltinTransformers = _chunkRGTR7CIOcjs.registerBuiltinTransformers;
@@ -1,18 +1,18 @@
1
1
  import "./chunk-46RLHI7D.js";
2
- import {
3
- TransformerChainExecutor
4
- } from "./chunk-G2UTNSGU.js";
5
2
  import {
6
3
  TransformerService
7
4
  } from "./chunk-DK4A7DLE.js";
8
5
  import {
9
6
  registerBuiltinTransformers
10
- } from "./chunk-MQNDWYPN.js";
11
- import "./chunk-Z7LUNECE.js";
7
+ } from "./chunk-VPBAUQ2M.js";
12
8
  import "./chunk-ZJZAOKI7.js";
13
9
  import "./chunk-FTQ7IQUC.js";
14
10
  import "./chunk-C7PSERMH.js";
15
- import "./chunk-5HTVET6E.js";
11
+ import "./chunk-TIER4SUC.js";
12
+ import "./chunk-Z7LUNECE.js";
13
+ import {
14
+ TransformerChainExecutor
15
+ } from "./chunk-G2UTNSGU.js";
16
16
  import "./chunk-MZNPGW5Q.js";
17
17
  import "./chunk-Z7Y2NPHY.js";
18
18
  import "./chunk-S4WBV25P.js";
@@ -8,95 +8,7 @@ import { L as Logger } from './logger-4GvQNzhE.cjs';
8
8
  import { ProviderConfigSource } from './ports/provider-config-source.cjs';
9
9
  import { P as ProviderProxy } from './ProviderProxy-CnMQYN59.cjs';
10
10
  import { ProviderProxyDeps } from './provider-proxy/types.cjs';
11
-
12
- /**
13
- * keyPolicy — PURE decision helpers for the outbound key-policy envelope
14
- * (`outbound-key-policy`, design D2/D4). Expiry/activation resolution +
15
- * cost-quota decision. No I/O, no clock ownership (the caller passes `now`), so
16
- * these are trivially unit-testable and reused by both the auth path
17
- * (`verifyKey`) and the wire path (`outboundApiRouter`).
18
- *
19
- * The #6 (`restrictedModels`) and #9 (voucher) children EXTEND the key-policy
20
- * schema; they must not change the shapes frozen here.
21
- *
22
- * @module outbound-api/keyPolicy
23
- */
24
- /** The expiry/activation subset of a key row `computeKeyExpiry` reads. */
25
- interface KeyExpiryInput {
26
- /** Fixed-mode absolute expiry (epoch ms). */
27
- expiresAt?: number | null;
28
- /** Expiry mode; absent ⇒ `'fixed'`. */
29
- activationMode?: 'fixed' | 'activation';
30
- /** Activation-mode lifetime in days (absent/null ⇒ never expires). */
31
- activationDays?: number | null;
32
- /** First-use activation stamp (epoch ms); null ⇒ not yet activated. */
33
- activatedAt?: number | null;
34
- }
35
- /** Result of {@link computeKeyExpiry}. */
36
- interface KeyExpiryResult {
37
- expired: boolean;
38
- /** The resolved absolute expiry (epoch ms), when the key has one. */
39
- effectiveExpiresAt?: number;
40
- /**
41
- * True when this is an activation-mode key that has NOT been activated yet, so
42
- * the caller SHOULD stamp the activation (best-effort) on a successful verify.
43
- */
44
- needsActivation?: boolean;
45
- }
46
- /**
47
- * Resolve whether a key is past its effective expiry (design D2).
48
- * - `fixed`: expired when `expiresAt != null && now >= expiresAt`.
49
- * - `activation`: while `activatedAt == null` the key is NOT expired (it
50
- * activates on THIS use → `needsActivation`); once activated, expired when
51
- * `now >= activatedAt + activationDays*DAY`. A null `activationDays` never
52
- * expires.
53
- * A key with no expiry configured never expires.
54
- */
55
- declare function computeKeyExpiry(row: KeyExpiryInput, now: number): KeyExpiryResult;
56
- /** Per-key USD cost limits carried on the verified key (absent scope ⇒ no cap). */
57
- interface KeyCostLimits {
58
- dailyUsd?: number;
59
- totalUsd?: number;
60
- weeklyUsd?: number;
61
- }
62
- /** In-memory per-key accumulated spend snapshot (see `keySpendTracker`). */
63
- interface KeySpend {
64
- dailyUsd: number;
65
- /** Local-midnight boundary the `dailyUsd` window opened at (epoch ms). */
66
- dailyWindowStart: number;
67
- weeklyUsd: number;
68
- /** Local week-start boundary the `weeklyUsd` window opened at (epoch ms). */
69
- weeklyWindowStart: number;
70
- totalUsd: number;
71
- }
72
- /** Decision returned by {@link checkKeyQuota}. */
73
- type QuotaDecision = {
74
- allowed: true;
75
- } | {
76
- allowed: false;
77
- scope: 'daily' | 'weekly' | 'total';
78
- limitUsd: number;
79
- spentUsd: number;
80
- };
81
- /**
82
- * Decide whether the key's accumulated spend already meets/exceeds any
83
- * configured cost limit (design D4). `allowed:false` when a scope's PRIOR spend
84
- * is `>= limit` (the triggering request's own cost is unknown pre-flight →
85
- * bounded one-request overage, CRS-equivalent). An unconfigured scope is never
86
- * gated; a `limits`-less key always passes.
87
- */
88
- declare function checkKeyQuota(limits: KeyCostLimits | undefined, spend: KeySpend): QuotaDecision;
89
- /**
90
- * Per-key model restriction carried on the verified key (outbound-key-policy #6).
91
- * Present ONLY when the key has `enableModelRestriction === true` — so the wire
92
- * layer's presence check (`if (key.modelRestriction) …`) is the zero-regression
93
- * gate.
94
- */
95
- interface ModelRestriction {
96
- mode: 'blacklist' | 'allowlist';
97
- /** Bare modelIds the mode acts on. Empty allowlist denies every model. */
98
- models: string[];
99
- }
11
+ import { c as KeySpend } from './keyPolicy-Cp0FntZl.cjs';
100
12
 
101
13
  /**
102
14
  * keySpendTracker — a cheap in-memory per-key accumulated-spend cache
@@ -398,6 +310,18 @@ interface EndpointRoutingConfig {
398
310
  backgroundModel?: ModelRef;
399
311
  /** Gates subscription-vs-BYO provider selection. Default FALSE. */
400
312
  useSubscription: boolean;
313
+ /**
314
+ * OPTIONAL subscription-mode binding to ONE specific subscription account id
315
+ * (provider/subscription duality). Absent/blank ⇒ the provider's account pool
316
+ * auto-schedules (priority/LRU/health). When set and the account is
317
+ * schedulable it is used directly; otherwise the pool is the fallback.
318
+ */
319
+ boundAccountId?: string;
320
+ /**
321
+ * OPTIONAL provider-mode binding to ONE specific BYO key id (from the
322
+ * provider's key pool). Absent/blank ⇒ the provider's default key / key pool.
323
+ */
324
+ boundKeyId?: string;
401
325
  /**
402
326
  * OPTIONAL "background model id" override list (role-based `gemini` only).
403
327
  * When set, an incoming requested model id appearing in this list is
@@ -827,4 +751,4 @@ interface OutboundApiDeps {
827
751
  readonly logger?: Logger;
828
752
  }
829
753
 
830
- export { type AccountProbeConfig as A, computeVoucherGrant as B, type ChatDispatchMode as C, generateVoucherCode as D, ENDPOINT_MODEL_KINDS as E, type FingerprintConfig as F, hashVoucherCode as G, newVoucherId as H, startOfLocalDay as I, startOfLocalWeek as J, type KeyCostLimits as K, toVoucherInfo as L, type MessagesModelKind as M, voucherCodePrefix as N, type OutboundKeyDb as O, type ModelRef as P, type QuotaDecision as Q, type RequestRole as R, type ModelRestriction as S, type AccountHealthConfig as T, type UserMessageQueueConfig as U, type VoucherCreateInput as V, type OutboundKeyModelRestrictionMode as W, type ConcurrencyQueueConfig as a, type EndpointRoutingConfig as b, type KeyExpiryInput as c, type KeyExpiryResult as d, type KeySpend as e, type KeySpendReader as f, type KeySpendSeeder as g, KeySpendTracker as h, type KindMappedEndpoint as i, type ModelKind as j, type ModelPrefixTargets as k, type OutboundApiDeps as l, type OutboundApiKeyCreated as m, type OutboundApiKeyInfo as n, type OutboundApiServerConfig as o, type OutboundApiServerStatus as p, type OutboundEndpoint as q, type OutboundFormatUrls as r, type OutboundKeyActivationMode as s, type OutboundKeyDbRow as t, type OutboundKeyPolicy as u, type OutboundProxyConfig as v, type ResponsesModelKind as w, type VoucherDb as x, checkKeyQuota as y, computeKeyExpiry as z };
754
+ export { type AccountProbeConfig as A, toVoucherInfo as B, type ChatDispatchMode as C, voucherCodePrefix as D, ENDPOINT_MODEL_KINDS as E, type FingerprintConfig as F, type ModelRef as G, type AccountHealthConfig as H, type OutboundKeyModelRestrictionMode as I, type KeySpendReader as K, type MessagesModelKind as M, type OutboundKeyDb as O, type RequestRole as R, type UserMessageQueueConfig as U, type VoucherCreateInput as V, type ConcurrencyQueueConfig as a, type EndpointRoutingConfig as b, type KeySpendSeeder as c, KeySpendTracker as d, type KindMappedEndpoint as e, type ModelKind as f, type ModelPrefixTargets as g, type OutboundApiDeps as h, type OutboundApiKeyCreated as i, type OutboundApiKeyInfo as j, type OutboundApiServerConfig as k, type OutboundApiServerStatus as l, type OutboundEndpoint as m, type OutboundFormatUrls as n, type OutboundKeyActivationMode as o, type OutboundKeyDbRow as p, type OutboundKeyPolicy as q, type OutboundProxyConfig as r, type ResponsesModelKind as s, type VoucherDb as t, computeVoucherGrant as u, generateVoucherCode as v, hashVoucherCode as w, newVoucherId as x, startOfLocalDay as y, startOfLocalWeek as z };
@@ -8,95 +8,7 @@ import { L as Logger } from './logger-4GvQNzhE.js';
8
8
  import { ProviderConfigSource } from './ports/provider-config-source.js';
9
9
  import { P as ProviderProxy } from './ProviderProxy-C-xqrkKi.js';
10
10
  import { ProviderProxyDeps } from './provider-proxy/types.js';
11
-
12
- /**
13
- * keyPolicy — PURE decision helpers for the outbound key-policy envelope
14
- * (`outbound-key-policy`, design D2/D4). Expiry/activation resolution +
15
- * cost-quota decision. No I/O, no clock ownership (the caller passes `now`), so
16
- * these are trivially unit-testable and reused by both the auth path
17
- * (`verifyKey`) and the wire path (`outboundApiRouter`).
18
- *
19
- * The #6 (`restrictedModels`) and #9 (voucher) children EXTEND the key-policy
20
- * schema; they must not change the shapes frozen here.
21
- *
22
- * @module outbound-api/keyPolicy
23
- */
24
- /** The expiry/activation subset of a key row `computeKeyExpiry` reads. */
25
- interface KeyExpiryInput {
26
- /** Fixed-mode absolute expiry (epoch ms). */
27
- expiresAt?: number | null;
28
- /** Expiry mode; absent ⇒ `'fixed'`. */
29
- activationMode?: 'fixed' | 'activation';
30
- /** Activation-mode lifetime in days (absent/null ⇒ never expires). */
31
- activationDays?: number | null;
32
- /** First-use activation stamp (epoch ms); null ⇒ not yet activated. */
33
- activatedAt?: number | null;
34
- }
35
- /** Result of {@link computeKeyExpiry}. */
36
- interface KeyExpiryResult {
37
- expired: boolean;
38
- /** The resolved absolute expiry (epoch ms), when the key has one. */
39
- effectiveExpiresAt?: number;
40
- /**
41
- * True when this is an activation-mode key that has NOT been activated yet, so
42
- * the caller SHOULD stamp the activation (best-effort) on a successful verify.
43
- */
44
- needsActivation?: boolean;
45
- }
46
- /**
47
- * Resolve whether a key is past its effective expiry (design D2).
48
- * - `fixed`: expired when `expiresAt != null && now >= expiresAt`.
49
- * - `activation`: while `activatedAt == null` the key is NOT expired (it
50
- * activates on THIS use → `needsActivation`); once activated, expired when
51
- * `now >= activatedAt + activationDays*DAY`. A null `activationDays` never
52
- * expires.
53
- * A key with no expiry configured never expires.
54
- */
55
- declare function computeKeyExpiry(row: KeyExpiryInput, now: number): KeyExpiryResult;
56
- /** Per-key USD cost limits carried on the verified key (absent scope ⇒ no cap). */
57
- interface KeyCostLimits {
58
- dailyUsd?: number;
59
- totalUsd?: number;
60
- weeklyUsd?: number;
61
- }
62
- /** In-memory per-key accumulated spend snapshot (see `keySpendTracker`). */
63
- interface KeySpend {
64
- dailyUsd: number;
65
- /** Local-midnight boundary the `dailyUsd` window opened at (epoch ms). */
66
- dailyWindowStart: number;
67
- weeklyUsd: number;
68
- /** Local week-start boundary the `weeklyUsd` window opened at (epoch ms). */
69
- weeklyWindowStart: number;
70
- totalUsd: number;
71
- }
72
- /** Decision returned by {@link checkKeyQuota}. */
73
- type QuotaDecision = {
74
- allowed: true;
75
- } | {
76
- allowed: false;
77
- scope: 'daily' | 'weekly' | 'total';
78
- limitUsd: number;
79
- spentUsd: number;
80
- };
81
- /**
82
- * Decide whether the key's accumulated spend already meets/exceeds any
83
- * configured cost limit (design D4). `allowed:false` when a scope's PRIOR spend
84
- * is `>= limit` (the triggering request's own cost is unknown pre-flight →
85
- * bounded one-request overage, CRS-equivalent). An unconfigured scope is never
86
- * gated; a `limits`-less key always passes.
87
- */
88
- declare function checkKeyQuota(limits: KeyCostLimits | undefined, spend: KeySpend): QuotaDecision;
89
- /**
90
- * Per-key model restriction carried on the verified key (outbound-key-policy #6).
91
- * Present ONLY when the key has `enableModelRestriction === true` — so the wire
92
- * layer's presence check (`if (key.modelRestriction) …`) is the zero-regression
93
- * gate.
94
- */
95
- interface ModelRestriction {
96
- mode: 'blacklist' | 'allowlist';
97
- /** Bare modelIds the mode acts on. Empty allowlist denies every model. */
98
- models: string[];
99
- }
11
+ import { c as KeySpend } from './keyPolicy-Cp0FntZl.js';
100
12
 
101
13
  /**
102
14
  * keySpendTracker — a cheap in-memory per-key accumulated-spend cache
@@ -398,6 +310,18 @@ interface EndpointRoutingConfig {
398
310
  backgroundModel?: ModelRef;
399
311
  /** Gates subscription-vs-BYO provider selection. Default FALSE. */
400
312
  useSubscription: boolean;
313
+ /**
314
+ * OPTIONAL subscription-mode binding to ONE specific subscription account id
315
+ * (provider/subscription duality). Absent/blank ⇒ the provider's account pool
316
+ * auto-schedules (priority/LRU/health). When set and the account is
317
+ * schedulable it is used directly; otherwise the pool is the fallback.
318
+ */
319
+ boundAccountId?: string;
320
+ /**
321
+ * OPTIONAL provider-mode binding to ONE specific BYO key id (from the
322
+ * provider's key pool). Absent/blank ⇒ the provider's default key / key pool.
323
+ */
324
+ boundKeyId?: string;
401
325
  /**
402
326
  * OPTIONAL "background model id" override list (role-based `gemini` only).
403
327
  * When set, an incoming requested model id appearing in this list is
@@ -827,4 +751,4 @@ interface OutboundApiDeps {
827
751
  readonly logger?: Logger;
828
752
  }
829
753
 
830
- export { type AccountProbeConfig as A, computeVoucherGrant as B, type ChatDispatchMode as C, generateVoucherCode as D, ENDPOINT_MODEL_KINDS as E, type FingerprintConfig as F, hashVoucherCode as G, newVoucherId as H, startOfLocalDay as I, startOfLocalWeek as J, type KeyCostLimits as K, toVoucherInfo as L, type MessagesModelKind as M, voucherCodePrefix as N, type OutboundKeyDb as O, type ModelRef as P, type QuotaDecision as Q, type RequestRole as R, type ModelRestriction as S, type AccountHealthConfig as T, type UserMessageQueueConfig as U, type VoucherCreateInput as V, type OutboundKeyModelRestrictionMode as W, type ConcurrencyQueueConfig as a, type EndpointRoutingConfig as b, type KeyExpiryInput as c, type KeyExpiryResult as d, type KeySpend as e, type KeySpendReader as f, type KeySpendSeeder as g, KeySpendTracker as h, type KindMappedEndpoint as i, type ModelKind as j, type ModelPrefixTargets as k, type OutboundApiDeps as l, type OutboundApiKeyCreated as m, type OutboundApiKeyInfo as n, type OutboundApiServerConfig as o, type OutboundApiServerStatus as p, type OutboundEndpoint as q, type OutboundFormatUrls as r, type OutboundKeyActivationMode as s, type OutboundKeyDbRow as t, type OutboundKeyPolicy as u, type OutboundProxyConfig as v, type ResponsesModelKind as w, type VoucherDb as x, checkKeyQuota as y, computeKeyExpiry as z };
754
+ export { type AccountProbeConfig as A, toVoucherInfo as B, type ChatDispatchMode as C, voucherCodePrefix as D, ENDPOINT_MODEL_KINDS as E, type FingerprintConfig as F, type ModelRef as G, type AccountHealthConfig as H, type OutboundKeyModelRestrictionMode as I, type KeySpendReader as K, type MessagesModelKind as M, type OutboundKeyDb as O, type RequestRole as R, type UserMessageQueueConfig as U, type VoucherCreateInput as V, type ConcurrencyQueueConfig as a, type EndpointRoutingConfig as b, type KeySpendSeeder as c, KeySpendTracker as d, type KindMappedEndpoint as e, type ModelKind as f, type ModelPrefixTargets as g, type OutboundApiDeps as h, type OutboundApiKeyCreated as i, type OutboundApiKeyInfo as j, type OutboundApiServerConfig as k, type OutboundApiServerStatus as l, type OutboundEndpoint as m, type OutboundFormatUrls as n, type OutboundKeyActivationMode as o, type OutboundKeyDbRow as p, type OutboundKeyPolicy as q, type OutboundProxyConfig as r, type ResponsesModelKind as s, type VoucherDb as t, computeVoucherGrant as u, generateVoucherCode as v, hashVoucherCode as w, newVoucherId as x, startOfLocalDay as y, startOfLocalWeek as z };
@@ -1,6 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk3QOSDDNIcjs = require('../chunk-3QOSDDNI.cjs');
3
+ var _chunkSNYBEXLBcjs = require('../chunk-SNYBEXLB.cjs');
4
+ require('../chunk-XSVNC2UD.cjs');
4
5
 
5
6
 
6
- exports.UsageRecorder = _chunk3QOSDDNIcjs.UsageRecorder;
7
+ exports.UsageRecorder = _chunkSNYBEXLBcjs.UsageRecorder;
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  UsageRecorder
3
- } from "../chunk-CWM2ZDU5.js";
3
+ } from "../chunk-BPKCU575.js";
4
+ import "../chunk-OZFM4X3S.js";
4
5
  export {
5
6
  UsageRecorder
6
7
  };
package/dist/usage.cjs CHANGED
@@ -4,8 +4,9 @@
4
4
  var _chunkYMFAJFQTcjs = require('./chunk-YMFAJFQT.cjs');
5
5
 
6
6
 
7
- var _chunk3QOSDDNIcjs = require('./chunk-3QOSDDNI.cjs');
7
+ var _chunkSNYBEXLBcjs = require('./chunk-SNYBEXLB.cjs');
8
+ require('./chunk-XSVNC2UD.cjs');
8
9
 
9
10
 
10
11
 
11
- exports.PricingEngine = _chunkYMFAJFQTcjs.PricingEngine; exports.UsageRecorder = _chunk3QOSDDNIcjs.UsageRecorder;
12
+ exports.PricingEngine = _chunkYMFAJFQTcjs.PricingEngine; exports.UsageRecorder = _chunkSNYBEXLBcjs.UsageRecorder;
package/dist/usage.js CHANGED
@@ -4,7 +4,8 @@ import {
4
4
  } from "./chunk-ZLX3KGXX.js";
5
5
  import {
6
6
  UsageRecorder
7
- } from "./chunk-CWM2ZDU5.js";
7
+ } from "./chunk-BPKCU575.js";
8
+ import "./chunk-OZFM4X3S.js";
8
9
  export {
9
10
  PricingEngine,
10
11
  UsageRecorder