@omnicross/core 0.1.10 → 0.2.1
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/README.md +7 -0
- package/dist/{BuiltinToolExecutor-CS2WpXhM.d.cts → BuiltinToolExecutor-BHgH-EaZ.d.cts} +25 -2
- package/dist/{BuiltinToolExecutor-BluWyeob.d.ts → BuiltinToolExecutor-Bi1LmiTP.d.ts} +25 -2
- package/dist/{CompletionService-kNA17cfI.d.cts → CompletionService-BniP7j88.d.cts} +2 -2
- package/dist/{CompletionService-C3BX0Ovy.d.ts → CompletionService-BqrKPwfA.d.ts} +2 -2
- package/dist/{ProviderProxy-QdwNV6l1.d.cts → ProviderProxy-Bz_nkOwq.d.cts} +1 -1
- package/dist/{ProviderProxy--ROec6VI.d.ts → ProviderProxy-Ckr6oTrE.d.ts} +1 -1
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +6 -6
- package/dist/auth/GeminiCodeAssistProjectResolver.js +4 -4
- package/dist/{chunk-NGYOO5TO.js → chunk-2C3TTBS7.js} +7 -7
- package/dist/{chunk-QUSEZNYS.cjs → chunk-32SRZFFP.cjs} +4 -1
- package/dist/chunk-4JOU54M5.js +200 -0
- package/dist/{chunk-2UTGX6FM.js → chunk-4VVCXVB7.js} +1 -1
- package/dist/{chunk-RJUONLUQ.cjs → chunk-4Z3ZLLC2.cjs} +14 -8
- package/dist/chunk-6DDYNS2B.cjs +384 -0
- package/dist/{chunk-GXEZ2R3E.js → chunk-6OKXH2TW.js} +18 -7
- package/dist/{chunk-YWL7YZWS.cjs → chunk-7LRTPNFL.cjs} +5 -0
- package/dist/{chunk-CCVRRJOX.js → chunk-7PIUVCKK.js} +9 -2
- package/dist/chunk-7RJI3NDI.cjs +236 -0
- package/dist/{chunk-IIRPUVPH.cjs → chunk-7ZHBN75N.cjs} +3 -1
- package/dist/chunk-D4WNI6BR.cjs +386 -0
- package/dist/chunk-DBBR6RHF.js +236 -0
- package/dist/chunk-E4QHVXV5.cjs +118 -0
- package/dist/{chunk-HKB656B4.js → chunk-EUZRH544.js} +55 -287
- package/dist/{chunk-WNKWAEUR.js → chunk-EYGBM2VC.js} +3 -1
- package/dist/{chunk-UWDW6PN3.cjs → chunk-FX325I5Q.cjs} +20 -9
- package/dist/chunk-G4CZIUIB.cjs +200 -0
- package/dist/chunk-HCOQQAZE.cjs +123 -0
- package/dist/chunk-HL2YSPL7.cjs +673 -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-LFPQ2OVH.js +386 -0
- package/dist/{chunk-FEBAQI5A.js → chunk-LKDAN4D7.js} +6363 -1350
- package/dist/chunk-LQYS2N47.js +3923 -0
- package/dist/{chunk-NZYN7C3P.cjs → chunk-MPXOKQJP.cjs} +53 -53
- package/dist/chunk-MZEGQSKQ.js +118 -0
- package/dist/chunk-N76KU6F5.js +123 -0
- package/dist/chunk-NLUOTJWB.js +673 -0
- package/dist/{chunk-CMVXX7ON.cjs → chunk-NOITAVHA.cjs} +114 -58
- package/dist/{chunk-Q27JY5RG.cjs → chunk-OIKREZVQ.cjs} +7 -4
- package/dist/{chunk-ZQQUD66M.cjs → chunk-POUTD5AM.cjs} +63 -295
- package/dist/{chunk-6D4W22P4.js → chunk-QIIAMBTM.js} +4 -1
- package/dist/{chunk-56QD3YW6.cjs → chunk-QWNUOR7F.cjs} +11 -4
- package/dist/{chunk-S3DYFEBE.js → chunk-R4VCO2CB.js} +10 -1
- package/dist/{chunk-4VZX5F4T.cjs → chunk-T6NWPIYZ.cjs} +5 -2
- package/dist/{chunk-EBLFCNPY.js → chunk-U47LQXPB.js} +5 -2
- package/dist/chunk-UPQIWJIE.cjs +3923 -0
- package/dist/{chunk-N7OOJI5V.js → chunk-V2UKUTJ3.js} +5 -0
- package/dist/{chunk-45FHEOKW.js → chunk-V53ZEFXC.js} +92 -36
- package/dist/{chunk-RJ5ZGNI3.js → chunk-VL5TUDTM.js} +8 -2
- package/dist/{chunk-TIT74RIL.cjs → chunk-VSYQ6XYN.cjs} +6837 -1824
- package/dist/{chunk-OC6DOOFX.cjs → chunk-VXRTQZF2.cjs} +5 -5
- package/dist/{chunk-RICPANBY.cjs → chunk-WX2E2G7H.cjs} +13 -4
- package/dist/{chunk-DE2SRBFZ.js → chunk-X335TJNS.js} +4 -3
- package/dist/{chunk-CDHS2QDC.js → chunk-Y4CRNHJO.js} +53 -53
- package/dist/{chunk-P7EM6BND.cjs → chunk-ZAPN7XA6.cjs} +10 -10
- package/dist/{chunk-N2EIM2XJ.js → chunk-ZLNHPUFA.js} +22 -1
- package/dist/completion/BuiltinToolExecutor.cjs +2 -2
- package/dist/completion/BuiltinToolExecutor.d.cts +3 -1
- package/dist/completion/BuiltinToolExecutor.d.ts +3 -1
- package/dist/completion/BuiltinToolExecutor.js +1 -1
- package/dist/completion/CompletionService.cjs +32 -28
- package/dist/completion/CompletionService.d.cts +7 -3
- package/dist/completion/CompletionService.d.ts +7 -3
- package/dist/completion/CompletionService.js +31 -27
- package/dist/completion.cjs +40 -36
- package/dist/completion.d.cts +7 -3
- package/dist/completion.d.ts +7 -3
- package/dist/completion.js +39 -35
- package/dist/egress-I46O_p5L.d.cts +126 -0
- package/dist/egress-I46O_p5L.d.ts +126 -0
- package/dist/frontends-Doz0RaWu.d.cts +97 -0
- package/dist/frontends-Doz0RaWu.d.ts +97 -0
- package/dist/image-generation.cjs +52 -0
- package/dist/image-generation.d.cts +96 -0
- package/dist/image-generation.d.ts +96 -0
- package/dist/image-generation.js +52 -0
- package/dist/index.cjs +142 -32
- package/dist/index.d.cts +16 -8
- package/dist/index.d.ts +16 -8
- package/dist/index.js +159 -49
- package/dist/openai-operation.cjs +18 -0
- package/dist/openai-operation.d.cts +22 -0
- package/dist/openai-operation.d.ts +22 -0
- package/dist/openai-operation.js +18 -0
- package/dist/outbound-api/auditCapture.cjs +3 -3
- package/dist/outbound-api/auditCapture.d.cts +13 -2
- package/dist/outbound-api/auditCapture.d.ts +13 -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 +11 -4
- package/dist/outbound-api/routeResolver.d.ts +11 -4
- package/dist/outbound-api/routeResolver.js +1 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +5 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +5 -1
- package/dist/outbound-api/types.d.cts +10 -3
- package/dist/outbound-api/types.d.ts +10 -3
- package/dist/outbound-api.cjs +65 -33
- package/dist/outbound-api.d.cts +205 -10
- package/dist/outbound-api.d.ts +205 -10
- package/dist/outbound-api.js +64 -32
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +22 -15
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +22 -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 +10 -3
- package/dist/ports.d.ts +10 -3
- package/dist/provider-proxy/ProviderProxy.cjs +32 -28
- package/dist/provider-proxy/ProviderProxy.d.cts +6 -2
- package/dist/provider-proxy/ProviderProxy.d.ts +6 -2
- package/dist/provider-proxy/ProviderProxy.js +31 -27
- 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 +36 -28
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +41 -9
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +41 -9
- package/dist/provider-proxy/ingress/providerProxyShared.js +35 -27
- package/dist/provider-proxy/types.d.cts +17 -483
- package/dist/provider-proxy/types.d.ts +17 -483
- package/dist/provider-proxy.cjs +46 -28
- package/dist/provider-proxy.d.cts +34 -8
- package/dist/provider-proxy.d.ts +34 -8
- package/dist/provider-proxy.js +45 -27
- package/dist/proxy-UZTtjPZx.d.cts +18 -0
- package/dist/proxy-UZTtjPZx.d.ts +18 -0
- package/dist/{routeResolver-CVFE8KKe.d.cts → routeResolver-Da0yvkL1.d.cts} +4 -2
- package/dist/{routeResolver-C0mkkZaM.d.ts → routeResolver-STwMz_G4.d.ts} +4 -2
- package/dist/runtime-6QXNU526.cjs +8 -0
- package/dist/runtime-M5WXLD2R.js +8 -0
- package/dist/runtime-t8AZacFF.d.cts +233 -0
- package/dist/runtime-t8AZacFF.d.ts +233 -0
- package/dist/search/api.cjs +761 -0
- package/dist/search/api.d.cts +370 -0
- package/dist/search/api.d.ts +370 -0
- package/dist/search/api.js +761 -0
- package/dist/search/http.cjs +37 -0
- package/dist/search/http.d.cts +269 -0
- package/dist/search/http.d.ts +269 -0
- package/dist/search/http.js +37 -0
- package/dist/search.cjs +57 -0
- package/dist/search.d.cts +113 -0
- package/dist/search.d.ts +113 -0
- package/dist/search.js +57 -0
- 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 +11 -10
- package/dist/transformer/transformers.js +12 -11
- 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 +13 -12
- package/dist/types-BSIJdsyl.d.cts +1130 -0
- package/dist/types-Be-yt_6T.d.cts +196 -0
- package/dist/types-By9Tg6-I.d.ts +1130 -0
- package/dist/types-CbCZqLGg.d.cts +127 -0
- package/dist/types-CbCZqLGg.d.ts +127 -0
- package/dist/{types-C2MwkLah.d.cts → types-D-oHYusb.d.cts} +250 -21
- package/dist/types-Dm4_36V4.d.ts +196 -0
- package/dist/{types-BB8pxk_3.d.ts → types-Dvlpjn0d.d.ts} +250 -21
- package/dist/usage.cjs +2 -2
- package/dist/usage.d.cts +6 -1
- package/dist/usage.d.ts +6 -1
- package/dist/usage.js +1 -1
- package/package.json +71 -64
- package/dist/chunk-FCR77GYM.cjs +0 -33
- package/dist/chunk-K5NM7VAH.js +0 -33
- /package/dist/{chunk-XXFYLL7R.js → chunk-ECZ3ZE2C.js} +0 -0
- /package/dist/{chunk-3SCOLIPT.cjs → chunk-MXI2PWIC.cjs} +0 -0
|
@@ -3,26 +3,27 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZAPN7XA6cjs = require('../chunk-ZAPN7XA6.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkKIQ2HA2Acjs = require('../chunk-KIQ2HA2A.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkNOITAVHAcjs = require('../chunk-NOITAVHA.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
require('../chunk-5RSZYQJH.cjs');
|
|
15
|
+
var _chunkQWNUOR7Fcjs = require('../chunk-QWNUOR7F.cjs');
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
var
|
|
18
|
+
var _chunkPOUTD5AMcjs = require('../chunk-POUTD5AM.cjs');
|
|
19
|
+
require('../chunk-6DDYNS2B.cjs');
|
|
20
|
+
require('../chunk-5RSZYQJH.cjs');
|
|
20
21
|
|
|
21
22
|
|
|
22
|
-
var
|
|
23
|
-
require('../chunk-
|
|
23
|
+
var _chunkVXRTQZF2cjs = require('../chunk-VXRTQZF2.cjs');
|
|
24
|
+
require('../chunk-WX2E2G7H.cjs');
|
|
24
25
|
require('../chunk-77USGNRW.cjs');
|
|
25
|
-
require('../chunk-
|
|
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 =
|
|
37
|
+
exports.AnthropicTransformer = _chunkPOUTD5AMcjs.AnthropicTransformer; exports.BUILTIN_TRANSFORMER_NAMES = _chunkZAPN7XA6cjs.BUILTIN_TRANSFORMER_NAMES; exports.BuiltinTransformers = _chunkZAPN7XA6cjs.BuiltinTransformers; exports.GeminiCodeAssistTransformer = _chunkVXRTQZF2cjs.GeminiCodeAssistTransformer; exports.GeminiTransformer = _chunkKIQ2HA2Acjs.GeminiTransformer; exports.OpenAIResponseTransformer = _chunkNOITAVHAcjs.OpenAIResponseTransformer; exports.OpenAITransformer = _chunkQWNUOR7Fcjs.OpenAITransformer; exports.getBuiltinTransformers = _chunkZAPN7XA6cjs.getBuiltinTransformers; exports.registerBuiltinTransformers = _chunkZAPN7XA6cjs.registerBuiltinTransformers;
|
|
@@ -3,26 +3,27 @@ import {
|
|
|
3
3
|
BuiltinTransformers,
|
|
4
4
|
getBuiltinTransformers,
|
|
5
5
|
registerBuiltinTransformers
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import {
|
|
8
|
-
AnthropicTransformer
|
|
9
|
-
} from "../chunk-HKB656B4.js";
|
|
6
|
+
} from "../chunk-2C3TTBS7.js";
|
|
10
7
|
import {
|
|
11
8
|
GeminiTransformer
|
|
12
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-HN74IGEO.js";
|
|
13
10
|
import {
|
|
14
11
|
OpenAIResponseTransformer
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-FU7EAR73.js";
|
|
12
|
+
} from "../chunk-V53ZEFXC.js";
|
|
17
13
|
import {
|
|
18
14
|
OpenAITransformer
|
|
19
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-7PIUVCKK.js";
|
|
16
|
+
import {
|
|
17
|
+
AnthropicTransformer
|
|
18
|
+
} from "../chunk-EUZRH544.js";
|
|
19
|
+
import "../chunk-LFEH7CEO.js";
|
|
20
|
+
import "../chunk-FU7EAR73.js";
|
|
20
21
|
import {
|
|
21
22
|
GeminiCodeAssistTransformer
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
23
|
+
} from "../chunk-4VVCXVB7.js";
|
|
24
|
+
import "../chunk-R4VCO2CB.js";
|
|
24
25
|
import "../chunk-WYVGULTQ.js";
|
|
25
|
-
import "../chunk-
|
|
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
|
-
*
|
|
6
|
+
* transformWarnings — the `_transformWarnings` audit side-channel
|
|
7
|
+
* (`claude-api-transform-fidelity`, R7 / design D2).
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
6
|
+
* transformWarnings — the `_transformWarnings` audit side-channel
|
|
7
|
+
* (`claude-api-transform-fidelity`, R7 / design D2).
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
-
*
|
|
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 */
|
package/dist/transformer.cjs
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-QVOB2DNX.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
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');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _chunkIIRPUVPHcjs = require('./chunk-IIRPUVPH.cjs');
|
|
4
|
+
var _chunk7ZHBN75Ncjs = require('./chunk-7ZHBN75N.cjs');
|
|
13
5
|
require('./chunk-GBHYAGX3.cjs');
|
|
14
6
|
|
|
15
7
|
|
|
16
8
|
var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkZAPN7XA6cjs = require('./chunk-ZAPN7XA6.cjs');
|
|
12
|
+
require('./chunk-KIQ2HA2A.cjs');
|
|
13
|
+
require('./chunk-NOITAVHA.cjs');
|
|
14
|
+
require('./chunk-QWNUOR7F.cjs');
|
|
15
|
+
require('./chunk-POUTD5AM.cjs');
|
|
16
|
+
require('./chunk-6DDYNS2B.cjs');
|
|
17
|
+
require('./chunk-5RSZYQJH.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
|
|
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 =
|
|
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 = _chunkZAPN7XA6cjs.registerBuiltinTransformers; exports.resolveReasoningEffort = _chunkIUL4VWNUcjs.resolveReasoningEffort; exports.resolveReasoningPlan = _chunkIUL4VWNUcjs.resolveReasoningPlan; exports.resolveReasoningTokenLimit = _chunkIUL4VWNUcjs.resolveReasoningTokenLimit; exports.resolveRequestReasoning = _chunkIUL4VWNUcjs.resolveRequestReasoning; exports.resolveTargetModelCapabilities = _chunkIUL4VWNUcjs.resolveTargetModelCapabilities;
|
package/dist/transformer.js
CHANGED
|
@@ -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-
|
|
4
|
+
} from "./chunk-EYGBM2VC.js";
|
|
13
5
|
import "./chunk-MZNPGW5Q.js";
|
|
14
6
|
import {
|
|
15
7
|
TransformerService
|
|
16
8
|
} from "./chunk-DK4A7DLE.js";
|
|
17
|
-
import
|
|
18
|
-
|
|
9
|
+
import {
|
|
10
|
+
registerBuiltinTransformers
|
|
11
|
+
} from "./chunk-2C3TTBS7.js";
|
|
12
|
+
import "./chunk-HN74IGEO.js";
|
|
13
|
+
import "./chunk-V53ZEFXC.js";
|
|
14
|
+
import "./chunk-7PIUVCKK.js";
|
|
15
|
+
import "./chunk-EUZRH544.js";
|
|
16
|
+
import "./chunk-LFEH7CEO.js";
|
|
17
|
+
import "./chunk-FU7EAR73.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-
|
|
30
|
+
} from "./chunk-ZLNHPUFA.js";
|
|
30
31
|
export {
|
|
31
32
|
THINK_LEVELS,
|
|
32
33
|
TransformerChainExecutor,
|