{"version":3,"file":"storage/index.mjs","sources":["webpack://@agent-tars/server/./src/storage/index.ts"],"sourcesContent":["/*\n * Copyright (c) 2025 Bytedance, Inc. and its affiliates.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { StorageProvider, ServerStorageOptions } from './types';\nimport { MemoryStorageProvider } from './MemoryStorageProvider';\nimport { FileStorageProvider } from './FileStorageProvider';\nimport { SQLiteStorageProvider } from './SQLiteStorageProvider';\n\nexport * from './types';\n\n/**\n * Creates and returns a storage provider based on the options\n * @param options Storage configuration options\n * @returns Configured storage provider\n */\nexport function createStorageProvider(options?: ServerStorageOptions): StorageProvider {\n  if (!options || options.type === 'memory') {\n    return new MemoryStorageProvider();\n  }\n\n  if (options.type === 'file') {\n    return new FileStorageProvider(options.path);\n  }\n\n  if (options.type === 'sqlite') {\n    return new SQLiteStorageProvider(options.path);\n  }\n\n  if (options.type === 'database') {\n    throw new Error('Database storage not implemented');\n  }\n\n  throw new Error(`Unknown storage type: ${options.type}`);\n}\n"],"names":["createStorageProvider","options","MemoryStorageProvider","FileStorageProvider","SQLiteStorageProvider","Error"],"mappings":";;;;;;;;AAiBO,SAASA,sBAAsBC,OAA8B;IAClE,IAAI,CAACA,WAAWA,AAAiB,aAAjBA,QAAQ,IAAI,EAC1B,OAAO,IAAIC;IAGb,IAAID,AAAiB,WAAjBA,QAAQ,IAAI,EACd,OAAO,IAAIE,oBAAoBF,QAAQ,IAAI;IAG7C,IAAIA,AAAiB,aAAjBA,QAAQ,IAAI,EACd,OAAO,IAAIG,sBAAsBH,QAAQ,IAAI;IAG/C,IAAIA,AAAiB,eAAjBA,QAAQ,IAAI,EACd,MAAM,IAAII,MAAM;IAGlB,MAAM,IAAIA,MAAM,CAAC,sBAAsB,EAAEJ,QAAQ,IAAI,EAAE;AACzD"}