( workspace: Workspace, )
| 9 | }; |
| 10 | |
| 11 | export function getAllAppsWithAgent( |
| 12 | workspace: Workspace, |
| 13 | ): WorkspaceAppWithAgent[] { |
| 14 | return workspace.latest_build.resources |
| 15 | .flatMap((r) => r.agents ?? []) |
| 16 | .flatMap((agent) => |
| 17 | agent.apps.map((app) => ({ |
| 18 | ...app, |
| 19 | agent, |
| 20 | })), |
| 21 | ); |
| 22 | } |