import { LocalApprovalStore, } from "../core/approval-store.js";
import { LocalThreadStore, } from "../core/thread-store.js";
import { createModelProvider } from "../provider/model-provider.js";
export function createDefaultThreadStore(storageRoot) {
    const storeOptions = {
        storageRoot,
    };
    return new LocalThreadStore(storeOptions);
}
export function createDefaultApprovalStore(storageRoot) {
    const storeOptions = {
        storageRoot,
    };
    return new LocalApprovalStore(storeOptions);
}
export function createRuntimeProvider(provider, providerConfig) {
    if (provider) {
        return provider;
    }
    if (!providerConfig) {
        return undefined;
    }
    return createModelProvider(providerConfig);
}
export async function closeResource(resource) {
    await resource.close?.();
}
//# sourceMappingURL=runtime-factory.js.map