@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.
Files changed (122) hide show
  1. package/LICENSE +21 -21
  2. package/NOTICE +57 -57
  3. package/README.md +22 -22
  4. package/dist/{BuiltinToolExecutor-CS2WpXhM.d.cts → BuiltinToolExecutor-BHgH-EaZ.d.cts} +25 -2
  5. package/dist/{BuiltinToolExecutor-BluWyeob.d.ts → BuiltinToolExecutor-Bi1LmiTP.d.ts} +25 -2
  6. package/dist/{CompletionService-BiJqftc-.d.cts → CompletionService-BniP7j88.d.cts} +2 -2
  7. package/dist/{CompletionService-NXN_Av5W.d.ts → CompletionService-BqrKPwfA.d.ts} +2 -2
  8. package/dist/{ProviderProxy-CgIcCVwk.d.cts → ProviderProxy-Bz_nkOwq.d.cts} +1 -1
  9. package/dist/{ProviderProxy-DYoY5XoT.d.ts → ProviderProxy-Ckr6oTrE.d.ts} +1 -1
  10. package/dist/auth/GeminiCodeAssistProjectResolver.cjs +2 -2
  11. package/dist/auth/GeminiCodeAssistProjectResolver.js +1 -1
  12. package/dist/{chunk-FJNKXOWE.js → chunk-2C3TTBS7.js} +4 -4
  13. package/dist/{chunk-OST5RJOJ.cjs → chunk-4Z3ZLLC2.cjs} +13 -7
  14. package/dist/chunk-7RJI3NDI.cjs +236 -0
  15. package/dist/chunk-D4WNI6BR.cjs +386 -0
  16. package/dist/chunk-DBBR6RHF.js +236 -0
  17. package/dist/chunk-E4QHVXV5.cjs +118 -0
  18. package/dist/chunk-HL2YSPL7.cjs +673 -0
  19. package/dist/chunk-LFPQ2OVH.js +386 -0
  20. package/dist/{chunk-WSJE42SG.js → chunk-LKDAN4D7.js} +3684 -2462
  21. package/dist/{chunk-DEIUR2TH.js → chunk-LQYS2N47.js} +12 -8
  22. package/dist/{chunk-NZYN7C3P.cjs → chunk-MPXOKQJP.cjs} +53 -53
  23. package/dist/chunk-MZEGQSKQ.js +118 -0
  24. package/dist/chunk-NLUOTJWB.js +673 -0
  25. package/dist/{chunk-CTKM773J.cjs → chunk-UPQIWJIE.cjs} +12 -8
  26. package/dist/{chunk-CFSGYFOZ.js → chunk-VL5TUDTM.js} +7 -1
  27. package/dist/{chunk-7B56AJBB.cjs → chunk-VSYQ6XYN.cjs} +2233 -1011
  28. package/dist/{chunk-CDHS2QDC.js → chunk-Y4CRNHJO.js} +53 -53
  29. package/dist/{chunk-TVYA5JSQ.cjs → chunk-ZAPN7XA6.cjs} +5 -5
  30. package/dist/completion/BuiltinToolExecutor.cjs +2 -2
  31. package/dist/completion/BuiltinToolExecutor.d.cts +3 -1
  32. package/dist/completion/BuiltinToolExecutor.d.ts +3 -1
  33. package/dist/completion/BuiltinToolExecutor.js +1 -1
  34. package/dist/completion/CompletionService.cjs +11 -10
  35. package/dist/completion/CompletionService.d.cts +6 -3
  36. package/dist/completion/CompletionService.d.ts +6 -3
  37. package/dist/completion/CompletionService.js +10 -9
  38. package/dist/completion.cjs +11 -10
  39. package/dist/completion.d.cts +6 -3
  40. package/dist/completion.d.ts +6 -3
  41. package/dist/completion.js +10 -9
  42. package/dist/egress-I46O_p5L.d.cts +126 -0
  43. package/dist/egress-I46O_p5L.d.ts +126 -0
  44. package/dist/frontends-Doz0RaWu.d.cts +97 -0
  45. package/dist/frontends-Doz0RaWu.d.ts +97 -0
  46. package/dist/image-generation.cjs +2 -2
  47. package/dist/image-generation.d.cts +7 -4
  48. package/dist/image-generation.d.ts +7 -4
  49. package/dist/image-generation.js +1 -1
  50. package/dist/index.cjs +25 -10
  51. package/dist/index.d.cts +12 -8
  52. package/dist/index.d.ts +12 -8
  53. package/dist/index.js +24 -9
  54. package/dist/openai-operation.d.cts +4 -1
  55. package/dist/openai-operation.d.ts +4 -1
  56. package/dist/outbound-api/routeResolver.d.cts +9 -5
  57. package/dist/outbound-api/routeResolver.d.ts +9 -5
  58. package/dist/outbound-api/subscriptionRegistryPort.d.cts +4 -1
  59. package/dist/outbound-api/subscriptionRegistryPort.d.ts +4 -1
  60. package/dist/outbound-api/types.d.cts +8 -4
  61. package/dist/outbound-api/types.d.ts +8 -4
  62. package/dist/outbound-api.cjs +25 -10
  63. package/dist/outbound-api.d.cts +117 -8
  64. package/dist/outbound-api.d.ts +117 -8
  65. package/dist/outbound-api.js +24 -9
  66. package/dist/pipeline/AccountAllowanceScheduling.d.cts +8 -4
  67. package/dist/pipeline/AccountAllowanceScheduling.d.ts +8 -4
  68. package/dist/pipeline/upstreamFetch.cjs +2 -2
  69. package/dist/pipeline/upstreamFetch.js +1 -1
  70. package/dist/ports.d.cts +8 -4
  71. package/dist/ports.d.ts +8 -4
  72. package/dist/provider-proxy/ProviderProxy.cjs +11 -10
  73. package/dist/provider-proxy/ProviderProxy.d.cts +5 -2
  74. package/dist/provider-proxy/ProviderProxy.d.ts +5 -2
  75. package/dist/provider-proxy/ProviderProxy.js +10 -9
  76. package/dist/provider-proxy/ingress/providerProxyShared.cjs +13 -10
  77. package/dist/provider-proxy/ingress/providerProxyShared.d.cts +22 -3
  78. package/dist/provider-proxy/ingress/providerProxyShared.d.ts +22 -3
  79. package/dist/provider-proxy/ingress/providerProxyShared.js +12 -9
  80. package/dist/provider-proxy/types.d.cts +4 -1
  81. package/dist/provider-proxy/types.d.ts +4 -1
  82. package/dist/provider-proxy.cjs +11 -10
  83. package/dist/provider-proxy.d.cts +10 -6
  84. package/dist/provider-proxy.d.ts +10 -6
  85. package/dist/provider-proxy.js +10 -9
  86. package/dist/proxy-UZTtjPZx.d.cts +18 -0
  87. package/dist/proxy-UZTtjPZx.d.ts +18 -0
  88. package/dist/{routeResolver-rpKQLyDO.d.cts → routeResolver-Da0yvkL1.d.cts} +2 -2
  89. package/dist/{routeResolver-CTCcSHWu.d.ts → routeResolver-STwMz_G4.d.ts} +2 -2
  90. package/dist/runtime-6QXNU526.cjs +8 -0
  91. package/dist/runtime-M5WXLD2R.js +8 -0
  92. package/dist/runtime-t8AZacFF.d.cts +233 -0
  93. package/dist/runtime-t8AZacFF.d.ts +233 -0
  94. package/dist/search/api.cjs +761 -0
  95. package/dist/search/api.d.cts +370 -0
  96. package/dist/search/api.d.ts +370 -0
  97. package/dist/search/api.js +761 -0
  98. package/dist/search/http.cjs +37 -0
  99. package/dist/search/http.d.cts +269 -0
  100. package/dist/search/http.d.ts +269 -0
  101. package/dist/search/http.js +37 -0
  102. package/dist/search.cjs +57 -0
  103. package/dist/search.d.cts +113 -0
  104. package/dist/search.d.ts +113 -0
  105. package/dist/search.js +57 -0
  106. package/dist/transformer/transformers/AnthropicTransformer.cjs +3 -3
  107. package/dist/transformer/transformers/AnthropicTransformer.js +2 -2
  108. package/dist/transformer/transformers.cjs +7 -7
  109. package/dist/transformer/transformers.js +6 -6
  110. package/dist/transformer.cjs +6 -6
  111. package/dist/transformer.js +5 -5
  112. package/dist/{types-DsHBBk3h.d.cts → types-BSIJdsyl.d.cts} +15 -0
  113. package/dist/{types-CbglB73l.d.cts → types-Be-yt_6T.d.cts} +1 -1
  114. package/dist/{types-CVRge76p.d.ts → types-By9Tg6-I.d.ts} +15 -0
  115. package/dist/types-CbCZqLGg.d.cts +127 -0
  116. package/dist/types-CbCZqLGg.d.ts +127 -0
  117. package/dist/{types-jjU24eYG.d.cts → types-D-oHYusb.d.cts} +73 -4
  118. package/dist/{types-Bd72H4SB.d.ts → types-Dm4_36V4.d.ts} +1 -1
  119. package/dist/{types-5T223WYQ.d.ts → types-Dvlpjn0d.d.ts} +73 -4
  120. package/package.json +5 -3
  121. package/dist/{chunk-6OC3ORW6.js → chunk-EUZRH544.js} +3 -3
  122. package/dist/{chunk-SQMAEDNE.cjs → chunk-POUTD5AM.cjs} +2 -2
