* Resolve a workflow folder id to its canonical, per-segment-encoded VFS folder * path. Returns null for root-level workflows or when the folder can't be * resolved. Uses the shared buildVfsFolderPathMap so the pointer path * matches what the workspace VFS serves.
( workspaceId: string | null | undefined, folderId: string | null | undefined )
| 341 | * matches what the workspace VFS serves. |
| 342 | */ |
| 343 | async function resolveWorkflowFolderPath( |
| 344 | workspaceId: string | null | undefined, |
| 345 | folderId: string | null | undefined |
| 346 | ): Promise<string | null> { |
| 347 | if (!folderId || !workspaceId) return null |
| 348 | try { |
| 349 | const folders = await listFolders(workspaceId) |
| 350 | return buildVfsFolderPathMap(folders).get(folderId) ?? null |
| 351 | } catch (error) { |
| 352 | logger.warn('Failed to resolve workflow folder path', { workspaceId, folderId, error }) |
| 353 | return null |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | async function processWorkflowFromDb( |
| 358 | workflowId: string, |
no test coverage detected