@@ -138,8 +138,8 @@ export const registerDev = (program: Command) => {
138138 . alias ( 'd' )
139139 . description ( COMMAND_DESCRIPTIONS . dev )
140140 . option ( '-p, --port <port>' , 'Port for development server' , '8080' )
141- . option ( '-a , --agent <name>' , 'Agent to run or invoke (required if multiple agents )' )
142- . option ( '-i, --invoke <prompt>' , 'Invoke running dev server (use --agent if multiple) [non-interactive]' )
141+ . option ( '-r , --runtime <name>' , 'Runtime to run or invoke (required if multiple runtimes )' )
142+ . option ( '-i, --invoke <prompt>' , 'Invoke running dev server (use --runtime if multiple) [non-interactive]' )
143143 . option ( '-s, --stream' , 'Stream response when using --invoke [non-interactive]' )
144144 . option ( '-l, --logs' , 'Run dev server with logs to stdout [non-interactive]' )
145145 . option ( '--tool <name>' , 'MCP tool name (used with --invoke call-tool) [non-interactive]' )
@@ -167,12 +167,12 @@ export const registerDev = (program: Command) => {
167167 // Determine which agent/port to invoke
168168 let invokePort = port ;
169169 let targetAgent = invokeProject ?. runtimes [ 0 ] ;
170- if ( opts . agent && invokeProject ) {
171- invokePort = getAgentPort ( invokeProject , opts . agent , port ) ;
172- targetAgent = invokeProject . runtimes . find ( a => a . name === opts . agent ) ;
173- } else if ( invokeProject && invokeProject . runtimes . length > 1 && ! opts . agent ) {
170+ if ( opts . runtime && invokeProject ) {
171+ invokePort = getAgentPort ( invokeProject , opts . runtime , port ) ;
172+ targetAgent = invokeProject . runtimes . find ( a => a . name === opts . runtime ) ;
173+ } else if ( invokeProject && invokeProject . runtimes . length > 1 && ! opts . runtime ) {
174174 const names = invokeProject . runtimes . map ( a => a . name ) . join ( ', ' ) ;
175- console . error ( `Error: Multiple agents found. Use --agent to specify which one.` ) ;
175+ console . error ( `Error: Multiple runtimes found. Use --runtime to specify which one.` ) ;
176176 console . error ( `Available: ${ names } ` ) ;
177177 process . exit ( 1 ) ;
178178 }
@@ -210,7 +210,7 @@ export const registerDev = (program: Command) => {
210210 }
211211
212212 // Warn about VPC mode limitations in local dev
213- const targetDevAgent = opts . agent ? project . runtimes . find ( a => a . name === opts . agent ) : project . runtimes [ 0 ] ;
213+ const targetDevAgent = opts . runtime ? project . runtimes . find ( a => a . name === opts . runtime ) : project . runtimes [ 0 ] ;
214214 if ( targetDevAgent ?. networkMode === 'VPC' ) {
215215 console . log (
216216 '\x1b[33mWarning: This agent uses VPC network mode. Local dev server runs outside your VPC. Network behavior may differ from deployed environment.\x1b[0m\n'
@@ -228,14 +228,14 @@ export const registerDev = (program: Command) => {
228228 // If --logs provided, run non-interactive mode
229229 if ( opts . logs ) {
230230 // Require --agent if multiple agents
231- if ( project . runtimes . length > 1 && ! opts . agent ) {
231+ if ( project . runtimes . length > 1 && ! opts . runtime ) {
232232 const names = project . runtimes . map ( a => a . name ) . join ( ', ' ) ;
233- console . error ( `Error: Multiple agents found. Use --agent to specify which one.` ) ;
233+ console . error ( `Error: Multiple runtimes found. Use --runtime to specify which one.` ) ;
234234 console . error ( `Available: ${ names } ` ) ;
235235 process . exit ( 1 ) ;
236236 }
237237
238- const agentName = opts . agent ?? project . runtimes [ 0 ] ?. name ;
238+ const agentName = opts . runtime ?? project . runtimes [ 0 ] ?. name ;
239239 const configRoot = findConfigRoot ( workingDir ) ;
240240 const envVars = configRoot ? await readEnvFile ( configRoot ) : { } ;
241241 const gatewayEnvVars = await getGatewayEnvVars ( ) ;
@@ -325,7 +325,7 @@ export const registerDev = (program: Command) => {
325325 } }
326326 workingDir = { workingDir }
327327 port = { port }
328- agentName = { opts . agent }
328+ agentName = { opts . runtime }
329329 headers = { headers }
330330 />
331331 </ LayoutProvider >
0 commit comments