@@ -10,10 +10,13 @@ import '../pipeline/SubscriptionAuthSource.cjs';
10
10
  import '../pipeline/SubscriptionAuthStrategy.cjs';
11
11
  import '../ports/provider-config-source.cjs';
12
12
  import '../ports/web-search-backend.cjs';
13
- export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-DsHBBk3h.cjs';
13
+ export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-BSIJdsyl.cjs';
14
+ import '../frontends-Doz0RaWu.cjs';
15
+ import '../runtime-t8AZacFF.cjs';
14
16
  import '@omnicross/contracts/llm-config';
15
17
  import '../logger-4GvQNzhE.cjs';
16
18
  import '../transformer/types.cjs';
17
19
  import '../transformer/TransformerService.cjs';
18
20
  import '@omnicross/contracts/websearch-types';
19
21
  import '@omnicross/contracts/image-generation-types';
22
+ import '@omnicross/contracts/search-types';
@@ -10,10 +10,13 @@ import '../pipeline/SubscriptionAuthSource.js';
10
10
  import '../pipeline/SubscriptionAuthStrategy.js';
11
11
  import '../ports/provider-config-source.js';
12
12
  import '../ports/web-search-backend.js';
13
- export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-CVRge76p.js';
13
+ export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, D as IngressFormat, W as ProviderProxyDeps, X as ProxyAttribution, aB as RetryCallback, aC as RouteAuthMode, aD as RouteContext, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aS as UsageRecordImportInput, U as UsageRecorderImport } from '../types-By9Tg6-I.js';
14
+ import '../frontends-Doz0RaWu.js';
15
+ import '../runtime-t8AZacFF.js';
14
16
  import '@omnicross/contracts/llm-config';
15
17
  import '../logger-4GvQNzhE.js';
16
18
  import '../transformer/types.js';
17
19
  import '../transformer/TransformerService.js';
18
20
  import '@omnicross/contracts/websearch-types';
19
21
  import '@omnicross/contracts/image-generation-types';
22
+ import '@omnicross/contracts/search-types';
@@ -40,22 +40,23 @@
40
40
 
41
41
 
42
42
 
43
- var _chunk7B56AJBBcjs = require('./chunk-7B56AJBB.cjs');
43
+ var _chunkVSYQ6XYNcjs = require('./chunk-VSYQ6XYN.cjs');
44
+ require('./chunk-E4QHVXV5.cjs');
44
45
  require('./chunk-HQP3K7PU.cjs');
45
46
  require('./chunk-QVOB2DNX.cjs');
46
47
  require('./chunk-7ZHBN75N.cjs');
48
+ require('./chunk-GBHYAGX3.cjs');
47
49
  require('./chunk-3OPYJG76.cjs');
48
- require('./chunk-TVYA5JSQ.cjs');
50
+ require('./chunk-ZAPN7XA6.cjs');
51
+ require('./chunk-KIQ2HA2A.cjs');
49
52
  require('./chunk-NOITAVHA.cjs');
50
53
  require('./chunk-QWNUOR7F.cjs');
51
- require('./chunk-SQMAEDNE.cjs');
52
- require('./chunk-5RSZYQJH.cjs');
54
+ require('./chunk-POUTD5AM.cjs');
53
55
  require('./chunk-6DDYNS2B.cjs');
