@@ -13,6 +13,7 @@ function buildCliInstallCommands(ctx) {
1313 mergeClaudeHooks, mergeClaudeMcpConfig,
1414 ensureRuntimeDirs, ensureDevCodexGitignore, getLegacyCounts, isPlainObject,
1515 resolveHostAdapterScope, writeGrokPluginRegistration, syncGrokPluginInstallation,
16+ syncGrokWorkspacePluginInstallation,
1617 uninstallGrokPluginInstallation, retireWorkspaceProjectHostManifest,
1718 resolveTenantSelection, shouldIncludeInstructionFile
1819 } = ctx
@@ -794,6 +795,7 @@ function buildCliInstallCommands(ctx) {
794795 if ( grokWorkspaceScope ) {
795796 writeGrokPluginRegistration ( {
796797 pluginPath : hostScope . pluginRoot ,
798+ legacyPluginPaths : hostScope . legacyPluginRoots ,
797799 activeRoot,
798800 dryRun : true ,
799801 env : process . env
@@ -818,30 +820,27 @@ function buildCliInstallCommands(ctx) {
818820 addCounts ( counts , copyProjectedTree ( {
819821 cwd : targetRoot ,
820822 source : 'grok/plugins/devcodex-workspace' ,
821- destination : path . join ( '.grok' , 'plugins' , 'devcodex-workspace' ) ,
823+ destination : path . join ( '.grok' , 'devcodex' , ' plugins', 'devcodex-workspace' ) ,
822824 force, dryRun, backupDir, log, inlineLog, tenantId
823825 } ) )
824- const registration = writeGrokPluginRegistration ( {
826+ const installation = syncGrokWorkspacePluginInstallation ( {
825827 pluginPath : hostScope . pluginRoot ,
828+ legacyPluginPaths : hostScope . legacyPluginRoots ,
826829 activeRoot,
830+ backupDir,
827831 dryRun,
828832 env : process . env
829833 } )
830- if ( registration . changed ) {
834+ if ( installation . status === 'migrated' ) {
831835 counts . updated ++
832- log ( c . green ( ' ✓ Grok user config (managed workspace plugin registration) ' ) )
836+ log ( c . green ( ' ✓ Grok workspace plugin migrated to the canonical source ' ) )
833837 } else {
834838 counts . skipped ++
835- log ( c . dim ( ' ~ Grok user config ( workspace plugin already registered)' ) )
839+ log ( c . dim ( ` ~ Grok workspace plugin source ( ${ installation . status } )` ) )
836840 }
837- const installation = syncGrokPluginInstallation ( {
838- pluginPath : hostScope . pluginRoot ,
839- dryRun,
840- env : process . env
841- } )
842841 if ( installation . status === 'unavailable' ) {
843- inlineLog ( c . yellow ( ' ⚠ Grok CLI not found; plugin path is registered but runtime activation remains unverified' ) )
844- } else if ( installation . status === 'verified' ) {
842+ inlineLog ( c . yellow ( ' ⚠ Grok CLI not found; legacy source was retained and canonical activation remains unverified' ) )
843+ } else if ( [ 'verified' , 'migrated' ] . includes ( installation . status ) ) {
845844 log ( c . green ( ' ✓ Grok user plugin installation synchronized' ) )
846845 } else {
847846 log ( c . dim ( ` ~ Grok user plugin installation (${ installation . status } )` ) )
0 commit comments