* Ensures the directory for an agent location exists
( source: SettingSource, )
| 217 | * Ensures the directory for an agent location exists |
| 218 | */ |
| 219 | async function ensureAgentDirectoryExists( |
| 220 | source: SettingSource, |
| 221 | ): Promise<string> { |
| 222 | const dirPath = getCanonicalAgentDirectoryPath(source) |
| 223 | await mkdir(dirPath, { recursive: true }) |
| 224 | return dirPath |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Saves an agent to the filesystem |
no test coverage detected