@omnicross/core 0.2.0 → 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/LICENSE +21 -21
- package/NOTICE +57 -57
- package/README.md +22 -22
- 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-BiJqftc-.d.cts → CompletionService-BniP7j88.d.cts} +2 -2
- package/dist/{CompletionService-NXN_Av5W.d.ts → CompletionService-BqrKPwfA.d.ts} +2 -2
- package/dist/{ProviderProxy-CgIcCVwk.d.cts → ProviderProxy-Bz_nkOwq.d.cts} +1 -1
- package/dist/{ProviderProxy-DYoY5XoT.d.ts → ProviderProxy-Ckr6oTrE.d.ts} +1 -1
- package/dist/auth/GeminiCodeAssistProjectResolver.cjs +2 -2
- package/dist/auth/GeminiCodeAssistProjectResolver.js +1 -1
- package/dist/{chunk-FJNKXOWE.js → chunk-2C3TTBS7.js} +4 -4
- package/dist/{chunk-OST5RJOJ.cjs → chunk-4Z3ZLLC2.cjs} +13 -7
- package/dist/chunk-7RJI3NDI.cjs +236 -0
- package/dist/chunk-D4WNI6BR.cjs +386 -0
- package/dist/chunk-DBBR6RHF.js +236 -0
- package/dist/chunk-E4QHVXV5.cjs +118 -0
- package/dist/chunk-HL2YSPL7.cjs +673 -0
- package/dist/chunk-LFPQ2OVH.js +386 -0
- package/dist/{chunk-WSJE42SG.js → chunk-LKDAN4D7.js} +3684 -2462
- package/dist/{chunk-DEIUR2TH.js → chunk-LQYS2N47.js} +12 -8
- package/dist/{chunk-NZYN7C3P.cjs → chunk-MPXOKQJP.cjs} +53 -53
- package/dist/chunk-MZEGQSKQ.js +118 -0
- package/dist/chunk-NLUOTJWB.js +673 -0
- package/dist/{chunk-CTKM773J.cjs → chunk-UPQIWJIE.cjs} +12 -8
- package/dist/{chunk-CFSGYFOZ.js → chunk-VL5TUDTM.js} +7 -1
- package/dist/{chunk-7B56AJBB.cjs → chunk-VSYQ6XYN.cjs} +2233 -1011
- package/dist/{chunk-CDHS2QDC.js → chunk-Y4CRNHJO.js} +53 -53
- package/dist/{chunk-TVYA5JSQ.cjs → chunk-ZAPN7XA6.cjs} +5 -5
- 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 +11 -10
- package/dist/completion/CompletionService.d.cts +6 -3
- package/dist/completion/CompletionService.d.ts +6 -3
- package/dist/completion/CompletionService.js +10 -9
- package/dist/completion.cjs +11 -10
- package/dist/completion.d.cts +6 -3
- package/dist/completion.d.ts +6 -3
- package/dist/completion.js +10 -9
- 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 +2 -2
- package/dist/image-generation.d.cts +7 -4
- package/dist/image-generation.d.ts +7 -4
- package/dist/image-generation.js +1 -1
- package/dist/index.cjs +25 -10
- package/dist/index.d.cts +12 -8
- package/dist/index.d.ts +12 -8
- package/dist/index.js +24 -9
- package/dist/openai-operation.d.cts +4 -1
- package/dist/openai-operation.d.ts +4 -1
- package/dist/outbound-api/routeResolver.d.cts +9 -5
- package/dist/outbound-api/routeResolver.d.ts +9 -5
- package/dist/outbound-api/subscriptionRegistryPort.d.cts +4 -1
- package/dist/outbound-api/subscriptionRegistryPort.d.ts +4 -1
- package/dist/outbound-api/types.d.cts +8 -4
- package/dist/outbound-api/types.d.ts +8 -4
- package/dist/outbound-api.cjs +25 -10
- package/dist/outbound-api.d.cts +117 -8
- package/dist/outbound-api.d.ts +117 -8
- package/dist/outbound-api.js +24 -9
- package/dist/pipeline/AccountAllowanceScheduling.d.cts +8 -4
- package/dist/pipeline/AccountAllowanceScheduling.d.ts +8 -4
- package/dist/pipeline/upstreamFetch.cjs +2 -2
- package/dist/pipeline/upstreamFetch.js +1 -1
- package/dist/ports.d.cts +8 -4
- package/dist/ports.d.ts +8 -4
- package/dist/provider-proxy/ProviderProxy.cjs +11 -10
- package/dist/provider-proxy/ProviderProxy.d.cts +5 -2
- package/dist/provider-proxy/ProviderProxy.d.ts +5 -2
- package/dist/provider-proxy/ProviderProxy.js +10 -9
- package/dist/provider-proxy/ingress/providerProxyShared.cjs +13 -10
- package/dist/provider-proxy/ingress/providerProxyShared.d.cts +22 -3
- package/dist/provider-proxy/ingress/providerProxyShared.d.ts +22 -3
- package/dist/provider-proxy/ingress/providerProxyShared.js +12 -9
- package/dist/provider-proxy/types.d.cts +4 -1
- package/dist/provider-proxy/types.d.ts +4 -1
- package/dist/provider-proxy.cjs +11 -10
- package/dist/provider-proxy.d.cts +10 -6
- package/dist/provider-proxy.d.ts +10 -6
- package/dist/provider-proxy.js +10 -9
- package/dist/proxy-UZTtjPZx.d.cts +18 -0
- package/dist/proxy-UZTtjPZx.d.ts +18 -0
- package/dist/{routeResolver-rpKQLyDO.d.cts → routeResolver-Da0yvkL1.d.cts} +2 -2
- package/dist/{routeResolver-CTCcSHWu.d.ts → routeResolver-STwMz_G4.d.ts} +2 -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/transformers/AnthropicTransformer.cjs +3 -3
- package/dist/transformer/transformers/AnthropicTransformer.js +2 -2
- package/dist/transformer/transformers.cjs +7 -7
- package/dist/transformer/transformers.js +6 -6
- package/dist/transformer.cjs +6 -6
- package/dist/transformer.js +5 -5
- package/dist/{types-DsHBBk3h.d.cts → types-BSIJdsyl.d.cts} +15 -0
- package/dist/{types-CbglB73l.d.cts → types-Be-yt_6T.d.cts} +1 -1
- package/dist/{types-CVRge76p.d.ts → types-By9Tg6-I.d.ts} +15 -0
- package/dist/types-CbCZqLGg.d.cts +127 -0
- package/dist/types-CbCZqLGg.d.ts +127 -0
- package/dist/{types-jjU24eYG.d.cts → types-D-oHYusb.d.cts} +73 -4
- package/dist/{types-Bd72H4SB.d.ts → types-Dm4_36V4.d.ts} +1 -1
- package/dist/{types-5T223WYQ.d.ts → types-Dvlpjn0d.d.ts} +73 -4
- package/package.json +5 -3
- package/dist/{chunk-6OC3ORW6.js → chunk-EUZRH544.js} +3 -3
- package/dist/{chunk-SQMAEDNE.cjs → chunk-POUTD5AM.cjs} +2 -2
|
@@ -1765,7 +1765,10 @@ async function readJsonBody(request2, options) {
|
|
|
1765
1765
|
|
|
1766
1766
|
// src/image-generation/openai-images/types.ts
|
|
1767
1767
|
var DEFAULT_IMAGE_API_LIMITS = Object.freeze({
|
|
1768
|
-
|
|
1768
|
+
// Codex's built-in image tool sends edits as JSON data URLs rather than
|
|
1769
|
+
// multipart files. Leave room for the Base64 expansion of the bounded
|
|
1770
|
+
// aggregate input budget plus the small JSON/options envelope.
|
|
1771
|
+
maxJsonBytes: 96 * 1024 * 1024,
|
|
1769
1772
|
maxMultipartBytes: 64 * 1024 * 1024,
|
|
1770
1773
|
maxFileBytes: 50 * 1024 * 1024,
|
|
1771
1774
|
maxTotalInputBytes: 64 * 1024 * 1024,
|
|
@@ -2326,7 +2329,7 @@ async function readMultipartEdit(request2, scope, limits, signal) {
|
|
|
2326
2329
|
function invalid4(param = "image") {
|
|
2327
2330
|
throw new ImageGenerationError("invalid_image_request", { param });
|
|
2328
2331
|
}
|
|
2329
|
-
function closedInput(value,
|
|
2332
|
+
function closedInput(value, limits) {
|
|
2330
2333
|
if (!value || typeof value !== "object" || Array.isArray(value)) invalid4();
|
|
2331
2334
|
const record2 = value;
|
|
2332
2335
|
const keys = Object.keys(record2);
|
|
@@ -2334,8 +2337,9 @@ function closedInput(value, maxRemoteUrlBytes) {
|
|
|
2334
2337
|
const key = keys[0];
|
|
2335
2338
|
if (key !== "file_id" && key !== "image_url") invalid4();
|
|
2336
2339
|
const item = record2[key];
|
|
2337
|
-
|
|
2338
|
-
|
|
2340
|
+
if (typeof item !== "string" || !item) invalid4();
|
|
2341
|
+
const maxBytes = key === "file_id" ? 256 : item.toLowerCase().startsWith("data:") ? Math.ceil(limits.maxFileBytes / 3) * 4 + 64 : limits.maxRemoteUrlBytes;
|
|
2342
|
+
if (Buffer.byteLength(item, "utf8") > maxBytes) invalid4();
|
|
2339
2343
|
return { [key]: item };
|
|
2340
2344
|
}
|
|
2341
2345
|
function decodedBase64Length(value) {
|
|
@@ -2407,7 +2411,7 @@ async function resolveReference(referenceId, runtime, scope) {
|
|
|
2407
2411
|
return asset;
|
|
2408
2412
|
}
|
|
2409
2413
|
async function resolveImageInput(value, runtime, scope, signal) {
|
|
2410
|
-
const input = closedInput(value, runtime.limits
|
|
2414
|
+
const input = closedInput(value, runtime.limits);
|
|
2411
2415
|
if ("file_id" in input) return resolveReference(input.file_id, runtime, scope);
|
|
2412
2416
|
if (input.image_url.toLowerCase().startsWith("data:")) {
|
|
2413
2417
|
return resolveDataUrl(input.image_url, runtime, scope, signal);
|
|
@@ -2432,10 +2436,10 @@ async function resolveImageInput(value, runtime, scope, signal) {
|
|
|
2432
2436
|
materializer
|
|
2433
2437
|
});
|
|
2434
2438
|
}
|
|
2435
|
-
function parseImageInputList(value,
|
|
2439
|
+
function parseImageInputList(value, limits) {
|
|
2436
2440
|
const list = Array.isArray(value) ? value : [value];
|
|
2437
2441
|
if (list.length < 1 || list.length > 16) invalid4();
|
|
2438
|
-
for (const item of list) closedInput(item,
|
|
2442
|
+
for (const item of list) closedInput(item, limits);
|
|
2439
2443
|
return list;
|
|
2440
2444
|
}
|
|
2441
2445
|
|
|
@@ -2481,7 +2485,7 @@ function createImageEditHandler(deps) {
|
|
|
2481
2485
|
});
|
|
2482
2486
|
const inputs = parseImageInputList(
|
|
2483
2487
|
_nullishCoalesce(record2.images, () => ( record2.image)),
|
|
2484
|
-
runtime.limits
|
|
2488
|
+
runtime.limits
|
|
2485
2489
|
);
|
|
2486
2490
|
const resolveObservedInput = async (input) => {
|
|
2487
2491
|
const reference = isReferenceInput(input);
|
|
@@ -32,6 +32,12 @@ function bumpUpstreamProxyGeneration() {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
+
function isClientDisconnectAbort(signal) {
|
|
36
|
+
if (!signal?.aborted) return false;
|
|
37
|
+
const reason = signal.reason;
|
|
38
|
+
if (!reason || typeof reason !== "object") return false;
|
|
39
|
+
return reason.code === "client_disconnect";
|
|
40
|
+
}
|
|
35
41
|
function normalizeProxy(cfg) {
|
|
36
42
|
if ("url" in cfg) {
|
|
37
43
|
let u;
|
|
@@ -144,7 +150,7 @@ function fetchUpstream(url, init, ctx) {
|
|
|
144
150
|
return response;
|
|
145
151
|
},
|
|
146
152
|
(error) => {
|
|
147
|
-
recordActivity(0);
|
|
153
|
+
if (!isClientDisconnectAbort(init.signal)) recordActivity(0);
|
|
148
154
|
throw error;
|
|
149
155
|
}
|
|
150
156
|
);
|