// Path: src/main/java/io/dashbase/clue/ClueContext.java
// public class ClueContext {
//   protected final CommandRegistry registry = new CommandRegistry();
// 
//   private final boolean interactiveMode;
// 
//   public ClueContext(CommandRegistrar commandRegistrar, boolean interactiveMode) {
//     commandRegistrar.registerCommands(this);
//     this.interactiveMode = interactiveMode;
//   }
// 
//   public void registerCommand(ClueCommand cmd){
//     String cmdName = cmd.getName();
//     if (registry.exists(cmdName)){
//       throw new IllegalArgumentException(cmdName+" exists!");
//     }
//     registry.registerCommand(cmd);
//   }
//   
//   public boolean isReadOnlyMode() {
//     return registry.isReadonly();
//   }
// 
//   public boolean isInteractiveMode(){
//     return interactiveMode;
//   }
//   
//   public Optional<ClueCommand> getCommand(String cmd){
//     return registry.getCommand(cmd);
//   }
//   
//   public CommandRegistry getCommandRegistry(){
//     return registry;
//   }
// 
//   public void shutdown() throws Exception{
//   }
// }


import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.dashbase.clue.ClueContext;
package io.dashbase.clue.commands;


@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = DefaultCommandRegistrar.class)
@JsonSubTypes({
        @JsonSubTypes.Type(name = "default", value = DefaultCommandRegistrar.class)
})
public interface CommandRegistrar {
// Path: src/main/java/io/dashbase/clue/ClueContext.java
// public class ClueContext {
//   protected final CommandRegistry registry = new CommandRegistry();
// 
//   private final boolean interactiveMode;
// 
//   public ClueContext(CommandRegistrar commandRegistrar, boolean interactiveMode) {
//     commandRegistrar.registerCommands(this);
//     this.interactiveMode = interactiveMode;
//   }
// 
//   public void registerCommand(ClueCommand cmd){
//     String cmdName = cmd.getName();
//     if (registry.exists(cmdName)){
//       throw new IllegalArgumentException(cmdName+" exists!");
//     }
//     registry.registerCommand(cmd);
//   }
//   
//   public boolean isReadOnlyMode() {
//     return registry.isReadonly();
//   }
// 
//   public boolean isInteractiveMode(){
//     return interactiveMode;
//   }
//   
//   public Optional<ClueCommand> getCommand(String cmd){
//     return registry.getCommand(cmd);
//   }
//   
//   public CommandRegistry getCommandRegistry(){
//     return registry;
//   }
// 
//   public void shutdown() throws Exception{
//   }
// }


// Path: src/main/java/io/dashbase/clue/commands/CommandRegistrar.java
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.dashbase.clue.ClueContext;

package io.dashbase.clue.commands;


@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = DefaultCommandRegistrar.class)
@JsonSubTypes({
        @JsonSubTypes.Type(name = "default", value = DefaultCommandRegistrar.class)
})
public interface CommandRegistrar {
    void registerCommands(ClueContext ctx);