/** * Runtime helpers consumed by generated bundle entrypoints (Cloudflare * Workers, Cloudflare Containers, AWS Lambda, …). * * Anything exported here runs *inside* the deployed function — keep the * surface tiny and dependency-light. */ import * as ConfigProvider from "effect/ConfigProvider"; import * as Layer from "effect/Layer"; /** * Resolve the user's default-export entrypoint into a `Layer` for the * bundled runtime. * * `entrypoint` may be any of: * - a `Layer` factory (`{ build: (...) => ... }`) — used as-is * - an Alchemy `Platform`/`Worker` construct (now a real `Effect`) * - a plain `Effect` * * Centralized so the inline ternary doesn't have to be re-emitted into * every bundle template (and accidentally rewritten to `x : x` by a bulk * replace, which silently swaps the class in for the Effect and bricks * every deployed worker/lambda). */ export declare const makeEntrypointLayer: (tag: any, entrypoint: any) => Layer.Layer; /** * Wrap a runtime's env-backed `ConfigProvider` so values that were * auto-bound by the deploy-time `Config` interceptor decode transparently. * * The engine can't know which config values are sensitive, so the * interceptor binds every `Config` read during Init onto the deploy target * as a secret, serialized as a `{"_tag":"Redacted","value":}` * marker. The interceptor's runtime branch reifies those markers for reads * during Init, but effects that run later (request handlers, nested * layers) resolve `Config` against the raw env-backed provider — without * this wrapper, `Config.number("PORT")` inside a handler sees the marker * JSON instead of the source value and fails with a schema error. * * Two behaviors: * - Leaf values that carry the marker are unwrapped to the raw source * string before `Config` schemas decode them; everything else passes * through untouched. * - On a miss, falls back to the flat `sanitizeKey`-canonicalized key * (`my.key` → `my_key`) that the interceptor bound the value under, so * config names with non-alphanumeric characters resolve at runtime too. */ export declare const reifyBoundConfigProvider: (base: ConfigProvider.ConfigProvider, env: Record) => ConfigProvider.ConfigProvider; //# sourceMappingURL=Runtime.d.ts.map