@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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { lookup } from 'node:dns';
|
|
2
|
+
import { SearchProviderId, SearchProviderError } from '@omnicross/contracts/search-types';
|
|
3
|
+
import { Dispatcher } from 'undici';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The SSRF egress policy every search network path runs through
|
|
7
|
+
* (plan hard-constraint 7).
|
|
8
|
+
*
|
|
9
|
+
* 阶段4 introduces the first attacker-influenceable network surface in the
|
|
10
|
+
* search tree: a custom `apiHost`. Until now every search request went to one
|
|
11
|
+
* of two fixed engines, so a URL built from configuration could not be aimed at
|
|
12
|
+
* an internal address. It can now, which is why this module exists and why it
|
|
13
|
+
* guards BOTH the API transport and the HTTP slice's redirect walk rather than
|
|
14
|
+
* living inside one adapter.
|
|
15
|
+
*
|
|
16
|
+
* Two layers, because one is not enough:
|
|
17
|
+
*
|
|
18
|
+
* 1. {@link validateEgressUrl} — a URL-level check applied to the initial URL
|
|
19
|
+
* and to EVERY redirect hop. It catches literal addresses and the named
|
|
20
|
+
* loopback/metadata hosts before a request is built.
|
|
21
|
+
* 2. {@link createEgressGuardedDispatcher} — a connection-time check of every
|
|
22
|
+
* address DNS resolves to. Layer 1 alone is a TOCTOU: `evil.example` passes
|
|
23
|
+
* the URL check as a public name and then resolves to `127.0.0.1`. Validating
|
|
24
|
+
* at the moment of use closes that rebinding window.
|
|
25
|
+
*
|
|
26
|
+
* The division of labour between them is worth stating, because it is the
|
|
27
|
+
* easiest thing to misread here: layer 1 can only judge what a URL SAYS, so it
|
|
28
|
+
* denies literal addresses and the two host names that are denied by name
|
|
29
|
+
* (`localhost`, `metadata.google.internal`). An ordinary internal name like
|
|
30
|
+
* `searx.internal.corp` carries no address and passes layer 1 exactly as a
|
|
31
|
+
* public name would — layer 2 is what asks where it actually points. Neither
|
|
32
|
+
* layer is redundant: layer 1 stops `http://169.254.169.254/` without a
|
|
33
|
+
* resolver, and layer 2 stops every name that lies.
|
|
34
|
+
*
|
|
35
|
+
* LIMITATION, stated here because it is a property of the design and not an
|
|
36
|
+
* oversight: layer 2 only applies to DIRECT connections. When a proxy
|
|
37
|
+
* dispatcher is in use the proxy resolves DNS, so the guarded lookup never
|
|
38
|
+
* runs; proxied paths keep layer 1 on every hop and nothing more. The
|
|
39
|
+
* precedence is asserted by a test rather than left to be discovered.
|
|
40
|
+
*
|
|
41
|
+
* Denial messages carry the HOSTNAME only. A search URL embeds the user's
|
|
42
|
+
* query and may carry userinfo credentials, and these errors are printed,
|
|
43
|
+
* logged, and returned to callers.
|
|
44
|
+
*
|
|
45
|
+
* @module search/egress
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The admin-level egress policy.
|
|
50
|
+
*
|
|
51
|
+
* Construction-level, never per-request: a per-request allowlist would let an
|
|
52
|
+
* attacker who can influence a search request also influence where it may go,
|
|
53
|
+
* which is the whole thing this module prevents.
|
|
54
|
+
*/
|
|
55
|
+
interface SearchEgressPolicy {
|
|
56
|
+
/**
|
|
57
|
+
* Hostnames permitted to resolve into an otherwise-denied address class.
|
|
58
|
+
*
|
|
59
|
+
* The escape hatch for an internal SearXNG deployment
|
|
60
|
+
* (`searx.internal.corp`). Matching is EXACT and case-insensitive — no
|
|
61
|
+
* wildcards, no suffix matching — because a suffix rule (`.corp`) is one
|
|
62
|
+
* attacker-registered subdomain away from admitting anything.
|
|
63
|
+
*/
|
|
64
|
+
allowedPrivateHosts?: string[];
|
|
65
|
+
}
|
|
66
|
+
/** Permit every public host; permit nothing private. The production default. */
|
|
67
|
+
declare const DEFAULT_SEARCH_EGRESS_POLICY: Readonly<SearchEgressPolicy>;
|
|
68
|
+
/** Why a host was denied. Stamped into `details.egressClass` for diagnostics. */
|
|
69
|
+
type EgressDenialReason = 'scheme' | 'malformed' | 'loopback' | 'unspecified' | 'link-local' | 'private' | 'unique-local' | 'metadata';
|
|
70
|
+
/**
|
|
71
|
+
* Validate one request target against the policy.
|
|
72
|
+
*
|
|
73
|
+
* @param url - the target. A relative or unparseable value is a denial, not a
|
|
74
|
+
* crash: a redirect `location` is attacker-controlled input.
|
|
75
|
+
* @returns the parsed URL, so callers can reuse it instead of re-parsing.
|
|
76
|
+
* @throws SearchProviderError code `policy_denied`, naming the hostname only.
|
|
77
|
+
*/
|
|
78
|
+
declare function validateEgressUrl(url: string | URL, policy?: SearchEgressPolicy, providerId?: SearchProviderId): URL;
|
|
79
|
+
/**
|
|
80
|
+
* Classify a resolved ADDRESS for a hostname that already passed
|
|
81
|
+
* {@link validateEgressUrl}.
|
|
82
|
+
*
|
|
83
|
+
* Separate from the URL check because this is the rebinding defense: the
|
|
84
|
+
* hostname was public, the address it resolved to may not be. Allowlisting is
|
|
85
|
+
* by hostname, so an allowlisted name's private address is admitted here too —
|
|
86
|
+
* that is exactly what the SearXNG escape hatch means.
|
|
87
|
+
*/
|
|
88
|
+
declare function assertEgressAddressAllowed(address: string, hostname: string, policy?: SearchEgressPolicy, providerId?: SearchProviderId): void;
|
|
89
|
+
/**
|
|
90
|
+
* The `policy_denied` error buried in a thrown value's `cause` chain, if any.
|
|
91
|
+
*
|
|
92
|
+
* undici reports a connect-time failure as a `TypeError: fetch failed` whose
|
|
93
|
+
* `cause` holds the real error, so a denial raised inside the guarded lookup
|
|
94
|
+
* reaches the caller wrapped. Without this the transport would classify a
|
|
95
|
+
* blocked rebinding attempt as `upstream_unavailable`.
|
|
96
|
+
*
|
|
97
|
+
* The depth cap assumes undici's wrapping stays SHALLOW — today it is two
|
|
98
|
+
* levels and this allows six. If a future undici (or an intermediate
|
|
99
|
+
* dispatcher) nests deeper, a blocked rebinding attempt would quietly
|
|
100
|
+
* reclassify as a transport failure: the request is still refused, but the
|
|
101
|
+
* security signal is lost. That is the failure mode to check if denials ever
|
|
102
|
+
* start reading as `upstream_unavailable`.
|
|
103
|
+
*/
|
|
104
|
+
declare function findEgressDenial(error: unknown): SearchProviderError | undefined;
|
|
105
|
+
/** Node's `dns.lookup` shape — the seam a test replaces. */
|
|
106
|
+
type EgressDnsLookup = typeof lookup;
|
|
107
|
+
/**
|
|
108
|
+
* Wrap a resolver so every address it returns is validated before use.
|
|
109
|
+
*
|
|
110
|
+
* Always resolves with `all: true` and re-shapes the answer to whatever the
|
|
111
|
+
* caller asked for. Node's `net.connect` passes `all: true` under
|
|
112
|
+
* `autoSelectFamily` and `all: false` otherwise; validating only the address a
|
|
113
|
+
* single-answer lookup happened to pick would leave the others unchecked on the
|
|
114
|
+
* hosts where it matters most.
|
|
115
|
+
*/
|
|
116
|
+
declare function createEgressGuardedLookup(policy?: SearchEgressPolicy, lookupImpl?: EgressDnsLookup): EgressDnsLookup;
|
|
117
|
+
/**
|
|
118
|
+
* An undici dispatcher that validates every resolved address before connecting.
|
|
119
|
+
*
|
|
120
|
+
* Cached per policy signature: a fresh `Agent` per request would leak
|
|
121
|
+
* connection pools. As in `search/http/proxy.ts`, a superseded dispatcher is
|
|
122
|
+
* never closed — a concurrent request may still be reading through it.
|
|
123
|
+
*/
|
|
124
|
+
declare function createEgressGuardedDispatcher(policy?: SearchEgressPolicy, lookupImpl?: EgressDnsLookup): Dispatcher;
|
|
125
|
+
|
|
126
|
+
export { DEFAULT_SEARCH_EGRESS_POLICY as D, type EgressDenialReason as E, type SearchEgressPolicy as S, type EgressDnsLookup as a, assertEgressAddressAllowed as b, createEgressGuardedDispatcher as c, createEgressGuardedLookup as d, findEgressDenial as f, validateEgressUrl as v };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { lookup } from 'node:dns';
|
|
2
|
+
import { SearchProviderId, SearchProviderError } from '@omnicross/contracts/search-types';
|
|
3
|
+
import { Dispatcher } from 'undici';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The SSRF egress policy every search network path runs through
|
|
7
|
+
* (plan hard-constraint 7).
|
|
8
|
+
*
|
|
9
|
+
* 阶段4 introduces the first attacker-influenceable network surface in the
|
|
10
|
+
* search tree: a custom `apiHost`. Until now every search request went to one
|
|
11
|
+
* of two fixed engines, so a URL built from configuration could not be aimed at
|
|
12
|
+
* an internal address. It can now, which is why this module exists and why it
|
|
13
|
+
* guards BOTH the API transport and the HTTP slice's redirect walk rather than
|
|
14
|
+
* living inside one adapter.
|
|
15
|
+
*
|
|
16
|
+
* Two layers, because one is not enough:
|
|
17
|
+
*
|
|
18
|
+
* 1. {@link validateEgressUrl} — a URL-level check applied to the initial URL
|
|
19
|
+
* and to EVERY redirect hop. It catches literal addresses and the named
|
|
20
|
+
* loopback/metadata hosts before a request is built.
|
|
21
|
+
* 2. {@link createEgressGuardedDispatcher} — a connection-time check of every
|
|
22
|
+
* address DNS resolves to. Layer 1 alone is a TOCTOU: `evil.example` passes
|
|
23
|
+
* the URL check as a public name and then resolves to `127.0.0.1`. Validating
|
|
24
|
+
* at the moment of use closes that rebinding window.
|
|
25
|
+
*
|
|
26
|
+
* The division of labour between them is worth stating, because it is the
|
|
27
|
+
* easiest thing to misread here: layer 1 can only judge what a URL SAYS, so it
|
|
28
|
+
* denies literal addresses and the two host names that are denied by name
|
|
29
|
+
* (`localhost`, `metadata.google.internal`). An ordinary internal name like
|
|
30
|
+
* `searx.internal.corp` carries no address and passes layer 1 exactly as a
|
|
31
|
+
* public name would — layer 2 is what asks where it actually points. Neither
|
|
32
|
+
* layer is redundant: layer 1 stops `http://169.254.169.254/` without a
|
|
33
|
+
* resolver, and layer 2 stops every name that lies.
|
|
34
|
+
*
|
|
35
|
+
* LIMITATION, stated here because it is a property of the design and not an
|
|
36
|
+
* oversight: layer 2 only applies to DIRECT connections. When a proxy
|
|
37
|
+
* dispatcher is in use the proxy resolves DNS, so the guarded lookup never
|
|
38
|
+
* runs; proxied paths keep layer 1 on every hop and nothing more. The
|
|
39
|
+
* precedence is asserted by a test rather than left to be discovered.
|
|
40
|
+
*
|
|
41
|
+
* Denial messages carry the HOSTNAME only. A search URL embeds the user's
|
|
42
|
+
* query and may carry userinfo credentials, and these errors are printed,
|
|
43
|
+
* logged, and returned to callers.
|
|
44
|
+
*
|
|
45
|
+
* @module search/egress
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The admin-level egress policy.
|
|
50
|
+
*
|
|
51
|
+
* Construction-level, never per-request: a per-request allowlist would let an
|
|
52
|
+
* attacker who can influence a search request also influence where it may go,
|
|
53
|
+
* which is the whole thing this module prevents.
|
|
54
|
+
*/
|
|
55
|
+
interface SearchEgressPolicy {
|
|
56
|
+
/**
|
|
57
|
+
* Hostnames permitted to resolve into an otherwise-denied address class.
|
|
58
|
+
*
|
|
59
|
+
* The escape hatch for an internal SearXNG deployment
|
|
60
|
+
* (`searx.internal.corp`). Matching is EXACT and case-insensitive — no
|
|
61
|
+
* wildcards, no suffix matching — because a suffix rule (`.corp`) is one
|
|
62
|
+
* attacker-registered subdomain away from admitting anything.
|
|
63
|
+
*/
|
|
64
|
+
allowedPrivateHosts?: string[];
|
|
65
|
+
}
|
|
66
|
+
/** Permit every public host; permit nothing private. The production default. */
|
|
67
|
+
declare const DEFAULT_SEARCH_EGRESS_POLICY: Readonly<SearchEgressPolicy>;
|
|
68
|
+
/** Why a host was denied. Stamped into `details.egressClass` for diagnostics. */
|
|
69
|
+
type EgressDenialReason = 'scheme' | 'malformed' | 'loopback' | 'unspecified' | 'link-local' | 'private' | 'unique-local' | 'metadata';
|
|
70
|
+
/**
|
|
71
|
+
* Validate one request target against the policy.
|
|
72
|
+
*
|
|
73
|
+
* @param url - the target. A relative or unparseable value is a denial, not a
|
|
74
|
+
* crash: a redirect `location` is attacker-controlled input.
|
|
75
|
+
* @returns the parsed URL, so callers can reuse it instead of re-parsing.
|
|
76
|
+
* @throws SearchProviderError code `policy_denied`, naming the hostname only.
|
|
77
|
+
*/
|
|
78
|
+
declare function validateEgressUrl(url: string | URL, policy?: SearchEgressPolicy, providerId?: SearchProviderId): URL;
|
|
79
|
+
/**
|
|
80
|
+
* Classify a resolved ADDRESS for a hostname that already passed
|
|
81
|
+
* {@link validateEgressUrl}.
|
|
82
|
+
*
|
|
83
|
+
* Separate from the URL check because this is the rebinding defense: the
|
|
84
|
+
* hostname was public, the address it resolved to may not be. Allowlisting is
|
|
85
|
+
* by hostname, so an allowlisted name's private address is admitted here too —
|
|
86
|
+
* that is exactly what the SearXNG escape hatch means.
|
|
87
|
+
*/
|
|
88
|
+
declare function assertEgressAddressAllowed(address: string, hostname: string, policy?: SearchEgressPolicy, providerId?: SearchProviderId): void;
|
|
89
|
+
/**
|
|
90
|
+
* The `policy_denied` error buried in a thrown value's `cause` chain, if any.
|
|
91
|
+
*
|
|
92
|
+
* undici reports a connect-time failure as a `TypeError: fetch failed` whose
|
|
93
|
+
* `cause` holds the real error, so a denial raised inside the guarded lookup
|
|
94
|
+
* reaches the caller wrapped. Without this the transport would classify a
|
|
95
|
+
* blocked rebinding attempt as `upstream_unavailable`.
|
|
96
|
+
*
|
|
97
|
+
* The depth cap assumes undici's wrapping stays SHALLOW — today it is two
|
|
98
|
+
* levels and this allows six. If a future undici (or an intermediate
|
|
99
|
+
* dispatcher) nests deeper, a blocked rebinding attempt would quietly
|
|
100
|
+
* reclassify as a transport failure: the request is still refused, but the
|
|
101
|
+
* security signal is lost. That is the failure mode to check if denials ever
|
|
102
|
+
* start reading as `upstream_unavailable`.
|
|
103
|
+
*/
|
|
104
|
+
declare function findEgressDenial(error: unknown): SearchProviderError | undefined;
|
|
105
|
+
/** Node's `dns.lookup` shape — the seam a test replaces. */
|
|
106
|
+
type EgressDnsLookup = typeof lookup;
|
|
107
|
+
/**
|
|
108
|
+
* Wrap a resolver so every address it returns is validated before use.
|
|
109
|
+
*
|
|
110
|
+
* Always resolves with `all: true` and re-shapes the answer to whatever the
|
|
111
|
+
* caller asked for. Node's `net.connect` passes `all: true` under
|
|
112
|
+
* `autoSelectFamily` and `all: false` otherwise; validating only the address a
|
|
113
|
+
* single-answer lookup happened to pick would leave the others unchecked on the
|
|
114
|
+
* hosts where it matters most.
|
|
115
|
+
*/
|
|
116
|
+
declare function createEgressGuardedLookup(policy?: SearchEgressPolicy, lookupImpl?: EgressDnsLookup): EgressDnsLookup;
|
|
117
|
+
/**
|
|
118
|
+
* An undici dispatcher that validates every resolved address before connecting.
|
|
119
|
+
*
|
|
120
|
+
* Cached per policy signature: a fresh `Agent` per request would leak
|
|
121
|
+
* connection pools. As in `search/http/proxy.ts`, a superseded dispatcher is
|
|
122
|
+
* never closed — a concurrent request may still be reading through it.
|
|
123
|
+
*/
|
|
124
|
+
declare function createEgressGuardedDispatcher(policy?: SearchEgressPolicy, lookupImpl?: EgressDnsLookup): Dispatcher;
|
|
125
|
+
|
|
126
|
+
export { DEFAULT_SEARCH_EGRESS_POLICY as D, type EgressDenialReason as E, type SearchEgressPolicy as S, type EgressDnsLookup as a, assertEgressAddressAllowed as b, createEgressGuardedDispatcher as c, createEgressGuardedLookup as d, findEgressDenial as f, validateEgressUrl as v };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { SearchErrorCode } from '@omnicross/contracts/search-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Per-frontend search execution modes (plan 阶段5, hard constraint 6).
|
|
5
|
+
*
|
|
6
|
+
* Three protocol frontends can reach search — Codex `/v1/alpha/search`, OpenAI
|
|
7
|
+
* Responses, and Anthropic Messages — and each of them independently answers
|
|
8
|
+
* ONE question: who executes the search?
|
|
9
|
+
*
|
|
10
|
+
* - `native` — the UPSTREAM executes it. Omnicross injects/relays and touches
|
|
11
|
+
* nothing else; the wire stays whatever the provider produced.
|
|
12
|
+
* - `managed` — OMNICROSS executes it through {@link SearchRuntime} and
|
|
13
|
+
* synthesizes protocol-compatible output.
|
|
14
|
+
* - `off` — the capability is not offered: a structured
|
|
15
|
+
* `unsupported_capability` error, never a bare 404 (plan §15).
|
|
16
|
+
*
|
|
17
|
+
* **Native and managed are never mixed on one wire exchange.** That is a plan
|
|
18
|
+
* hard constraint, and this module is how it is made structural rather than
|
|
19
|
+
* conventional: a request resolves its mode ONCE, before any wire bytes, and
|
|
20
|
+
* the two lanes downstream share no emission code. A helper that "falls back
|
|
21
|
+
* from native to managed" (or the reverse) would defeat the whole arrangement,
|
|
22
|
+
* so no such helper exists here and none should be added.
|
|
23
|
+
*
|
|
24
|
+
* The defaults preserve today's behavior exactly: Responses and Anthropic keep
|
|
25
|
+
* their existing native relay, and Codex is `off` — which is the one deliberate
|
|
26
|
+
* visible change in this change set, since `off` answers with a structured
|
|
27
|
+
* error where the router previously answered a generic 404.
|
|
28
|
+
*
|
|
29
|
+
* Pure vocabulary: no IO, no provider imports, no runtime. That is what lets
|
|
30
|
+
* `outbound-api` and `provider-proxy` both import it without dragging jsdom or
|
|
31
|
+
* undici into their module graphs.
|
|
32
|
+
*
|
|
33
|
+
* @module search/frontends
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/** Who executes a search for one protocol frontend. */
|
|
37
|
+
type SearchFrontendMode = 'native' | 'managed' | 'off';
|
|
38
|
+
/** The protocol frontends that can reach search. */
|
|
39
|
+
type SearchFrontendName = 'codex' | 'responses' | 'anthropic';
|
|
40
|
+
/** The resolved mode of every frontend. Total — every frontend always has one. */
|
|
41
|
+
type SearchFrontendModes = {
|
|
42
|
+
readonly [K in SearchFrontendName]: SearchFrontendMode;
|
|
43
|
+
};
|
|
44
|
+
/** Every frontend name, in the order configuration and doctor print them. */
|
|
45
|
+
declare const SEARCH_FRONTEND_NAMES: readonly SearchFrontendName[];
|
|
46
|
+
/** Every mode value, for validation messages and exhaustiveness. */
|
|
47
|
+
declare const SEARCH_FRONTEND_MODES: readonly SearchFrontendMode[];
|
|
48
|
+
/**
|
|
49
|
+
* The behavior-preserving defaults.
|
|
50
|
+
*
|
|
51
|
+
* `codex: 'off'` is not "search disabled" — the route exists and answers with a
|
|
52
|
+
* structured `unsupported_capability`. It is off because the Codex request and
|
|
53
|
+
* response schemas are UNVERIFIED (see `docs/design/search-baseline/wire-baseline.md`
|
|
54
|
+
* §1.2/§1.3); enabling it is a deliberate operator decision.
|
|
55
|
+
*/
|
|
56
|
+
declare const DEFAULT_SEARCH_FRONTEND_MODES: SearchFrontendModes;
|
|
57
|
+
/**
|
|
58
|
+
* The stable error code every frontend uses when its mode is `off`.
|
|
59
|
+
*
|
|
60
|
+
* Plan §15: a frontend may close managed search, but it must then say
|
|
61
|
+
* `unsupported_capability` — it must never keep exposing an unimplemented route
|
|
62
|
+
* as a 404. The string is shared so the three frontends cannot drift apart.
|
|
63
|
+
*/
|
|
64
|
+
declare const SEARCH_UNSUPPORTED_CAPABILITY_CODE = "unsupported_capability";
|
|
65
|
+
/**
|
|
66
|
+
* HTTP status for a search-taxonomy failure surfaced by a protocol frontend.
|
|
67
|
+
*
|
|
68
|
+
* The mapping answers "whose problem is it?" rather than "which code is it?":
|
|
69
|
+
* a client can act on 429 and 504; everything that failed on OUR side of the
|
|
70
|
+
* wire — a provider that broke, a policy that refused, a config we lack — is a
|
|
71
|
+
* 502-class fact about the gateway's upstream, not a fault in the request the
|
|
72
|
+
* client sent. The one 4xx here is `cancelled`, which is 499 because the client
|
|
73
|
+
* itself hung up.
|
|
74
|
+
*/
|
|
75
|
+
declare function searchErrorHttpStatus(code: SearchErrorCode): number;
|
|
76
|
+
/** Whether `value` is one of the three modes. */
|
|
77
|
+
declare function isSearchFrontendMode(value: unknown): value is SearchFrontendMode;
|
|
78
|
+
/**
|
|
79
|
+
* Read modes tolerantly: an unusable member falls back to its default rather
|
|
80
|
+
* than throwing, so a malformed config never takes the daemon down.
|
|
81
|
+
*
|
|
82
|
+
* Use {@link validateSearchFrontendModes} to REPORT what was unusable — the two
|
|
83
|
+
* run side by side exactly as the images config's tolerant read and strict
|
|
84
|
+
* validation do.
|
|
85
|
+
*/
|
|
86
|
+
declare function normalizeSearchFrontendModes(value: unknown): SearchFrontendModes;
|
|
87
|
+
/**
|
|
88
|
+
* Structured validation errors, naming the offending FIELD.
|
|
89
|
+
*
|
|
90
|
+
* The rejected VALUE is never echoed, only its type. A mode is not a secret,
|
|
91
|
+
* but a secret pasted into the wrong field is still a secret, and a validator
|
|
92
|
+
* that quotes whatever it was handed is one misconfiguration away from putting
|
|
93
|
+
* it in a log. Same no-echo rule as the images config validator.
|
|
94
|
+
*/
|
|
95
|
+
declare function validateSearchFrontendModes(value: unknown, path?: string): string[];
|
|
96
|
+
|
|
97
|
+
export { DEFAULT_SEARCH_FRONTEND_MODES as D, SEARCH_FRONTEND_MODES as S, SEARCH_FRONTEND_NAMES as a, SEARCH_UNSUPPORTED_CAPABILITY_CODE as b, type SearchFrontendMode as c, type SearchFrontendModes as d, type SearchFrontendName as e, isSearchFrontendMode as i, normalizeSearchFrontendModes as n, searchErrorHttpStatus as s, validateSearchFrontendModes as v };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { SearchErrorCode } from '@omnicross/contracts/search-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Per-frontend search execution modes (plan 阶段5, hard constraint 6).
|
|
5
|
+
*
|
|
6
|
+
* Three protocol frontends can reach search — Codex `/v1/alpha/search`, OpenAI
|
|
7
|
+
* Responses, and Anthropic Messages — and each of them independently answers
|
|
8
|
+
* ONE question: who executes the search?
|
|
9
|
+
*
|
|
10
|
+
* - `native` — the UPSTREAM executes it. Omnicross injects/relays and touches
|
|
11
|
+
* nothing else; the wire stays whatever the provider produced.
|
|
12
|
+
* - `managed` — OMNICROSS executes it through {@link SearchRuntime} and
|
|
13
|
+
* synthesizes protocol-compatible output.
|
|
14
|
+
* - `off` — the capability is not offered: a structured
|
|
15
|
+
* `unsupported_capability` error, never a bare 404 (plan §15).
|
|
16
|
+
*
|
|
17
|
+
* **Native and managed are never mixed on one wire exchange.** That is a plan
|
|
18
|
+
* hard constraint, and this module is how it is made structural rather than
|
|
19
|
+
* conventional: a request resolves its mode ONCE, before any wire bytes, and
|
|
20
|
+
* the two lanes downstream share no emission code. A helper that "falls back
|
|
21
|
+
* from native to managed" (or the reverse) would defeat the whole arrangement,
|
|
22
|
+
* so no such helper exists here and none should be added.
|
|
23
|
+
*
|
|
24
|
+
* The defaults preserve today's behavior exactly: Responses and Anthropic keep
|
|
25
|
+
* their existing native relay, and Codex is `off` — which is the one deliberate
|
|
26
|
+
* visible change in this change set, since `off` answers with a structured
|
|
27
|
+
* error where the router previously answered a generic 404.
|
|
28
|
+
*
|
|
29
|
+
* Pure vocabulary: no IO, no provider imports, no runtime. That is what lets
|
|
30
|
+
* `outbound-api` and `provider-proxy` both import it without dragging jsdom or
|
|
31
|
+
* undici into their module graphs.
|
|
32
|
+
*
|
|
33
|
+
* @module search/frontends
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/** Who executes a search for one protocol frontend. */
|
|
37
|
+
type SearchFrontendMode = 'native' | 'managed' | 'off';
|
|
38
|
+
/** The protocol frontends that can reach search. */
|
|
39
|
+
type SearchFrontendName = 'codex' | 'responses' | 'anthropic';
|
|
40
|
+
/** The resolved mode of every frontend. Total — every frontend always has one. */
|
|
41
|
+
type SearchFrontendModes = {
|
|
42
|
+
readonly [K in SearchFrontendName]: SearchFrontendMode;
|
|
43
|
+
};
|
|
44
|
+
/** Every frontend name, in the order configuration and doctor print them. */
|
|
45
|
+
declare const SEARCH_FRONTEND_NAMES: readonly SearchFrontendName[];
|
|
46
|
+
/** Every mode value, for validation messages and exhaustiveness. */
|
|
47
|
+
declare const SEARCH_FRONTEND_MODES: readonly SearchFrontendMode[];
|
|
48
|
+
/**
|
|
49
|
+
* The behavior-preserving defaults.
|
|
50
|
+
*
|
|
51
|
+
* `codex: 'off'` is not "search disabled" — the route exists and answers with a
|
|
52
|
+
* structured `unsupported_capability`. It is off because the Codex request and
|
|
53
|
+
* response schemas are UNVERIFIED (see `docs/design/search-baseline/wire-baseline.md`
|
|
54
|
+
* §1.2/§1.3); enabling it is a deliberate operator decision.
|
|
55
|
+
*/
|
|
56
|
+
declare const DEFAULT_SEARCH_FRONTEND_MODES: SearchFrontendModes;
|
|
57
|
+
/**
|
|
58
|
+
* The stable error code every frontend uses when its mode is `off`.
|
|
59
|
+
*
|
|
60
|
+
* Plan §15: a frontend may close managed search, but it must then say
|
|
61
|
+
* `unsupported_capability` — it must never keep exposing an unimplemented route
|
|
62
|
+
* as a 404. The string is shared so the three frontends cannot drift apart.
|
|
63
|
+
*/
|
|
64
|
+
declare const SEARCH_UNSUPPORTED_CAPABILITY_CODE = "unsupported_capability";
|
|
65
|
+
/**
|
|
66
|
+
* HTTP status for a search-taxonomy failure surfaced by a protocol frontend.
|
|
67
|
+
*
|
|
68
|
+
* The mapping answers "whose problem is it?" rather than "which code is it?":
|
|
69
|
+
* a client can act on 429 and 504; everything that failed on OUR side of the
|
|
70
|
+
* wire — a provider that broke, a policy that refused, a config we lack — is a
|
|
71
|
+
* 502-class fact about the gateway's upstream, not a fault in the request the
|
|
72
|
+
* client sent. The one 4xx here is `cancelled`, which is 499 because the client
|
|
73
|
+
* itself hung up.
|
|
74
|
+
*/
|
|
75
|
+
declare function searchErrorHttpStatus(code: SearchErrorCode): number;
|
|
76
|
+
/** Whether `value` is one of the three modes. */
|
|
77
|
+
declare function isSearchFrontendMode(value: unknown): value is SearchFrontendMode;
|
|
78
|
+
/**
|
|
79
|
+
* Read modes tolerantly: an unusable member falls back to its default rather
|
|
80
|
+
* than throwing, so a malformed config never takes the daemon down.
|
|
81
|
+
*
|
|
82
|
+
* Use {@link validateSearchFrontendModes} to REPORT what was unusable — the two
|
|
83
|
+
* run side by side exactly as the images config's tolerant read and strict
|
|
84
|
+
* validation do.
|
|
85
|
+
*/
|
|
86
|
+
declare function normalizeSearchFrontendModes(value: unknown): SearchFrontendModes;
|
|
87
|
+
/**
|
|
88
|
+
* Structured validation errors, naming the offending FIELD.
|
|
89
|
+
*
|
|
90
|
+
* The rejected VALUE is never echoed, only its type. A mode is not a secret,
|
|
91
|
+
* but a secret pasted into the wrong field is still a secret, and a validator
|
|
92
|
+
* that quotes whatever it was handed is one misconfiguration away from putting
|
|
93
|
+
* it in a log. Same no-echo rule as the images config validator.
|
|
94
|
+
*/
|
|
95
|
+
declare function validateSearchFrontendModes(value: unknown, path?: string): string[];
|
|
96
|
+
|
|
97
|
+
export { DEFAULT_SEARCH_FRONTEND_MODES as D, SEARCH_FRONTEND_MODES as S, SEARCH_FRONTEND_NAMES as a, SEARCH_UNSUPPORTED_CAPABILITY_CODE as b, type SearchFrontendMode as c, type SearchFrontendModes as d, type SearchFrontendName as e, isSearchFrontendMode as i, normalizeSearchFrontendModes as n, searchErrorHttpStatus as s, validateSearchFrontendModes as v };
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _chunkUPQIWJIEcjs = require('./chunk-UPQIWJIE.cjs');
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
@@ -49,4 +49,4 @@ var _chunkCTKM773Jcjs = require('./chunk-CTKM773J.cjs');
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
|
|
52
|
-
exports.DEFAULT_IMAGE_API_LIMITS =
|
|
52
|
+
exports.DEFAULT_IMAGE_API_LIMITS = _chunkUPQIWJIEcjs.DEFAULT_IMAGE_API_LIMITS; exports.IMAGE_REQUEST_DIRECTORY_MARKER_CONTENT = _chunkUPQIWJIEcjs.IMAGE_REQUEST_DIRECTORY_MARKER_CONTENT; exports.IMAGE_REQUEST_DIRECTORY_MARKER_NAME = _chunkUPQIWJIEcjs.IMAGE_REQUEST_DIRECTORY_MARKER_NAME; exports.ImageGenerationError = _chunkUPQIWJIEcjs.ImageGenerationError; exports.ImageOrchestrator = _chunkUPQIWJIEcjs.ImageOrchestrator; exports.ImageProviderRegistry = _chunkUPQIWJIEcjs.ImageProviderRegistry; exports.ImageRequestResourceScope = _chunkUPQIWJIEcjs.ImageRequestResourceScope; exports.InMemoryImageAsset = _chunkUPQIWJIEcjs.InMemoryImageAsset; exports.InMemoryImageReferenceStore = _chunkUPQIWJIEcjs.InMemoryImageReferenceStore; exports.InMemoryResponsesImageStateStore = _chunkUPQIWJIEcjs.InMemoryResponsesImageStateStore; exports.assertFiniteImageApiLimits = _chunkUPQIWJIEcjs.assertFiniteImageApiLimits; exports.createImageApiContributions = _chunkUPQIWJIEcjs.createImageApiContributions; exports.createImageRequestResourceScope = _chunkUPQIWJIEcjs.createImageRequestResourceScope; exports.createResponsesImageGenerationContribution = _chunkUPQIWJIEcjs.createResponsesImageGenerationContribution; exports.createSafeRemoteImageResolver = _chunkUPQIWJIEcjs.createSafeRemoteImageResolver; exports.emitImageTelemetry = _chunkUPQIWJIEcjs.emitImageTelemetry; exports.imageGenerationErrorFromPublic = _chunkUPQIWJIEcjs.imageGenerationErrorFromPublic; exports.inspectResponsesImageRequest = _chunkUPQIWJIEcjs.inspectResponsesImageRequest; exports.isImageGenerationError = _chunkUPQIWJIEcjs.isImageGenerationError; exports.normalizeImageGenerationError = _chunkUPQIWJIEcjs.normalizeImageGenerationError; exports.readImageAssetBytes = _chunkUPQIWJIEcjs.readImageAssetBytes; exports.resolveImageCapabilities = _chunkUPQIWJIEcjs.resolveImageCapabilities; exports.serializeImageGenerationError = _chunkUPQIWJIEcjs.serializeImageGenerationError; exports.validateResponsesImageSelection = _chunkUPQIWJIEcjs.validateResponsesImageSelection;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ImageCapabilityEvidenceLayer, ImageCapabilities, ImageGenerationErrorCode, ImageRetrySafety, ImageModerationDetails, ImageGenerationPublicError } from '@omnicross/contracts/image-generation-types';
|
|
2
|
-
import { al as ResponsesImageGenerationContributionDeps, ak as ResponsesImageGenerationContribution, am as ResponsesImageInspectionInput, a9 as ResponsesImageAdmission, a7 as ResponsesHostedToolSelection } from './types-
|
|
3
|
-
export { I as ImageAsset, e as ImageJob, f as ImageJobObservability, g as ImageJobObservabilitySnapshot, h as ImageOrchestrator, i as ImageOrchestratorOptions, j as ImageOrchestratorRunOptions, k as ImageProvider, l as ImageProviderContext, m as ImageProviderLease, n as ImageProviderRegistry, o as ImageProviderRequest, p as ImageReferenceLease, q as ImageReferenceResolution, r as ImageReferenceSaveInput, s as ImageReferenceStore, t as ImageReferenceValue, u as ImageRetentionPolicy, v as ImageTelemetryOutputMetadata, w as ImageTelemetryRecord, x as ImageTelemetrySink, y as InMemoryImageAsset, z as InMemoryImageReferenceStore, B as InMemoryResponsesImageStateStore, C as InMemoryResponsesImageStateStoreOptions, a6 as ResponsesHostedToolIdentity, a8 as ResponsesImageAction, aa as ResponsesImageCallBinding, ab as ResponsesImageCallId, ac as ResponsesImageCallResolution, ad as ResponsesImageCallStateLease, ae as ResponsesImageCompletedRecord, af as ResponsesImageEventAllocator, ag as ResponsesImageExecutionEvent, ah as ResponsesImageFailedRecord, ai as ResponsesImageGenerationCallItem, aj as ResponsesImageGenerationCallStartedItem, an as ResponsesImageNormalizedOptions, ao as ResponsesImagePartialEvent, ap as ResponsesImageRequestScope, aq as ResponsesImageRequestScopeInput, ar as ResponsesImageResponseResolution, as as ResponsesImageResponseStateLease, at as ResponsesImageSelectionPolicy, au as ResponsesImageStartedRecord, av as ResponsesImageStateCommitInput, aw as ResponsesImageStateStore, ax as ResponsesImageTrustedRuntime, aA as ResponsesSelectedImageCall, aL as emitImageTelemetry, aP as readImageAssetBytes } from './types-
|
|
4
|
-
import { d as ImageApiContributionsDeps, c as ImageApiContributions, R as RemoteImageAssetResolver } from './types-
|
|
5
|
-
export { C as CreateImageRequestResourceScopeOptions, D as DEFAULT_IMAGE_API_LIMITS, I as IMAGE_REQUEST_DIRECTORY_MARKER_CONTENT, a as IMAGE_REQUEST_DIRECTORY_MARKER_NAME, b as ImageApiAuditRecord, e as ImageApiLimits, f as ImageApiRuntime, g as ImageApiRuntimeResolver, h as ImageOpenAIOperationContribution, i as ImageRemoteMaterializer, j as ImageRequestResourceOwnership, k as ImageRequestResourceScope, l as ImageTemporaryResourceBudget, m as ImageTemporaryResourceBudgetLease, n as assertFiniteImageApiLimits, o as createImageRequestResourceScope } from './types-
|
|
2
|
+
import { al as ResponsesImageGenerationContributionDeps, ak as ResponsesImageGenerationContribution, am as ResponsesImageInspectionInput, a9 as ResponsesImageAdmission, a7 as ResponsesHostedToolSelection } from './types-BSIJdsyl.cjs';
|
|
3
|
+
export { I as ImageAsset, e as ImageJob, f as ImageJobObservability, g as ImageJobObservabilitySnapshot, h as ImageOrchestrator, i as ImageOrchestratorOptions, j as ImageOrchestratorRunOptions, k as ImageProvider, l as ImageProviderContext, m as ImageProviderLease, n as ImageProviderRegistry, o as ImageProviderRequest, p as ImageReferenceLease, q as ImageReferenceResolution, r as ImageReferenceSaveInput, s as ImageReferenceStore, t as ImageReferenceValue, u as ImageRetentionPolicy, v as ImageTelemetryOutputMetadata, w as ImageTelemetryRecord, x as ImageTelemetrySink, y as InMemoryImageAsset, z as InMemoryImageReferenceStore, B as InMemoryResponsesImageStateStore, C as InMemoryResponsesImageStateStoreOptions, a6 as ResponsesHostedToolIdentity, a8 as ResponsesImageAction, aa as ResponsesImageCallBinding, ab as ResponsesImageCallId, ac as ResponsesImageCallResolution, ad as ResponsesImageCallStateLease, ae as ResponsesImageCompletedRecord, af as ResponsesImageEventAllocator, ag as ResponsesImageExecutionEvent, ah as ResponsesImageFailedRecord, ai as ResponsesImageGenerationCallItem, aj as ResponsesImageGenerationCallStartedItem, an as ResponsesImageNormalizedOptions, ao as ResponsesImagePartialEvent, ap as ResponsesImageRequestScope, aq as ResponsesImageRequestScopeInput, ar as ResponsesImageResponseResolution, as as ResponsesImageResponseStateLease, at as ResponsesImageSelectionPolicy, au as ResponsesImageStartedRecord, av as ResponsesImageStateCommitInput, aw as ResponsesImageStateStore, ax as ResponsesImageTrustedRuntime, aA as ResponsesSelectedImageCall, aL as emitImageTelemetry, aP as readImageAssetBytes } from './types-BSIJdsyl.cjs';
|
|
4
|
+
import { d as ImageApiContributionsDeps, c as ImageApiContributions, R as RemoteImageAssetResolver } from './types-Be-yt_6T.cjs';
|
|
5
|
+
export { C as CreateImageRequestResourceScopeOptions, D as DEFAULT_IMAGE_API_LIMITS, I as IMAGE_REQUEST_DIRECTORY_MARKER_CONTENT, a as IMAGE_REQUEST_DIRECTORY_MARKER_NAME, b as ImageApiAuditRecord, e as ImageApiLimits, f as ImageApiRuntime, g as ImageApiRuntimeResolver, h as ImageOpenAIOperationContribution, i as ImageRemoteMaterializer, j as ImageRequestResourceOwnership, k as ImageRequestResourceScope, l as ImageTemporaryResourceBudget, m as ImageTemporaryResourceBudgetLease, n as assertFiniteImageApiLimits, o as createImageRequestResourceScope } from './types-Be-yt_6T.cjs';
|
|
6
6
|
import 'node:http';
|
|
7
7
|
import '@omnicross/contracts/completion-types';
|
|
8
8
|
import '@omnicross/contracts/usage-stats-types';
|
|
@@ -20,6 +20,9 @@ import './transformer/types.cjs';
|
|
|
20
20
|
import './transformer/TransformerService.cjs';
|
|
21
21
|
import './ports/web-search-backend.cjs';
|
|
22
22
|
import '@omnicross/contracts/websearch-types';
|
|
23
|
+
import './frontends-Doz0RaWu.cjs';
|
|
24
|
+
import '@omnicross/contracts/search-types';
|
|
25
|
+
import './runtime-t8AZacFF.cjs';
|
|
23
26
|
import 'node:fs/promises';
|
|
24
27
|
|
|
25
28
|
declare function createResponsesImageGenerationContribution(deps: ResponsesImageGenerationContributionDeps): ResponsesImageGenerationContribution;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ImageCapabilityEvidenceLayer, ImageCapabilities, ImageGenerationErrorCode, ImageRetrySafety, ImageModerationDetails, ImageGenerationPublicError } from '@omnicross/contracts/image-generation-types';
|
|
2
|
-
import { al as ResponsesImageGenerationContributionDeps, ak as ResponsesImageGenerationContribution, am as ResponsesImageInspectionInput, a9 as ResponsesImageAdmission, a7 as ResponsesHostedToolSelection } from './types-
|
|
3
|
-
export { I as ImageAsset, e as ImageJob, f as ImageJobObservability, g as ImageJobObservabilitySnapshot, h as ImageOrchestrator, i as ImageOrchestratorOptions, j as ImageOrchestratorRunOptions, k as ImageProvider, l as ImageProviderContext, m as ImageProviderLease, n as ImageProviderRegistry, o as ImageProviderRequest, p as ImageReferenceLease, q as ImageReferenceResolution, r as ImageReferenceSaveInput, s as ImageReferenceStore, t as ImageReferenceValue, u as ImageRetentionPolicy, v as ImageTelemetryOutputMetadata, w as ImageTelemetryRecord, x as ImageTelemetrySink, y as InMemoryImageAsset, z as InMemoryImageReferenceStore, B as InMemoryResponsesImageStateStore, C as InMemoryResponsesImageStateStoreOptions, a6 as ResponsesHostedToolIdentity, a8 as ResponsesImageAction, aa as ResponsesImageCallBinding, ab as ResponsesImageCallId, ac as ResponsesImageCallResolution, ad as ResponsesImageCallStateLease, ae as ResponsesImageCompletedRecord, af as ResponsesImageEventAllocator, ag as ResponsesImageExecutionEvent, ah as ResponsesImageFailedRecord, ai as ResponsesImageGenerationCallItem, aj as ResponsesImageGenerationCallStartedItem, an as ResponsesImageNormalizedOptions, ao as ResponsesImagePartialEvent, ap as ResponsesImageRequestScope, aq as ResponsesImageRequestScopeInput, ar as ResponsesImageResponseResolution, as as ResponsesImageResponseStateLease, at as ResponsesImageSelectionPolicy, au as ResponsesImageStartedRecord, av as ResponsesImageStateCommitInput, aw as ResponsesImageStateStore, ax as ResponsesImageTrustedRuntime, aA as ResponsesSelectedImageCall, aL as emitImageTelemetry, aP as readImageAssetBytes } from './types-
|
|
4
|
-
import { d as ImageApiContributionsDeps, c as ImageApiContributions, R as RemoteImageAssetResolver } from './types-
|
|
5
|
-
export { C as CreateImageRequestResourceScopeOptions, D as DEFAULT_IMAGE_API_LIMITS, I as IMAGE_REQUEST_DIRECTORY_MARKER_CONTENT, a as IMAGE_REQUEST_DIRECTORY_MARKER_NAME, b as ImageApiAuditRecord, e as ImageApiLimits, f as ImageApiRuntime, g as ImageApiRuntimeResolver, h as ImageOpenAIOperationContribution, i as ImageRemoteMaterializer, j as ImageRequestResourceOwnership, k as ImageRequestResourceScope, l as ImageTemporaryResourceBudget, m as ImageTemporaryResourceBudgetLease, n as assertFiniteImageApiLimits, o as createImageRequestResourceScope } from './types-
|
|
2
|
+
import { al as ResponsesImageGenerationContributionDeps, ak as ResponsesImageGenerationContribution, am as ResponsesImageInspectionInput, a9 as ResponsesImageAdmission, a7 as ResponsesHostedToolSelection } from './types-By9Tg6-I.js';
|
|
3
|
+
export { I as ImageAsset, e as ImageJob, f as ImageJobObservability, g as ImageJobObservabilitySnapshot, h as ImageOrchestrator, i as ImageOrchestratorOptions, j as ImageOrchestratorRunOptions, k as ImageProvider, l as ImageProviderContext, m as ImageProviderLease, n as ImageProviderRegistry, o as ImageProviderRequest, p as ImageReferenceLease, q as ImageReferenceResolution, r as ImageReferenceSaveInput, s as ImageReferenceStore, t as ImageReferenceValue, u as ImageRetentionPolicy, v as ImageTelemetryOutputMetadata, w as ImageTelemetryRecord, x as ImageTelemetrySink, y as InMemoryImageAsset, z as InMemoryImageReferenceStore, B as InMemoryResponsesImageStateStore, C as InMemoryResponsesImageStateStoreOptions, a6 as ResponsesHostedToolIdentity, a8 as ResponsesImageAction, aa as ResponsesImageCallBinding, ab as ResponsesImageCallId, ac as ResponsesImageCallResolution, ad as ResponsesImageCallStateLease, ae as ResponsesImageCompletedRecord, af as ResponsesImageEventAllocator, ag as ResponsesImageExecutionEvent, ah as ResponsesImageFailedRecord, ai as ResponsesImageGenerationCallItem, aj as ResponsesImageGenerationCallStartedItem, an as ResponsesImageNormalizedOptions, ao as ResponsesImagePartialEvent, ap as ResponsesImageRequestScope, aq as ResponsesImageRequestScopeInput, ar as ResponsesImageResponseResolution, as as ResponsesImageResponseStateLease, at as ResponsesImageSelectionPolicy, au as ResponsesImageStartedRecord, av as ResponsesImageStateCommitInput, aw as ResponsesImageStateStore, ax as ResponsesImageTrustedRuntime, aA as ResponsesSelectedImageCall, aL as emitImageTelemetry, aP as readImageAssetBytes } from './types-By9Tg6-I.js';
|
|
4
|
+
import { d as ImageApiContributionsDeps, c as ImageApiContributions, R as RemoteImageAssetResolver } from './types-Dm4_36V4.js';
|
|
5
|
+
export { C as CreateImageRequestResourceScopeOptions, D as DEFAULT_IMAGE_API_LIMITS, I as IMAGE_REQUEST_DIRECTORY_MARKER_CONTENT, a as IMAGE_REQUEST_DIRECTORY_MARKER_NAME, b as ImageApiAuditRecord, e as ImageApiLimits, f as ImageApiRuntime, g as ImageApiRuntimeResolver, h as ImageOpenAIOperationContribution, i as ImageRemoteMaterializer, j as ImageRequestResourceOwnership, k as ImageRequestResourceScope, l as ImageTemporaryResourceBudget, m as ImageTemporaryResourceBudgetLease, n as assertFiniteImageApiLimits, o as createImageRequestResourceScope } from './types-Dm4_36V4.js';
|
|
6
6
|
import 'node:http';
|
|
7
7
|
import '@omnicross/contracts/completion-types';
|
|
8
8
|
import '@omnicross/contracts/usage-stats-types';
|
|
@@ -20,6 +20,9 @@ import './transformer/types.js';
|
|
|
20
20
|
import './transformer/TransformerService.js';
|
|
21
21
|
import './ports/web-search-backend.js';
|
|
22
22
|
import '@omnicross/contracts/websearch-types';
|
|
23
|
+
import './frontends-Doz0RaWu.js';
|
|
24
|
+
import '@omnicross/contracts/search-types';
|
|
25
|
+
import './runtime-t8AZacFF.js';
|
|
23
26
|
import 'node:fs/promises';
|
|
24
27
|
|
|
25
28
|
declare function createResponsesImageGenerationContribution(deps: ResponsesImageGenerationContributionDeps): ResponsesImageGenerationContribution;
|
package/dist/image-generation.js
CHANGED