54
- require('./chunk-KIQ2HA2A.cjs');
56
+ require('./chunk-5RSZYQJH.cjs');
55
57
  require('./chunk-32SRZFFP.cjs');
56
58
  require('./chunk-2E42SAW3.cjs');
57
59
  require('./chunk-5UK3KLE2.cjs');
58
- require('./chunk-GBHYAGX3.cjs');
59
60
  require('./chunk-MXI2PWIC.cjs');
60
61
  require('./chunk-RPII3E6Z.cjs');
61
62
  require('./chunk-6RPZADX3.cjs');
@@ -91,13 +92,13 @@ require('./chunk-VXRTQZF2.cjs');
91
92
  require('./chunk-WX2E2G7H.cjs');
92
93
  require('./chunk-77USGNRW.cjs');
93
94
  require('./chunk-IUL4VWNU.cjs');
94
- require('./chunk-OST5RJOJ.cjs');
95
+ require('./chunk-4Z3ZLLC2.cjs');
95
96
  require('./chunk-235MXAGX.cjs');
96
97
  require('./chunk-HVBBDBS3.cjs');
97
98
  require('./chunk-NKVZ6Z3Y.cjs');
98
- require('./chunk-CTKM773J.cjs');
99
+ require('./chunk-UPQIWJIE.cjs');
99
100
  require('./chunk-G4CZIUIB.cjs');
100
- require('./chunk-NZYN7C3P.cjs');
101
+ require('./chunk-MPXOKQJP.cjs');
101
102
 
102
103
 
103
104
 
@@ -140,4 +141,4 @@ require('./chunk-NZYN7C3P.cjs');
140
141
 
141
142
 
142
143
 
