# Development Platform Configuration
#
# Runtime configuration for development environment
# Loaded by kb-cli/kb-mcp in development mode

let contracts = import "../../schemas/kb/contracts.ncl" in
let defaults = import "../../schemas/kb/defaults.ncl" in
let helpers = import "../../schemas/kb/helpers.ncl" in
let dev_mode = import "../../schemas/kb/modes/dev.ncl" in

# Development-specific overrides
let dev_platform = {
  graph = {
    name = "knowledge-base-dev",
    description = "Development instance of KB",
  },

  storage = {
    primary = 'filesystem,
    secondary = {
      enabled = false,  # No SurrealDB in dev
    },
  },

  embeddings = {
    enabled = true,
    provider = 'fastembed,  # Local provider, no API costs
    model = "BAAI/bge-small-en-v1.5",
    dimensions = 384,
  },

  query = {
    similarity_threshold = 0.4,  # Permissive for exploration
    max_results = 20,
    cross_graph = true,
  },

  sync = {
    auto_index = false,  # Manual sync in development
    debounce_ms = 1000,
  },

  mcp = {
    server = {
      name = "kb-mcp-dev",
      version = "1.0.0",
      transport = 'stdio,
    },
  },
} in

helpers.compose_config defaults.base dev_mode dev_platform
  | contracts.KbConfig
