import { loadGitCasConstructors } from "./gitCasModule.js";
import LoggerObservabilityBridge from "./LoggerObservabilityBridge.js";
/**
 * Builds the standard CDC-backed git-cas store used by runtime adapters.
 */
export async function createCdcCasStore({ plumbing, logger, }) {
    const { ContentAddressableStore, CborCodecCtor } = await loadGitCasConstructors();
    const opts = {
        plumbing,
        codec: new CborCodecCtor(),
        chunking: { strategy: 'cdc' },
    };
    if (logger !== undefined) {
        opts.observability = new LoggerObservabilityBridge(logger);
    }
    return new ContentAddressableStore(opts);
}
