@omnicross/core 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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-NZYN7C3P.cjs → chunk-2RCCLQYV.cjs} +53 -53
- package/dist/{chunk-CDHS2QDC.js → chunk-4PFWFODB.js} +53 -53
- package/dist/{chunk-OST5RJOJ.cjs → chunk-4Z3ZLLC2.cjs} +13 -7
- package/dist/chunk-7RJI3NDI.cjs +236 -0
- package/dist/chunk-BTBEJRGL.cjs +781 -0
- package/dist/chunk-DBBR6RHF.js +236 -0
- package/dist/chunk-DXWFBBSK.js +781 -0
- package/dist/chunk-E4QHVXV5.cjs +118 -0
- package/dist/chunk-L7O2YQ5O.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-MZEGQSKQ.js +118 -0
- package/dist/chunk-PTU7SXM3.cjs +386 -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-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-5NCT3J3T.cjs +8 -0
- package/dist/runtime-JTHUWCBM.js +8 -0
- package/dist/runtime-t8AZacFF.d.cts +233 -0
- package/dist/runtime-t8AZacFF.d.ts +233 -0
- package/dist/search/api.cjs +766 -0
- package/dist/search/api.d.cts +385 -0
- package/dist/search/api.d.ts +385 -0
- package/dist/search/api.js +766 -0
- package/dist/search/http.cjs +37 -0
- package/dist/search/http.d.cts +323 -0
- package/dist/search/http.d.ts +323 -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 +6 -3
- package/dist/{chunk-6OC3ORW6.js → chunk-EUZRH544.js} +3 -3
- package/dist/{chunk-SQMAEDNE.cjs → chunk-POUTD5AM.cjs} +2 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_MAX_RESULTS,
|
|
3
|
+
DEFAULT_SEARCH_TIMEOUT_MS,
|
|
4
|
+
HTTP_BING_PROVIDER_ID,
|
|
5
|
+
HTTP_DUCKDUCKGO_PROVIDER_ID,
|
|
6
|
+
HTTP_SEARCH_CAPABILITIES,
|
|
7
|
+
HttpBingProvider,
|
|
8
|
+
HttpDuckDuckGoProvider,
|
|
9
|
+
MAX_REDIRECTS,
|
|
10
|
+
MAX_RESULTS,
|
|
11
|
+
SEARCH_BROWSER_HEADERS,
|
|
12
|
+
SEARCH_HTTP_TRANSPORT_ID,
|
|
13
|
+
SEARCH_RESPONSE_BYTES,
|
|
14
|
+
builtinHttpSearchContributions,
|
|
15
|
+
clampMaxResults,
|
|
16
|
+
createSearchHttpTransport,
|
|
17
|
+
defaultSearchHttpTransport
|
|
18
|
+
} from "../chunk-DXWFBBSK.js";
|
|
19
|
+
import "../chunk-DBBR6RHF.js";
|
|
20
|
+
export {
|
|
21
|
+
DEFAULT_MAX_RESULTS,
|
|
22
|
+
DEFAULT_SEARCH_TIMEOUT_MS,
|
|
23
|
+
HTTP_BING_PROVIDER_ID,
|
|
24
|
+
HTTP_DUCKDUCKGO_PROVIDER_ID,
|
|
25
|
+
HTTP_SEARCH_CAPABILITIES,
|
|
26
|
+
HttpBingProvider,
|
|
27
|
+
HttpDuckDuckGoProvider,
|
|
28
|
+
MAX_REDIRECTS,
|
|
29
|
+
MAX_RESULTS,
|
|
30
|
+
SEARCH_BROWSER_HEADERS,
|
|
31
|
+
SEARCH_HTTP_TRANSPORT_ID,
|
|
32
|
+
SEARCH_RESPONSE_BYTES,
|
|
33
|
+
builtinHttpSearchContributions,
|
|
34
|
+
clampMaxResults,
|
|
35
|
+
createSearchHttpTransport,
|
|
36
|
+
defaultSearchHttpTransport
|
|
37
|
+
};
|
package/dist/search.cjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkPTU7SXM3cjs = require('./chunk-PTU7SXM3.cjs');
|
|
12
|
+
require('./chunk-BTBEJRGL.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
var _chunk7RJI3NDIcjs = require('./chunk-7RJI3NDI.cjs');
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var _chunkE4QHVXV5cjs = require('./chunk-E4QHVXV5.cjs');
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
exports.DEFAULT_NORMALIZED_MAX_RESULTS = _chunkPTU7SXM3cjs.DEFAULT_NORMALIZED_MAX_RESULTS; exports.DEFAULT_SEARCH_EGRESS_POLICY = _chunk7RJI3NDIcjs.DEFAULT_SEARCH_EGRESS_POLICY; exports.DEFAULT_SEARCH_FRONTEND_MODES = _chunkE4QHVXV5cjs.DEFAULT_SEARCH_FRONTEND_MODES; exports.SEARCH_FRONTEND_MODES = _chunkE4QHVXV5cjs.SEARCH_FRONTEND_MODES; exports.SEARCH_FRONTEND_NAMES = _chunkE4QHVXV5cjs.SEARCH_FRONTEND_NAMES; exports.SEARCH_UNSUPPORTED_CAPABILITY_CODE = _chunkE4QHVXV5cjs.SEARCH_UNSUPPORTED_CAPABILITY_CODE; exports.SearchOrchestrator = _chunkPTU7SXM3cjs.SearchOrchestrator; exports.SearchProviderRegistry = _chunkPTU7SXM3cjs.SearchProviderRegistry; exports.SearchRegistryError = _chunkPTU7SXM3cjs.SearchRegistryError; exports.assertEgressAddressAllowed = _chunk7RJI3NDIcjs.assertEgressAddressAllowed; exports.createEgressGuardedDispatcher = _chunk7RJI3NDIcjs.createEgressGuardedDispatcher; exports.createEgressGuardedLookup = _chunk7RJI3NDIcjs.createEgressGuardedLookup; exports.createSearchRuntime = _chunkPTU7SXM3cjs.createSearchRuntime; exports.findEgressDenial = _chunk7RJI3NDIcjs.findEgressDenial; exports.hashSearchQuery = _chunkPTU7SXM3cjs.hashSearchQuery; exports.isDirectResultUrl = _chunkPTU7SXM3cjs.isDirectResultUrl; exports.isSearchFrontendMode = _chunkE4QHVXV5cjs.isSearchFrontendMode; exports.normalizeSearchFrontendModes = _chunkE4QHVXV5cjs.normalizeSearchFrontendModes; exports.normalizeSearchResults = _chunkPTU7SXM3cjs.normalizeSearchResults; exports.normalizedResultLimit = _chunkPTU7SXM3cjs.normalizedResultLimit; exports.searchErrorHttpStatus = _chunkE4QHVXV5cjs.searchErrorHttpStatus; exports.searchRuntimeAsWebSearchBackend = _chunkE4QHVXV5cjs.searchRuntimeAsWebSearchBackend; exports.validateEgressUrl = _chunk7RJI3NDIcjs.validateEgressUrl; exports.validateSearchFrontendModes = _chunkE4QHVXV5cjs.validateSearchFrontendModes;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export { D as DEFAULT_SEARCH_EGRESS_POLICY, E as EgressDenialReason, a as EgressDnsLookup, S as SearchEgressPolicy, b as assertEgressAddressAllowed, c as createEgressGuardedDispatcher, d as createEgressGuardedLookup, f as findEgressDenial, v as validateEgressUrl } from './egress-I46O_p5L.cjs';
|
|
2
|
+
export { D as DEFAULT_SEARCH_FRONTEND_MODES, S as SEARCH_FRONTEND_MODES, a as SEARCH_FRONTEND_NAMES, b as SEARCH_UNSUPPORTED_CAPABILITY_CODE, c as SearchFrontendMode, d as SearchFrontendModes, e as SearchFrontendName, i as isSearchFrontendMode, n as normalizeSearchFrontendModes, s as searchErrorHttpStatus, v as validateSearchFrontendModes } from './frontends-Doz0RaWu.cjs';
|
|
3
|
+
import { SearchResult } from '@omnicross/contracts/search-types';
|
|
4
|
+
import { S as SearchRuntime } from './runtime-t8AZacFF.cjs';
|
|
5
|
+
export { a as SearchOrchestrator, b as SearchOrchestratorOptions, c as SearchProviderRegistry, d as SearchProviderRegistryOptions, e as SearchRegistryError, f as SearchRuntimeEventListener, g as SearchRuntimeOptions, h as createSearchRuntime, i as hashSearchQuery } from './runtime-t8AZacFF.cjs';
|
|
6
|
+
import { WebSearchBackend } from './ports/web-search-backend.cjs';
|
|
7
|
+
import 'node:dns';
|
|
8
|
+
import 'undici';
|
|
9
|
+
import '@omnicross/contracts/websearch-types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Result normalization — the baseline's safety checks, ported.
|
|
13
|
+
*
|
|
14
|
+
* A search result is untrusted input: it is produced by a page or an API the
|
|
15
|
+
* user does not control, and it is handed straight to a model that may follow
|
|
16
|
+
* the URL. The baseline (`elftia-search-baseline.md` §6.3/§6.4) filtered three
|
|
17
|
+
* things before letting results out of the orchestrator, and all three are kept
|
|
18
|
+
* here: a result needs a title, its URL must be a DIRECT result rather than a
|
|
19
|
+
* search-engine redirect, and the set must not repeat itself.
|
|
20
|
+
*
|
|
21
|
+
* One baseline behavior is deliberately NOT ported: **duplicate-only
|
|
22
|
+
* invalidation** — the rule that turned "exactly one survivor out of more than
|
|
23
|
+
* one structurally usable item" into `Provider returned only duplicate results`.
|
|
24
|
+
* It existed to catch a scrape that collapsed to a single repeated link, and
|
|
25
|
+
* 阶段2's HTTP providers now detect that themselves and raise `parse_failed`.
|
|
26
|
+
* For an API or host provider, one deduplicated result is a legitimate answer,
|
|
27
|
+
* not a failure. Recorded as an allowed difference for 阶段5's comparison.
|
|
28
|
+
*
|
|
29
|
+
* Normalization NEVER fails: it filters. Whether a search succeeded is the
|
|
30
|
+
* provider's answer, decided before these results get here — turning "every
|
|
31
|
+
* item was filtered" back into an error would hand the fallback policy a third
|
|
32
|
+
* outcome to interpret, which is exactly the conflation 阶段2 removed.
|
|
33
|
+
*
|
|
34
|
+
* @module search/normalize
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/** Results returned when the caller expresses no preference (baseline parity). */
|
|
38
|
+
declare const DEFAULT_NORMALIZED_MAX_RESULTS = 5;
|
|
39
|
+
/**
|
|
40
|
+
* Whether a URL points at a result rather than back at a search engine.
|
|
41
|
+
*
|
|
42
|
+
* Accepts only `http:`/`https:`; an unparseable URL is rejected. This is the
|
|
43
|
+
* check that keeps a SERP-redirect link — which re-runs a search instead of
|
|
44
|
+
* opening a page — out of a result set.
|
|
45
|
+
*/
|
|
46
|
+
declare function isDirectResultUrl(rawUrl: string): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* How many results to keep.
|
|
49
|
+
*
|
|
50
|
+
* `Math.max(1, …)` with no upper clamp, per baseline §4.4 — a provider's own
|
|
51
|
+
* limit is the provider's business, and imposing a second ceiling here would
|
|
52
|
+
* silently contradict whatever it declared in its capabilities.
|
|
53
|
+
*
|
|
54
|
+
* Non-finite input falls back to the default rather than propagating: 阶段2's
|
|
55
|
+
* `clampMaxResults` left `NaN` at baseline parity on purpose and named the
|
|
56
|
+
* runtime that owns option handling — this one — as where it should be
|
|
57
|
+
* normalized. Without this, a `NaN` reaches `slice(0, NaN)` and silently
|
|
58
|
+
* discards every result.
|
|
59
|
+
*/
|
|
60
|
+
declare function normalizedResultLimit(maxResults: number | undefined): number;
|
|
61
|
+
/**
|
|
62
|
+
* Apply the baseline's safety checks to one provider's results.
|
|
63
|
+
*
|
|
64
|
+
* Order is preserved; trimming happens before every comparison, so dedupe sees
|
|
65
|
+
* the same URL string a consumer will.
|
|
66
|
+
*/
|
|
67
|
+
declare function normalizeSearchResults(results: readonly SearchResult[], maxResults?: number): SearchResult[];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A legacy `WebSearchBackend` backed by the new runtime — migration scaffolding.
|
|
71
|
+
*
|
|
72
|
+
* **Nothing in Omnicross uses this yet, on purpose.** It exists so 阶段5 can
|
|
73
|
+
* move the remaining `WebSearchBackend` consumers (the Anthropic ingress
|
|
74
|
+
* `webSearchService` hint, anything a host passes in) onto the runtime one at a
|
|
75
|
+
* time instead of in a flag day. Like `@omnicross/contracts/search-compat`, it
|
|
76
|
+
* is Phase-1 debt with a scheduled deletion (阶段8) and is meant to be
|
|
77
|
+
* grep-able as such.
|
|
78
|
+
*
|
|
79
|
+
* The port TYPE stays exactly where it is — Elftia imports
|
|
80
|
+
* `@omnicross/core/ports/web-search-backend` directly — and this module only
|
|
81
|
+
* adds an implementation of it.
|
|
82
|
+
*
|
|
83
|
+
* The legacy conversions are NOT re-derived here: `toLegacyWebSearchResponse`
|
|
84
|
+
* and `searchErrorToLegacyWebSearchResponse` are child 2's single, tested
|
|
85
|
+
* mapping, and having a second one is how the two vocabularies would start to
|
|
86
|
+
* drift.
|
|
87
|
+
*
|
|
88
|
+
* @module search/webSearchBackendCompat
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/** Optional capabilities the runtime itself does not provide. */
|
|
92
|
+
interface SearchRuntimeBackendOptions {
|
|
93
|
+
/**
|
|
94
|
+
* URL reading delegate.
|
|
95
|
+
*
|
|
96
|
+
* The runtime orchestrates `search` only — reading a URL stays with
|
|
97
|
+
* `web_fetch`'s own path until the reader story settles (阶段4+). Without a
|
|
98
|
+
* delegate, `readUrl` answers with a legacy failure response naming the
|
|
99
|
+
* missing capability rather than pretending to have read anything.
|
|
100
|
+
*/
|
|
101
|
+
readUrl?: WebSearchBackend['readUrl'];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Present a {@link SearchRuntime} through the legacy port interface.
|
|
105
|
+
*
|
|
106
|
+
* `search` PINS the runtime to the requested provider: a legacy caller naming a
|
|
107
|
+
* provider is making an explicit choice, and quietly answering from a different
|
|
108
|
+
* one would both surprise it and send its query somewhere it did not ask for.
|
|
109
|
+
* Legacy callers that want fallback get it by looping, exactly as they do today.
|
|
110
|
+
*/
|
|
111
|
+
declare function searchRuntimeAsWebSearchBackend(runtime: SearchRuntime, options?: SearchRuntimeBackendOptions): WebSearchBackend;
|
|
112
|
+
|
|
113
|
+
export { DEFAULT_NORMALIZED_MAX_RESULTS, SearchRuntime, type SearchRuntimeBackendOptions, isDirectResultUrl, normalizeSearchResults, normalizedResultLimit, searchRuntimeAsWebSearchBackend };
|
package/dist/search.d.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export { D as DEFAULT_SEARCH_EGRESS_POLICY, E as EgressDenialReason, a as EgressDnsLookup, S as SearchEgressPolicy, b as assertEgressAddressAllowed, c as createEgressGuardedDispatcher, d as createEgressGuardedLookup, f as findEgressDenial, v as validateEgressUrl } from './egress-I46O_p5L.js';
|
|
2
|
+
export { D as DEFAULT_SEARCH_FRONTEND_MODES, S as SEARCH_FRONTEND_MODES, a as SEARCH_FRONTEND_NAMES, b as SEARCH_UNSUPPORTED_CAPABILITY_CODE, c as SearchFrontendMode, d as SearchFrontendModes, e as SearchFrontendName, i as isSearchFrontendMode, n as normalizeSearchFrontendModes, s as searchErrorHttpStatus, v as validateSearchFrontendModes } from './frontends-Doz0RaWu.js';
|
|
3
|
+
import { SearchResult } from '@omnicross/contracts/search-types';
|
|
4
|
+
import { S as SearchRuntime } from './runtime-t8AZacFF.js';
|
|
5
|
+
export { a as SearchOrchestrator, b as SearchOrchestratorOptions, c as SearchProviderRegistry, d as SearchProviderRegistryOptions, e as SearchRegistryError, f as SearchRuntimeEventListener, g as SearchRuntimeOptions, h as createSearchRuntime, i as hashSearchQuery } from './runtime-t8AZacFF.js';
|
|
6
|
+
import { WebSearchBackend } from './ports/web-search-backend.js';
|
|
7
|
+
import 'node:dns';
|
|
8
|
+
import 'undici';
|
|
9
|
+
import '@omnicross/contracts/websearch-types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Result normalization — the baseline's safety checks, ported.
|
|
13
|
+
*
|
|
14
|
+
* A search result is untrusted input: it is produced by a page or an API the
|
|
15
|
+
* user does not control, and it is handed straight to a model that may follow
|
|
16
|
+
* the URL. The baseline (`elftia-search-baseline.md` §6.3/§6.4) filtered three
|
|
17
|
+
* things before letting results out of the orchestrator, and all three are kept
|
|
18
|
+
* here: a result needs a title, its URL must be a DIRECT result rather than a
|
|
19
|
+
* search-engine redirect, and the set must not repeat itself.
|
|
20
|
+
*
|
|
21
|
+
* One baseline behavior is deliberately NOT ported: **duplicate-only
|
|
22
|
+
* invalidation** — the rule that turned "exactly one survivor out of more than
|
|
23
|
+
* one structurally usable item" into `Provider returned only duplicate results`.
|
|
24
|
+
* It existed to catch a scrape that collapsed to a single repeated link, and
|
|
25
|
+
* 阶段2's HTTP providers now detect that themselves and raise `parse_failed`.
|
|
26
|
+
* For an API or host provider, one deduplicated result is a legitimate answer,
|
|
27
|
+
* not a failure. Recorded as an allowed difference for 阶段5's comparison.
|
|
28
|
+
*
|
|
29
|
+
* Normalization NEVER fails: it filters. Whether a search succeeded is the
|
|
30
|
+
* provider's answer, decided before these results get here — turning "every
|
|
31
|
+
* item was filtered" back into an error would hand the fallback policy a third
|
|
32
|
+
* outcome to interpret, which is exactly the conflation 阶段2 removed.
|
|
33
|
+
*
|
|
34
|
+
* @module search/normalize
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/** Results returned when the caller expresses no preference (baseline parity). */
|
|
38
|
+
declare const DEFAULT_NORMALIZED_MAX_RESULTS = 5;
|
|
39
|
+
/**
|
|
40
|
+
* Whether a URL points at a result rather than back at a search engine.
|
|
41
|
+
*
|
|
42
|
+
* Accepts only `http:`/`https:`; an unparseable URL is rejected. This is the
|
|
43
|
+
* check that keeps a SERP-redirect link — which re-runs a search instead of
|
|
44
|
+
* opening a page — out of a result set.
|
|
45
|
+
*/
|
|
46
|
+
declare function isDirectResultUrl(rawUrl: string): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* How many results to keep.
|
|
49
|
+
*
|
|
50
|
+
* `Math.max(1, …)` with no upper clamp, per baseline §4.4 — a provider's own
|
|
51
|
+
* limit is the provider's business, and imposing a second ceiling here would
|
|
52
|
+
* silently contradict whatever it declared in its capabilities.
|
|
53
|
+
*
|
|
54
|
+
* Non-finite input falls back to the default rather than propagating: 阶段2's
|
|
55
|
+
* `clampMaxResults` left `NaN` at baseline parity on purpose and named the
|
|
56
|
+
* runtime that owns option handling — this one — as where it should be
|
|
57
|
+
* normalized. Without this, a `NaN` reaches `slice(0, NaN)` and silently
|
|
58
|
+
* discards every result.
|
|
59
|
+
*/
|
|
60
|
+
declare function normalizedResultLimit(maxResults: number | undefined): number;
|
|
61
|
+
/**
|
|
62
|
+
* Apply the baseline's safety checks to one provider's results.
|
|
63
|
+
*
|
|
64
|
+
* Order is preserved; trimming happens before every comparison, so dedupe sees
|
|
65
|
+
* the same URL string a consumer will.
|
|
66
|
+
*/
|
|
67
|
+
declare function normalizeSearchResults(results: readonly SearchResult[], maxResults?: number): SearchResult[];
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A legacy `WebSearchBackend` backed by the new runtime — migration scaffolding.
|
|
71
|
+
*
|
|
72
|
+
* **Nothing in Omnicross uses this yet, on purpose.** It exists so 阶段5 can
|
|
73
|
+
* move the remaining `WebSearchBackend` consumers (the Anthropic ingress
|
|
74
|
+
* `webSearchService` hint, anything a host passes in) onto the runtime one at a
|
|
75
|
+
* time instead of in a flag day. Like `@omnicross/contracts/search-compat`, it
|
|
76
|
+
* is Phase-1 debt with a scheduled deletion (阶段8) and is meant to be
|
|
77
|
+
* grep-able as such.
|
|
78
|
+
*
|
|
79
|
+
* The port TYPE stays exactly where it is — Elftia imports
|
|
80
|
+
* `@omnicross/core/ports/web-search-backend` directly — and this module only
|
|
81
|
+
* adds an implementation of it.
|
|
82
|
+
*
|
|
83
|
+
* The legacy conversions are NOT re-derived here: `toLegacyWebSearchResponse`
|
|
84
|
+
* and `searchErrorToLegacyWebSearchResponse` are child 2's single, tested
|
|
85
|
+
* mapping, and having a second one is how the two vocabularies would start to
|
|
86
|
+
* drift.
|
|
87
|
+
*
|
|
88
|
+
* @module search/webSearchBackendCompat
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/** Optional capabilities the runtime itself does not provide. */
|
|
92
|
+
interface SearchRuntimeBackendOptions {
|
|
93
|
+
/**
|
|
94
|
+
* URL reading delegate.
|
|
95
|
+
*
|
|
96
|
+
* The runtime orchestrates `search` only — reading a URL stays with
|
|
97
|
+
* `web_fetch`'s own path until the reader story settles (阶段4+). Without a
|
|
98
|
+
* delegate, `readUrl` answers with a legacy failure response naming the
|
|
99
|
+
* missing capability rather than pretending to have read anything.
|
|
100
|
+
*/
|
|
101
|
+
readUrl?: WebSearchBackend['readUrl'];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Present a {@link SearchRuntime} through the legacy port interface.
|
|
105
|
+
*
|
|
106
|
+
* `search` PINS the runtime to the requested provider: a legacy caller naming a
|
|
107
|
+
* provider is making an explicit choice, and quietly answering from a different
|
|
108
|
+
* one would both surprise it and send its query somewhere it did not ask for.
|
|
109
|
+
* Legacy callers that want fallback get it by looping, exactly as they do today.
|
|
110
|
+
*/
|
|
111
|
+
declare function searchRuntimeAsWebSearchBackend(runtime: SearchRuntime, options?: SearchRuntimeBackendOptions): WebSearchBackend;
|
|
112
|
+
|
|
113
|
+
export { DEFAULT_NORMALIZED_MAX_RESULTS, SearchRuntime, type SearchRuntimeBackendOptions, isDirectResultUrl, normalizeSearchResults, normalizedResultLimit, searchRuntimeAsWebSearchBackend };
|
package/dist/search.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_NORMALIZED_MAX_RESULTS,
|
|
3
|
+
SearchOrchestrator,
|
|
4
|
+
SearchProviderRegistry,
|
|
5
|
+
SearchRegistryError,
|
|
6
|
+
createSearchRuntime,
|
|
7
|
+
hashSearchQuery,
|
|
8
|
+
isDirectResultUrl,
|
|
9
|
+
normalizeSearchResults,
|
|
10
|
+
normalizedResultLimit
|
|
11
|
+
} from "./chunk-L7O2YQ5O.js";
|
|
12
|
+
import "./chunk-DXWFBBSK.js";
|
|
13
|
+
import {
|
|
14
|
+
DEFAULT_SEARCH_EGRESS_POLICY,
|
|
15
|
+
assertEgressAddressAllowed,
|
|
16
|
+
createEgressGuardedDispatcher,
|
|
17
|
+
createEgressGuardedLookup,
|
|
18
|
+
findEgressDenial,
|
|
19
|
+
validateEgressUrl
|
|
20
|
+
} from "./chunk-DBBR6RHF.js";
|
|
21
|
+
import {
|
|
22
|
+
DEFAULT_SEARCH_FRONTEND_MODES,
|
|
23
|
+
SEARCH_FRONTEND_MODES,
|
|
24
|
+
SEARCH_FRONTEND_NAMES,
|
|
25
|
+
SEARCH_UNSUPPORTED_CAPABILITY_CODE,
|
|
26
|
+
isSearchFrontendMode,
|
|
27
|
+
normalizeSearchFrontendModes,
|
|
28
|
+
searchErrorHttpStatus,
|
|
29
|
+
searchRuntimeAsWebSearchBackend,
|
|
30
|
+
validateSearchFrontendModes
|
|
31
|
+
} from "./chunk-MZEGQSKQ.js";
|
|
32
|
+
export {
|
|
33
|
+
DEFAULT_NORMALIZED_MAX_RESULTS,
|
|
34
|
+
DEFAULT_SEARCH_EGRESS_POLICY,
|
|
35
|
+
DEFAULT_SEARCH_FRONTEND_MODES,
|
|
36
|
+
SEARCH_FRONTEND_MODES,
|
|
37
|
+
SEARCH_FRONTEND_NAMES,
|
|
38
|
+
SEARCH_UNSUPPORTED_CAPABILITY_CODE,
|
|
39
|
+
SearchOrchestrator,
|
|
40
|
+
SearchProviderRegistry,
|
|
41
|
+
SearchRegistryError,
|
|
42
|
+
assertEgressAddressAllowed,
|
|
43
|
+
createEgressGuardedDispatcher,
|
|
44
|
+
createEgressGuardedLookup,
|
|
45
|
+
createSearchRuntime,
|
|
46
|
+
findEgressDenial,
|
|
47
|
+
hashSearchQuery,
|
|
48
|
+
isDirectResultUrl,
|
|
49
|
+
isSearchFrontendMode,
|
|
50
|
+
normalizeSearchFrontendModes,
|
|
51
|
+
normalizeSearchResults,
|
|
52
|
+
normalizedResultLimit,
|
|
53
|
+
searchErrorHttpStatus,
|
|
54
|
+
searchRuntimeAsWebSearchBackend,
|
|
55
|
+
validateEgressUrl,
|
|
56
|
+
validateSearchFrontendModes
|
|
57
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-5RSZYQJH.cjs');
|
|
3
|
+
var _chunkPOUTD5AMcjs = require('../../chunk-POUTD5AM.cjs');
|
|
5
4
|
require('../../chunk-6DDYNS2B.cjs');
|
|
5
|
+
require('../../chunk-5RSZYQJH.cjs');
|
|
6
6
|
require('../../chunk-77USGNRW.cjs');
|
|
7
7
|
require('../../chunk-IUL4VWNU.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.AnthropicTransformer =
|
|
10
|
+
exports.AnthropicTransformer = _chunkPOUTD5AMcjs.AnthropicTransformer;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnthropicTransformer
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-FU7EAR73.js";
|
|
3
|
+
} from "../../chunk-EUZRH544.js";
|
|
5
4
|
import "../../chunk-LFEH7CEO.js";
|
|
5
|
+
import "../../chunk-FU7EAR73.js";
|
|
6
6
|
import "../../chunk-WYVGULTQ.js";
|
|
7
7
|
import "../../chunk-ZLNHPUFA.js";
|
|
8
8
|
export {
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkZAPN7XA6cjs = require('../chunk-ZAPN7XA6.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkKIQ2HA2Acjs = require('../chunk-KIQ2HA2A.cjs');
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
var _chunkNOITAVHAcjs = require('../chunk-NOITAVHA.cjs');
|
|
@@ -12,12 +15,9 @@ var _chunkNOITAVHAcjs = require('../chunk-NOITAVHA.cjs');
|
|
|
12
15
|
var _chunkQWNUOR7Fcjs = require('../chunk-QWNUOR7F.cjs');
|
|
13
16
|
|
|
14
17
|
|
|
15
|
-
var
|
|
16
|
-
require('../chunk-5RSZYQJH.cjs');
|
|
18
|
+
var _chunkPOUTD5AMcjs = require('../chunk-POUTD5AM.cjs');
|
|
17
19
|
require('../chunk-6DDYNS2B.cjs');
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _chunkKIQ2HA2Acjs = require('../chunk-KIQ2HA2A.cjs');
|
|
20
|
+
require('../chunk-5RSZYQJH.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
var _chunkVXRTQZF2cjs = require('../chunk-VXRTQZF2.cjs');
|
|
@@ -34,4 +34,4 @@ require('../chunk-IUL4VWNU.cjs');
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
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,7 +3,10 @@ import {
|
|
|
3
3
|
BuiltinTransformers,
|
|
4
4
|
getBuiltinTransformers,
|
|
5
5
|
registerBuiltinTransformers
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-2C3TTBS7.js";
|
|
7
|
+
import {
|
|
8
|
+
GeminiTransformer
|
|
9
|
+
} from "../chunk-HN74IGEO.js";
|
|
7
10
|
import {
|
|
8
11
|
OpenAIResponseTransformer
|
|
9
12
|
} from "../chunk-V53ZEFXC.js";
|
|
@@ -12,12 +15,9 @@ import {
|
|
|
12
15
|
} from "../chunk-7PIUVCKK.js";
|
|
13
16
|
import {
|
|
14
17
|
AnthropicTransformer
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-FU7EAR73.js";
|
|
18
|
+
} from "../chunk-EUZRH544.js";
|
|
17
19
|
import "../chunk-LFEH7CEO.js";
|
|
18
|
-
import
|
|
19
|
-
GeminiTransformer
|
|
20
|
-
} from "../chunk-HN74IGEO.js";
|
|
20
|
+
import "../chunk-FU7EAR73.js";
|
|
21
21
|
import {
|
|
22
22
|
GeminiCodeAssistTransformer
|
|
23
23
|
} from "../chunk-4VVCXVB7.js";
|
package/dist/transformer.cjs
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunk7ZHBN75Ncjs = require('./chunk-7ZHBN75N.cjs');
|
|
5
|
+
require('./chunk-GBHYAGX3.cjs');
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
var _chunk3OPYJG76cjs = require('./chunk-3OPYJG76.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
var
|
|
11
|
+
var _chunkZAPN7XA6cjs = require('./chunk-ZAPN7XA6.cjs');
|
|
12
|
+
require('./chunk-KIQ2HA2A.cjs');
|
|
11
13
|
require('./chunk-NOITAVHA.cjs');
|
|
12
14
|
require('./chunk-QWNUOR7F.cjs');
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-5RSZYQJH.cjs');
|
|
15
|
+
require('./chunk-POUTD5AM.cjs');
|
|
15
16
|
require('./chunk-6DDYNS2B.cjs');
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-GBHYAGX3.cjs');
|
|
17
|
+
require('./chunk-5RSZYQJH.cjs');
|
|
18
18
|
require('./chunk-VXRTQZF2.cjs');
|
|
19
19
|
require('./chunk-WX2E2G7H.cjs');
|
|
20
20
|
require('./chunk-77USGNRW.cjs');
|
|
@@ -40,4 +40,4 @@ var _chunkIUL4VWNUcjs = require('./chunk-IUL4VWNU.cjs');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
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 =
|
|
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
|
@@ -2,19 +2,19 @@ import "./chunk-WTQMX2Q6.js";
|
|
|
2
2
|
import {
|
|
3
3
|
TransformerChainExecutor
|
|
4
4
|
} from "./chunk-EYGBM2VC.js";
|
|
5
|
+
import "./chunk-MZNPGW5Q.js";
|
|
5
6
|
import {
|
|
6
7
|
TransformerService
|
|
7
8
|
} from "./chunk-DK4A7DLE.js";
|
|
8
9
|
import {
|
|
9
10
|
registerBuiltinTransformers
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2C3TTBS7.js";
|
|
12
|
+
import "./chunk-HN74IGEO.js";
|
|
11
13
|
import "./chunk-V53ZEFXC.js";
|
|
12
14
|
import "./chunk-7PIUVCKK.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-FU7EAR73.js";
|
|
15
|
+
import "./chunk-EUZRH544.js";
|
|
15
16
|
import "./chunk-LFEH7CEO.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-MZNPGW5Q.js";
|
|
17
|
+
import "./chunk-FU7EAR73.js";
|
|
18
18
|
import "./chunk-4VVCXVB7.js";
|
|
19
19
|
import "./chunk-R4VCO2CB.js";
|
|
20
20
|
import "./chunk-WYVGULTQ.js";
|
|
@@ -10,6 +10,8 @@ import { SubscriptionAuthProfile } from './pipeline/SubscriptionAuthSource.cjs';
|
|
|
10
10
|
import { AuthStrategy } from './pipeline/SubscriptionAuthStrategy.cjs';
|
|
11
11
|
import { ProviderConfigSource } from './ports/provider-config-source.cjs';
|
|
12
12
|
import { WebSearchBackend } from './ports/web-search-backend.cjs';
|
|
13
|
+
import { d as SearchFrontendModes } from './frontends-Doz0RaWu.cjs';
|
|
14
|
+
import { S as SearchRuntime } from './runtime-t8AZacFF.cjs';
|
|
13
15
|
import { ImageArtifactMetadata, SensitiveOpaqueImageReference, ImageReferenceMetadata, ImageReferenceId, ImageAction, ImageQuality, ImageBackground, ImageOutputFormat, ImageGenerationErrorCode, ImageUsage, ImageArtifactId, ImageCapabilities, NormalizedImageRequest, ImageProviderEvent, ImageSize, ImageGenerationPublicError } from '@omnicross/contracts/image-generation-types';
|
|
14
16
|
import { ApiFormat } from '@omnicross/contracts/llm-config';
|
|
15
17
|
|
|
@@ -1064,6 +1066,19 @@ interface ProviderProxyDeps {
|
|
|
1064
1066
|
* ingress responds 502 (the factory is a hard dependency of THAT path only).
|
|
1065
1067
|
*/
|
|
1066
1068
|
readonly anthropicIngressHandlerFactory?: AnthropicIngressHandlerFactory | null;
|
|
1069
|
+
/**
|
|
1070
|
+
* The ONE shared search runtime (plan 阶段5). Consumed by the managed
|
|
1071
|
+
* Responses and Anthropic lanes; the same instance the outbound Codex route
|
|
1072
|
+
* and `doctor search` see. Optional so embedders that never enable a managed
|
|
1073
|
+
* mode compile and behave unchanged.
|
|
1074
|
+
*/
|
|
1075
|
+
readonly searchRuntime?: SearchRuntime | null;
|
|
1076
|
+
/**
|
|
1077
|
+
* Per-frontend search modes, resolved ONCE per request from this snapshot
|
|
1078
|
+
* before any wire bytes are emitted. Absent ⇒ the behavior-preserving
|
|
1079
|
+
* defaults (`native` for both protocol frontends).
|
|
1080
|
+
*/
|
|
1081
|
+
readonly searchFrontendModes?: SearchFrontendModes | null;
|
|
1067
1082
|
}
|
|
1068
1083
|
/**
|
|
1069
1084
|
* Structural port for the usage recorder — only the `record` method.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _omnicross_contracts_image_generation_types from '@omnicross/contracts/image-generation-types';
|
|
2
2
|
import { ImageArtifactMetadata, ImageRequestOptions } from '@omnicross/contracts/image-generation-types';
|
|
3
|
-
import { I as ImageAsset, p as ImageReferenceLease, K as OpenAIOperationHandler, h as ImageOrchestrator, L as OpenAIOperationHandlerContext, s as ImageReferenceStore, u as ImageRetentionPolicy } from './types-
|
|
3
|
+
import { I as ImageAsset, p as ImageReferenceLease, K as OpenAIOperationHandler, h as ImageOrchestrator, L as OpenAIOperationHandlerContext, s as ImageReferenceStore, u as ImageRetentionPolicy } from './types-BSIJdsyl.cjs';
|
|
4
4
|
import { FileHandle } from 'node:fs/promises';
|
|
5
5
|
|
|
6
6
|
type ResourceKind = 'input' | 'spool';
|
|
@@ -10,6 +10,8 @@ import { SubscriptionAuthProfile } from './pipeline/SubscriptionAuthSource.js';
|
|
|
10
10
|
import { AuthStrategy } from './pipeline/SubscriptionAuthStrategy.js';
|
|
11
11
|
import { ProviderConfigSource } from './ports/provider-config-source.js';
|
|
12
12
|
import { WebSearchBackend } from './ports/web-search-backend.js';
|
|
13
|
+
import { d as SearchFrontendModes } from './frontends-Doz0RaWu.js';
|
|
14
|
+
import { S as SearchRuntime } from './runtime-t8AZacFF.js';
|
|
13
15
|
import { ImageArtifactMetadata, SensitiveOpaqueImageReference, ImageReferenceMetadata, ImageReferenceId, ImageAction, ImageQuality, ImageBackground, ImageOutputFormat, ImageGenerationErrorCode, ImageUsage, ImageArtifactId, ImageCapabilities, NormalizedImageRequest, ImageProviderEvent, ImageSize, ImageGenerationPublicError } from '@omnicross/contracts/image-generation-types';
|
|
14
16
|
import { ApiFormat } from '@omnicross/contracts/llm-config';
|
|
15
17
|
|
|
@@ -1064,6 +1066,19 @@ interface ProviderProxyDeps {
|
|
|
1064
1066
|
* ingress responds 502 (the factory is a hard dependency of THAT path only).
|
|
1065
1067
|
*/
|
|
1066
1068
|
readonly anthropicIngressHandlerFactory?: AnthropicIngressHandlerFactory | null;
|
|
1069
|
+
/**
|
|
1070
|
+
* The ONE shared search runtime (plan 阶段5). Consumed by the managed
|
|
1071
|
+
* Responses and Anthropic lanes; the same instance the outbound Codex route
|
|
1072
|
+
* and `doctor search` see. Optional so embedders that never enable a managed
|
|
1073
|
+
* mode compile and behave unchanged.
|
|
1074
|
+
*/
|
|
1075
|
+
readonly searchRuntime?: SearchRuntime | null;
|
|
1076
|
+
/**
|
|
1077
|
+
* Per-frontend search modes, resolved ONCE per request from this snapshot
|
|
1078
|
+
* before any wire bytes are emitted. Absent ⇒ the behavior-preserving
|
|
1079
|
+
* defaults (`native` for both protocol frontends).
|
|
1080
|
+
*/
|
|
1081
|
+
readonly searchFrontendModes?: SearchFrontendModes | null;
|
|
1067
1082
|
}
|
|
1068
1083
|
/**
|
|
1069
1084
|
* Structural port for the usage recorder — only the `record` method.
|