@omnicross/core 0.4.4 → 0.4.6
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/dist/{CompletionService-BniP7j88.d.cts → CompletionService-BJu4AWVc.d.cts} +1 -1
- package/dist/{CompletionService-BqrKPwfA.d.ts → CompletionService-C4W2gBi_.d.ts} +1 -1
- package/dist/{ProviderProxy-Ckr6oTrE.d.ts → ProviderProxy-DxsNi3cO.d.ts} +1 -1
- package/dist/{ProviderProxy-Bz_nkOwq.d.cts → ProviderProxy-OuQPYW2I.d.cts} +1 -1
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +4 -4
- package/dist/auth/GeminiCodeAssistProjectResolver.js +3 -3
- package/dist/{chunk-NKVZ6Z3Y.cjs → chunk-4HMAS74X.cjs} +8 -3
- package/dist/{chunk-MPFOC7AT.js → chunk-5XG6FR5F.js} +2 -2
- package/dist/{chunk-VFFCV4J6.cjs → chunk-CXRJMNJJ.cjs} +12 -6
- package/dist/{chunk-E5RCCGE7.cjs → chunk-DF5JXK36.cjs} +2 -2
- package/dist/{chunk-NCZDUBC2.js → chunk-DRUT7H5H.js} +1 -1
- package/dist/{chunk-RX3BCX53.cjs → chunk-DV7656NN.cjs} +1208 -527
- package/dist/{chunk-CGEZQC2G.cjs → chunk-F3TT5XPV.cjs} +2 -2
- package/dist/{chunk-EE7VP4O3.js → chunk-HQ7C3VB6.js} +1 -1
- package/dist/{chunk-ZJJBITUN.js → chunk-IAWLTZUP.js} +2 -2
- package/dist/{chunk-57Y2EA2G.cjs → chunk-JGRNVH7C.cjs} +1 -1
- package/dist/{chunk-NTF7TLT7.js → chunk-LBIXTHP7.js} +11 -5
- package/dist/{chunk-GWC7HCZI.cjs → chunk-LWBXQXZ3.cjs} +1 -1
- package/dist/{chunk-7PIUVCKK.js → chunk-MZCJL3QU.js} +1 -1
- package/dist/{chunk-K6J2RIEX.js → chunk-NDJSLJIA.js} +1 -1
- package/dist/{chunk-UOOLU64V.cjs → chunk-QLVRJ5FS.cjs} +4 -4
- package/dist/{chunk-F6P4DIBL.js → chunk-TLYFFUW4.js} +1 -1
- package/dist/{chunk-YV4JSBPA.js → chunk-TU4BB776.js} +789 -108
- package/dist/{chunk-GL6XM527.js → chunk-TX7ZM4OI.js} +8 -3
- package/dist/{chunk-ZMERU7D3.js → chunk-VXHN5IDL.js} +1 -1
- package/dist/{chunk-NDIBVTBZ.cjs → chunk-XYFCNDJK.cjs} +2 -2
- package/dist/{chunk-X6GHTNDL.cjs → chunk-ZG57GAVU.cjs} +7 -7
- package/dist/{chunk-QWNUOR7F.cjs → chunk-ZTN2PVKO.cjs} +1 -1
- package/dist/completion/CompletionService.cjs +12 -12
- package/dist/completion/CompletionService.d.cts +2 -2
- package/dist/completion/CompletionService.d.ts +2 -2
- package/dist/completion/CompletionService.js +11 -11
- package/dist/completion.cjs +12 -12
- package/dist/completion.d.cts +2 -2
- package/dist/completion.d.ts +2 -2
- package/dist/completion.js +11 -11
- package/dist/image-generation.d.cts +4 -4
- package/dist/image-generation.d.ts +4 -4
- package/dist/index.cjs +14 -12
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +13 -11
- package/dist/openai-operation.d.cts +1 -1
- package/dist/openai-operation.d.ts +1 -1
- package/dist/outbound-api/routeResolver.cjs +2 -2
- package/dist/outbound-api/routeResolver.d.cts +5 -5
- package/dist/outbound-api/routeResolver.d.ts +5 -5
- package/dist/outbound-api/routeResolver.js +1 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +9 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +9 -1
- package/dist/outbound-api/types.d.cts +5 -5
- package/dist/outbound-api/types.d.ts +5 -5
- package/dist/outbound-api.cjs +14 -12
- package/dist/outbound-api.d.cts +49 -8
- package/dist/outbound-api.d.ts +49 -8
- package/dist/outbound-api.js +13 -11
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +4 -4
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +4 -4
- package/dist/pipeline/AccountRouteActivity.cjs +2 -2
- package/dist/pipeline/AccountRouteActivity.d.cts +33 -8
- package/dist/pipeline/AccountRouteActivity.d.ts +33 -8
- package/dist/pipeline/AccountRouteActivity.js +1 -1
- package/dist/pipeline/SubscriptionAuthSource.d.cts +11 -0
- package/dist/pipeline/SubscriptionAuthSource.d.ts +11 -0
- package/dist/pipeline/upstreamFetch.cjs +3 -3
- package/dist/pipeline/upstreamFetch.d.cts +15 -1
- package/dist/pipeline/upstreamFetch.d.ts +15 -1
- package/dist/pipeline/upstreamFetch.js +2 -2
- package/dist/ports.d.cts +4 -4
- package/dist/ports.d.ts +4 -4
- package/dist/provider-proxy/ProviderProxy.cjs +12 -12
- package/dist/provider-proxy/ProviderProxy.d.cts +2 -2
- package/dist/provider-proxy/ProviderProxy.d.ts +2 -2
- package/dist/provider-proxy/ProviderProxy.js +11 -11
- package/dist/provider-proxy/identity/codexCliHeaders.d.cts +6 -4
- package/dist/provider-proxy/identity/codexCliHeaders.d.ts +6 -4
- package/dist/provider-proxy/identity/openCodeGoHeaders.cjs +2 -2
- package/dist/provider-proxy/identity/openCodeGoHeaders.js +1 -1
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +20 -12
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +54 -2
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +54 -2
- package/dist/provider-proxy/ingress/providerProxyShared.js +19 -11
- package/dist/provider-proxy/types.d.cts +1 -1
- package/dist/provider-proxy/types.d.ts +1 -1
- package/dist/provider-proxy.cjs +12 -12
- package/dist/provider-proxy.d.cts +6 -6
- package/dist/provider-proxy.d.ts +6 -6
- package/dist/provider-proxy.js +11 -11
- package/dist/{routeResolver-C2z0pp-q.d.cts → routeResolver-BQYMEXer.d.cts} +2 -2
- package/dist/{routeResolver-BLTleO4H.d.ts → routeResolver-DTfyzaFb.d.ts} +2 -2
- package/dist/transformer/transformers/AntigravityTransformer.cjs +6 -6
- package/dist/transformer/transformers/AntigravityTransformer.js +5 -5
- package/dist/transformer/transformers/OpenAITransformer.cjs +2 -2
- package/dist/transformer/transformers/OpenAITransformer.js +1 -1
- package/dist/transformer/transformers/antigravityFailover.cjs +7 -7
- package/dist/transformer/transformers/antigravityFailover.js +6 -6
- package/dist/transformer/transformers/antigravityIdentity.cjs +4 -4
- package/dist/transformer/transformers/antigravityIdentity.js +3 -3
- package/dist/transformer/transformers.cjs +9 -9
- package/dist/transformer/transformers.js +8 -8
- package/dist/transformer.cjs +9 -9
- package/dist/transformer.js +8 -8
- package/dist/{types-C6m-Db26.d.cts → types-BpSkj2JA.d.cts} +66 -5
- package/dist/{types-BVwJQ9ZS.d.cts → types-BsZ1s_a_.d.cts} +1 -1
- package/dist/{types-By9Tg6-I.d.ts → types-Di8VH1c9.d.ts} +12 -0
- package/dist/{types-BSIJdsyl.d.cts → types-Dpr5IAaP.d.cts} +12 -0
- package/dist/{types-Da735j2d.d.ts → types-EReErShW.d.ts} +66 -5
- package/dist/{types-VAHRysdP.d.ts → types-USaixzVP.d.ts} +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkZG57GAVUcjs = require('./chunk-ZG57GAVU.cjs');
|
|
4
4
|
|
|
5
5
|
// src/transformer/transformers/antigravityFailover.ts
|
|
6
6
|
var ANTIGRAVITY_SANDBOX_ENDPOINT = "https://daily-cloudcode-pa.sandbox.googleapis.com";
|
|
@@ -32,7 +32,7 @@ function maybeAntigravityFailoverUrl(failedUrl, status, bodyText, methodPath) {
|
|
|
32
32
|
} catch (e) {
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
if (parsed.origin !==
|
|
35
|
+
if (parsed.origin !== _chunkZG57GAVUcjs.ANTIGRAVITY_ENDPOINT) return null;
|
|
36
36
|
const tail = _nullishCoalesce(methodPath, () => ( `${parsed.pathname}${parsed.search}`));
|
|
37
37
|
return `${ANTIGRAVITY_SANDBOX_ENDPOINT}${tail.startsWith("/") ? tail : `/${tail}`}`;
|
|
38
38
|
}
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
getAntigravityModelWireProfile,
|
|
4
4
|
getAntigravityUserAgent,
|
|
5
5
|
getAntigravityVersion
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TLYFFUW4.js";
|
|
7
7
|
import {
|
|
8
8
|
antigravityModelFamily
|
|
9
9
|
} from "./chunk-XBQTVRMK.js";
|
|
10
10
|
import {
|
|
11
11
|
ANTIGRAVITY_CODE_ASSIST_ENDPOINT
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HQ7C3VB6.js";
|
|
13
13
|
import {
|
|
14
14
|
buildCcaMethodUrl,
|
|
15
15
|
unwrapCcaResponse
|
|
@@ -353,7 +353,7 @@ async function resolveSubscriptionRoute(args) {
|
|
|
353
353
|
boundAccountFallbackPolicy: config.boundAccountFallbackPolicy,
|
|
354
354
|
attribution: { sessionId, apiKeyId: _nullishCoalesce(apiKeyId, () => ( null)) }
|
|
355
355
|
};
|
|
356
|
-
const subscriptionConfig = providerId === "opencodego" ? await _optionalChain([registry, 'optionalAccess', _9 => _9.getOpenCodeGoConfig, 'optionalCall', _10 => _10()]) : void 0;
|
|
356
|
+
const subscriptionConfig = providerId === "opencodego" ? await _optionalChain([registry, 'optionalAccess', _9 => _9.getOpenCodeGoConfig, 'optionalCall', _10 => _10()]) : providerId === "copilot" ? await _optionalChain([registry, 'optionalAccess', _11 => _11.getCopilotConfig, 'optionalCall', _12 => _12()]) : void 0;
|
|
357
357
|
const route = {
|
|
358
358
|
sessionId,
|
|
359
359
|
targetProviderFormat: "transform",
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-FYPKKMB3.js";
|
|
10
10
|
import {
|
|
11
11
|
getSharedAccountRouteActivity
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TX7ZM4OI.js";
|
|
13
13
|
|
|
14
14
|
// src/pipeline/upstreamFetch.ts
|
|
15
15
|
import { Agent, buildConnector, ProxyAgent } from "undici";
|
|
@@ -130,12 +130,18 @@ function fetchUpstream(url, init, ctx) {
|
|
|
130
130
|
return response;
|
|
131
131
|
});
|
|
132
132
|
const activity = ctx?.routeActivity;
|
|
133
|
-
const activityStartedAt = activity
|
|
133
|
+
const activityStartedAt = activity ? Date.now() : 0;
|
|
134
134
|
const recordActivity = (status) => {
|
|
135
|
-
if (!activity
|
|
135
|
+
if (!activity) return;
|
|
136
|
+
const providerId2 = activity.providerId ?? ctx?.providerId;
|
|
137
|
+
const accountId2 = activity.accountId ?? ctx?.accountId;
|
|
138
|
+
if (!providerId2) return;
|
|
139
|
+
if (activity.credentialKind !== "provider-key" && !accountId2) return;
|
|
136
140
|
const record = getSharedAccountRouteActivity().record({
|
|
137
|
-
providerId:
|
|
138
|
-
|
|
141
|
+
providerId: providerId2,
|
|
142
|
+
credentialKind: activity.credentialKind,
|
|
143
|
+
accountId: accountId2,
|
|
144
|
+
keyId: activity.keyId,
|
|
139
145
|
endpoint: activity.endpoint,
|
|
140
146
|
sessionKey: activity.sessionKey,
|
|
141
147
|
sessionSource: activity.sessionSource,
|
|
@@ -11,7 +11,7 @@ function setOpenCodeGoUserAgent(userAgent) {
|
|
|
11
11
|
}
|
|
12
12
|
function getOpenCodeGoUserAgent() {
|
|
13
13
|
if (configuredUserAgent) return configuredUserAgent;
|
|
14
|
-
const version = true ? "0.4.
|
|
14
|
+
const version = true ? "0.4.6" : "0.0.0-dev";
|
|
15
15
|
return `omnicross/${version}`;
|
|
16
16
|
}
|
|
17
17
|
function extractOpenCodeSessionHeader(reqHeaders) {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
|
|
7
7
|
// src/transformer/transformers/OpenAITransformer.ts
|
|
8
8
|
var FOREIGN_MESSAGE_KEYS = ["cache_control", "thinking"];
|
|
9
|
-
var FOREIGN_BODY_KEYS = ["meta", "reasoning", "thinking", "top_k", "metadata_user_id", "_transformWarnings"];
|
|
9
|
+
var FOREIGN_BODY_KEYS = ["meta", "reasoning", "thinking", "top_k", "metadata_user_id", "_transformWarnings", "_serverSideTools"];
|
|
10
10
|
function normalizeContent(content) {
|
|
11
11
|
if (!Array.isArray(content)) return content;
|
|
12
12
|
const cleaned = content.map((block) => {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
var _chunkNOITAVHAcjs = require('./chunk-NOITAVHA.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZTN2PVKOcjs = require('./chunk-ZTN2PVKO.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunk47E3I5PFcjs = require('./chunk-47E3I5PF.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkZG57GAVUcjs = require('./chunk-ZG57GAVU.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
var _chunkBTSADEX4cjs = require('./chunk-BTSADEX4.cjs');
|
|
@@ -19,10 +19,10 @@ var _chunkN3MGNLCUcjs = require('./chunk-N3MGNLCU.cjs');
|
|
|
19
19
|
|
|
20
20
|
// src/transformer/transformers/index.ts
|
|
21
21
|
var BuiltinTransformers = {
|
|
22
|
-
OpenAITransformer:
|
|
22
|
+
OpenAITransformer: _chunkZTN2PVKOcjs.OpenAITransformer,
|
|
23
23
|
GeminiTransformer: _chunkBTSADEX4cjs.GeminiTransformer,
|
|
24
24
|
GeminiCodeAssistTransformer: _chunkN3MGNLCUcjs.GeminiCodeAssistTransformer,
|
|
25
|
-
AntigravityTransformer:
|
|
25
|
+
AntigravityTransformer: _chunkZG57GAVUcjs.AntigravityTransformer,
|
|
26
26
|
AnthropicTransformer: _chunk47E3I5PFcjs.AnthropicTransformer,
|
|
27
27
|
OpenAIResponseTransformer: _chunkNOITAVHAcjs.OpenAIResponseTransformer
|
|
28
28
|
};
|