# Commands Defaults - Concrete default values for command metadata schemas
# ALL values must be concrete (no null, no functions)

{
  command_requirements = {
    interactive = false,
    requires_auth = false,
    auth_type = 'none,
    requires_workspace = true,
    side_effects = false,
    side_effect_type = 'none,
    requires_confirmation = false,
    min_permission = 'read,
    slow_operation = false,
    rust_optimizable = false,
  },

  command_metadata = {
    name = "",
    domain = 'infrastructure,
    description = "",
    aliases = [],
    requirements = command_requirements,
    estimated_time = 1,
  },

  # Infrastructure commands
  server_create = {
    name = "server create",
    domain = 'infrastructure,
    description = "Create new servers from configuration",
    aliases = ["server c", "create server", "s create"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = true,
      side_effects = true,
      side_effect_type = 'create,
      requires_confirmation = false,
      min_permission = 'write,
      slow_operation = true,
      rust_optimizable = true,
    },
    estimated_time = 120,
  },

  server_delete = {
    name = "server delete",
    domain = 'infrastructure,
    description = "Delete existing servers",
    aliases = ["server d", "delete server", "s delete"],
    requirements = {
      interactive = true,
      requires_auth = true,
      auth_type = 'jwt,
      requires_workspace = true,
      side_effects = true,
      side_effect_type = 'delete,
      requires_confirmation = true,
      min_permission = 'admin,
      slow_operation = true,
      rust_optimizable = false,
    },
    form_path = "provisioning/.typedialog/core/forms/infrastructure/server_delete_confirm.toml",
    estimated_time = 60,
  },

  server_list = {
    name = "server list",
    domain = 'infrastructure,
    description = "List all servers",
    aliases = ["server ls", "ls server", "s list"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = true,
      side_effects = false,
      side_effect_type = 'none,
      requires_confirmation = false,
      min_permission = 'read,
      slow_operation = true,
      rust_optimizable = false,
    },
    estimated_time = 5,
  },

  taskserv_create = {
    name = "taskserv create",
    domain = 'infrastructure,
    description = "Install task service on servers",
    aliases = ["taskserv c", "task create", "t create"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = true,
      side_effects = true,
      side_effect_type = 'create,
      requires_confirmation = false,
      min_permission = 'write,
      slow_operation = true,
      rust_optimizable = false,
    },
    estimated_time = 180,
  },

  taskserv_delete = {
    name = "taskserv delete",
    domain = 'infrastructure,
    description = "Remove task service from servers",
    aliases = ["taskserv d", "task delete", "t delete"],
    requirements = {
      interactive = true,
      requires_auth = true,
      auth_type = 'jwt,
      requires_workspace = true,
      side_effects = true,
      side_effect_type = 'delete,
      requires_confirmation = true,
      min_permission = 'admin,
      slow_operation = true,
      rust_optimizable = false,
    },
    form_path = "provisioning/.typedialog/core/forms/infrastructure/taskserv_delete_confirm.toml",
    estimated_time = 60,
  },

  cluster_create = {
    name = "cluster create",
    domain = 'infrastructure,
    description = "Create new cluster",
    aliases = ["cluster c", "create cluster", "cl create"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = true,
      side_effects = true,
      side_effect_type = 'create,
      requires_confirmation = false,
      min_permission = 'write,
      slow_operation = true,
      rust_optimizable = false,
    },
    estimated_time = 300,
  },

  # Workspace commands
  workspace_init = {
    name = "workspace init",
    domain = 'workspace,
    description = "Initialize new workspace interactively",
    aliases = ["workspace create", "ws init", "ws create"],
    requirements = {
      interactive = true,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = false,
      side_effects = true,
      side_effect_type = 'create,
      requires_confirmation = false,
      min_permission = 'write,
      slow_operation = false,
      rust_optimizable = false,
    },
    form_path = "provisioning/.typedialog/core/forms/setup-wizard.toml",
    estimated_time = 30,
  },

  workspace_list = {
    name = "workspace list",
    domain = 'workspace,
    description = "List all registered workspaces",
    aliases = ["workspace ls", "ws list", "ws ls"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = false,
      side_effects = false,
      side_effect_type = 'none,
      requires_confirmation = false,
      min_permission = 'read,
      slow_operation = false,
      rust_optimizable = false,
    },
    estimated_time = 1,
  },

  workspace_switch = {
    name = "workspace switch",
    domain = 'workspace,
    description = "Switch active workspace",
    aliases = ["workspace activate", "ws switch", "ws activate"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = false,
      side_effects = false,
      side_effect_type = 'none,
      requires_confirmation = false,
      min_permission = 'read,
      slow_operation = false,
      rust_optimizable = false,
    },
    estimated_time = 2,
  },

  # Authentication commands
  auth_login = {
    name = "auth login",
    domain = 'authentication,
    description = "Authenticate user with JWT",
    aliases = ["login"],
    requirements = {
      interactive = true,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = false,
      side_effects = true,
      side_effect_type = 'create,
      requires_confirmation = false,
      min_permission = 'read,
      slow_operation = false,
      rust_optimizable = false,
    },
    form_path = "provisioning/.typedialog/core/forms/auth-login.toml",
    estimated_time = 2,
  },

  mfa_enroll = {
    name = "mfa enroll",
    domain = 'authentication,
    description = "Enroll in multi-factor authentication",
    aliases = ["mfa-enroll", "mfa setup"],
    requirements = {
      interactive = true,
      requires_auth = true,
      auth_type = 'jwt,
      requires_workspace = false,
      side_effects = true,
      side_effect_type = 'create,
      requires_confirmation = false,
      min_permission = 'write,
      slow_operation = false,
      rust_optimizable = false,
    },
    form_path = "provisioning/.typedialog/core/forms/mfa-enroll.toml",
    estimated_time = 30,
  },

  # Configuration commands
  setup_wizard = {
    name = "setup",
    domain = 'configuration,
    description = "Interactive system setup wizard",
    aliases = ["setup wizard", "st"],
    requirements = {
      interactive = true,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = false,
      side_effects = true,
      side_effect_type = 'create,
      requires_confirmation = false,
      min_permission = 'admin,
      slow_operation = false,
      rust_optimizable = false,
    },
    form_path = "provisioning/.typedialog/core/forms/setup-wizard.toml",
    estimated_time = 120,
  },

  # Utility commands
  help_command = {
    name = "help",
    domain = 'utilities,
    description = "Show help information",
    aliases = ["h", "-h", "--help"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = false,
      side_effects = false,
      side_effect_type = 'none,
      requires_confirmation = false,
      min_permission = 'read,
      slow_operation = false,
      rust_optimizable = false,
    },
    estimated_time = 1,
  },

  version_command = {
    name = "version",
    domain = 'utilities,
    description = "Show version information",
    aliases = ["v", "-v", "--version"],
    requirements = {
      interactive = false,
      requires_auth = false,
      auth_type = 'none,
      requires_workspace = false,
      side_effects = false,
      side_effect_type = 'none,
      requires_confirmation = false,
      min_permission = 'read,
      slow_operation = false,
      rust_optimizable = false,
    },
    estimated_time = 1,
  },

  # Command registry
  command_registry = {
    version = "1.0.0",
    commands = {
      "server create" = server_create,
      "server delete" = server_delete,
      "server list" = server_list,
      "taskserv create" = taskserv_create,
      "taskserv delete" = taskserv_delete,
      "cluster create" = cluster_create,
      "workspace init" = workspace_init,
      "workspace list" = workspace_list,
      "workspace switch" = workspace_switch,
      "auth login" = auth_login,
      "mfa enroll" = mfa_enroll,
      "setup" = setup_wizard,
      "help" = help_command,
      "version" = version_command,
    },
  },
}
