(taskId: string)
| 344 | } |
| 345 | |
| 346 | async loadTask(taskId: string): Promise<Task | null> { |
| 347 | try { |
| 348 | const tasksDir = await this.getTasksDir(); |
| 349 | const core = { filesystem: { tasksDir } }; |
| 350 | const filepath = await getTaskPath(taskId, core as TaskPathContext); |
| 351 | |
| 352 | if (!filepath) return null; |
| 353 | |
| 354 | const content = await Bun.file(filepath).text(); |
| 355 | const task = normalizeTaskIdentity(parseTask(content)); |
| 356 | return { ...task, filePath: filepath }; |
| 357 | } catch (_error) { |
| 358 | return null; |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | async listTasks(filter?: TaskListFilter): Promise<Task[]> { |
| 363 | let tasksDir: string; |
no test coverage detected