143
- exports.DEFAULT_ROUTE_IDLE_MS = _chunk7B56AJBBcjs.DEFAULT_ROUTE_IDLE_MS; exports.ProviderProxy = _chunk7B56AJBBcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunk7B56AJBBcjs.ProviderProxyRouteMap; exports.ROUTE_LEASE_API_VERSION = _chunk7B56AJBBcjs.ROUTE_LEASE_API_VERSION; exports.ROUTE_LEASE_CAPABILITIES = _chunk7B56AJBBcjs.ROUTE_LEASE_CAPABILITIES; exports.ROUTE_LEASE_CAPABILITIES_SCHEMA = _chunk7B56AJBBcjs.ROUTE_LEASE_CAPABILITIES_SCHEMA; exports.ROUTE_LEASE_CODEX_TOKEN_ENV = _chunk7B56AJBBcjs.ROUTE_LEASE_CODEX_TOKEN_ENV; exports.ROUTE_LEASE_DEFAULT_TTL_SECONDS = _chunk7B56AJBBcjs.ROUTE_LEASE_DEFAULT_TTL_SECONDS; exports.ROUTE_LEASE_MAX_CONSUMER_BYTES = _chunk7B56AJBBcjs.ROUTE_LEASE_MAX_CONSUMER_BYTES; exports.ROUTE_LEASE_MAX_EXECUTION_ID_BYTES = _chunk7B56AJBBcjs.ROUTE_LEASE_MAX_EXECUTION_ID_BYTES; exports.ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES = _chunk7B56AJBBcjs.ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES; exports.ROUTE_LEASE_MAX_MODEL_BYTES = _chunk7B56AJBBcjs.ROUTE_LEASE_MAX_MODEL_BYTES; exports.ROUTE_LEASE_MAX_SESSION_ID_BYTES = _chunk7B56AJBBcjs.ROUTE_LEASE_MAX_SESSION_ID_BYTES; exports.ROUTE_LEASE_MAX_TTL_SECONDS = _chunk7B56AJBBcjs.ROUTE_LEASE_MAX_TTL_SECONDS; exports.ROUTE_LEASE_REQUEST_SCHEMA = _chunk7B56AJBBcjs.ROUTE_LEASE_REQUEST_SCHEMA; exports.ROUTE_LEASE_RESULT_SCHEMA = _chunk7B56AJBBcjs.ROUTE_LEASE_RESULT_SCHEMA; exports.ROUTE_LEASE_RUNTIMES = _chunk7B56AJBBcjs.ROUTE_LEASE_RUNTIMES; exports.ROUTE_LEASE_RUNTIME_TABLE = _chunk7B56AJBBcjs.ROUTE_LEASE_RUNTIME_TABLE; exports.ROUTE_LEASE_SESSION_HASH_DOMAIN = _chunk7B56AJBBcjs.ROUTE_LEASE_SESSION_HASH_DOMAIN; exports.ResponsesAffinityStore = _chunk7B56AJBBcjs.ResponsesAffinityStore; exports.RouteLeaseError = _chunk7B56AJBBcjs.RouteLeaseError; exports.RouteLeaseManager = _chunk7B56AJBBcjs.RouteLeaseManager; exports.RouteLeaseTargetResolver = _chunk7B56AJBBcjs.RouteLeaseTargetResolver; exports.SYSTEM_ROUTE_LEASE_CLOCK = _chunk7B56AJBBcjs.SYSTEM_ROUTE_LEASE_CLOCK; exports.__resetProviderProxyForTests = _chunk7B56AJBBcjs.__resetProviderProxyForTests; exports.canonicalizeRouteLeasePayload = _chunk7B56AJBBcjs.canonicalizeRouteLeasePayload; exports.classifyResponsesProfile = _chunk7B56AJBBcjs.classifyResponsesProfile; exports.createNativeResponsesHostedImageIngress = _chunk7B56AJBBcjs.createNativeResponsesHostedImageIngress; exports.createResponsesCompactHandler = _chunk7B56AJBBcjs.createResponsesCompactHandler; exports.extractRouteToken = _chunk7B56AJBBcjs.extractRouteToken; exports.getProviderProxy = _chunk7B56AJBBcjs.getProviderProxy; exports.getResponsesAffinityStore = _chunk7B56AJBBcjs.getResponsesAffinityStore; exports.hashRouteLeasePayload = _chunk7B56AJBBcjs.hashRouteLeasePayload; exports.hashRouteLeaseSessionId = _chunk7B56AJBBcjs.hashRouteLeaseSessionId; exports.isLoopbackAddress = _chunk7B56AJBBcjs.isLoopbackAddress; exports.normalizeRouteLeaseIdempotencyKey = _chunk7B56AJBBcjs.normalizeRouteLeaseIdempotencyKey; exports.normalizeRouteLeaseTtl = _chunk7B56AJBBcjs.normalizeRouteLeaseTtl; exports.parseRouteLeaseCreate = _chunk7B56AJBBcjs.parseRouteLeaseCreate; exports.previousResponseNotFound = _chunk7B56AJBBcjs.previousResponseNotFound; exports.registerResponsesCompactOperation = _chunk7B56AJBBcjs.registerResponsesCompactOperation; exports.routeLeaseRuntime = _chunk7B56AJBBcjs.routeLeaseRuntime;
144
+ exports.DEFAULT_ROUTE_IDLE_MS = _chunkVSYQ6XYNcjs.DEFAULT_ROUTE_IDLE_MS; exports.ProviderProxy = _chunkVSYQ6XYNcjs.ProviderProxy; exports.ProviderProxyRouteMap = _chunkVSYQ6XYNcjs.ProviderProxyRouteMap; exports.ROUTE_LEASE_API_VERSION = _chunkVSYQ6XYNcjs.ROUTE_LEASE_API_VERSION; exports.ROUTE_LEASE_CAPABILITIES = _chunkVSYQ6XYNcjs.ROUTE_LEASE_CAPABILITIES; exports.ROUTE_LEASE_CAPABILITIES_SCHEMA = _chunkVSYQ6XYNcjs.ROUTE_LEASE_CAPABILITIES_SCHEMA; exports.ROUTE_LEASE_CODEX_TOKEN_ENV = _chunkVSYQ6XYNcjs.ROUTE_LEASE_CODEX_TOKEN_ENV; exports.ROUTE_LEASE_DEFAULT_TTL_SECONDS = _chunkVSYQ6XYNcjs.ROUTE_LEASE_DEFAULT_TTL_SECONDS; exports.ROUTE_LEASE_MAX_CONSUMER_BYTES = _chunkVSYQ6XYNcjs.ROUTE_LEASE_MAX_CONSUMER_BYTES; exports.ROUTE_LEASE_MAX_EXECUTION_ID_BYTES = _chunkVSYQ6XYNcjs.ROUTE_LEASE_MAX_EXECUTION_ID_BYTES; exports.ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES = _chunkVSYQ6XYNcjs.ROUTE_LEASE_MAX_IDEMPOTENCY_BYTES; exports.ROUTE_LEASE_MAX_MODEL_BYTES = _chunkVSYQ6XYNcjs.ROUTE_LEASE_MAX_MODEL_BYTES; exports.ROUTE_LEASE_MAX_SESSION_ID_BYTES = _chunkVSYQ6XYNcjs.ROUTE_LEASE_MAX_SESSION_ID_BYTES; exports.ROUTE_LEASE_MAX_TTL_SECONDS = _chunkVSYQ6XYNcjs.ROUTE_LEASE_MAX_TTL_SECONDS; exports.ROUTE_LEASE_REQUEST_SCHEMA = _chunkVSYQ6XYNcjs.ROUTE_LEASE_REQUEST_SCHEMA; exports.ROUTE_LEASE_RESULT_SCHEMA = _chunkVSYQ6XYNcjs.ROUTE_LEASE_RESULT_SCHEMA; exports.ROUTE_LEASE_RUNTIMES = _chunkVSYQ6XYNcjs.ROUTE_LEASE_RUNTIMES; exports.ROUTE_LEASE_RUNTIME_TABLE = _chunkVSYQ6XYNcjs.ROUTE_LEASE_RUNTIME_TABLE; exports.ROUTE_LEASE_SESSION_HASH_DOMAIN = _chunkVSYQ6XYNcjs.ROUTE_LEASE_SESSION_HASH_DOMAIN; exports.ResponsesAffinityStore = _chunkVSYQ6XYNcjs.ResponsesAffinityStore; exports.RouteLeaseError = _chunkVSYQ6XYNcjs.RouteLeaseError; exports.RouteLeaseManager = _chunkVSYQ6XYNcjs.RouteLeaseManager; exports.RouteLeaseTargetResolver = _chunkVSYQ6XYNcjs.RouteLeaseTargetResolver; exports.SYSTEM_ROUTE_LEASE_CLOCK = _chunkVSYQ6XYNcjs.SYSTEM_ROUTE_LEASE_CLOCK; exports.__resetProviderProxyForTests = _chunkVSYQ6XYNcjs.__resetProviderProxyForTests; exports.canonicalizeRouteLeasePayload = _chunkVSYQ6XYNcjs.canonicalizeRouteLeasePayload; exports.classifyResponsesProfile = _chunkVSYQ6XYNcjs.classifyResponsesProfile; exports.createNativeResponsesHostedImageIngress = _chunkVSYQ6XYNcjs.createNativeResponsesHostedImageIngress; exports.createResponsesCompactHandler = _chunkVSYQ6XYNcjs.createResponsesCompactHandler; exports.extractRouteToken = _chunkVSYQ6XYNcjs.extractRouteToken; exports.getProviderProxy = _chunkVSYQ6XYNcjs.getProviderProxy; exports.getResponsesAffinityStore = _chunkVSYQ6XYNcjs.getResponsesAffinityStore; exports.hashRouteLeasePayload = _chunkVSYQ6XYNcjs.hashRouteLeasePayload; exports.hashRouteLeaseSessionId = _chunkVSYQ6XYNcjs.hashRouteLeaseSessionId; exports.isLoopbackAddress = _chunkVSYQ6XYNcjs.isLoopbackAddress; exports.normalizeRouteLeaseIdempotencyKey = _chunkVSYQ6XYNcjs.normalizeRouteLeaseIdempotencyKey; exports.normalizeRouteLeaseTtl = _chunkVSYQ6XYNcjs.normalizeRouteLeaseTtl; exports.parseRouteLeaseCreate = _chunkVSYQ6XYNcjs.parseRouteLeaseCreate; exports.previousResponseNotFound = _chunkVSYQ6XYNcjs.previousResponseNotFound; exports.registerResponsesCompactOperation = _chunkVSYQ6XYNcjs.registerResponsesCompactOperation; exports.routeLeaseRuntime = _chunkVSYQ6XYNcjs.routeLeaseRuntime;
@@ -1,8 +1,8 @@
1
- import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy-CgIcCVwk.cjs';
2
- export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy-CgIcCVwk.cjs';
3
- import { D as IngressFormat, aD as RouteContext, $ as ResponsesAffinityStore, K as OpenAIOperationHandler, R as OpenAIOperationRegistry, a4 as ResponsesHostedImageRuntimeFactory, a2 as ResponsesHostedImageIngress, W as ProviderProxyDeps } from './types-DsHBBk3h.cjs';
4
- export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, X as ProxyAttribution, Y as ResponsesAffinityEntry, Z as ResponsesAffinityRecord, _ as ResponsesAffinityScope, a0 as ResponsesAffinityStoreOptions, a1 as ResponsesCredentialIdentity, a3 as ResponsesHostedImageRequestLease, a5 as ResponsesHostedImageRuntimeLease, ay as ResponsesProfile, az as ResponsesProfileDeclaration, aB as RetryCallback, aC as RouteAuthMode, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aK as classifyResponsesProfile, aN as getResponsesAffinityStore, aO as previousResponseNotFound } from './types-DsHBBk3h.cjs';
5
- import { g as GatewayBindingTarget } from './types-jjU24eYG.cjs';
1
+ import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy-Bz_nkOwq.cjs';
2
+ export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy-Bz_nkOwq.cjs';
3
+ import { D as IngressFormat, aD as RouteContext, $ as ResponsesAffinityStore, K as OpenAIOperationHandler, R as OpenAIOperationRegistry, a4 as ResponsesHostedImageRuntimeFactory, a2 as ResponsesHostedImageIngress, W as ProviderProxyDeps } from './types-BSIJdsyl.cjs';
4
+ export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, X as ProxyAttribution, Y as ResponsesAffinityEntry, Z as ResponsesAffinityRecord, _ as ResponsesAffinityScope, a0 as ResponsesAffinityStoreOptions, a1 as ResponsesCredentialIdentity, a3 as ResponsesHostedImageRequestLease, a5 as ResponsesHostedImageRuntimeLease, ay as ResponsesProfile, az as ResponsesProfileDeclaration, aB as RetryCallback, aC as RouteAuthMode, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aK as classifyResponsesProfile, aN as getResponsesAffinityStore, aO as previousResponseNotFound } from './types-BSIJdsyl.cjs';
5
+ import { g as GatewayBindingTarget } from './types-D-oHYusb.cjs';
6
6
  import { ProviderConfigSource } from './ports/provider-config-source.cjs';
