import { Effect } from "effect";
import { StorageError, type IFumaClient } from "./fuma-runtime";
export interface BlobStore {
    readonly get: (namespace: string, key: string) => Effect.Effect<string | null, StorageError>;
    /** Multi-namespace lookup for a single key. Backends issue one query
     *  (`WHERE namespace IN (...) AND key = ?`) and return the hits keyed
     *  by namespace — the caller applies its own precedence. Lets
     *  `pluginBlobStore` walk the scope stack in O(1) round-trips instead
     *  of one per scope. */
    readonly getMany: (namespaces: readonly string[], key: string) => Effect.Effect<ReadonlyMap<string, string>, StorageError>;
    readonly put: (namespace: string, key: string, value: string) => Effect.Effect<void, StorageError>;
    readonly delete: (namespace: string, key: string) => Effect.Effect<void, StorageError>;
    readonly has: (namespace: string, key: string) => Effect.Effect<boolean, StorageError>;
}
export interface PluginBlobStore {
    /** Walk the scope stack (innermost first) and return the first
     *  non-null value for `key`. */
    readonly get: (key: string) => Effect.Effect<string | null, StorageError>;
    /** Write `value` under `key` at the named scope. Scope must be one
     *  of the executor's configured scopes. */
    readonly put: (key: string, value: string, options: {
        readonly scope: string;
    }) => Effect.Effect<void, StorageError>;
    /** Delete `key` at the named scope. */
    readonly delete: (key: string, options: {
        readonly scope: string;
    }) => Effect.Effect<void, StorageError>;
    /** Walk the scope stack and return true if any scope has a value for `key`. */
    readonly has: (key: string) => Effect.Effect<boolean, StorageError>;
}
/**
 * Bind a `BlobStore` to a specific scope stack and plugin id. Reads
 * fall through the stack; writes require an explicit scope. Used by
 * the executor to build the `blobs` field handed to each plugin's
 * `storage` factory.
 */
export declare const pluginBlobStore: (store: BlobStore, scopes: readonly string[], pluginId: string) => PluginBlobStore;
/**
 * Minimal in-memory BlobStore — good for tests and trivial hosts. Real
 * backends (filesystem, S3/R2, SQLite-table-backed) implement the same
 * interface.
 *
 * Every method is `Effect<_, never>` — a pure in-memory Map can't fail.
 * `never` is assignable to `StorageError`, so the result still fits the
 * `BlobStore` interface.
 */
export declare const makeInMemoryBlobStore: () => BlobStore;
export declare const makeFumaBlobStore: (fuma: IFumaClient) => BlobStore;
//# sourceMappingURL=blob.d.ts.map