In CodeBook there is a check with "import" such that a package is local "_is_local(module)" and if not, they are not allowed, with the error "RefiImportError: module 'X' is restricted".
In this case I have my package "core" and "defs" is a module within it (see screenshot below).
I have contacted support and they suggested asking here.
(Apologies for the choice of forum - there's no "CodeBook" or similar.)