7
7
  import 'node:http';
8
8
  import '@omnicross/contracts/completion-types';
@@ -18,8 +18,11 @@ import './pipeline/SubscriptionAuthSource.cjs';
18
18
  import './pipeline/SubscriptionAuthStrategy.cjs';
19
19
  import './ports/web-search-backend.cjs';
20
20
  import '@omnicross/contracts/websearch-types';
21
+ import './frontends-Doz0RaWu.cjs';
22
+ import '@omnicross/contracts/search-types';
23
+ import './runtime-t8AZacFF.cjs';
21
24
  import '@omnicross/contracts/image-generation-types';
22
- import './types-CbglB73l.cjs';
25
+ import './types-Be-yt_6T.cjs';
23
26
  import 'node:fs/promises';
24
27
  import '@omnicross/contracts/account-tokens-types';
25
28
  import '@omnicross/contracts/audit-types';
@@ -27,6 +30,7 @@ import '@omnicross/contracts/billing-types';
27
30
  import '@omnicross/contracts/health-logging-types';
28
31
  import '@omnicross/contracts/voucher-types';
29
32
  import '@omnicross/contracts/webhook-types';
33
+ import './types-CbCZqLGg.cjs';
30
34
  import './keyPolicy-zdWTu3CQ.cjs';
31
35
  import './transformer/types.cjs';
32
36
  import './transformer/TransformerService.cjs';
@@ -1,8 +1,8 @@
1
- import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy-DYoY5XoT.js';
2
- export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy-DYoY5XoT.js';
3
- import { D as IngressFormat, aD as RouteContext, $ as ResponsesAffinityStore, K as OpenAIOperationHandler, R as OpenAIOperationRegistry, a4 as ResponsesHostedImageRuntimeFactory, a2 as ResponsesHostedImageIngress, W as ProviderProxyDeps } from './types-CVRge76p.js';
4
- export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, X as ProxyAttribution, Y as ResponsesAffinityEntry, Z as ResponsesAffinityRecord, _ as ResponsesAffinityScope, a0 as ResponsesAffinityStoreOptions, a1 as ResponsesCredentialIdentity, a3 as ResponsesHostedImageRequestLease, a5 as ResponsesHostedImageRuntimeLease, ay as ResponsesProfile, az as ResponsesProfileDeclaration, aB as RetryCallback, aC as RouteAuthMode, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aK as classifyResponsesProfile, aN as getResponsesAffinityStore, aO as previousResponseNotFound } from './types-CVRge76p.js';
5
- import { g as GatewayBindingTarget } from './types-5T223WYQ.js';
1
+ import { b as RouteRegistrationOptions, P as ProviderProxy } from './ProviderProxy-Ckr6oTrE.js';
2
+ export { D as DEFAULT_ROUTE_IDLE_MS, a as ProviderProxyRouteMap, R as RouteEvictionReason, i as isLoopbackAddress } from './ProviderProxy-Ckr6oTrE.js';
3
+ import { D as IngressFormat, aD as RouteContext, $ as ResponsesAffinityStore, K as OpenAIOperationHandler, R as OpenAIOperationRegistry, a4 as ResponsesHostedImageRuntimeFactory, a2 as ResponsesHostedImageIngress, W as ProviderProxyDeps } from './types-By9Tg6-I.js';
4
+ export { A as AnthropicIngressHandler, a as AnthropicIngressHandlerFactory, b as AnthropicRouteHandlerParams, c as AnthropicSdkHints, E as ExtendedContextHint, X as ProxyAttribution, Y as ResponsesAffinityEntry, Z as ResponsesAffinityRecord, _ as ResponsesAffinityScope, a0 as ResponsesAffinityStoreOptions, a1 as ResponsesCredentialIdentity, a3 as ResponsesHostedImageRequestLease, a5 as ResponsesHostedImageRuntimeLease, ay as ResponsesProfile, az as ResponsesProfileDeclaration, aB as RetryCallback, aC as RouteAuthMode, aE as RouteLeaseUsageAttribution, aF as StreamEventCallback, aG as SubscriptionDispatchProfile, aH as SubscriptionRequestSummary, aI as TargetProviderFormat, aK as classifyResponsesProfile, aN as getResponsesAffinityStore, aO as previousResponseNotFound } from './types-By9Tg6-I.js';
5
+ import { g as GatewayBindingTarget } from './types-Dvlpjn0d.js';
6
6
  import { ProviderConfigSource } from './ports/provider-config-source.js';
