@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.
Files changed (119) hide show
  1. package/dist/{BuiltinToolExecutor-CS2WpXhM.d.cts → BuiltinToolExecutor-BHgH-EaZ.d.cts} +25 -2
  2. package/dist/{BuiltinToolExecutor-BluWyeob.d.ts → BuiltinToolExecutor-Bi1LmiTP.d.ts} +25 -2
  3. package/dist/{CompletionService-BiJqftc-.d.cts → CompletionService-BniP7j88.d.cts} +2 -2
  4. package/dist/{CompletionService-NXN_Av5W.d.ts → CompletionService-BqrKPwfA.d.ts} +2 -2
  5. package/dist/{ProviderProxy-CgIcCVwk.d.cts → ProviderProxy-Bz_nkOwq.d.cts} +1 -1
  6. package/dist/{ProviderProxy-DYoY5XoT.d.ts → ProviderProxy-Ckr6oTrE.d.ts} +1 -1
  7. package/dist/auth/GeminiCodeAssistProjectResolver.cjs +2 -2
  8. package/dist/auth/GeminiCodeAssistProjectResolver.js +1 -1
  9. package/dist/{chunk-FJNKXOWE.js → chunk-2C3TTBS7.js} +4 -4
  10. package/dist/{chunk-NZYN7C3P.cjs → chunk-2RCCLQYV.cjs} +53 -53
  11. package/dist/{chunk-CDHS2QDC.js → chunk-4PFWFODB.js} +53 -53
  12. package/dist/{chunk-OST5RJOJ.cjs → chunk-4Z3ZLLC2.cjs} +13 -7
  13. package/dist/chunk-7RJI3NDI.cjs +236 -0
  14. package/dist/chunk-BTBEJRGL.cjs +781 -0
  15. package/dist/chunk-DBBR6RHF.js +236 -0
  16. package/dist/chunk-DXWFBBSK.js +781 -0
  17. package/dist/chunk-E4QHVXV5.cjs +118 -0
  18. package/dist/chunk-L7O2YQ5O.js +386 -0
  19. package/dist/{chunk-WSJE42SG.js → chunk-LKDAN4D7.js} +3684 -2462
  20. package/dist/{chunk-DEIUR2TH.js → chunk-LQYS2N47.js} +12 -8
  21. package/dist/chunk-MZEGQSKQ.js +118 -0
  22. package/dist/chunk-PTU7SXM3.cjs +386 -0
  23. package/dist/{chunk-CTKM773J.cjs → chunk-UPQIWJIE.cjs} +12 -8
  24. package/dist/{chunk-CFSGYFOZ.js → chunk-VL5TUDTM.js} +7 -1
  25. package/dist/{chunk-7B56AJBB.cjs → chunk-VSYQ6XYN.cjs} +2233 -1011
  26. package/dist/{chunk-TVYA5JSQ.cjs → chunk-ZAPN7XA6.cjs} +5 -5
  27. package/dist/completion/BuiltinToolExecutor.cjs +2 -2
  28. package/dist/completion/BuiltinToolExecutor.d.cts +3 -1
  29. package/dist/completion/BuiltinToolExecutor.d.ts +3 -1
  30. package/dist/completion/BuiltinToolExecutor.js +1 -1
  31. package/dist/completion/CompletionService.cjs +11 -10
  32. package/dist/completion/CompletionService.d.cts +6 -3
  33. package/dist/completion/CompletionService.d.ts +6 -3
  34. package/dist/completion/CompletionService.js +10 -9
  35. package/dist/completion.cjs +11 -10
  36. package/dist/completion.d.cts +6 -3
  37. package/dist/completion.d.ts +6 -3
  38. package/dist/completion.js +10 -9
  39. package/dist/egress-I46O_p5L.d.cts +126 -0
  40. package/dist/egress-I46O_p5L.d.ts +126 -0
  41. package/dist/frontends-Doz0RaWu.d.cts +97 -0
  42. package/dist/frontends-Doz0RaWu.d.ts +97 -0
  43. package/dist/image-generation.cjs +2 -2
  44. package/dist/image-generation.d.cts +7 -4
  45. package/dist/image-generation.d.ts +7 -4
  46. package/dist/image-generation.js +1 -1
  47. package/dist/index.cjs +25 -10
  48. package/dist/index.d.cts +12 -8
  49. package/dist/index.d.ts +12 -8
  50. package/dist/index.js +24 -9
  51. package/dist/openai-operation.d.cts +4 -1
  52. package/dist/openai-operation.d.ts +4 -1
  53. package/dist/outbound-api/routeResolver.d.cts +9 -5
  54. package/dist/outbound-api/routeResolver.d.ts +9 -5
  55. package/dist/outbound-api/subscriptionRegistryPort.d.cts +4 -1
  56. package/dist/outbound-api/subscriptionRegistryPort.d.ts +4 -1
  57. package/dist/outbound-api/types.d.cts +8 -4
  58. package/dist/outbound-api/types.d.ts +8 -4
  59. package/dist/outbound-api.cjs +25 -10
  60. package/dist/outbound-api.d.cts +117 -8
  61. package/dist/outbound-api.d.ts +117 -8
  62. package/dist/outbound-api.js +24 -9
  63. package/dist/pipeline/AccountAllowanceScheduling.d.cts +8 -4
  64. package/dist/pipeline/AccountAllowanceScheduling.d.ts +8 -4
  65. package/dist/pipeline/upstreamFetch.cjs +2 -2
  66. package/dist/pipeline/upstreamFetch.js +1 -1
  67. package/dist/ports.d.cts +8 -4
  68. package/dist/ports.d.ts +8 -4
  69. package/dist/provider-proxy/ProviderProxy.cjs +11 -10
  70. package/dist/provider-proxy/ProviderProxy.d.cts +5 -2
  71. package/dist/provider-proxy/ProviderProxy.d.ts +5 -2
  72. package/dist/provider-proxy/ProviderProxy.js +10 -9
  73. package/dist/provider-proxy/ingress/providerProxyShared.cjs +13 -10
  74. package/dist/provider-proxy/ingress/providerProxyShared.d.cts +22 -3
  75. package/dist/provider-proxy/ingress/providerProxyShared.d.ts +22 -3
  76. package/dist/provider-proxy/ingress/providerProxyShared.js +12 -9
  77. package/dist/provider-proxy/types.d.cts +4 -1
  78. package/dist/provider-proxy/types.d.ts +4 -1
  79. package/dist/provider-proxy.cjs +11 -10
  80. package/dist/provider-proxy.d.cts +10 -6
  81. package/dist/provider-proxy.d.ts +10 -6
  82. package/dist/provider-proxy.js +10 -9
  83. package/dist/proxy-UZTtjPZx.d.cts +18 -0
  84. package/dist/proxy-UZTtjPZx.d.ts +18 -0
  85. package/dist/{routeResolver-rpKQLyDO.d.cts → routeResolver-Da0yvkL1.d.cts} +2 -2
  86. package/dist/{routeResolver-CTCcSHWu.d.ts → routeResolver-STwMz_G4.d.ts} +2 -2
  87. package/dist/runtime-5NCT3J3T.cjs +8 -0
  88. package/dist/runtime-JTHUWCBM.js +8 -0
  89. package/dist/runtime-t8AZacFF.d.cts +233 -0
  90. package/dist/runtime-t8AZacFF.d.ts +233 -0
  91. package/dist/search/api.cjs +766 -0
  92. package/dist/search/api.d.cts +385 -0
  93. package/dist/search/api.d.ts +385 -0
  94. package/dist/search/api.js +766 -0
  95. package/dist/search/http.cjs +37 -0
  96. package/dist/search/http.d.cts +323 -0
  97. package/dist/search/http.d.ts +323 -0
  98. package/dist/search/http.js +37 -0
  99. package/dist/search.cjs +57 -0
  100. package/dist/search.d.cts +113 -0
  101. package/dist/search.d.ts +113 -0
  102. package/dist/search.js +57 -0
  103. package/dist/transformer/transformers/AnthropicTransformer.cjs +3 -3
  104. package/dist/transformer/transformers/AnthropicTransformer.js +2 -2
  105. package/dist/transformer/transformers.cjs +7 -7
  106. package/dist/transformer/transformers.js +6 -6
  107. package/dist/transformer.cjs +6 -6
  108. package/dist/transformer.js +5 -5
  109. package/dist/{types-DsHBBk3h.d.cts → types-BSIJdsyl.d.cts} +15 -0
  110. package/dist/{types-CbglB73l.d.cts → types-Be-yt_6T.d.cts} +1 -1
  111. package/dist/{types-CVRge76p.d.ts → types-By9Tg6-I.d.ts} +15 -0
  112. package/dist/types-CbCZqLGg.d.cts +127 -0
  113. package/dist/types-CbCZqLGg.d.ts +127 -0
  114. package/dist/{types-jjU24eYG.d.cts → types-D-oHYusb.d.cts} +73 -4
  115. package/dist/{types-Bd72H4SB.d.ts → types-Dm4_36V4.d.ts} +1 -1
  116. package/dist/{types-5T223WYQ.d.ts → types-Dvlpjn0d.d.ts} +73 -4
  117. package/package.json +6 -3
  118. package/dist/{chunk-6OC3ORW6.js → chunk-EUZRH544.js} +3 -3
  119. package/dist/{chunk-SQMAEDNE.cjs → chunk-POUTD5AM.cjs} +2 -2
