/** * Shared Cloudflare-migration test doubles: a fake KV `Http` that satisfies * mcp-core's `CfKvBackend` wire contract, plus a multi-user env preset. Lets the * credential-layer unit tests run offline and reproducibly against the same * backend the deployed Worker uses. */ /** * Structural shape of mcp-core's injectable `Http` (storage/backends.ts): * `request(method, url, data?, headers?) -> { status, body }`. Declared locally * so the harness does not depend on `Http` being re-exported from the subpath. */ export interface KvHttp { request(method: string, url: string, data?: Uint8Array | Buffer, headers?: Record): Promise<{ status: number; body: Uint8Array | Buffer; }>; } /** * In-memory KV that implements the `CfKvBackend` wire contract exactly: * PUT -> 200, GET -> 200/404, DELETE -> 200/404. The key is the last URL * segment, percent-decoded (CfKvBackend `encodeURIComponent`s the whole key). */ export declare class FakeKvHttp implements KvHttp { readonly store: Map>; request(method: string, url: string, data?: Uint8Array | Buffer): Promise<{ status: number; body: Uint8Array; }>; } /** Apply the canonical CF multi-user env preset (dummy secrets only). */ export declare function applyCfEnv(): void; /** Restore the single-user (LocalFs) default by clearing the CF env. */ export declare function clearCfEnv(): void; //# sourceMappingURL=test-helpers.d.ts.map