7
7
  import 'node:http';
8
8
  import '@omnicross/contracts/completion-types';
@@ -18,8 +18,11 @@ import './pipeline/SubscriptionAuthSource.js';
18
18
  import './pipeline/SubscriptionAuthStrategy.js';
19
19
  import './ports/web-search-backend.js';
20
20
  import '@omnicross/contracts/websearch-types';
21
+ import './frontends-Doz0RaWu.js';
22
+ import '@omnicross/contracts/search-types';
23
+ import './runtime-t8AZacFF.js';
21
24
  import '@omnicross/contracts/image-generation-types';
22
- import './types-Bd72H4SB.js';
25
+ import './types-Dm4_36V4.js';
23
26
  import 'node:fs/promises';
24
27
  import '@omnicross/contracts/account-tokens-types';
25
28
  import '@omnicross/contracts/audit-types';
@@ -27,6 +30,7 @@ import '@omnicross/contracts/billing-types';
27
30
  import '@omnicross/contracts/health-logging-types';
28
31
  import '@omnicross/contracts/voucher-types';
29
32
  import '@omnicross/contracts/webhook-types';
33
+ import './types-CbCZqLGg.js';
30
34
  import './keyPolicy-zdWTu3CQ.js';
31
35
  import './transformer/types.js';
32
36
  import './transformer/TransformerService.js';
@@ -40,22 +40,23 @@ import {
40
40
  previousResponseNotFound,
41
41
  registerResponsesCompactOperation,
42
42
  routeLeaseRuntime
43
- } from "./chunk-WSJE42SG.js";
43
+ } from "./chunk-LKDAN4D7.js";
44
+ import "./chunk-MZEGQSKQ.js";
44
45
  import "./chunk-VVEHS2LI.js";
45
46
  import "./chunk-WTQMX2Q6.js";
46
47
  import "./chunk-EYGBM2VC.js";
48
+ import "./chunk-MZNPGW5Q.js";
47
49
  import "./chunk-DK4A7DLE.js";
48
- import "./chunk-FJNKXOWE.js";
50
+ import "./chunk-2C3TTBS7.js";
51
+ import "./chunk-HN74IGEO.js";
49
52
  import "./chunk-V53ZEFXC.js";
50
53
  import "./chunk-7PIUVCKK.js";
51
- import "./chunk-6OC3ORW6.js";
52
- import "./chunk-FU7EAR73.js";
54
+ import "./chunk-EUZRH544.js";
53
55
  import "./chunk-LFEH7CEO.js";
54
- import "./chunk-HN74IGEO.js";
56
+ import "./chunk-FU7EAR73.js";
55
57
  import "./chunk-QIIAMBTM.js";
56
58
  import "./chunk-FXR6N3SR.js";
57
59
  import "./chunk-AQDON6MB.js";
58
- import "./chunk-MZNPGW5Q.js";
59
60
  import "./chunk-ECZ3ZE2C.js";
60
61
  import "./chunk-XTEI64OU.js";
61
62
  import "./chunk-XX6NQJMA.js";
@@ -91,13 +92,13 @@ import "./chunk-4VVCXVB7.js";
91
92
  import "./chunk-R4VCO2CB.js";
92
93
  import "./chunk-WYVGULTQ.js";
93
94
  import "./chunk-ZLNHPUFA.js";
94
- import "./chunk-CFSGYFOZ.js";
95
+ import "./chunk-VL5TUDTM.js";
95
96
  import "./chunk-3WD4HTR2.js";
96
97
  import "./chunk-MKF46GNZ.js";
97
98
  import "./chunk-GL6XM527.js";
98
- import "./chunk-DEIUR2TH.js";
99
+ import "./chunk-LQYS2N47.js";
99
100
  import "./chunk-4JOU54M5.js";