@@ -1,19 +1,22 @@
1
1
  import { VoucherConfig } from '@omnicross/contracts/voucher-types';
2
- import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, W as AnthropicConfigSegment, n as OutboundApiDeps, r as OutboundApiServerStatus, t as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, q as OutboundApiServerConfig, m as ModelPrefixTargets, y as OutboundProxyConfig, I as ImagesServerConfig, s as OutboundEndpoint, R as RequestRole, T as ModelRef, k as KindMappedEndpoint, l as ModelKind, x as OutboundPermission, O as OutboundKeyDb, o as OutboundApiKeyCreated } from './types-jjU24eYG.cjs';
3
- export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, M as MessagesModelKind, p as OutboundApiKeyInfo, u as OutboundKeyActivationMode, v as OutboundKeyDbRow, w as OutboundKeyPolicy, z as ResponsesModelKind, V as VoucherCreateInput, B as VoucherDb, D as computeVoucherGrant, H as generateVoucherCode, J as hashVoucherCode, L as newVoucherId, N as startOfLocalDay, P as startOfLocalWeek, Q as toVoucherInfo, S as voucherCodePrefix } from './types-jjU24eYG.cjs';
2
+ import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, X as AnthropicConfigSegment, S as SearchServerConfig, n as OutboundApiDeps, r as OutboundApiServerStatus, t as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, q as OutboundApiServerConfig, m as ModelPrefixTargets, y as OutboundProxyConfig, I as ImagesServerConfig, s as OutboundEndpoint, R as RequestRole, W as ModelRef, k as KindMappedEndpoint, l as ModelKind, x as OutboundPermission, O as OutboundKeyDb, o as OutboundApiKeyCreated } from './types-D-oHYusb.cjs';
3
+ export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, M as MessagesModelKind, p as OutboundApiKeyInfo, u as OutboundKeyActivationMode, v as OutboundKeyDbRow, w as OutboundKeyPolicy, z as ResponsesModelKind, V as VoucherCreateInput, B as VoucherDb, D as computeVoucherGrant, H as generateVoucherCode, J as hashVoucherCode, L as newVoucherId, N as startOfLocalDay, P as startOfLocalWeek, Q as toVoucherInfo, T as voucherCodePrefix } from './types-D-oHYusb.cjs';
4
4
  import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
5
5
  import { AuditConfig } from '@omnicross/contracts/audit-types';
6
6
  import { BillingConfig } from '@omnicross/contracts/billing-types';
7
7
  import { WebhookDestination, WebhookConfig } from '@omnicross/contracts/webhook-types';
8
- import { e as ImageApiLimits } from './types-CbglB73l.cjs';
8
+ import { e as ImageApiLimits } from './types-Be-yt_6T.cjs';
9
+ import { S as SearchApiProviderConfigs } from './types-CbCZqLGg.cjs';
10
+ import http from 'node:http';
11
+ import { c as SearchFrontendMode } from './frontends-Doz0RaWu.cjs';
12
+ import { S as SearchRuntime } from './runtime-t8AZacFF.cjs';
9
13
  export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.cjs';
10
14
  export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.cjs';
11
15
  export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.cjs';
12
16
  import { K as KeyCostLimits, M as ModelRestriction } from './keyPolicy-zdWTu3CQ.cjs';
