import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as MutableHashMap from "effect/MutableHashMap"; import * as Path from "effect/Path"; import { AlchemyContext } from "../AlchemyContext.ts"; import { CloudflareEnvironment } from "./CloudflareEnvironment.ts"; import type { Queue } from "./Queues/Queue.ts"; import type { Consumer } from "./Queues/Consumer.ts"; export declare const LOCAL_ENTRY_URL: string; declare const LocalRuntimeState_base: Context.ServiceClass; readonly queueConsumers: MutableHashMap.MutableHashMap; /** * Restart hooks for locally running Workers, keyed by script name. * * A local workerd instance bakes its queue-consumer wiring in at start * time (`runtime.start({ queueConsumers })`), but the `Consumer` * resource that populates {@link queueConsumers} reconciles as a * *sibling* of the Worker — the engine may start workerd before the * consumer registers. Providers that mutate a worker's runtime wiring * (e.g. `ConsumerProviderLocal`) invoke the script's hook after * updating state so the running instance is reconfigured; the hook is * a no-op until the worker has served at least once. */ readonly workerRestarts: MutableHashMap.MutableHashMap>; }>; export declare class LocalRuntimeState extends LocalRuntimeState_base { } /** * Directory under `.alchemy` holding local-provider persistent state * (workerd storage). Shared so every consumer — the local runtime layer and * Vite child processes — points at the same storage. */ export declare const localStorageDirectory: Effect.Effect; /** * The shared local-runtime dependency layer (workerd `Runtime`, * `WorkerProxy`, {@link LocalRuntimeState}) used by every Cloudflare local * provider. * * Returns a **module-memoized layer reference**: local providers register * via `ProviderLayer.dual`, which builds each provider's local variant * lazily against the stack build's shared `Layer.MemoMap` — memoization is * keyed by layer identity, so Worker/Queue/Consumer/Container composing * this exact reference into their local thunks share one runtime instance * per stack build (a fresh build gets a fresh instance via its own memo * map; the layer blueprint itself is immutable). */ export declare const localRuntimeServices: () => Layer.Layer; export declare const isLocalId: (id: string | undefined) => id is string; export declare const isLiveId: (id: string | undefined) => id is string; export declare const generateLocalId: () => string; export {}; //# sourceMappingURL=LocalRuntime.d.ts.map