100
- import "./chunk-CDHS2QDC.js";
101
+ import "./chunk-Y4CRNHJO.js";
101
102
  export {
102
103
  DEFAULT_ROUTE_IDLE_MS,
103
104
  ProviderProxy,
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Environment proxy resolution for the search transport.
3
+ *
4
+ * Ported from Elftia's `nodeWebFetchTransport.resolveNodeProxySettings` +
5
+ * dispatcher cache. `EnvHttpProxyAgent` applies the `no_proxy` rules itself, so
6
+ * this module only decides WHETHER a proxied dispatcher is needed and keeps one
7
+ * cached per proxy signature.
8
+ *
9
+ * Nothing here ever reaches an error message or a diagnostic: a proxy URL can
10
+ * carry credentials.
11
+ *
12
+ * @module search/http/proxy
13
+ */
14
+
15
+ /** The conventional proxy variables, read case-insensitively in pairs. */
16
+ type ProxyEnvironment = Readonly<Record<string, string | undefined>>;
17
+
18
+ export type { ProxyEnvironment as P };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Environment proxy resolution for the search transport.
3
+ *
4
+ * Ported from Elftia's `nodeWebFetchTransport.resolveNodeProxySettings` +
5
+ * dispatcher cache. `EnvHttpProxyAgent` applies the `no_proxy` rules itself, so
6
+ * this module only decides WHETHER a proxied dispatcher is needed and keeps one
7
+ * cached per proxy signature.
8
+ *
9
+ * Nothing here ever reaches an error message or a diagnostic: a proxy URL can
10
+ * carry credentials.
11
+ *
12
+ * @module search/http/proxy
13
+ */
14
+
15
+ /** The conventional proxy variables, read case-insensitively in pairs. */
16
+ type ProxyEnvironment = Readonly<Record<string, string | undefined>>;
17
+
18
+ export type { ProxyEnvironment as P };
@@ -1,6 +1,6 @@
1
1
  import { ProviderConfigSource } from './ports/provider-config-source.cjs';
2
- import { D as IngressFormat, aD as RouteContext } from './types-DsHBBk3h.cjs';
3
- import { s as OutboundEndpoint, T as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-jjU24eYG.cjs';
2
+ import { D as IngressFormat, aD as RouteContext } from './types-BSIJdsyl.cjs';
3
+ import { s as OutboundEndpoint, W as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-D-oHYusb.cjs';
4
4
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { ProviderConfigSource } from './ports/provider-config-source.js';
2
- import { D as IngressFormat, aD as RouteContext } from './types-CVRge76p.js';
3
- import { s as OutboundEndpoint, T as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-5T223WYQ.js';
2
+ import { D as IngressFormat, aD as RouteContext } from './types-By9Tg6-I.js';
3
+ import { s as OutboundEndpoint, W as ModelRef, c as EndpointRoutingConfig, R as RequestRole } from './types-Dvlpjn0d.js';
4
4
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
5
5
 
6
6
  /**
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkD4WNI6BRcjs = require('./chunk-D4WNI6BR.cjs');
4
+ require('./chunk-HL2YSPL7.cjs');
5
+ require('./chunk-7RJI3NDI.cjs');
6
+
7
+
8
+ exports.createSearchRuntime = _chunkD4WNI6BRcjs.createSearchRuntime;
@@ -0,0 +1,8 @@
1
+ import {
2
+ createSearchRuntime
3
+ } from "./chunk-LFPQ2OVH.js";
4
+ import "./chunk-NLUOTJWB.js";
5
+ import "./chunk-DBBR6RHF.js";
6
+ export {
7
+ createSearchRuntime
8
+ };
@@ -0,0 +1,233 @@
1
+ import { SearchProviderContribution, SearchContributionContext, SearchProviderId, SearchPolicy, SearchRuntimeEvent, SearchRequest, OrchestratedSearchResponse, SearchProviderDescriptor } from '@omnicross/contracts/search-types';
2
+
3
+ /**
4
+ * The search provider registry — one place that knows which providers exist.
5
+ *
6
+ * Registration is by CONTRIBUTION, not by class: a provider arrives with its
7
+ * `source` and `kind` declared, so nothing downstream has to guess a trust
8
+ * boundary from an id's spelling. That is what makes this registry usable by a
9
+ * Phase-2 host unchanged — Elftia's `local-*` providers register through the
10
+ * same call an Omnicross builtin does, with `source: 'host'` stated.
11
+ *
12
+ * Two rules worth stating out loud:
13
+ *
14
+ * 1. **Registration failures are NOT search failures.** They throw
15
+ * {@link SearchRegistryError}, a plain `Error`, never a
16
+ * `SearchProviderError`. The eight-code taxonomy exists so a fallback policy
17
+ * can decide what to do next; a duplicate id is a wiring bug with no "next"
18
+ * to decide on, and letting it wear a taxonomy code would teach the
19
+ * orchestrator to fall back from a programming error.
20
+ * 2. **Ordering lives here, once.** `list()` is the single answer to "in what
21
+ * order do providers come?", which is the scattered decision plan 阶段3
22
+ * exists to consolidate.
23
+ *
24
+ * @module search/registry
25
+ */
26
+
27
+ /**
28
+ * A registration was rejected.
29
+ *
30
+ * Deliberately not a `SearchProviderError`: see rule 1 in the module doc.
31
+ */
32
+ declare class SearchRegistryError extends Error {
33
+ constructor(message: string);
34
+ }
35
+ /** Construction-time registry policy. */
36
+ interface SearchProviderRegistryOptions {
37
+ /**
38
+ * Allow a `source: 'host'` contribution to replace a registered
39
+ * `source: 'builtin'` one.
40
+ *
41
+ * Default `false` — plan §7.2's default-deny. This is the admin-policy
42
+ * escape hatch, not a convenience: shadowing a builtin silently changes where
43
+ * a user's queries are sent.
44
+ */
45
+ allowBuiltinOverride?: boolean;
46
+ }
47
+ /**
48
+ * The registered providers, ordered.
49
+ *
50
+ * Not a singleton: a runtime owns one. Tests, hosts, and future multi-tenant
51
+ * assemblies each get their own without global state to reset.
52
+ */
53
+ declare class SearchProviderRegistry {
54
+ private readonly entries;
55
+ private readonly allowBuiltinOverride;
56
+ private nextSequence;
57
+ constructor(options?: SearchProviderRegistryOptions);
58
+ /**
59
+ * Register one provider.
60
+ *
61
+ * @param contribution - the provider with its origin, transport, and
62
+ * capabilities declared.
63
+ * @param context - who is registering, for a Phase-2 host. Retained as-is;
64
+ * no rule reads it today, and the parameter exists so adding one later is
65
+ * not a signature change for every caller.
66
+ * @throws {SearchRegistryError} on a blank id, a duplicate id, or a host
67
+ * contribution colliding with a builtin without `allowBuiltinOverride`.
68
+ */
69
+ register(contribution: SearchProviderContribution, context?: SearchContributionContext): void;
70
+ /** Whether an id is currently registered. */
71
+ has(id: SearchProviderId): boolean;
72
+ /** The contribution registered under `id`, if any. */
73
+ get(id: SearchProviderId): SearchProviderContribution | undefined;
74
+ /**
75
+ * Remove a provider.
76
+ *
77
+ * The Phase-2 host-disconnect hook: when a host goes away its contributions
78
+ * go with it, and the id becomes free to register again.
79
+ *
80
+ * @returns whether something was removed.
81
+ */
82
+ unregister(id: SearchProviderId): boolean;
83
+ /**
84
+ * Every registered contribution, in candidate order.
85
+ *
86
+ * `priorityHint` ascending; contributions without a hint come AFTER every
87
+ * hinted one (an absent hint is "no opinion", not "highest priority"); ties
88
+ * keep registration order. The builtin HTTP contributions carry no hints, so
89
+ * today this is exactly registration order.
90
+ */
91
+ list(): SearchProviderContribution[];
92
+ }
93
+
94
+ /**
95
+ * The search orchestrator — the ONE fallback implementation in Omnicross.
96
+ *
97
+ * Before this module the repo had three provider orders (the host orchestrator,
98
+ * the HTTP-only service, and `BuiltinToolExecutor`'s own list), which is how a
99
+ * query could be sent to a provider twice, or to one a policy meant to exclude.
100
+ * Plan 阶段3's exit condition is that exactly one implementation decides which
101
+ * provider runs next, and that no request ever falls back twice. Both are
102
+ * structural here: consumers submit ONE request and get one answer, with no
103
+ * loop of their own.
104
+ *
105
+ * The semantics that are easy to get wrong, stated plainly:
106
+ *
107
+ * - **An empty result set is a SUCCESS.** A provider that returns `[]` has
108
+ * already walked its own candidates and is reporting "nothing found". Treating
109
+ * that as a failure would re-conflate the empty-vs-broken distinction 阶段2
110
+ * built, so it ends the walk. (A deliberate divergence from Elftia, which
111
+ * continues to the next provider on zero results — recorded for 阶段5's
112
+ * allowed-differences list.)
113
+ * - **A pinned provider never falls back.** `request.provider` is a caller's
114
+ * explicit choice; silently trying someone else would send the query
115
+ * somewhere it was not authorized to go, and would be the second fallback in
116
+ * a caller that has its own.
117
+ * - **Cancellation ends everything immediately.** It is the caller's decision,
118
+ * not a provider failure, and must never spend another candidate.
119
+ *
120
+ * Observability is emitted here because this is where attempts happen, and it
121
+ * carries a query HASH only — plan §11.3. No event field can hold query text, a
122
+ * URL, or result content.
123
+ *
124
+ * @module search/orchestrator
125
+ */
126
+
127
+ /** Receives runtime events. Exceptions from it are swallowed, never propagated. */
128
+ type SearchRuntimeEventListener = (event: SearchRuntimeEvent) => void;
129
+ /** Construction-time orchestrator configuration. */
130
+ interface SearchOrchestratorOptions {
131
+ /** Default policy for every search; a per-call policy overrides it field by field. */
132
+ policy?: SearchPolicy;
133
+ /** Observability sink (plan §11.3). */
134
+ onEvent?: SearchRuntimeEventListener;
135
+ }
136
+ /**
137
+ * A short, one-way key for correlating the events of one query.
138
+ *
139
+ * Truncated deliberately: enough to group events, far too little to attack the
140
+ * preimage of a full query with, and the events channel is the one place a
141
+ * query must never appear in the clear.
142
+ */
143
+ declare function hashSearchQuery(query: string): string;
144
+ declare class SearchOrchestrator {
145
+ private readonly registry;
146
+ private readonly defaultPolicy;
147
+ private readonly onEvent?;
148
+ constructor(registry: SearchProviderRegistry, options?: SearchOrchestratorOptions);
149
+ /**
150
+ * Run one search.
151
+ *
152
+ * @param request - the query, an optional pinned provider, and per-request
153
+ * options. `options` is passed to the provider untouched: providers own
154
+ * their own timeouts and the orchestrator adds no second timeout layer.
155
+ * @param policyOverride - per-request policy, merged field-by-field over the
156
+ * orchestrator's default.
157
+ * @throws {SearchProviderError} when no provider produced a response.
158
+ */
159
+ search(request: SearchRequest, policyOverride?: SearchPolicy): Promise<OrchestratedSearchResponse>;
160
+ /** Resolve the candidate list for one request. */
161
+ private planCandidates;
162
+ /** Deliver one event. A listener that throws must never fail a search. */
163
+ private emit;
164
+ }
165
+
166
+ /**
167
+ * `SearchRuntime` — the one high-level entry for search in Omnicross.
168
+ *
169
+ * Everything above this line (阶段5's protocol frontends, the daemon, and in
170
+ * Phase 2 the embedding host) calls `search`, `registerContribution`, and
171
+ * `listProviders`; nothing above it builds a provider chain, because the moment
172
+ * two callers can, the fallback order is scattered again. That is the whole
173
+ * point of plan 阶段3.
174
+ *
175
+ * The facade is thin on purpose — a registry, an orchestrator, and the wiring
176
+ * between them. Policy arrives as an argument (runtime default here,
177
+ * per-request pinning on the request); nothing in this module reads a config
178
+ * file or a user setting, which keeps "where does policy come from?" a 阶段5
179
+ * assembly question rather than a contract baked in now.
180
+ *
181
+ * @module search/runtime
182
+ */
183
+
184
+ /** How a runtime is assembled. Every field has a documented default. */
185
+ interface SearchRuntimeOptions {
186
+ /**
187
+ * Providers to register at construction.
188
+ *
189
+ * Defaults to {@link builtinHttpSearchContributions} — the two keyless HTTP
190
+ * engines. Pass an explicit list (including an empty one) to build a runtime
191
+ * that has only what the caller supplies.
192
+ */
193
+ contributions?: SearchProviderContribution[];
194
+ /** Default policy for every search. Defaults to fallback on, all allowed, unbounded. */
195
+ policy?: SearchPolicy;
196
+ /** Observability listener; receives events carrying a query hash, never a query. */
197
+ onEvent?: SearchRuntimeEventListener;
198
+ /** Let a host contribution replace a builtin one. Default-deny, per plan §7.2. */
199
+ allowBuiltinOverride?: boolean;
200
+ }
201
+ /**
202
+ * The search entry point.
203
+ *
204
+ * Search, registration, and capability discovery in one object, so a consumer
205
+ * never needs a reference to the registry or the orchestrator underneath.
206
+ */
207
+ interface SearchRuntime {
208
+ /**
209
+ * Run one search.
210
+ *
211
+ * @throws {SearchProviderError} when no provider produced a response. An
212
+ * empty `results` array is a SUCCESS — a provider reporting that it found
213
+ * nothing, which is a different answer from failing to look.
214
+ */
215
+ search(request: SearchRequest): Promise<OrchestratedSearchResponse>;
216
+ /** Add a provider (the Phase-2 host registration path). */
217
+ registerContribution(contribution: SearchProviderContribution, context?: SearchContributionContext): void;
218
+ /** Remove a provider; returns whether one was removed. */
219
+ unregisterContribution(id: SearchProviderId): boolean;
220
+ /** Serializable descriptors of every registered provider, in candidate order. */
221
+ listProviders(): SearchProviderDescriptor[];
222
+ }
223
+ /**
224
+ * Build a runtime.
225
+ *
226
+ * Defaults to the builtin HTTP providers with an unrestricted policy: the
227
+ * deliberate 阶段3 stance, since a sensitive default (one provider, egress
228
+ * restricted) only becomes meaningful once user-facing configuration exists to
229
+ * express the choice. Both are reachable today through {@link SearchPolicy}.
230
+ */
231
+ declare function createSearchRuntime(options?: SearchRuntimeOptions): SearchRuntime;
232
+
233
+ export { type SearchRuntime as S, SearchOrchestrator as a, type SearchOrchestratorOptions as b, SearchProviderRegistry as c, type SearchProviderRegistryOptions as d, SearchRegistryError as e, type SearchRuntimeEventListener as f, type SearchRuntimeOptions as g, createSearchRuntime as h, hashSearchQuery as i };