File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,14 +137,15 @@ export function extractS3KeyFromUrl(url: string): string {
137137
138138export async function getFleetAgent ( { os } : { os : 'macos' | 'windows' | 'linux' } ) {
139139 const fleetBucketName = process . env . FLEET_AGENT_BUCKET_NAME ;
140+ const fleetAgentFileName = 'Comp AI Agent-1.0.0-arm64.dmg' ;
140141
141142 if ( ! fleetBucketName ) {
142143 throw new Error ( 'FLEET_AGENT_BUCKET_NAME is not defined.' ) ;
143144 }
144145
145146 const getFleetAgentCommand = new GetObjectCommand ( {
146147 Bucket : fleetBucketName ,
147- Key : `${ os } /fleet-osquery.pkg ` ,
148+ Key : `${ os } /${ fleetAgentFileName } ` ,
148149 } ) ;
149150
150151 const response = await s3Client . send ( getFleetAgentCommand ) ;
Original file line number Diff line number Diff line change @@ -92,7 +92,9 @@ export async function GET(req: NextRequest) {
9292
9393 // Get package from S3 and stream it
9494 const packageFilename = getPackageFilename ( os ) ;
95- const packageKey = `${ os } /fleet-osquery.${ os === 'macos' ? 'pkg' : 'msi' } ` ;
95+ const macosPackageFilename = 'Comp AI Agent-1.0.0-arm64.dmg' ;
96+ const windowsPackageFilename = 'fleet-osquery.msi' ;
97+ const packageKey = `${ os } /${ os === 'macos' ? macosPackageFilename : windowsPackageFilename } ` ;
9698
9799 const getObjectCommand = new GetObjectCommand ( {
98100 Bucket : fleetBucketName ,
Original file line number Diff line number Diff line change @@ -132,9 +132,12 @@ export async function getFleetAgent({ os }: { os: 'macos' | 'windows' }) {
132132 throw new Error ( `Unsupported OS: ${ os } ` ) ;
133133 }
134134
135+ const macosPackageFilename = 'Comp AI Agent-1.0.0-arm64.dmg' ;
136+ const windowsPackageFilename = 'fleet-osquery.msi' ;
137+
135138 const getFleetAgentCommand = new GetObjectCommand ( {
136139 Bucket : fleetBucketName ,
137- Key : `${ os } /fleet-osquery. ${ extension } ` ,
140+ Key : `${ os } /${ os === 'macos' ? macosPackageFilename : windowsPackageFilename } ` ,
138141 } ) ;
139142
140143 const response = await s3Client . send ( getFleetAgentCommand ) ;
You can’t perform that action at this time.
0 commit comments