()
| 40 | // ─── User overrides path ───────────────────────────────────────── |
| 41 | |
| 42 | function getUserProfilesPath(): string { |
| 43 | if (process.env.AGENT_TOWER_DATA_DIR) { |
| 44 | return path.join(process.env.AGENT_TOWER_DATA_DIR, 'profiles.json'); |
| 45 | } |
| 46 | // 开发模式回退: server 包根目录的 data 目录 |
| 47 | const __dirname = path.dirname(fileURLToPath(import.meta.url)); |
| 48 | const serverRoot = path.resolve(__dirname, '..', '..'); |
| 49 | return path.join(serverRoot, 'data', 'profiles.json'); |
| 50 | } |
| 51 | |
| 52 | // ─── Core functions ────────────────────────────────────────────── |
| 53 |
no test coverage detected