@@ -6,9 +6,11 @@ const { createCliCommandRegistry, parseHostSelection, runCliCommand } = require(
66
77const calls = [ ]
88const handlers = Object . fromEntries ( [
9- 'cmdInit' , ' cmdInitClaude', 'cmdInitCodex' , 'cmdGrok' , 'cmdStatus' ,
9+ 'cmdInitClaude' , 'cmdInitCodex' , 'cmdGrok' , 'cmdStatus' ,
1010 'cmdProfileInit' , 'cmdDoctor' , 'cmdProbe' , 'cmdTrace' , 'cmdSkill' , 'cmdTask' , 'cmdHelp'
1111] . map ( name => [ name , argv => calls . push ( [ name , argv ] ) ] ) )
12+ // Capture opts so bare five-host routing cannot silently drop includeExtended (V-registry).
13+ handlers . cmdInit = ( argv , opts ) => calls . push ( [ 'cmdInit' , argv , opts ] )
1214handlers . cmdInitHost = ( host , argv ) => calls . push ( [ 'cmdInitHost' , host , argv ] )
1315handlers . cmdUninstallHost = ( host , argv ) => calls . push ( [ 'cmdUninstallHost' , host , argv ] )
1416const registry = createCliCommandRegistry ( handlers )
@@ -27,7 +29,9 @@ assert.deepStrictEqual(calls.pop(), ['cmdInitHost', 'gemini', ['--dry-run']])
2729assert . strictEqual ( runCliCommand ( { cmd : 'update' , argv : [ '--grok' ] , registry, runMigrateLayout : migrate , process : fakeProcess , c, console : logger } ) , 'update' )
2830assert . deepStrictEqual ( calls . pop ( ) , [ 'cmdInitHost' , 'grok' , [ '--force' ] ] )
2931assert . strictEqual ( runCliCommand ( { cmd : 'init' , argv : [ ] , registry, runMigrateLayout : migrate , process : fakeProcess , c, console : logger } ) , 'init' )
30- assert . deepStrictEqual ( calls . pop ( ) , [ 'cmdInit' , [ ] ] )
32+ assert . deepStrictEqual ( calls . pop ( ) , [ 'cmdInit' , [ ] , { includeExtended : true } ] )
33+ assert . strictEqual ( runCliCommand ( { cmd : 'update' , argv : [ '--dry-run' ] , registry, runMigrateLayout : migrate , process : fakeProcess , c, console : logger } ) , 'update' )
34+ assert . deepStrictEqual ( calls . pop ( ) , [ 'cmdInit' , [ '--force' , '--dry-run' ] , { includeExtended : true } ] )
3135assert . strictEqual ( runCliCommand ( { cmd : 'profile' , argv : [ 'init' , '--prod' ] , registry, runMigrateLayout : migrate , process : fakeProcess , c, console : logger } ) , 'profile-init' )
3236assert . deepStrictEqual ( calls . pop ( ) , [ 'cmdProfileInit' , [ '--prod' ] ] )
3337assert . strictEqual ( runCliCommand ( { cmd : 'profile' , argv : [ 'plan' , '--tier' , 'profile-standard' ] , registry, runMigrateLayout : migrate , process : fakeProcess , c, console : logger } ) , 'profile-plan' )
0 commit comments