import { type MantleRuntime, type RuntimePlan, type SiteConfigRepository } from "@aotter/mantle-runtime"; import { type MantleWeb } from "@aotter/mantle-web"; import type { AdminAssetServer } from "@aotter/mantle-admin"; import type { MantleAuth as Auth } from "@aotter/mantle-auth"; import type { MantleCloudflareConfig } from "./cmsConfig.js"; import type { ConsumerCredentialResolver } from "./resolveCaller.js"; import { type McpCatalogSiteConfigReader } from "../bindings/KvSiteConfigRepository.js"; /** * Per-isolate runtime singleton. The cached promise MUST reset on * rejection (PR #29 carry-forward) — otherwise a transient D1 error * during boot poisons the isolate permanently and every subsequent * request re-throws the same rejected promise. */ export interface MantleRuntimeRef { get(): Promise; web(runtime: CloudflareMantleRuntime): MantleWeb; readonly plan: RuntimePlan; readonly auth: Auth; readonly adminAssets?: AdminAssetServer; readonly credentialResolver?: ConsumerCredentialResolver; readonly jwtBearer?: MantleCloudflareConfig["jwtBearer"]; readonly audit?: MantleCloudflareConfig["audit"]; /** Caller-independent catalog reader. MCP invokes this only after auth. */ readonly mcpCatalogSiteConfig?: McpCatalogSiteConfigReader; readonly publicCacheTag?: string; } export type CloudflareMantleRuntime = MantleRuntime & { readonly siteConfig: SiteConfigRepository; readonly updateSiteSettings: NonNullable; }; export declare function createMantleRuntimeRef(config: MantleCloudflareConfig): MantleRuntimeRef; //# sourceMappingURL=bootRuntimeOnce.d.ts.map