@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.
- package/LICENSE +21 -21
- package/NOTICE +57 -57
- package/README.md +22 -15
- package/dist/{CompletionService-kNA17cfI.d.cts → CompletionService-BiJqftc-.d.cts} +1 -1
- package/dist/{CompletionService-C3BX0Ovy.d.ts → CompletionService-NXN_Av5W.d.ts} +1 -1
- package/dist/{ProviderProxy-QdwNV6l1.d.cts → ProviderProxy-CgIcCVwk.d.cts} +1 -1
- package/dist/{ProviderProxy--ROec6VI.d.ts → ProviderProxy-DYoY5XoT.d.ts} +1 -1
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +6 -6
- package/dist/auth/GeminiCodeAssistProjectResolver.js +4 -4
- package/dist/chunk-32SRZFFP.cjs +153 -0
- package/dist/chunk-4JOU54M5.js +200 -0
- package/dist/{chunk-2UTGX6FM.js → chunk-4VVCXVB7.js} +1 -1
- package/dist/{chunk-EPN67EGP.cjs → chunk-5UK3KLE2.cjs} +9 -1
- package/dist/chunk-6DDYNS2B.cjs +384 -0
- package/dist/{chunk-HKB656B4.js → chunk-6OC3ORW6.js} +55 -287
- package/dist/chunk-6OKXH2TW.js +320 -0
- package/dist/{chunk-XELFM7KL.cjs → chunk-7B56AJBB.cjs} +6275 -2421
- package/dist/{chunk-YWL7YZWS.cjs → chunk-7LRTPNFL.cjs} +5 -0
- package/dist/{chunk-CCVRRJOX.js → chunk-7PIUVCKK.js} +9 -2
- package/dist/{chunk-IIRPUVPH.cjs → chunk-7ZHBN75N.cjs} +3 -1
- package/dist/{chunk-UAPBLNN2.js → chunk-AQDON6MB.js} +8 -0
- package/dist/{chunk-RJ5ZGNI3.js → chunk-CFSGYFOZ.js} +1 -1
- package/dist/chunk-CTKM773J.cjs +3919 -0
- package/dist/chunk-DEIUR2TH.js +3919 -0
- package/dist/{chunk-WNKWAEUR.js → chunk-EYGBM2VC.js} +3 -1
- package/dist/{chunk-NGYOO5TO.js → chunk-FJNKXOWE.js} +9 -9
- package/dist/chunk-FX325I5Q.cjs +320 -0
- package/dist/chunk-G4CZIUIB.cjs +200 -0
- package/dist/chunk-HCOQQAZE.cjs +123 -0
- package/dist/{chunk-55FMGZ3L.js → chunk-HN74IGEO.js} +1 -1
- package/dist/{chunk-ZY6KU6P3.js → chunk-HOMUGKHR.js} +8 -5
- package/dist/{chunk-AOFWNWLT.cjs → chunk-IUL4VWNU.cjs} +22 -1
- package/dist/{chunk-5LNYGCIW.cjs → chunk-KIQ2HA2A.cjs} +5 -5
- package/dist/{chunk-MUHWHQVM.cjs → chunk-KQBLZMP6.cjs} +4 -3
- package/dist/chunk-LFEH7CEO.js +384 -0
- package/dist/chunk-N76KU6F5.js +123 -0
- package/dist/{chunk-CMVXX7ON.cjs → chunk-NOITAVHA.cjs} +114 -58
- package/dist/{chunk-Q27JY5RG.cjs → chunk-OIKREZVQ.cjs} +7 -4
- package/dist/{chunk-RJUONLUQ.cjs → chunk-OST5RJOJ.cjs} +1 -1
- package/dist/chunk-QIIAMBTM.js +153 -0
- package/dist/{chunk-56QD3YW6.cjs → chunk-QWNUOR7F.cjs} +11 -4
- package/dist/{chunk-S3DYFEBE.js → chunk-R4VCO2CB.js} +10 -1
- package/dist/{chunk-ZQQUD66M.cjs → chunk-SQMAEDNE.cjs} +63 -295
- package/dist/{chunk-4VZX5F4T.cjs → chunk-T6NWPIYZ.cjs} +5 -2
- package/dist/{chunk-P7EM6BND.cjs → chunk-TVYA5JSQ.cjs} +10 -10
- package/dist/{chunk-EBLFCNPY.js → chunk-U47LQXPB.js} +5 -2
- package/dist/{chunk-N7OOJI5V.js → chunk-V2UKUTJ3.js} +5 -0
- package/dist/{chunk-45FHEOKW.js → chunk-V53ZEFXC.js} +92 -36
- package/dist/{chunk-OC6DOOFX.cjs → chunk-VXRTQZF2.cjs} +5 -5
- package/dist/{chunk-CQIJCPMF.js → chunk-WSJE42SG.js} +5149 -1295
- package/dist/{chunk-RICPANBY.cjs → chunk-WX2E2G7H.cjs} +13 -4
- package/dist/{chunk-DE2SRBFZ.js → chunk-X335TJNS.js} +4 -3
- package/dist/{chunk-N2EIM2XJ.js → chunk-ZLNHPUFA.js} +22 -1
- package/dist/completion/CompletionService.cjs +30 -27
- package/dist/completion/CompletionService.d.cts +3 -2
- package/dist/completion/CompletionService.d.ts +3 -2
- package/dist/completion/CompletionService.js +29 -26
- package/dist/completion.cjs +38 -35
- package/dist/completion.d.cts +3 -2
- package/dist/completion.d.ts +3 -2
- package/dist/completion.js +37 -34
- package/dist/image-generation.cjs +52 -0
- package/dist/image-generation.d.cts +93 -0
- package/dist/image-generation.d.ts +93 -0
- package/dist/image-generation.js +52 -0
- package/dist/index.cjs +126 -31
- package/dist/index.d.cts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +143 -48
- package/dist/openai-operation.cjs +18 -0
- package/dist/openai-operation.d.cts +19 -0
- package/dist/openai-operation.d.ts +19 -0
- package/dist/openai-operation.js +18 -0
- package/dist/outbound-api/auditCapture.cjs +3 -3
- package/dist/outbound-api/auditCapture.d.cts +19 -2
- package/dist/outbound-api/auditCapture.d.ts +19 -2
- package/dist/outbound-api/auditCapture.js +2 -2
- package/dist/outbound-api/auditRedact.cjs +2 -2
- package/dist/outbound-api/auditRedact.js +1 -1
- package/dist/outbound-api/routeResolver.cjs +2 -2
- package/dist/outbound-api/routeResolver.d.cts +7 -4
- package/dist/outbound-api/routeResolver.d.ts +7 -4
- package/dist/outbound-api/routeResolver.js +1 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +2 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +2 -1
- package/dist/outbound-api/types.d.cts +6 -3
- package/dist/outbound-api/types.d.ts +6 -3
- package/dist/outbound-api.cjs +49 -32
- package/dist/outbound-api.d.cts +97 -10
- package/dist/outbound-api.d.ts +97 -10
- package/dist/outbound-api.js +48 -31
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +18 -15
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +18 -15
- package/dist/pipeline/LlmConfigProviderAuth.cjs +3 -3
- package/dist/pipeline/LlmConfigProviderAuth.js +2 -2
- package/dist/pipeline/SubscriptionAccountHealth.cjs +2 -2
- package/dist/pipeline/SubscriptionAccountHealth.d.cts +7 -0
- package/dist/pipeline/SubscriptionAccountHealth.d.ts +7 -0
- package/dist/pipeline/SubscriptionAccountHealth.js +1 -1
- package/dist/pipeline/executeProviderCall.cjs +2 -2
- package/dist/pipeline/executeProviderCall.d.cts +11 -6
- package/dist/pipeline/executeProviderCall.d.ts +11 -6
- package/dist/pipeline/executeProviderCall.js +1 -1
- package/dist/pipeline/upstreamFetch.cjs +2 -2
- package/dist/pipeline/upstreamFetch.d.cts +5 -0
- package/dist/pipeline/upstreamFetch.d.ts +5 -0
- package/dist/pipeline/upstreamFetch.js +1 -1
- package/dist/ports.d.cts +6 -3
- package/dist/ports.d.ts +6 -3
- package/dist/provider-proxy/ProviderProxy.cjs +30 -27
- package/dist/provider-proxy/ProviderProxy.d.cts +3 -2
- package/dist/provider-proxy/ProviderProxy.d.ts +3 -2
- package/dist/provider-proxy/ProviderProxy.js +29 -26
- package/dist/provider-proxy/identity/codexCliHeaders.cjs +4 -2
- package/dist/provider-proxy/identity/codexCliHeaders.d.cts +26 -6
- package/dist/provider-proxy/identity/codexCliHeaders.d.ts +26 -6
- package/dist/provider-proxy/identity/codexCliHeaders.js +5 -3
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +32 -27
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +21 -8
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +21 -8
- package/dist/provider-proxy/ingress/providerProxyShared.js +31 -26
- package/dist/provider-proxy/types.d.cts +14 -483
- package/dist/provider-proxy/types.d.ts +14 -483
- package/dist/provider-proxy.cjs +44 -27
- package/dist/provider-proxy.d.cts +30 -8
- package/dist/provider-proxy.d.ts +30 -8
- package/dist/provider-proxy.js +43 -26
- package/dist/{routeResolver-C0mkkZaM.d.ts → routeResolver-CTCcSHWu.d.ts} +4 -2
- package/dist/{routeResolver-CVFE8KKe.d.cts → routeResolver-rpKQLyDO.d.cts} +4 -2
- package/dist/transformer/TransformerChainExecutor.cjs +2 -2
- package/dist/transformer/TransformerChainExecutor.d.cts +2 -2
- package/dist/transformer/TransformerChainExecutor.d.ts +2 -2
- package/dist/transformer/TransformerChainExecutor.js +1 -1
- package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.cjs +16 -0
- package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.d.cts +53 -0
- package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.d.ts +53 -0
- package/dist/transformer/transformers/AnthropicOpenAIToAnthropicStream.js +16 -0
- package/dist/transformer/transformers/AnthropicTransformer.cjs +4 -3
- package/dist/transformer/transformers/AnthropicTransformer.js +3 -2
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.cjs +4 -4
- package/dist/transformer/transformers/GeminiCodeAssistTransformer.js +3 -3
- package/dist/transformer/transformers/GeminiTransformer.cjs +4 -4
- package/dist/transformer/transformers/GeminiTransformer.js +3 -3
- package/dist/transformer/transformers/OpenAIResponseTransformer.cjs +3 -3
- package/dist/transformer/transformers/OpenAIResponseTransformer.js +2 -2
- package/dist/transformer/transformers/OpenAITransformer.cjs +3 -3
- package/dist/transformer/transformers/OpenAITransformer.js +2 -2
- package/dist/transformer/transformers.cjs +10 -9
- package/dist/transformer/transformers.js +13 -12
- package/dist/transformer/types.d.cts +39 -4
- package/dist/transformer/types.d.ts +39 -4
- package/dist/transformer.cjs +14 -13
- package/dist/transformer.js +14 -13
- package/dist/{types-BB8pxk_3.d.ts → types-5T223WYQ.d.ts} +183 -23
- package/dist/types-Bd72H4SB.d.ts +196 -0
- package/dist/types-CVRge76p.d.ts +1115 -0
- package/dist/types-CbglB73l.d.cts +196 -0
- package/dist/types-DsHBBk3h.d.cts +1115 -0
- package/dist/{types-C2MwkLah.d.cts → types-jjU24eYG.d.cts} +183 -23
- package/dist/usage/usage-recorder.cjs +2 -2
- package/dist/usage/usage-recorder.d.cts +12 -2
- package/dist/usage/usage-recorder.d.ts +12 -2
- package/dist/usage/usage-recorder.js +1 -1
- package/dist/usage.cjs +20 -3
- package/dist/usage.d.cts +154 -0
- package/dist/usage.d.ts +154 -0
- package/dist/usage.js +20 -3
- package/package.json +69 -64
- package/dist/chunk-7C7DET6S.js +0 -154
- package/dist/chunk-7VU7V2E4.js +0 -0
- package/dist/chunk-EYZYXJTJ.cjs +0 -1
- package/dist/chunk-FCR77GYM.cjs +0 -33
- package/dist/chunk-K5NM7VAH.js +0 -33
- package/dist/chunk-XPIOJQS2.cjs +0 -154
- /package/dist/{chunk-XXFYLL7R.js → chunk-ECZ3ZE2C.js} +0 -0
- /package/dist/{chunk-3SCOLIPT.cjs → chunk-MXI2PWIC.cjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy-
|
|
2
|
-
export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy-
|
|
3
|
-
import { IngressFormat, RouteContext, ProviderProxyDeps } from './
|
|
4
|
-
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, ProxyAttribution, RetryCallback, RouteAuthMode, RouteLeaseUsageAttribution, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat } from './
|
|
5
|
-
import { g as GatewayBindingTarget } from './types-
|
|
1
|
+
import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy-CgIcCVwk.cjs';
|
|
2
|
+
export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy-CgIcCVwk.cjs';
|
|
3
|
+
import { D as IngressFormat, aD as RouteContext, $ as ResponsesAffinityStore, K as OpenAIOperationHandler, R as OpenAIOperationRegistry, a4 as ResponsesHostedImageRuntimeFactory, a2 as ResponsesHostedImageIngress, W as ProviderProxyDeps } from './types-DsHBBk3h.cjs';
|
|
4
|
+
export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, X as ProxyAttribution, Y as ResponsesAffinityEntry, Z as ResponsesAffinityRecord, _ as ResponsesAffinityScope, a0 as ResponsesAffinityStoreOptions, a1 as ResponsesCredentialIdentity, a3 as ResponsesHostedImageRequestLease, a5 as ResponsesHostedImageRuntimeLease, ay as ResponsesProfile, az as ResponsesProfileDeclaration, aB as RetryCallback, aC as RouteAuthMode, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aK as classifyResponsesProfile, aN as getResponsesAffinityStore, aO as previousResponseNotFound } from './types-DsHBBk3h.cjs';
|
|
5
|
+
import { g as GatewayBindingTarget } from './types-jjU24eYG.cjs';
|
|
6
6
|
import { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
7
7
|
import 'node:http';
|
|
8
8
|
import '@omnicross/contracts/completion-types';
|
|
@@ -18,8 +18,9 @@ import './pipeline/SubscriptionAuthSource.cjs';
|
|
|
18
18
|
import './pipeline/SubscriptionAuthStrategy.cjs';
|
|
19
19
|
import './ports/web-search-backend.cjs';
|
|
20
20
|
import '@omnicross/contracts/websearch-types';
|
|
21
|
-
import '
|
|
22
|
-
import './
|
|
21
|
+
import '@omnicross/contracts/image-generation-types';
|
|
22
|
+
import './types-CbglB73l.cjs';
|
|
23
|
+
import 'node:fs/promises';
|
|
23
24
|
import '@omnicross/contracts/account-tokens-types';
|
|
24
25
|
import '@omnicross/contracts/audit-types';
|
|
25
26
|
import '@omnicross/contracts/billing-types';
|
|
@@ -27,6 +28,8 @@ import '@omnicross/contracts/health-logging-types';
|
|
|
27
28
|
import '@omnicross/contracts/voucher-types';
|
|
28
29
|
import '@omnicross/contracts/webhook-types';
|
|
29
30
|
import './keyPolicy-zdWTu3CQ.cjs';
|
|
31
|
+
import './transformer/types.cjs';
|
|
32
|
+
import './transformer/TransformerService.cjs';
|
|
30
33
|
|
|
31
34
|
declare const ROUTE_LEASE_REQUEST_SCHEMA: "omnicross.route-lease.request/1";
|
|
32
35
|
declare const ROUTE_LEASE_RESULT_SCHEMA: "omnicross.route-lease/1";
|
|
@@ -295,6 +298,25 @@ declare class RouteLeaseTargetResolver implements RouteLeaseTargetResolverPort {
|
|
|
295
298
|
*/
|
|
296
299
|
declare function extractRouteToken(authHeader: string | undefined): string | undefined;
|
|
297
300
|
|
|
301
|
+
interface ResponsesCompactRegistrationOptions {
|
|
302
|
+
readonly affinityStore?: ResponsesAffinityStore;
|
|
303
|
+
readonly timeoutMs?: number;
|
|
304
|
+
}
|
|
305
|
+
declare function createResponsesCompactHandler(options?: ResponsesCompactRegistrationOptions): OpenAIOperationHandler;
|
|
306
|
+
/** Register the extension-owned compact operation and return its idempotent disposer. */
|
|
307
|
+
declare function registerResponsesCompactOperation(registry: OpenAIOperationRegistry, options?: ResponsesCompactRegistrationOptions): () => void;
|
|
308
|
+
|
|
309
|
+
interface NativeResponsesHostedImageMediatorOptions {
|
|
310
|
+
readonly maxUpstreamJsonBytes?: number;
|
|
311
|
+
readonly createSelectorName?: () => string;
|
|
312
|
+
readonly createRequestId?: () => string;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Compose the daemon's generation-pinned hosted factory into the narrow Native
|
|
316
|
+
* Responses ingress port. Runtime acquisition remains lazy until `prepare`.
|
|
317
|
+
*/
|
|
318
|
+
declare function createNativeResponsesHostedImageIngress(runtimeFactory: ResponsesHostedImageRuntimeFactory, options?: NativeResponsesHostedImageMediatorOptions): ResponsesHostedImageIngress;
|
|
319
|
+
|
|
298
320
|
/**
|
|
299
321
|
* ProviderProxy module — singleton accessor + re-exports.
|
|
300
322
|
*
|
|
@@ -318,4 +340,4 @@ declare function getProviderProxy(deps?: ProviderProxyDeps): ProviderProxy;
|
|
|
318
340
|
/** Reset the singleton (tests / teardown only). */
|
|
319
341
|
declare function __resetProviderProxyForTests(): void;
|
|
320
342
|
|
|
321
|
-
export { IngressFormat, type NormalizedRouteLeaseCreate, type NormalizedRouteLeaseRequest, ProviderProxy, ProviderProxyDeps, ROUTE_LEASE_API_VERSION, ROUTE_LEASE_CAPABILITIES, ROUTE_LEASE_CAPABILITIES_SCHEMA, ROUTE_LEASE_CODEX_TOKEN_ENV, ROUTE_LEASE_DEFAULT_TTL_SECONDS, ROUTE_LEASE_MAX_CONSUMER_BYTES, ROUTE_LEASE_MAX_EXECUTION_ID_BYTES, ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES, ROUTE_LEASE_MAX_MODEL_BYTES, ROUTE_LEASE_MAX_SESSION_ID_BYTES, ROUTE_LEASE_MAX_TTL_SECONDS, ROUTE_LEASE_REQUEST_SCHEMA, ROUTE_LEASE_RESULT_SCHEMA, ROUTE_LEASE_RUNTIMES, ROUTE_LEASE_RUNTIME_TABLE, ROUTE_LEASE_SESSION_HASH_DOMAIN, RouteContext, type RouteLeaseCapabilities, type RouteLeaseClock, type RouteLeaseCreateOutcome, type RouteLeaseCreateResult, type RouteLeaseDescriptorPort, RouteLeaseError, type RouteLeaseErrorCode, type RouteLeaseExecutionMetadata, type RouteLeaseExecutionRequest, type RouteLeaseLogger, RouteLeaseManager, type RouteLeaseManagerOptions, type RouteLeaseMetadata, type RouteLeaseProviderKeyPreflight, type RouteLeaseReleaseResult, type RouteLeaseRenewResult, type RouteLeaseRequest, type RouteLeaseRoutePort, type RouteLeaseRuntime, type RouteLeaseStatus, type RouteLeaseSubscriptionPreflight, RouteLeaseTargetResolver, type RouteLeaseTargetResolverOptions, type RouteLeaseTargetResolverPort, type RouteLeaseUpstream, RouteRegistrationOptions, type RuntimeLaunchDescriptor, SYSTEM_ROUTE_LEASE_CLOCK, __resetProviderProxyForTests, canonicalizeRouteLeasePayload, extractRouteToken, getProviderProxy, hashRouteLeasePayload, hashRouteLeaseSessionId, normalizeRouteLeaseIdempotencyKey, normalizeRouteLeaseTtl, parseRouteLeaseCreate, routeLeaseRuntime };
|
|
343
|
+
export { IngressFormat, type NormalizedRouteLeaseCreate, type NormalizedRouteLeaseRequest, ProviderProxy, ProviderProxyDeps, ROUTE_LEASE_API_VERSION, ROUTE_LEASE_CAPABILITIES, ROUTE_LEASE_CAPABILITIES_SCHEMA, ROUTE_LEASE_CODEX_TOKEN_ENV, ROUTE_LEASE_DEFAULT_TTL_SECONDS, ROUTE_LEASE_MAX_CONSUMER_BYTES, ROUTE_LEASE_MAX_EXECUTION_ID_BYTES, ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES, ROUTE_LEASE_MAX_MODEL_BYTES, ROUTE_LEASE_MAX_SESSION_ID_BYTES, ROUTE_LEASE_MAX_TTL_SECONDS, ROUTE_LEASE_REQUEST_SCHEMA, ROUTE_LEASE_RESULT_SCHEMA, ROUTE_LEASE_RUNTIMES, ROUTE_LEASE_RUNTIME_TABLE, ROUTE_LEASE_SESSION_HASH_DOMAIN, ResponsesAffinityStore, type ResponsesCompactRegistrationOptions, ResponsesHostedImageIngress, ResponsesHostedImageRuntimeFactory, RouteContext, type RouteLeaseCapabilities, type RouteLeaseClock, type RouteLeaseCreateOutcome, type RouteLeaseCreateResult, type RouteLeaseDescriptorPort, RouteLeaseError, type RouteLeaseErrorCode, type RouteLeaseExecutionMetadata, type RouteLeaseExecutionRequest, type RouteLeaseLogger, RouteLeaseManager, type RouteLeaseManagerOptions, type RouteLeaseMetadata, type RouteLeaseProviderKeyPreflight, type RouteLeaseReleaseResult, type RouteLeaseRenewResult, type RouteLeaseRequest, type RouteLeaseRoutePort, type RouteLeaseRuntime, type RouteLeaseStatus, type RouteLeaseSubscriptionPreflight, RouteLeaseTargetResolver, type RouteLeaseTargetResolverOptions, type RouteLeaseTargetResolverPort, type RouteLeaseUpstream, RouteRegistrationOptions, type RuntimeLaunchDescriptor, SYSTEM_ROUTE_LEASE_CLOCK, __resetProviderProxyForTests, canonicalizeRouteLeasePayload, createNativeResponsesHostedImageIngress, createResponsesCompactHandler, extractRouteToken, getProviderProxy, hashRouteLeasePayload, hashRouteLeaseSessionId, normalizeRouteLeaseIdempotencyKey, normalizeRouteLeaseTtl, parseRouteLeaseCreate, registerResponsesCompactOperation, routeLeaseRuntime };
|
package/dist/provider-proxy.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy
|
|
2
|
-
export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy
|
|
3
|
-
import { IngressFormat, RouteContext, ProviderProxyDeps } from './
|
|
4
|
-
export { AnthropicIngressHandler, AnthropicIngressHandlerFactory, AnthropicRouteHandlerParams, AnthropicSdkHints, ExtendedContextHint, ProxyAttribution, RetryCallback, RouteAuthMode, RouteLeaseUsageAttribution, StreamEventCallback, SubscriptionDispatchProfile, SubscriptionRequestSummary, TargetProviderFormat } from './
|
|
5
|
-
import { g as GatewayBindingTarget } from './types-
|
|
1
|
+
import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy-DYoY5XoT.js';
|
|
2
|
+
export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy-DYoY5XoT.js';
|
|
3
|
+
import { D as IngressFormat, aD as RouteContext, $ as ResponsesAffinityStore, K as OpenAIOperationHandler, R as OpenAIOperationRegistry, a4 as ResponsesHostedImageRuntimeFactory, a2 as ResponsesHostedImageIngress, W as ProviderProxyDeps } from './types-CVRge76p.js';
|
|
4
|
+
export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, X as ProxyAttribution, Y as ResponsesAffinityEntry, Z as ResponsesAffinityRecord, _ as ResponsesAffinityScope, a0 as ResponsesAffinityStoreOptions, a1 as ResponsesCredentialIdentity, a3 as ResponsesHostedImageRequestLease, a5 as ResponsesHostedImageRuntimeLease, ay as ResponsesProfile, az as ResponsesProfileDeclaration, aB as RetryCallback, aC as RouteAuthMode, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aK as classifyResponsesProfile, aN as getResponsesAffinityStore, aO as previousResponseNotFound } from './types-CVRge76p.js';
|
|
5
|
+
import { g as GatewayBindingTarget } from './types-5T223WYQ.js';
|
|
6
6
|
import { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
7
7
|
import 'node:http';
|
|
8
8
|
import '@omnicross/contracts/completion-types';
|
|
@@ -18,8 +18,9 @@ import './pipeline/SubscriptionAuthSource.js';
|
|
|
18
18
|
import './pipeline/SubscriptionAuthStrategy.js';
|
|
19
19
|
import './ports/web-search-backend.js';
|
|
20
20
|
import '@omnicross/contracts/websearch-types';
|
|
21
|
-
import '
|
|
22
|
-
import './
|
|
21
|
+
import '@omnicross/contracts/image-generation-types';
|
|
22
|
+
import './types-Bd72H4SB.js';
|
|
23
|
+
import 'node:fs/promises';
|
|
23
24
|
import '@omnicross/contracts/account-tokens-types';
|
|
24
25
|
import '@omnicross/contracts/audit-types';
|
|
25
26
|
import '@omnicross/contracts/billing-types';
|
|
@@ -27,6 +28,8 @@ import '@omnicross/contracts/health-logging-types';
|
|
|
27
28
|
import '@omnicross/contracts/voucher-types';
|
|
28
29
|
import '@omnicross/contracts/webhook-types';
|
|
29
30
|
import './keyPolicy-zdWTu3CQ.js';
|
|
31
|
+
import './transformer/types.js';
|
|
32
|
+
import './transformer/TransformerService.js';
|
|
30
33
|
|
|
31
34
|
declare const ROUTE_LEASE_REQUEST_SCHEMA: "omnicross.route-lease.request/1";
|
|
32
35
|
declare const ROUTE_LEASE_RESULT_SCHEMA: "omnicross.route-lease/1";
|
|
@@ -295,6 +298,25 @@ declare class RouteLeaseTargetResolver implements RouteLeaseTargetResolverPort {
|
|
|
295
298
|
*/
|
|
296
299
|
declare function extractRouteToken(authHeader: string | undefined): string | undefined;
|
|
297
300
|
|
|
301
|
+
interface ResponsesCompactRegistrationOptions {
|
|
302
|
+
readonly affinityStore?: ResponsesAffinityStore;
|
|
303
|
+
readonly timeoutMs?: number;
|
|
304
|
+
}
|
|
305
|
+
declare function createResponsesCompactHandler(options?: ResponsesCompactRegistrationOptions): OpenAIOperationHandler;
|
|
306
|
+
/** Register the extension-owned compact operation and return its idempotent disposer. */
|
|
307
|
+
declare function registerResponsesCompactOperation(registry: OpenAIOperationRegistry, options?: ResponsesCompactRegistrationOptions): () => void;
|
|
308
|
+
|
|
309
|
+
interface NativeResponsesHostedImageMediatorOptions {
|
|
310
|
+
readonly maxUpstreamJsonBytes?: number;
|
|
311
|
+
readonly createSelectorName?: () => string;
|
|
312
|
+
readonly createRequestId?: () => string;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Compose the daemon's generation-pinned hosted factory into the narrow Native
|
|
316
|
+
* Responses ingress port. Runtime acquisition remains lazy until `prepare`.
|
|
317
|
+
*/
|
|
318
|
+
declare function createNativeResponsesHostedImageIngress(runtimeFactory: ResponsesHostedImageRuntimeFactory, options?: NativeResponsesHostedImageMediatorOptions): ResponsesHostedImageIngress;
|
|
319
|
+
|
|
298
320
|
/**
|
|
299
321
|
* ProviderProxy module — singleton accessor + re-exports.
|
|
300
322
|
*
|
|
@@ -318,4 +340,4 @@ declare function getProviderProxy(deps?: ProviderProxyDeps): ProviderProxy;
|
|
|
318
340
|
/** Reset the singleton (tests / teardown only). */
|
|
319
341
|
declare function __resetProviderProxyForTests(): void;
|
|
320
342
|
|
|
321
|
-
export { IngressFormat, type NormalizedRouteLeaseCreate, type NormalizedRouteLeaseRequest, ProviderProxy, ProviderProxyDeps, ROUTE_LEASE_API_VERSION, ROUTE_LEASE_CAPABILITIES, ROUTE_LEASE_CAPABILITIES_SCHEMA, ROUTE_LEASE_CODEX_TOKEN_ENV, ROUTE_LEASE_DEFAULT_TTL_SECONDS, ROUTE_LEASE_MAX_CONSUMER_BYTES, ROUTE_LEASE_MAX_EXECUTION_ID_BYTES, ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES, ROUTE_LEASE_MAX_MODEL_BYTES, ROUTE_LEASE_MAX_SESSION_ID_BYTES, ROUTE_LEASE_MAX_TTL_SECONDS, ROUTE_LEASE_REQUEST_SCHEMA, ROUTE_LEASE_RESULT_SCHEMA, ROUTE_LEASE_RUNTIMES, ROUTE_LEASE_RUNTIME_TABLE, ROUTE_LEASE_SESSION_HASH_DOMAIN, RouteContext, type RouteLeaseCapabilities, type RouteLeaseClock, type RouteLeaseCreateOutcome, type RouteLeaseCreateResult, type RouteLeaseDescriptorPort, RouteLeaseError, type RouteLeaseErrorCode, type RouteLeaseExecutionMetadata, type RouteLeaseExecutionRequest, type RouteLeaseLogger, RouteLeaseManager, type RouteLeaseManagerOptions, type RouteLeaseMetadata, type RouteLeaseProviderKeyPreflight, type RouteLeaseReleaseResult, type RouteLeaseRenewResult, type RouteLeaseRequest, type RouteLeaseRoutePort, type RouteLeaseRuntime, type RouteLeaseStatus, type RouteLeaseSubscriptionPreflight, RouteLeaseTargetResolver, type RouteLeaseTargetResolverOptions, type RouteLeaseTargetResolverPort, type RouteLeaseUpstream, RouteRegistrationOptions, type RuntimeLaunchDescriptor, SYSTEM_ROUTE_LEASE_CLOCK, __resetProviderProxyForTests, canonicalizeRouteLeasePayload, extractRouteToken, getProviderProxy, hashRouteLeasePayload, hashRouteLeaseSessionId, normalizeRouteLeaseIdempotencyKey, normalizeRouteLeaseTtl, parseRouteLeaseCreate, routeLeaseRuntime };
|
|
343
|
+
export { IngressFormat, type NormalizedRouteLeaseCreate, type NormalizedRouteLeaseRequest, ProviderProxy, ProviderProxyDeps, ROUTE_LEASE_API_VERSION, ROUTE_LEASE_CAPABILITIES, ROUTE_LEASE_CAPABILITIES_SCHEMA, ROUTE_LEASE_CODEX_TOKEN_ENV, ROUTE_LEASE_DEFAULT_TTL_SECONDS, ROUTE_LEASE_MAX_CONSUMER_BYTES, ROUTE_LEASE_MAX_EXECUTION_ID_BYTES, ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES, ROUTE_LEASE_MAX_MODEL_BYTES, ROUTE_LEASE_MAX_SESSION_ID_BYTES, ROUTE_LEASE_MAX_TTL_SECONDS, ROUTE_LEASE_REQUEST_SCHEMA, ROUTE_LEASE_RESULT_SCHEMA, ROUTE_LEASE_RUNTIMES, ROUTE_LEASE_RUNTIME_TABLE, ROUTE_LEASE_SESSION_HASH_DOMAIN, ResponsesAffinityStore, type ResponsesCompactRegistrationOptions, ResponsesHostedImageIngress, ResponsesHostedImageRuntimeFactory, RouteContext, type RouteLeaseCapabilities, type RouteLeaseClock, type RouteLeaseCreateOutcome, type RouteLeaseCreateResult, type RouteLeaseDescriptorPort, RouteLeaseError, type RouteLeaseErrorCode, type RouteLeaseExecutionMetadata, type RouteLeaseExecutionRequest, type RouteLeaseLogger, RouteLeaseManager, type RouteLeaseManagerOptions, type RouteLeaseMetadata, type RouteLeaseProviderKeyPreflight, type RouteLeaseReleaseResult, type RouteLeaseRenewResult, type RouteLeaseRequest, type RouteLeaseRoutePort, type RouteLeaseRuntime, type RouteLeaseStatus, type RouteLeaseSubscriptionPreflight, RouteLeaseTargetResolver, type RouteLeaseTargetResolverOptions, type RouteLeaseTargetResolverPort, type RouteLeaseUpstream, RouteRegistrationOptions, type RuntimeLaunchDescriptor, SYSTEM_ROUTE_LEASE_CLOCK, __resetProviderProxyForTests, canonicalizeRouteLeasePayload, createNativeResponsesHostedImageIngress, createResponsesCompactHandler, extractRouteToken, getProviderProxy, hashRouteLeasePayload, hashRouteLeaseSessionId, normalizeRouteLeaseIdempotencyKey, normalizeRouteLeaseTtl, parseRouteLeaseCreate, registerResponsesCompactOperation, routeLeaseRuntime };
|
package/dist/provider-proxy.js
CHANGED
|
@@ -18,76 +18,86 @@ import {
|
|
|
18
18
|
ROUTE_LEASE_RUNTIMES,
|
|
19
19
|
ROUTE_LEASE_RUNTIME_TABLE,
|
|
20
20
|
ROUTE_LEASE_SESSION_HASH_DOMAIN,
|
|
21
|
+
ResponsesAffinityStore,
|
|
21
22
|
RouteLeaseError,
|
|
22
23
|
RouteLeaseManager,
|
|
23
24
|
RouteLeaseTargetResolver,
|
|
24
25
|
SYSTEM_ROUTE_LEASE_CLOCK,
|
|
25
26
|
__resetProviderProxyForTests,
|
|
26
27
|
canonicalizeRouteLeasePayload,
|
|
28
|
+
classifyResponsesProfile,
|
|
29
|
+
createNativeResponsesHostedImageIngress,
|
|
30
|
+
createResponsesCompactHandler,
|
|
27
31
|
extractRouteToken,
|
|
28
32
|
getProviderProxy,
|
|
33
|
+
getResponsesAffinityStore,
|
|
29
34
|
hashRouteLeasePayload,
|
|
30
35
|
hashRouteLeaseSessionId,
|
|
31
36
|
isLoopbackAddress,
|
|
32
37
|
normalizeRouteLeaseIdempotencyKey,
|
|
33
38
|
normalizeRouteLeaseTtl,
|
|
34
39
|
parseRouteLeaseCreate,
|
|
40
|
+
previousResponseNotFound,
|
|
41
|
+
registerResponsesCompactOperation,
|
|
35
42
|
routeLeaseRuntime
|
|
36
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-WSJE42SG.js";
|
|
37
44
|
import "./chunk-VVEHS2LI.js";
|
|
38
45
|
import "./chunk-WTQMX2Q6.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-EYGBM2VC.js";
|
|
47
|
+
import "./chunk-DK4A7DLE.js";
|
|
48
|
+
import "./chunk-FJNKXOWE.js";
|
|
49
|
+
import "./chunk-V53ZEFXC.js";
|
|
50
|
+
import "./chunk-7PIUVCKK.js";
|
|
51
|
+
import "./chunk-6OC3ORW6.js";
|
|
43
52
|
import "./chunk-FU7EAR73.js";
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-LFEH7CEO.js";
|
|
54
|
+
import "./chunk-HN74IGEO.js";
|
|
55
|
+
import "./chunk-QIIAMBTM.js";
|
|
46
56
|
import "./chunk-FXR6N3SR.js";
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-WNKWAEUR.js";
|
|
57
|
+
import "./chunk-AQDON6MB.js";
|
|
49
58
|
import "./chunk-MZNPGW5Q.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-XXFYLL7R.js";
|
|
59
|
+
import "./chunk-ECZ3ZE2C.js";
|
|
52
60
|
import "./chunk-XTEI64OU.js";
|
|
53
61
|
import "./chunk-XX6NQJMA.js";
|
|
54
62
|
import "./chunk-GFIZ6LQI.js";
|
|
55
63
|
import "./chunk-OE6TDIWW.js";
|
|
56
64
|
import "./chunk-DRWHTIIZ.js";
|
|
65
|
+
import "./chunk-X335TJNS.js";
|
|
66
|
+
import "./chunk-HOMUGKHR.js";
|
|
57
67
|
import "./chunk-JWC6APFQ.js";
|
|
58
68
|
import "./chunk-5ERIZW3D.js";
|
|
59
69
|
import "./chunk-PO3XB56Z.js";
|
|
60
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-V2UKUTJ3.js";
|
|
61
71
|
import "./chunk-23S5OPIO.js";
|
|
62
72
|
import "./chunk-AVYJ4YBN.js";
|
|
63
73
|
import "./chunk-OPRS4IQZ.js";
|
|
64
74
|
import "./chunk-2JYRIADS.js";
|
|
65
|
-
import "./chunk-
|
|
66
|
-
import "./chunk-
|
|
75
|
+
import "./chunk-6OKXH2TW.js";
|
|
76
|
+
import "./chunk-WNY4WMRF.js";
|
|
77
|
+
import "./chunk-N76KU6F5.js";
|
|
67
78
|
import "./chunk-WLYIIEAF.js";
|
|
68
79
|
import "./chunk-TKJMZBAH.js";
|
|
80
|
+
import "./chunk-OZFM4X3S.js";
|
|
69
81
|
import "./chunk-3QFXFCHG.js";
|
|
70
|
-
import "./chunk-
|
|
82
|
+
import "./chunk-U47LQXPB.js";
|
|
71
83
|
import "./chunk-AQ5TNQB7.js";
|
|
72
84
|
import "./chunk-XEKD23J5.js";
|
|
85
|
+
import "./chunk-Y7FO65VT.js";
|
|
86
|
+
import "./chunk-FMOBD2OQ.js";
|
|
87
|
+
import "./chunk-HUZZZ3JL.js";
|
|
73
88
|
import "./chunk-H5JUT3KV.js";
|
|
74
|
-
import "./chunk-7C7DET6S.js";
|
|
75
|
-
import "./chunk-K5NM7VAH.js";
|
|
76
|
-
import "./chunk-WNY4WMRF.js";
|
|
77
|
-
import "./chunk-OZFM4X3S.js";
|
|
78
89
|
import "./chunk-5NJLQ6T6.js";
|
|
79
|
-
import "./chunk-
|
|
80
|
-
import "./chunk-
|
|
90
|
+
import "./chunk-4VVCXVB7.js";
|
|
91
|
+
import "./chunk-R4VCO2CB.js";
|
|
81
92
|
import "./chunk-WYVGULTQ.js";
|
|
82
|
-
import "./chunk-
|
|
83
|
-
import "./chunk-
|
|
93
|
+
import "./chunk-ZLNHPUFA.js";
|
|
94
|
+
import "./chunk-CFSGYFOZ.js";
|
|
84
95
|
import "./chunk-3WD4HTR2.js";
|
|
85
96
|
import "./chunk-MKF46GNZ.js";
|
|
86
97
|
import "./chunk-GL6XM527.js";
|
|
98
|
+
import "./chunk-DEIUR2TH.js";
|
|
99
|
+
import "./chunk-4JOU54M5.js";
|
|
87
100
|
import "./chunk-CDHS2QDC.js";
|
|
88
|
-
import "./chunk-Y7FO65VT.js";
|
|
89
|
-
import "./chunk-FMOBD2OQ.js";
|
|
90
|
-
import "./chunk-HUZZZ3JL.js";
|
|
91
101
|
export {
|
|
92
102
|
DEFAULT_ROUTE_IDLE_MS,
|
|
93
103
|
ProviderProxy,
|
|
@@ -108,19 +118,26 @@ export {
|
|
|
108
118
|
ROUTE_LEASE_RUNTIMES,
|
|
109
119
|
ROUTE_LEASE_RUNTIME_TABLE,
|
|
110
120
|
ROUTE_LEASE_SESSION_HASH_DOMAIN,
|
|
121
|
+
ResponsesAffinityStore,
|
|
111
122
|
RouteLeaseError,
|
|
112
123
|
RouteLeaseManager,
|
|
113
124
|
RouteLeaseTargetResolver,
|
|
114
125
|
SYSTEM_ROUTE_LEASE_CLOCK,
|
|
115
126
|
__resetProviderProxyForTests,
|
|
116
127
|
canonicalizeRouteLeasePayload,
|
|
128
|
+
classifyResponsesProfile,
|
|
129
|
+
createNativeResponsesHostedImageIngress,
|
|
130
|
+
createResponsesCompactHandler,
|
|
117
131
|
extractRouteToken,
|
|
118
132
|
getProviderProxy,
|
|
133
|
+
getResponsesAffinityStore,
|
|
119
134
|
hashRouteLeasePayload,
|
|
120
135
|
hashRouteLeaseSessionId,
|
|
121
136
|
isLoopbackAddress,
|
|
122
137
|
normalizeRouteLeaseIdempotencyKey,
|
|
123
138
|
normalizeRouteLeaseTtl,
|
|
124
139
|
parseRouteLeaseCreate,
|
|
140
|
+
previousResponseNotFound,
|
|
141
|
+
registerResponsesCompactOperation,
|
|
125
142
|
routeLeaseRuntime
|
|
126
143
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
2
|
-
import { IngressFormat, RouteContext } from './
|
|
3
|
-
import { s as OutboundEndpoint,
|
|
2
|
+
import { D as IngressFormat, aD as RouteContext } from './types-CVRge76p.js';
|
|
3
|
+
import { s as OutboundEndpoint, T as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-5T223WYQ.js';
|
|
4
4
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -109,6 +109,8 @@ declare function resolveRoute(args: {
|
|
|
109
109
|
* proxy's internal route minting, so internal usage records `apiKeyId: null`.
|
|
110
110
|
*/
|
|
111
111
|
apiKeyId?: string;
|
|
112
|
+
/** Least-authority fact derived by the authenticated outbound router. */
|
|
113
|
+
hostedImageGenerationAllowed?: boolean;
|
|
112
114
|
}): Promise<RouteResolveResult>;
|
|
113
115
|
|
|
114
116
|
export { type RouteResolveError as R, SUBSCRIPTION_PROVIDER_IDS as S, pickModelRefFromList as a, type RouteResolveResult as b, endpointSupportsSubscription as e, isSubscriptionProviderId as i, parseModelRef as p, resolveRoute as r };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
2
|
-
import { IngressFormat, RouteContext } from './
|
|
3
|
-
import { s as OutboundEndpoint,
|
|
2
|
+
import { D as IngressFormat, aD as RouteContext } from './types-DsHBBk3h.cjs';
|
|
3
|
+
import { s as OutboundEndpoint, T as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-jjU24eYG.cjs';
|
|
4
4
|
import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -109,6 +109,8 @@ declare function resolveRoute(args: {
|
|
|
109
109
|
* proxy's internal route minting, so internal usage records `apiKeyId: null`.
|
|
110
110
|
*/
|
|
111
111
|
apiKeyId?: string;
|
|
112
|
+
/** Least-authority fact derived by the authenticated outbound router. */
|
|
113
|
+
hostedImageGenerationAllowed?: boolean;
|
|
112
114
|
}): Promise<RouteResolveResult>;
|
|
113
115
|
|
|
114
116
|
export { type RouteResolveError as R, SUBSCRIPTION_PROVIDER_IDS as S, pickModelRefFromList as a, type RouteResolveResult as b, endpointSupportsSubscription as e, isSubscriptionProviderId as i, parseModelRef as p, resolveRoute as r };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk7ZHBN75Ncjs = require('../chunk-7ZHBN75N.cjs');
|
|
4
4
|
require('../chunk-GBHYAGX3.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.TransformerChainExecutor =
|
|
7
|
+
exports.TransformerChainExecutor = _chunk7ZHBN75Ncjs.TransformerChainExecutor;
|
|
@@ -6,8 +6,8 @@ import '@omnicross/contracts/completion-types';
|
|
|
6
6
|
* TransformerChainExecutor - Executes transformer chains for requests and responses
|
|
7
7
|
*
|
|
8
8
|
* Implements the transformer pipeline:
|
|
9
|
-
* Request: transformRequestOut
|
|
10
|
-
* Response: Model transformers (reverse)
|
|
9
|
+
* Request: transformRequestOut → Provider transformers → Model transformers → HTTP
|
|
10
|
+
* Response: Model transformers (reverse) → Provider transformers (reverse) → transformResponseIn
|
|
11
11
|
*
|
|
12
12
|
* @module transformer/TransformerChainExecutor
|
|
13
13
|
*/
|
|
@@ -6,8 +6,8 @@ import '@omnicross/contracts/completion-types';
|
|
|
6
6
|
* TransformerChainExecutor - Executes transformer chains for requests and responses
|
|
7
7
|
*
|
|
8
8
|
* Implements the transformer pipeline:
|
|
9
|
-
* Request: transformRequestOut
|
|
10
|
-
* Response: Model transformers (reverse)
|
|
9
|
+
* Request: transformRequestOut → Provider transformers → Model transformers → HTTP
|
|
10
|
+
* Response: Model transformers (reverse) → Provider transformers (reverse) → transformResponseIn
|
|
11
11
|
*
|
|
12
12
|
* @module transformer/TransformerChainExecutor
|
|
13
13
|
*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunk6DDYNS2Bcjs = require('../../chunk-6DDYNS2B.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
exports.DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS = _chunk6DDYNS2Bcjs.DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS; exports.__resetStopReasonContentFilterCountForTests = _chunk6DDYNS2Bcjs.__resetStopReasonContentFilterCountForTests; exports.convertOpenAIStreamToAnthropic = _chunk6DDYNS2Bcjs.convertOpenAIStreamToAnthropic; exports.getAnthropicPingHeartbeatMs = _chunk6DDYNS2Bcjs.getAnthropicPingHeartbeatMs; exports.setAnthropicPingHeartbeatMs = _chunk6DDYNS2Bcjs.setAnthropicPingHeartbeatMs; exports.stopReasonContentFilterCount = _chunk6DDYNS2Bcjs.stopReasonContentFilterCount;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TransformerContext, TransformerLogger } from '../types.cjs';
|
|
2
|
+
import '@omnicross/contracts/llm-config';
|
|
3
|
+
import '@omnicross/contracts/completion-types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AnthropicOpenAIToAnthropicStream - OpenAI SSE -> Anthropic event SSE conversion.
|
|
7
|
+
*
|
|
8
|
+
* Internal helper of `./AnthropicStreaming`; do not import the facade here.
|
|
9
|
+
*
|
|
10
|
+
* claude-api-protocol-fidelity (R6) hardening, all scoped to THIS converter (the
|
|
11
|
+
* translation path's synthesizer — the same-format verbatim relay never runs
|
|
12
|
+
* it, so synthesized frames structurally cannot leak into pass-through
|
|
13
|
+
* traffic):
|
|
14
|
+
* - `message_start` backfills the upstream usage known at emission time;
|
|
15
|
+
* - in-band `error` events use the official `{"type":"error","error":{…}}`
|
|
16
|
+
* shape with the upstream text preserved verbatim;
|
|
17
|
+
* - the finish_reason map carries `content_filter→refusal` (+ `refusal` /
|
|
18
|
+
* `pause_turn` placeholders) with an observable warning counter;
|
|
19
|
+
* - a lazy idle-timeout ping heartbeat keeps silent streams alive (Claude
|
|
20
|
+
* Code's 300s byte watchdog), armed only while idle and cleaned up on
|
|
21
|
+
* end/error/cancel.
|
|
22
|
+
*
|
|
23
|
+
* @module transformer/transformers/AnthropicOpenAIToAnthropicStream
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Default synthetic-ping interval (ms). ≤0 disables the heartbeat. */
|
|
27
|
+
declare const DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS = 20000;
|
|
28
|
+
/**
|
|
29
|
+
* Hot-set the synthetic-ping interval (claude-api-protocol-fidelity §10
|
|
30
|
+
* `anthropic.heartbeatIntervalMs`). Takes effect at each stream's NEXT timer
|
|
31
|
+
* arm — in-flight streams are never interrupted. `undefined`/`NaN` resets to
|
|
32
|
+
* the default; ≤0 disables the heartbeat entirely.
|
|
33
|
+
*/
|
|
34
|
+
declare function setAnthropicPingHeartbeatMs(ms: number | undefined): void;
|
|
35
|
+
/** The current synthetic-ping interval (ms); ≤0 means disabled. */
|
|
36
|
+
declare function getAnthropicPingHeartbeatMs(): number;
|
|
37
|
+
/**
|
|
38
|
+
* Observable counter for `content_filter→refusal` remaps (the §9 minimal
|
|
39
|
+
* observability seam — the repo has no metrics registry, so an exported
|
|
40
|
+
* counter + console.warn). Reset only via the test helper.
|
|
41
|
+
*/
|
|
42
|
+
declare let stopReasonContentFilterCount: number;
|
|
43
|
+
/** Test-only counter reset (keeps the exported binding read-only by convention). */
|
|
44
|
+
declare function __resetStopReasonContentFilterCountForTests(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Convert OpenAI SSE stream to Anthropic event stream.
|
|
47
|
+
*
|
|
48
|
+
* Accepts an optional `logger` for non-fatal parse-error reporting (matches
|
|
49
|
+
* the AnthropicTransformer facade's previous `this.logger?.error` behaviour).
|
|
50
|
+
*/
|
|
51
|
+
declare function convertOpenAIStreamToAnthropic(openaiStream: ReadableStream<Uint8Array>, _context?: TransformerContext, logger?: TransformerLogger): ReadableStream<Uint8Array>;
|
|
52
|
+
|
|
53
|
+
export { DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS, __resetStopReasonContentFilterCountForTests, convertOpenAIStreamToAnthropic, getAnthropicPingHeartbeatMs, setAnthropicPingHeartbeatMs, stopReasonContentFilterCount };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TransformerContext, TransformerLogger } from '../types.js';
|
|
2
|
+
import '@omnicross/contracts/llm-config';
|
|
3
|
+
import '@omnicross/contracts/completion-types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* AnthropicOpenAIToAnthropicStream - OpenAI SSE -> Anthropic event SSE conversion.
|
|
7
|
+
*
|
|
8
|
+
* Internal helper of `./AnthropicStreaming`; do not import the facade here.
|
|
9
|
+
*
|
|
10
|
+
* claude-api-protocol-fidelity (R6) hardening, all scoped to THIS converter (the
|
|
11
|
+
* translation path's synthesizer — the same-format verbatim relay never runs
|
|
12
|
+
* it, so synthesized frames structurally cannot leak into pass-through
|
|
13
|
+
* traffic):
|
|
14
|
+
* - `message_start` backfills the upstream usage known at emission time;
|
|
15
|
+
* - in-band `error` events use the official `{"type":"error","error":{…}}`
|
|
16
|
+
* shape with the upstream text preserved verbatim;
|
|
17
|
+
* - the finish_reason map carries `content_filter→refusal` (+ `refusal` /
|
|
18
|
+
* `pause_turn` placeholders) with an observable warning counter;
|
|
19
|
+
* - a lazy idle-timeout ping heartbeat keeps silent streams alive (Claude
|
|
20
|
+
* Code's 300s byte watchdog), armed only while idle and cleaned up on
|
|
21
|
+
* end/error/cancel.
|
|
22
|
+
*
|
|
23
|
+
* @module transformer/transformers/AnthropicOpenAIToAnthropicStream
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Default synthetic-ping interval (ms). ≤0 disables the heartbeat. */
|
|
27
|
+
declare const DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS = 20000;
|
|
28
|
+
/**
|
|
29
|
+
* Hot-set the synthetic-ping interval (claude-api-protocol-fidelity §10
|
|
30
|
+
* `anthropic.heartbeatIntervalMs`). Takes effect at each stream's NEXT timer
|
|
31
|
+
* arm — in-flight streams are never interrupted. `undefined`/`NaN` resets to
|
|
32
|
+
* the default; ≤0 disables the heartbeat entirely.
|
|
33
|
+
*/
|
|
34
|
+
declare function setAnthropicPingHeartbeatMs(ms: number | undefined): void;
|
|
35
|
+
/** The current synthetic-ping interval (ms); ≤0 means disabled. */
|
|
36
|
+
declare function getAnthropicPingHeartbeatMs(): number;
|
|
37
|
+
/**
|
|
38
|
+
* Observable counter for `content_filter→refusal` remaps (the §9 minimal
|
|
39
|
+
* observability seam — the repo has no metrics registry, so an exported
|
|
40
|
+
* counter + console.warn). Reset only via the test helper.
|
|
41
|
+
*/
|
|
42
|
+
declare let stopReasonContentFilterCount: number;
|
|
43
|
+
/** Test-only counter reset (keeps the exported binding read-only by convention). */
|
|
44
|
+
declare function __resetStopReasonContentFilterCountForTests(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Convert OpenAI SSE stream to Anthropic event stream.
|
|
47
|
+
*
|
|
48
|
+
* Accepts an optional `logger` for non-fatal parse-error reporting (matches
|
|
49
|
+
* the AnthropicTransformer facade's previous `this.logger?.error` behaviour).
|
|
50
|
+
*/
|
|
51
|
+
declare function convertOpenAIStreamToAnthropic(openaiStream: ReadableStream<Uint8Array>, _context?: TransformerContext, logger?: TransformerLogger): ReadableStream<Uint8Array>;
|
|
52
|
+
|
|
53
|
+
export { DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS, __resetStopReasonContentFilterCountForTests, convertOpenAIStreamToAnthropic, getAnthropicPingHeartbeatMs, setAnthropicPingHeartbeatMs, stopReasonContentFilterCount };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS,
|
|
3
|
+
__resetStopReasonContentFilterCountForTests,
|
|
4
|
+
convertOpenAIStreamToAnthropic,
|
|
5
|
+
getAnthropicPingHeartbeatMs,
|
|
6
|
+
setAnthropicPingHeartbeatMs,
|
|
7
|
+
stopReasonContentFilterCount
|
|
8
|
+
} from "../../chunk-LFEH7CEO.js";
|
|
9
|
+
export {
|
|
10
|
+
DEFAULT_ANTHROPIC_PING_HEARTBEAT_MS,
|
|
11
|
+
__resetStopReasonContentFilterCountForTests,
|
|
12
|
+
convertOpenAIStreamToAnthropic,
|
|
13
|
+
getAnthropicPingHeartbeatMs,
|
|
14
|
+
setAnthropicPingHeartbeatMs,
|
|
15
|
+
stopReasonContentFilterCount
|
|
16
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkSQMAEDNEcjs = require('../../chunk-SQMAEDNE.cjs');
|
|
4
4
|
require('../../chunk-5RSZYQJH.cjs');
|
|
5
|
+
require('../../chunk-6DDYNS2B.cjs');
|
|
5
6
|
require('../../chunk-77USGNRW.cjs');
|
|
6
|
-
require('../../chunk-
|
|
7
|
+
require('../../chunk-IUL4VWNU.cjs');
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
exports.AnthropicTransformer =
|
|
10
|
+
exports.AnthropicTransformer = _chunkSQMAEDNEcjs.AnthropicTransformer;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnthropicTransformer
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-6OC3ORW6.js";
|
|
4
4
|
import "../../chunk-FU7EAR73.js";
|
|
5
|
+
import "../../chunk-LFEH7CEO.js";
|
|
5
6
|
import "../../chunk-WYVGULTQ.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
+
import "../../chunk-ZLNHPUFA.js";
|
|
7
8
|
export {
|
|
8
9
|
AnthropicTransformer
|
|
9
10
|
};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('../../chunk-
|
|
6
|
+
var _chunkVXRTQZF2cjs = require('../../chunk-VXRTQZF2.cjs');
|
|
7
|
+
require('../../chunk-WX2E2G7H.cjs');
|
|
8
8
|
require('../../chunk-77USGNRW.cjs');
|
|
9
|
-
require('../../chunk-
|
|
9
|
+
require('../../chunk-IUL4VWNU.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
exports.GeminiCodeAssistTransformer =
|
|
15
|
+
exports.GeminiCodeAssistTransformer = _chunkVXRTQZF2cjs.GeminiCodeAssistTransformer; exports.buildCodeAssistUrl = _chunkVXRTQZF2cjs.buildCodeAssistUrl; exports.resolveCodeAssistApiVersion = _chunkVXRTQZF2cjs.resolveCodeAssistApiVersion; exports.resolveCodeAssistEndpoint = _chunkVXRTQZF2cjs.resolveCodeAssistEndpoint;
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
buildCodeAssistUrl,
|
|
4
4
|
resolveCodeAssistApiVersion,
|
|
5
5
|
resolveCodeAssistEndpoint
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-4VVCXVB7.js";
|
|
7
|
+
import "../../chunk-R4VCO2CB.js";
|
|
8
8
|
import "../../chunk-WYVGULTQ.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-ZLNHPUFA.js";
|
|
10
10
|
export {
|
|
11
11
|
GeminiCodeAssistTransformer,
|
|
12
12
|
buildCodeAssistUrl,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var _chunkKIQ2HA2Acjs = require('../../chunk-KIQ2HA2A.cjs');
|
|
4
|
+
require('../../chunk-WX2E2G7H.cjs');
|
|
5
5
|
require('../../chunk-77USGNRW.cjs');
|
|
6
|
-
require('../../chunk-
|
|
6
|
+
require('../../chunk-IUL4VWNU.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.GeminiTransformer =
|
|
9
|
+
exports.GeminiTransformer = _chunkKIQ2HA2Acjs.GeminiTransformer;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GeminiTransformer
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-HN74IGEO.js";
|
|
4
|
+
import "../../chunk-R4VCO2CB.js";
|
|
5
5
|
import "../../chunk-WYVGULTQ.js";
|
|
6
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-ZLNHPUFA.js";
|
|
7
7
|
export {
|
|
8
8
|
GeminiTransformer
|
|
9
9
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNOITAVHAcjs = require('../../chunk-NOITAVHA.cjs');
|
|
4
4
|
require('../../chunk-5RSZYQJH.cjs');
|
|
5
|
-
require('../../chunk-
|
|
5
|
+
require('../../chunk-IUL4VWNU.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.OpenAIResponseTransformer =
|
|
8
|
+
exports.OpenAIResponseTransformer = _chunkNOITAVHAcjs.OpenAIResponseTransformer;
|