13
17
  export { a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.cjs';
14
- import http from 'node:http';
15
- import { D as IngressFormat } from './types-DsHBBk3h.cjs';
16
- export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-rpKQLyDO.cjs';
18
+ import { D as IngressFormat } from './types-BSIJdsyl.cjs';
19
+ export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-Da0yvkL1.cjs';
17
20
  export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.cjs';
18
21
  import '@omnicross/contracts/health-logging-types';
19
22
  import './logger-4GvQNzhE.cjs';
@@ -22,9 +25,10 @@ import '@omnicross/contracts/llm-config';
22
25
  import './transformer/types.cjs';
23
26
  import '@omnicross/contracts/completion-types';
24
27
  import './transformer/TransformerService.cjs';
25
- import './ProviderProxy-CgIcCVwk.cjs';
28
+ import './ProviderProxy-Bz_nkOwq.cjs';
26
29
  import '@omnicross/contracts/image-generation-types';
27
30
  import 'node:fs/promises';
31
+ import '@omnicross/contracts/search-types';
28
32
  import '@omnicross/contracts/usage-stats-types';
29
33
  import '@omnicross/contracts/subscription-types';
30
34
  import '@omnicross/contracts/usage-types';
@@ -81,6 +85,11 @@ interface ApplyConfigInput {
81
85
  /** Anthropic-protocol segment (claude-api-protocol-fidelity, §10). Read live
82
86
  * per request; the heartbeat value is hot-applied to the stream synthesizer. */
83
87
  anthropic?: AnthropicConfigSegment;
88
+ /**
89
+ * Search assembly segment (plan 阶段5). Read live per request for the Codex
90
+ * frontend's mode; the runtime itself is wired once through `deps`.
91
+ */
92
+ search?: SearchServerConfig;
84
93
  }
85
94
  /** Prepared listener/config publication used by the daemon's settings transaction. */
86
95
  interface PreparedOutboundApiConfig {
@@ -101,6 +110,7 @@ declare class OutboundApiServer {
101
110
  private concurrencyQueue;
102
111
  private voucherConfig;
103
112
  private anthropicConfig;
113
+ private searchConfig;
104
114
  private imagesEnabled;
105
115
  /** R10 `/api/hello` switch (§10 `anthropic.apiHello`, default true). */
106
116
  private apiHelloEnabled;
@@ -399,6 +409,105 @@ declare function normalizeImagesServerConfig(value: unknown): ImagesServerConfig
399
409
  /** Strict structural/range validation. Daemon validation adds filesystem and resolver policy. */
400
410
  declare function validateImagesServerConfig(value: unknown): string[];
401
411
 
412
+ /**
413
+ * The persisted `search` config section — tolerant read, strict report.
414
+ *
415
+ * Two functions over the same shape, exactly as the Images section does it:
416
+ * {@link normalizeSearchServerConfig} never throws (a malformed member falls
417
+ * back or is dropped, so a bad config cannot take the daemon down), and
418
+ * {@link validateSearchServerConfig} says what was unusable so an operator can
419
+ * fix it.
420
+ *
421
+ * **Nothing here ever echoes a configured VALUE.** Every validation message
422
+ * names a FIELD. An API key, a Basic-auth password and an internal hostname are
423
+ * all things a validation log must not leak, and the cheapest way to guarantee
424
+ * that is a rule with no exceptions rather than a per-field judgement call.
425
+ *
426
+ * @module outbound-api/searchServerConfig
427
+ */
428
+
429
+ /** The frozen defaults, for comparison and for callers with no config at all. */
430
+ declare const DEFAULT_SEARCH_SERVER_CONFIG: Readonly<SearchServerConfig>;
431
+ /** Tolerant read: unusable members are DROPPED, which leaves them unconfigured. */
432
+ declare function normalizeSearchApiProviderConfigs(value: unknown): SearchApiProviderConfigs;
433
+ /** Tolerant read of the whole section. Never throws; an absent section is the default. */
434
+ declare function normalizeSearchServerConfig(value: unknown): SearchServerConfig;
435
+ /**
436
+ * Report what a `search` section got wrong, field by field.
437
+ *
438
+ * Returns `[]` for a valid (or absent) section. Callers surface the list the
439
+ * way the Images config's errors are surfaced — reported, not thrown — because
440
+ * a search misconfiguration must not prevent the gateway from serving text.
441
+ */
442
+ declare function validateSearchServerConfig(value: unknown, path?: string): string[];
443
+
444
+ /**
445
+ * The Codex search route — `POST /v1/alpha/search`.
446
+ *
447
+ * ## Compatibility source
448
+ *
449
+ * From `docs/design/search-baseline/wire-baseline.md` §1, over 11 real audit
450
+ * records produced by `codex-tui` 0.151.0 and 0.152.0:
451
+ *
452
+ * The request and response contracts are pinned from the Codex 0.152.0 typed
453
+ * API definitions and standalone-search integration fixtures. Codex sends text
454
+ * queries under `commands.search_query[].q` and requires a string `output` in
455
+ * the JSON response; structured `results` are optional opaque DTOs.
456
+ *
457
+ * ## What this route does about that
458
+ *
459
+ * The default mode is `off`, and `off` answers with a structured
460
+ * `unsupported_capability` error instead of the generic 404 (plan §15). That is
461
+ * strictly more informative than today's behavior and claims nothing.
462
+ *
463
+ * Enabling `managed` accepts Codex text-search commands plus the legacy flat
464
+ * query spellings used by early Omnicross clients. Other Codex command kinds
465
+ * are rejected because the shared runtime currently exposes text search only.
466
+ *
467
+ * ## The designed side effect
468
+ *
469
+ * A dispatched request reaches route resolution and is given a `sessionKey`, so
470
+ * the audit body store finally persists `/v1/alpha/search` exchanges. The
471
+ * capture that 阶段0 proved impossible becomes possible when a real client talks
472
+ * to an enabled route.
473
+ *
474
+ * @module outbound-api/searchRoute
475
+ */
476
+
477
+ /** The path observed on every one of the 11 baselined records. */
478
+ declare const codexSearchRoutePath = "/v1/alpha/search";
479
+ /** Everything the handler needs, injected so it is testable without a daemon. */
480
+ interface CodexSearchRouteDeps {
481
+ /** Resolved ONCE per request by the caller, before any wire bytes. */
482
+ readonly mode: SearchFrontendMode;
483
+ /**
484
+ * The single shared runtime. Absent behaves exactly like mode `off`.
485
+ *
486
+ * Selection and fallback policy live INSIDE it (阶段3): this route never
487
+ * builds a candidate list, and adding a per-request policy override here
488
+ * would be the second fallback order the extraction exists to prevent.
489
+ */
490
+ readonly runtime?: SearchRuntime | null;
491
+ /** Cancellation, wired to the client connection by the caller. */
492
+ readonly signal?: AbortSignal;
493
+ /**
494
+ * Audit hook. The route calls this with the raw body and the parsed object so
495
+ * the caller can stash the body and derive the session key — the mechanism
496
+ * that unblocks `/v1/alpha/search` body capture (see the module note).
497
+ */
498
+ readonly onRequestBody?: (raw: string, parsed: Record<string, unknown>) => void;
499
+ }
500
+ /** `POST` + a path ending in `/alpha/search`. Nothing else is this route. */
501
+ declare function isCodexSearchRequest(method: string | undefined, url: string | undefined): boolean;
502
+ /**
503
+ * Serve one `POST /v1/alpha/search`.
504
+ *
505
+ * Always answers: a structured JSON error or a structured JSON result, never a
506
+ * hang, never a bare 404. The caller has already authenticated the request and
507
+ * resolved `deps.mode`.
508
+ */
509
+ declare function handleCodexSearchRequest(req: http.IncomingMessage, res: http.ServerResponse, deps: CodexSearchRouteDeps): Promise<void>;
510
+
402
511
  /**
403
512
  * Either the winning route projected to the resolver shape, or `none` — no
404
513
  * enabled route for this key/endpoint could serve the request. There is no
@@ -1006,4 +1115,4 @@ declare function getOutboundApiServer(deps?: OutboundApiDeps, onPortChange?: (po
1006
1115
  /** Reset the singleton (tests / teardown only). */
1007
1116
  declare function __resetOutboundApiServerForTests(): void;
1008
1117
 
1009
- export { AccountProbeConfig, AllowanceSchedulingConfig, type ApiServerSettingsStore, type ApplyConfigInput, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_ALLOWANCE_SCHEDULING, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_IMAGES_SERVER_CONFIG, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, GatewayBinding, type GatewayBindingResolution, IMAGE_SERVER_HARD_CEILINGS, ImagesServerConfig, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, LEGACY_OUTBOUND_PERMISSIONS, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundPermission, OutboundProxyConfig, OutboundRateLimiter, type PreparedOutboundApiConfig, RequestRole, type ResolveGatewayBindingInput, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type VerifiedKey, __resetOutboundApiServerForTests, candidateBackgroundModelIds, candidateGatewayBindings, classifyModelPrefix, createIntegrationKey, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, effectiveOutboundPermissions, endpointToIngressFormat, formatUrls, gatewayBindingToEndpointConfig, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, legacyEndpointsToBindings, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAllowanceScheduling, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizeGatewayBindings, normalizeImagesServerConfig, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolveGatewayBinding, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateImagesServerConfig, validateOutboundPermissions, verifyKey, verifyPresentedKey };
1118
+ export { AccountProbeConfig, AllowanceSchedulingConfig, type ApiServerSettingsStore, type ApplyConfigInput, type CodexSearchRouteDeps, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_ALLOWANCE_SCHEDULING, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_IMAGES_SERVER_CONFIG, DEFAULT_OUTBOUND_PORT, DEFAULT_SEARCH_SERVER_CONFIG, DEFAULT_USER_MESSAGE_QUEUE, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, GatewayBinding, type GatewayBindingResolution, IMAGE_SERVER_HARD_CEILINGS, ImagesServerConfig, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, LEGACY_OUTBOUND_PERMISSIONS, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundPermission, OutboundProxyConfig, OutboundRateLimiter, type PreparedOutboundApiConfig, RequestRole, type ResolveGatewayBindingInput, SearchServerConfig, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type VerifiedKey, __resetOutboundApiServerForTests, candidateBackgroundModelIds, candidateGatewayBindings, classifyModelPrefix, codexSearchRoutePath, createIntegrationKey, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, effectiveOutboundPermissions, endpointToIngressFormat, formatUrls, gatewayBindingToEndpointConfig, getOutboundApiServer, handleCodexSearchRequest, handleVoucherRedeem, hashKey, isCodexSearchRequest, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, legacyEndpointsToBindings, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAllowanceScheduling, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizeGatewayBindings, normalizeImagesServerConfig, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeSearchApiProviderConfigs, normalizeSearchServerConfig, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolveGatewayBinding, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateImagesServerConfig, validateOutboundPermissions, validateSearchServerConfig, verifyKey, verifyPresentedKey };
@@ -1,19 +1,22 @@
1
1
  import { VoucherConfig } from '@omnicross/contracts/voucher-types';
2
- import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, W as AnthropicConfigSegment, n as OutboundApiDeps, r as OutboundApiServerStatus, t as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, q as OutboundApiServerConfig, m as ModelPrefixTargets, y as OutboundProxyConfig, I as ImagesServerConfig, s as OutboundEndpoint, R as RequestRole, T as ModelRef, k as KindMappedEndpoint, l as ModelKind, x as OutboundPermission, O as OutboundKeyDb, o as OutboundApiKeyCreated } from './types-5T223WYQ.js';
3
- export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, M as MessagesModelKind, p as OutboundApiKeyInfo, u as OutboundKeyActivationMode, v as OutboundKeyDbRow, w as OutboundKeyPolicy, z as ResponsesModelKind, V as VoucherCreateInput, B as VoucherDb, D as computeVoucherGrant, H as generateVoucherCode, J as hashVoucherCode, L as newVoucherId, N as startOfLocalDay, P as startOfLocalWeek, Q as toVoucherInfo, S as voucherCodePrefix } from './types-5T223WYQ.js';
2
+ import { c as EndpointRoutingConfig, G as GatewayBinding, U as UserMessageQueueConfig, b as ConcurrencyQueueConfig, X as AnthropicConfigSegment, S as SearchServerConfig, n as OutboundApiDeps, r as OutboundApiServerStatus, t as OutboundFormatUrls, A as AccountProbeConfig, a as AllowanceSchedulingConfig, F as FingerprintConfig, q as OutboundApiServerConfig, m as ModelPrefixTargets, y as OutboundProxyConfig, I as ImagesServerConfig, s as OutboundEndpoint, R as RequestRole, W as ModelRef, k as KindMappedEndpoint, l as ModelKind, x as OutboundPermission, O as OutboundKeyDb, o as OutboundApiKeyCreated } from './types-Dvlpjn0d.js';
3
+ export { C as ChatDispatchMode, E as ENDPOINT_MODEL_KINDS, d as GatewayBindingFallback, e as GatewayBindingKeyScope, f as GatewayBindingModelMode, g as GatewayBindingTarget, h as GatewayModelMapping, K as KeySpendReader, i as KeySpendSeeder, j as KeySpendTracker, M as MessagesModelKind, p as OutboundApiKeyInfo, u as OutboundKeyActivationMode, v as OutboundKeyDbRow, w as OutboundKeyPolicy, z as ResponsesModelKind, V as VoucherCreateInput, B as VoucherDb, D as computeVoucherGrant, H as generateVoucherCode, J as hashVoucherCode, L as newVoucherId, N as startOfLocalDay, P as startOfLocalWeek, Q as toVoucherInfo, T as voucherCodePrefix } from './types-Dvlpjn0d.js';
4
4
  import { ProxyConfig } from '@omnicross/contracts/account-tokens-types';
5
5
  import { AuditConfig } from '@omnicross/contracts/audit-types';
6
6
  import { BillingConfig } from '@omnicross/contracts/billing-types';
7
7
  import { WebhookDestination, WebhookConfig } from '@omnicross/contracts/webhook-types';
8
- import { e as ImageApiLimits } from './types-Bd72H4SB.js';
8
+ import { e as ImageApiLimits } from './types-Dm4_36V4.js';
9
+ import { S as SearchApiProviderConfigs } from './types-CbCZqLGg.js';
10
+ import http from 'node:http';
11
+ import { c as SearchFrontendMode } from './frontends-Doz0RaWu.js';
12
+ import { S as SearchRuntime } from './runtime-t8AZacFF.js';
9
13
  export { AUDIT_REDACTED, redactAuditText } from './outbound-api/auditRedact.js';
10
14
  export { AuditCaptureContext, beginAuditCapture } from './outbound-api/auditCapture.js';
11
15
  export { BillingCaptureContext, beginBillingCapture } from './outbound-api/billingCapture.js';
12
16
  import { K as KeyCostLimits, M as ModelRestriction } from './keyPolicy-zdWTu3CQ.js';
13
17
  export { a as KeyExpiryInput, b as KeyExpiryResult, c as KeySpend, Q as QuotaDecision, d as checkKeyQuota, e as computeKeyExpiry } from './keyPolicy-zdWTu3CQ.js';
14
- import http from 'node:http';
15
- import { D as IngressFormat } from './types-CVRge76p.js';
16
- export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-CTCcSHWu.js';
18
+ import { D as IngressFormat } from './types-By9Tg6-I.js';
19
+ export { S as SUBSCRIPTION_PROVIDER_IDS, e as endpointSupportsSubscription, i as isSubscriptionProviderId, p as parseModelRef, a as pickModelRefFromList, r as resolveRoute } from './routeResolver-STwMz_G4.js';
17
20
  export { BoundAccountFallbackPolicy, BoundAccountSelectionError, BoundAccountSelectionFailureReason, boundAccountSelectionMessage, isBoundAccountSelectionError } from './pipeline/BoundAccountSelectionError.js';
18
21
  import '@omnicross/contracts/health-logging-types';
19
22
  import './logger-4GvQNzhE.js';
@@ -22,9 +25,10 @@ import '@omnicross/contracts/llm-config';
22
25
  import './transformer/types.js';
23
26
  import '@omnicross/contracts/completion-types';
24
27
  import './transformer/TransformerService.js';
25
- import './ProviderProxy-DYoY5XoT.js';
28
+ import './ProviderProxy-Ckr6oTrE.js';
26
29
  import '@omnicross/contracts/image-generation-types';
27
30
  import 'node:fs/promises';
31
+ import '@omnicross/contracts/search-types';
28
32
  import '@omnicross/contracts/usage-stats-types';
29
33
  import '@omnicross/contracts/subscription-types';
30
34
  import '@omnicross/contracts/usage-types';
@@ -81,6 +85,11 @@ interface ApplyConfigInput {
81
85
  /** Anthropic-protocol segment (claude-api-protocol-fidelity, §10). Read live
82
86
  * per request; the heartbeat value is hot-applied to the stream synthesizer. */
83
87
  anthropic?: AnthropicConfigSegment;
88
+ /**
89
+ * Search assembly segment (plan 阶段5). Read live per request for the Codex
90
+ * frontend's mode; the runtime itself is wired once through `deps`.
91
+ */
92
+ search?: SearchServerConfig;
84
93
  }
85
94
  /** Prepared listener/config publication used by the daemon's settings transaction. */
86
95
  interface PreparedOutboundApiConfig {
@@ -101,6 +110,7 @@ declare class OutboundApiServer {
101
110
  private concurrencyQueue;
102
111
  private voucherConfig;
103
112
  private anthropicConfig;
113
+ private searchConfig;
104
114
  private imagesEnabled;
105
115
  /** R10 `/api/hello` switch (§10 `anthropic.apiHello`, default true). */
106
116
  private apiHelloEnabled;
@@ -399,6 +409,105 @@ declare function normalizeImagesServerConfig(value: unknown): ImagesServerConfig
399
409
  /** Strict structural/range validation. Daemon validation adds filesystem and resolver policy. */
400
410
  declare function validateImagesServerConfig(value: unknown): string[];
401
411
 
412
+ /**
413
+ * The persisted `search` config section — tolerant read, strict report.
414
+ *
415
+ * Two functions over the same shape, exactly as the Images section does it:
416
+ * {@link normalizeSearchServerConfig} never throws (a malformed member falls
417
+ * back or is dropped, so a bad config cannot take the daemon down), and
418
+ * {@link validateSearchServerConfig} says what was unusable so an operator can
419
+ * fix it.
420
+ *
421
+ * **Nothing here ever echoes a configured VALUE.** Every validation message
422
+ * names a FIELD. An API key, a Basic-auth password and an internal hostname are
423
+ * all things a validation log must not leak, and the cheapest way to guarantee
424
+ * that is a rule with no exceptions rather than a per-field judgement call.
425
+ *
426
+ * @module outbound-api/searchServerConfig
427
+ */
428
+
429
+ /** The frozen defaults, for comparison and for callers with no config at all. */
430
+ declare const DEFAULT_SEARCH_SERVER_CONFIG: Readonly<SearchServerConfig>;
431
+ /** Tolerant read: unusable members are DROPPED, which leaves them unconfigured. */
432
+ declare function normalizeSearchApiProviderConfigs(value: unknown): SearchApiProviderConfigs;
433
+ /** Tolerant read of the whole section. Never throws; an absent section is the default. */
434
+ declare function normalizeSearchServerConfig(value: unknown): SearchServerConfig;
435
+ /**
436
+ * Report what a `search` section got wrong, field by field.
437
+ *
438
+ * Returns `[]` for a valid (or absent) section. Callers surface the list the
439
+ * way the Images config's errors are surfaced — reported, not thrown — because
440
+ * a search misconfiguration must not prevent the gateway from serving text.
441
+ */
442
+ declare function validateSearchServerConfig(value: unknown, path?: string): string[];
443
+
444
+ /**
445
+ * The Codex search route — `POST /v1/alpha/search`.
446
+ *
447
+ * ## Compatibility source
448
+ *
449
+ * From `docs/design/search-baseline/wire-baseline.md` §1, over 11 real audit
450
+ * records produced by `codex-tui` 0.151.0 and 0.152.0:
451
+ *
452
+ * The request and response contracts are pinned from the Codex 0.152.0 typed
453
+ * API definitions and standalone-search integration fixtures. Codex sends text
454
+ * queries under `commands.search_query[].q` and requires a string `output` in
455
+ * the JSON response; structured `results` are optional opaque DTOs.
456
+ *
457
+ * ## What this route does about that
458
+ *
459
+ * The default mode is `off`, and `off` answers with a structured
460
+ * `unsupported_capability` error instead of the generic 404 (plan §15). That is
461
+ * strictly more informative than today's behavior and claims nothing.
462
+ *
463
+ * Enabling `managed` accepts Codex text-search commands plus the legacy flat
464
+ * query spellings used by early Omnicross clients. Other Codex command kinds
465
+ * are rejected because the shared runtime currently exposes text search only.
466
+ *
467
+ * ## The designed side effect
468
+ *
469
+ * A dispatched request reaches route resolution and is given a `sessionKey`, so
470
+ * the audit body store finally persists `/v1/alpha/search` exchanges. The
471
+ * capture that 阶段0 proved impossible becomes possible when a real client talks
472
+ * to an enabled route.
473
+ *
474
+ * @module outbound-api/searchRoute
475
+ */
476
+
477
+ /** The path observed on every one of the 11 baselined records. */
478
+ declare const codexSearchRoutePath = "/v1/alpha/search";
479
+ /** Everything the handler needs, injected so it is testable without a daemon. */
480
+ interface CodexSearchRouteDeps {
481
+ /** Resolved ONCE per request by the caller, before any wire bytes. */
482
+ readonly mode: SearchFrontendMode;
483
+ /**
484
+ * The single shared runtime. Absent behaves exactly like mode `off`.
485
+ *
486
+ * Selection and fallback policy live INSIDE it (阶段3): this route never
487
+ * builds a candidate list, and adding a per-request policy override here
488
+ * would be the second fallback order the extraction exists to prevent.
489
+ */
490
+ readonly runtime?: SearchRuntime | null;
491
+ /** Cancellation, wired to the client connection by the caller. */
492
+ readonly signal?: AbortSignal;
493
+ /**
494
+ * Audit hook. The route calls this with the raw body and the parsed object so
495
+ * the caller can stash the body and derive the session key — the mechanism
496
+ * that unblocks `/v1/alpha/search` body capture (see the module note).
497
+ */
498
+ readonly onRequestBody?: (raw: string, parsed: Record<string, unknown>) => void;
499
+ }
500
+ /** `POST` + a path ending in `/alpha/search`. Nothing else is this route. */
501
+ declare function isCodexSearchRequest(method: string | undefined, url: string | undefined): boolean;
502
+ /**
503
+ * Serve one `POST /v1/alpha/search`.
504
+ *
505
+ * Always answers: a structured JSON error or a structured JSON result, never a
506
+ * hang, never a bare 404. The caller has already authenticated the request and
507
+ * resolved `deps.mode`.
508
+ */
509
+ declare function handleCodexSearchRequest(req: http.IncomingMessage, res: http.ServerResponse, deps: CodexSearchRouteDeps): Promise<void>;
510
+
402
511
  /**
403
512
  * Either the winning route projected to the resolver shape, or `none` — no
404
513
  * enabled route for this key/endpoint could serve the request. There is no
@@ -1006,4 +1115,4 @@ declare function getOutboundApiServer(deps?: OutboundApiDeps, onPortChange?: (po
1006
1115
  /** Reset the singleton (tests / teardown only). */
1007
1116
  declare function __resetOutboundApiServerForTests(): void;
1008
1117
 
1009
- export { AccountProbeConfig, AllowanceSchedulingConfig, type ApiServerSettingsStore, type ApplyConfigInput, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_ALLOWANCE_SCHEDULING, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_IMAGES_SERVER_CONFIG, DEFAULT_OUTBOUND_PORT, DEFAULT_USER_MESSAGE_QUEUE, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, GatewayBinding, type GatewayBindingResolution, IMAGE_SERVER_HARD_CEILINGS, ImagesServerConfig, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, LEGACY_OUTBOUND_PERMISSIONS, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundPermission, OutboundProxyConfig, OutboundRateLimiter, type PreparedOutboundApiConfig, RequestRole, type ResolveGatewayBindingInput, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type VerifiedKey, __resetOutboundApiServerForTests, candidateBackgroundModelIds, candidateGatewayBindings, classifyModelPrefix, createIntegrationKey, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, effectiveOutboundPermissions, endpointToIngressFormat, formatUrls, gatewayBindingToEndpointConfig, getOutboundApiServer, handleVoucherRedeem, hashKey, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, legacyEndpointsToBindings, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAllowanceScheduling, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizeGatewayBindings, normalizeImagesServerConfig, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolveGatewayBinding, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateImagesServerConfig, validateOutboundPermissions, verifyKey, verifyPresentedKey };
1118
+ export { AccountProbeConfig, AllowanceSchedulingConfig, type ApiServerSettingsStore, type ApplyConfigInput, type CodexSearchRouteDeps, ConcurrencyQueueConfig, ConcurrencyQueueFullError, ConcurrencyWaitCancelledError, ConcurrencyWaitTimeoutError, DEFAULT_ACCOUNT_PROBE, DEFAULT_ALLOWANCE_SCHEDULING, DEFAULT_CONCURRENCY_QUEUE, DEFAULT_FINGERPRINT, DEFAULT_IMAGES_SERVER_CONFIG, DEFAULT_OUTBOUND_PORT, DEFAULT_SEARCH_SERVER_CONFIG, DEFAULT_USER_MESSAGE_QUEUE, EndpointRoutingConfig, FingerprintConfig, type GateAcquireOptions, type GateAcquisition, type GateSlot, type GateStatusEntry, GatewayBinding, type GatewayBindingResolution, IMAGE_SERVER_HARD_CEILINGS, ImagesServerConfig, KeyCostLimits, type KeyVerification, KeyedMutex, KindMappedEndpoint, LEGACY_OUTBOUND_PERMISSIONS, ModelKind, type ModelPrefixKind, ModelPrefixTargets, OUTBOUND_API_SERVER_CONFIG_KEY, OutboundApiDeps, OutboundApiKeyCreated, OutboundApiServer, OutboundApiServerConfig, OutboundApiServerStatus, OutboundConcurrencyGate, OutboundEndpoint, OutboundFormatUrls, OutboundKeyDb, OutboundPermission, OutboundProxyConfig, OutboundRateLimiter, type PreparedOutboundApiConfig, RequestRole, type ResolveGatewayBindingInput, SearchServerConfig, type SerialAcquireOptions, type SerialQueueStatusEntry, SerialQueueTimeoutError, type SerialSlot, UserMessageQueueConfig, UserMessageSerialQueue, type VerifiedKey, __resetOutboundApiServerForTests, candidateBackgroundModelIds, candidateGatewayBindings, classifyModelPrefix, codexSearchRoutePath, createIntegrationKey, createNamedKey, defaultServerConfig, detectModelKind, detectRequestRole, effectiveOutboundPermissions, endpointToIngressFormat, formatUrls, gatewayBindingToEndpointConfig, getOutboundApiServer, handleCodexSearchRequest, handleVoucherRedeem, hashKey, isCodexSearchRequest, isConcurrencyRejection, isKindMappedEndpoint, isRedeemRequest, isSerialQueueTimeout, isUserMessageRequest, legacyEndpointsToBindings, loadServerConfig, mergeServerConfig, modelKindsForEndpoint, normalizeAccountProbe, normalizeAllowanceScheduling, normalizeAudit, normalizeBilling, normalizeFingerprint, normalizeGatewayBindings, normalizeImagesServerConfig, normalizePrefixTargets, normalizeProxyConfig, normalizeProxySegment, normalizeQueueSegments, normalizeSearchApiProviderConfigs, normalizeSearchServerConfig, normalizeServerConfig, normalizeVoucher, normalizeWebhookDestination, normalizeWebhookSegment, randomBase62, resolveGatewayBinding, resolvePrefixTarget, saveServerConfig, validateEndpointModelConfig, validateImagesServerConfig, validateOutboundPermissions, validateSearchServerConfig, verifyKey, verifyPresentedKey };
@@ -8,6 +8,7 @@ import {
8
8
  DEFAULT_FINGERPRINT,
9
9
  DEFAULT_IMAGES_SERVER_CONFIG,
10
10
  DEFAULT_OUTBOUND_PORT,
11
+ DEFAULT_SEARCH_SERVER_CONFIG,
11
12
  DEFAULT_USER_MESSAGE_QUEUE,
12
13
  IMAGE_SERVER_HARD_CEILINGS,
13
14
  KeySpendTracker,
@@ -23,6 +24,7 @@ import {
23
24
  candidateBackgroundModelIds,
24
25
  candidateGatewayBindings,
25
26
  checkKeyQuota,
27
+ codexSearchRoutePath,
26
28
  computeKeyExpiry,
27
29
  computeVoucherGrant,
28
30
  createIntegrationKey,
@@ -33,9 +35,11 @@ import {
33
35
  gatewayBindingToEndpointConfig,
34
36
  generateVoucherCode,
35
37
  getOutboundApiServer,
38
+ handleCodexSearchRequest,
36
39
  handleVoucherRedeem,
37
40
  hashKey,
38
41
  hashVoucherCode,
42
+ isCodexSearchRequest,
39
43
  isConcurrencyRejection,
40
44
  isRedeemRequest,
41
45
  isSerialQueueTimeout,
@@ -55,6 +59,8 @@ import {
55
59
  normalizeProxyConfig,
56
60
  normalizeProxySegment,
57
61
  normalizeQueueSegments,
62
+ normalizeSearchApiProviderConfigs,
63
+ normalizeSearchServerConfig,
58
64
  normalizeServerConfig,
59
65
  normalizeVoucher,
60
66
  normalizeWebhookDestination,
@@ -67,25 +73,27 @@ import {
67
73
  toVoucherInfo,
68
74
  validateImagesServerConfig,
69
75
  validateOutboundPermissions,
76
+ validateSearchServerConfig,
70
77
  verifyKey,
71
78
  verifyPresentedKey,
72
79
  voucherCodePrefix
73
- } from "./chunk-WSJE42SG.js";
80
+ } from "./chunk-LKDAN4D7.js";
81
+ import "./chunk-MZEGQSKQ.js";
74
82
  import "./chunk-VVEHS2LI.js";
75
83
  import "./chunk-WTQMX2Q6.js";
76
84
  import "./chunk-EYGBM2VC.js";
85
+ import "./chunk-MZNPGW5Q.js";
77
86
  import "./chunk-DK4A7DLE.js";
78
- import "./chunk-FJNKXOWE.js";
87
+ import "./chunk-2C3TTBS7.js";
88
+ import "./chunk-HN74IGEO.js";
79
89
  import "./chunk-V53ZEFXC.js";
80
90
  import "./chunk-7PIUVCKK.js";
81
- import "./chunk-6OC3ORW6.js";
82
- import "./chunk-FU7EAR73.js";
91
+ import "./chunk-EUZRH544.js";
83
92
  import "./chunk-LFEH7CEO.js";
84
- import "./chunk-HN74IGEO.js";
93
+ import "./chunk-FU7EAR73.js";
85
94
  import "./chunk-QIIAMBTM.js";
86
95
  import "./chunk-FXR6N3SR.js";
87
96
  import "./chunk-AQDON6MB.js";
88
- import "./chunk-MZNPGW5Q.js";
89
97
  import "./chunk-ECZ3ZE2C.js";
90
98
  import "./chunk-XTEI64OU.js";
91
99
  import "./chunk-XX6NQJMA.js";
@@ -149,13 +157,13 @@ import "./chunk-4VVCXVB7.js";
149
157
  import "./chunk-R4VCO2CB.js";
150
158
  import "./chunk-WYVGULTQ.js";
151
159
  import "./chunk-ZLNHPUFA.js";
152
- import "./chunk-CFSGYFOZ.js";
160
+ import "./chunk-VL5TUDTM.js";
153
161
  import "./chunk-3WD4HTR2.js";
154
162
  import "./chunk-MKF46GNZ.js";
155
163
  import "./chunk-GL6XM527.js";
156
- import "./chunk-DEIUR2TH.js";
164
+ import "./chunk-LQYS2N47.js";
157
165
  import "./chunk-4JOU54M5.js";
158
- import "./chunk-CDHS2QDC.js";
166
+ import "./chunk-4PFWFODB.js";
159
167
  export {
160
168
  AUDIT_REDACTED,
161
169
  BoundAccountSelectionError,
@@ -168,6 +176,7 @@ export {
168
176
  DEFAULT_FINGERPRINT,
169
177
  DEFAULT_IMAGES_SERVER_CONFIG,
170
178
  DEFAULT_OUTBOUND_PORT,
179
+ DEFAULT_SEARCH_SERVER_CONFIG,
171
180
  DEFAULT_USER_MESSAGE_QUEUE,
172
181
  ENDPOINT_MODEL_KINDS,
173
182
  IMAGE_SERVER_HARD_CEILINGS,
@@ -189,6 +198,7 @@ export {
189
198
  candidateGatewayBindings,
190
199
  checkKeyQuota,
191
200
  classifyModelPrefix,
201
+ codexSearchRoutePath,
192
202
  computeKeyExpiry,
193
203
  computeVoucherGrant,
194
204
  createIntegrationKey,
@@ -203,10 +213,12 @@ export {
203
213
  gatewayBindingToEndpointConfig,
204
214
  generateVoucherCode,
205
215
  getOutboundApiServer,
216
+ handleCodexSearchRequest,
206
217
  handleVoucherRedeem,
207
218
  hashKey,
208
219
  hashVoucherCode,
209
220
  isBoundAccountSelectionError,
221
+ isCodexSearchRequest,
210
222
  isConcurrencyRejection,
211
223
  isKindMappedEndpoint,
212
224
  isRedeemRequest,
@@ -229,6 +241,8 @@ export {
229
241
  normalizeProxyConfig,
230
242
  normalizeProxySegment,
231
243
  normalizeQueueSegments,
244
+ normalizeSearchApiProviderConfigs,
245
+ normalizeSearchServerConfig,
232
246
  normalizeServerConfig,
233
247
  normalizeVoucher,
234
248
  normalizeWebhookDestination,
@@ -247,6 +261,7 @@ export {
247
261
  validateEndpointModelConfig,
248
262
  validateImagesServerConfig,
249
263
  validateOutboundPermissions,
264
+ validateSearchServerConfig,
250
265
  verifyKey,
251
266
  verifyPresentedKey,
252
267
  voucherCodePrefix
@@ -1,9 +1,9 @@
1
1
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
2
- import { a as AllowanceSchedulingConfig } from '../types-jjU24eYG.cjs';
2
+ import { a as AllowanceSchedulingConfig } from '../types-D-oHYusb.cjs';
3
3
  import { AccountAllowanceStore } from './AccountAllowanceStore.cjs';
4
- import '../types-CbglB73l.cjs';
4
+ import '../types-Be-yt_6T.cjs';
5
5
  import '@omnicross/contracts/image-generation-types';
6
- import '../types-DsHBBk3h.cjs';
6
+ import '../types-BSIJdsyl.cjs';
7
7
  import 'node:http';
8
8
  import '@omnicross/contracts/completion-types';
9
9
  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
  import '@omnicross/contracts/account-tokens-types';
25
28
  import '@omnicross/contracts/audit-types';
@@ -27,7 +30,8 @@ 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';
30
- import '../ProviderProxy-CgIcCVwk.cjs';
33
+ import '../ProviderProxy-Bz_nkOwq.cjs';
34
+ import '../types-CbCZqLGg.cjs';
31
35
  import '../keyPolicy-zdWTu3CQ.cjs';
32
36
  import '@omnicross/contracts/account-allowance-types';
33
37
 
@@ -1,9 +1,9 @@
1
1
  import { SubscriptionProviderId } from '@omnicross/contracts/subscription-types';
2
- import { a as AllowanceSchedulingConfig } from '../types-5T223WYQ.js';
2
+ import { a as AllowanceSchedulingConfig } from '../types-Dvlpjn0d.js';
3
3
  import { AccountAllowanceStore } from './AccountAllowanceStore.js';
4
- import '../types-Bd72H4SB.js';
4
+ import '../types-Dm4_36V4.js';
5
5
  import '@omnicross/contracts/image-generation-types';
6
- import '../types-CVRge76p.js';
6
+ import '../types-By9Tg6-I.js';
7
7
  import 'node:http';
8
8
  import '@omnicross/contracts/completion-types';
9
9
  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
  import '@omnicross/contracts/account-tokens-types';
25
28
  import '@omnicross/contracts/audit-types';
@@ -27,7 +30,8 @@ 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';
30
- import '../ProviderProxy-DYoY5XoT.js';
33
+ import '../ProviderProxy-Ckr6oTrE.js';
34
+ import '../types-CbCZqLGg.js';
31
35
  import '../keyPolicy-zdWTu3CQ.js';
32
36
  import '@omnicross/contracts/account-allowance-types';
33
37
 
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
 
7
- var _chunkOST5RJOJcjs = require('../chunk-OST5RJOJ.cjs');
7
+ var _chunk4Z3ZLLC2cjs = require('../chunk-4Z3ZLLC2.cjs');
8
8
  require('../chunk-235MXAGX.cjs');
9
9
  require('../chunk-HVBBDBS3.cjs');
10
10
  require('../chunk-NKVZ6Z3Y.cjs');
@@ -14,4 +14,4 @@ require('../chunk-NKVZ6Z3Y.cjs');
14
14
 
15
15
 
16
16
 
17
- exports.__resetUpstreamProxyForTests = _chunkOST5RJOJcjs.__resetUpstreamProxyForTests; exports.bumpUpstreamProxyGeneration = _chunkOST5RJOJcjs.bumpUpstreamProxyGeneration; exports.fetchUpstream = _chunkOST5RJOJcjs.fetchUpstream; exports.resolveUpstreamDispatcher = _chunkOST5RJOJcjs.resolveUpstreamDispatcher; exports.setUpstreamProxyResolver = _chunkOST5RJOJcjs.setUpstreamProxyResolver;
17
+ exports.__resetUpstreamProxyForTests = _chunk4Z3ZLLC2cjs.__resetUpstreamProxyForTests; exports.bumpUpstreamProxyGeneration = _chunk4Z3ZLLC2cjs.bumpUpstreamProxyGeneration; exports.fetchUpstream = _chunk4Z3ZLLC2cjs.fetchUpstream; exports.resolveUpstreamDispatcher = _chunk4Z3ZLLC2cjs.resolveUpstreamDispatcher; exports.setUpstreamProxyResolver = _chunk4Z3ZLLC2cjs.setUpstreamProxyResolver;
@@ -4,7 +4,7 @@ import {
4
4
  fetchUpstream,
5
5
  resolveUpstreamDispatcher,
6
6
  setUpstreamProxyResolver
7
- } from "../chunk-CFSGYFOZ.js";
7
+ } from "../chunk-VL5TUDTM.js";
8
8
  import "../chunk-3WD4HTR2.js";
9
9
  import "../chunk-MKF46GNZ.js";
10
10
  import "../chunk-GL6XM527.js";
package/dist/ports.d.cts CHANGED
@@ -4,8 +4,8 @@ export { AutomaticPricingSource, PricingStore } from './ports/pricing-store.cjs'
4
4
  export { ProviderConfigSource } from './ports/provider-config-source.cjs';
5
5
  export { UsageEventStore } from './ports/usage-event-store.cjs';
6
6
  export { WebSearchBackend } from './ports/web-search-backend.cjs';
7
- export { U as UsageSink } from './types-DsHBBk3h.cjs';
8
- export { O as OutboundCredentialStore } from './types-jjU24eYG.cjs';
7
+ export { U as UsageSink } from './types-BSIJdsyl.cjs';
8
+ export { O as OutboundCredentialStore } from './types-D-oHYusb.cjs';
9
9
  import '@omnicross/contracts/pricing-types';
10
10
  import '@omnicross/contracts/llm-config';
11
11
  import './transformer/types.cjs';
@@ -21,8 +21,11 @@ import './pipeline/AuthSource.cjs';
21
21
  import './pipeline/BoundAccountSelectionError.cjs';
22
22
  import './pipeline/SubscriptionAuthSource.cjs';
23
23
  import './pipeline/SubscriptionAuthStrategy.cjs';
24
+ import './frontends-Doz0RaWu.cjs';
25
+ import '@omnicross/contracts/search-types';
26
+ import './runtime-t8AZacFF.cjs';
24
27
  import '@omnicross/contracts/image-generation-types';
25
- import './types-CbglB73l.cjs';
28
+ import './types-Be-yt_6T.cjs';
26
29
  import 'node:fs/promises';
27
30
  import '@omnicross/contracts/account-tokens-types';
28
31
  import '@omnicross/contracts/audit-types';
@@ -30,5 +33,6 @@ import '@omnicross/contracts/billing-types';
30
33
  import '@omnicross/contracts/health-logging-types';
31
34
  import '@omnicross/contracts/voucher-types';
32
35
  import '@omnicross/contracts/webhook-types';
33
- import './ProviderProxy-CgIcCVwk.cjs';
36
+ import './ProviderProxy-Bz_nkOwq.cjs';
37
+ import './types-CbCZqLGg.cjs';
34
38
  import './keyPolicy-zdWTu3CQ.cjs';