@@ -6,6 +6,7 @@ import { createComposeCommandArgs } from '../lib/compose.js';
66import type { DoctorCommandOptions } from '../types/cli.types.js' ;
77import type { HostCheckResult , SmokeCheckDefinition } from '../types/doctor.types.js' ;
88import type {
9+ AiAgentsSmokeEnv ,
910 AiImageSmokeEnv ,
1011 AiVideoSmokeEnv ,
1112 AiLlmSmokeEnv ,
@@ -21,6 +22,7 @@ import { readGatewayCertificate } from './gateway-certificate.service.js';
2122import { checkNvidiaGpuRuntime } from './gpu-preflight.service.js' ;
2223import { canLoginToN8n } from './n8n-owner.service.js' ;
2324import {
25+ parseAiAgentsSmokeEnv ,
2426 parseAiImageSmokeEnv ,
2527 parseAiVideoSmokeEnv ,
2628 parseAiLlmSmokeEnv ,
@@ -69,11 +71,12 @@ export async function runDoctorCommand(
6971
7072 if ( options . smoke ) {
7173 const env = parseSmokeEnv ( context . env ) ;
74+ const aiAgentsEnv = options . withAiAgents ? parseAiAgentsSmokeEnv ( context . env ) : undefined ;
7275 const aiLlmEnv = options . withAiLlm ? parseAiLlmSmokeEnv ( context . env ) : undefined ;
7376 const aiImageEnv = options . withAiImage ? parseAiImageSmokeEnv ( context . env ) : undefined ;
7477 const aiVideoEnv = options . withAiVideo ? parseAiVideoSmokeEnv ( context . env ) : undefined ;
7578 const gatewayCertificate = await readGatewayCertificate ( context , 'smoke' ) ;
76- for ( const smokeCheck of buildSmokeChecks ( env , aiLlmEnv , aiImageEnv , aiVideoEnv ) ) {
79+ for ( const smokeCheck of buildSmokeChecks ( env , aiAgentsEnv , aiLlmEnv , aiImageEnv , aiVideoEnv ) ) {
7780 tasks . push ( createCheckTask ( results , 'smoke' , smokeCheck . name , ( ) => smokeCheck . run ( gatewayCertificate ) ) ) ;
7881 }
7982 }
@@ -193,12 +196,13 @@ function npmCheckCommand(): [string, string[], string] {
193196 */
194197async function checkComposeConfiguration (
195198 context : ProjectContext ,
196- options : Pick < DoctorCommandOptions , 'withAiLlm' | 'withAiImage' | 'withAiVideo' | 'withWorkbench' >
199+ options : Pick < DoctorCommandOptions , 'withAiLlm' | 'withAiAgents' | ' withAiImage' | 'withAiVideo' | 'withWorkbench' >
197200) : Promise < HostCheckResult > {
198201 const result = await runCommand (
199202 'docker' ,
200203 createComposeCommandArgs ( context , [ 'config' , '-q' ] , {
201204 includeAiLlm : Boolean ( options . withAiLlm ) ,
205+ includeAiAgents : Boolean ( options . withAiAgents ) ,
202206 includeAiImage : Boolean ( options . withAiImage ) ,
203207 includeAiVideo : Boolean ( options . withAiVideo ) ,
204208 includeWorkbench : Boolean ( options . withWorkbench )
@@ -239,6 +243,7 @@ function checkRequiredFile(projectRoot: string, relativePath: string): HostCheck
239243 */
240244function buildSmokeChecks (
241245 env : SmokeEnv ,
246+ aiAgentsEnv ?: AiAgentsSmokeEnv ,
242247 aiLlmEnv ?: AiLlmSmokeEnv ,
243248 aiImageEnv ?: AiImageSmokeEnv ,
244249 aiVideoEnv ?: AiVideoSmokeEnv
@@ -252,23 +257,26 @@ function buildSmokeChecks(
252257 name : 'Smoke Gitea' ,
253258 run : ( caCertificate ) =>
254259 runStatusCheck ( 'Smoke Gitea' , new URL ( '/api/healthz' , env . GITEA_URL ) . toString ( ) , caCertificate )
255- } ,
256- {
260+ }
261+ ] ;
262+
263+ if ( ! aiAgentsEnv && ! aiLlmEnv && ! aiImageEnv && ! aiVideoEnv ) {
264+ return checks ;
265+ }
266+
267+ if ( aiAgentsEnv ) {
268+ checks . push ( {
257269 name : 'Smoke n8n' ,
258270 run : async ( caCertificate ) => {
259- const ok = await canLoginToN8n ( env , caCertificate ) ;
271+ const ok = await canLoginToN8n ( aiAgentsEnv , caCertificate ) ;
260272
261273 return {
262274 name : 'Smoke n8n' ,
263275 ok,
264276 detail : ok ? 'Owner login verified' : 'Could not authenticate with the configured owner account'
265277 } ;
266278 }
267- }
268- ] ;
269-
270- if ( ! aiLlmEnv && ! aiImageEnv && ! aiVideoEnv ) {
271- return checks ;
279+ } ) ;
272280 }
273281
274282 if ( aiImageEnv ) {
0 commit comments