Files
2025-11-30 08:49:50 +08:00

271 lines
8.7 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MXCP Site Config (mxcp-site.yml)",
"type": "object",
"required": ["mxcp", "project", "profile"],
"properties": {
"mxcp": {
"type": "integer",
"description": "Version of the mxcp-site.yml format. Must be 1.",
"enum": [1],
"default": 1
},
"project": {
"type": "string",
"description": "Project name (must match one in ~/.mxcp/config.yml)."
},
"profile": {
"type": "string",
"description": "Profile name under the given project."
},
"secrets": {
"type": "array",
"description": "List of secret names used by this repo (resolved from ~/.mxcp/config.yml).",
"items": {
"type": "string"
}
},
"plugin": {
"type": "array",
"description": "List of plugin modules to load and their configurations.",
"items": {
"type": "object",
"required": ["name", "module"],
"properties": {
"name": {
"type": "string",
"description": "The name of the plugin instance."
},
"module": {
"type": "string",
"description": "The Python module containing the MXCP plugin."
},
"config": {
"type": "string",
"description": "Optional name of the configuration to use from the user config (resolved from ~/.mxcp/config.yml)."
}
},
"additionalProperties": false
}
},
"extensions": {
"type": "array",
"description": "List of DuckDB extensions to load. Can be simple strings for core extensions or objects with name/repo for community/nightly extensions.",
"items": {
"oneOf": [
{
"type": "string",
"description": "Name of a core DuckDB extension"
},
{
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Name of the extension"
},
"repo": {
"type": "string",
"description": "Repository to load the extension from (e.g., 'community', 'core_nightly')",
"enum": ["community", "core_nightly"]
}
},
"additionalProperties": false
}
]
}
},
"dbt": {
"type": "object",
"description": "Controls dbt integration and file paths.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to use dbt in this repo (defaults to true)."
},
"model_paths": {
"type": "array",
"description": "Paths to dbt model directories (defaults to ['models']).",
"items": {
"type": "string"
}
},
"analysis_paths": {
"type": "array",
"description": "Paths to dbt analysis directories (defaults to ['analyses']).",
"items": {
"type": "string"
}
},
"test_paths": {
"type": "array",
"description": "Paths to dbt test directories (defaults to ['tests']).",
"items": {
"type": "string"
}
},
"seed_paths": {
"type": "array",
"description": "Paths to dbt seed directories (defaults to ['seeds']).",
"items": {
"type": "string"
}
},
"macro_paths": {
"type": "array",
"description": "Paths to dbt macro directories (defaults to ['macros']).",
"items": {
"type": "string"
}
},
"snapshot_paths": {
"type": "array",
"description": "Paths to dbt snapshot directories (defaults to ['snapshots']).",
"items": {
"type": "string"
}
},
"target_path": {
"type": "string",
"description": "Path to dbt target directory (defaults to 'target')."
},
"clean_targets": {
"type": "array",
"description": "Paths to clean when running dbt clean (defaults to ['target', 'dbt_packages']).",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"profiles": {
"type": "object",
"description": "Profile-specific configuration settings.",
"patternProperties": {
"^[a-zA-Z0-9_-]+$": {
"type": "object",
"properties": {
"duckdb": {
"type": "object",
"description": "Profile-specific DuckDB configuration.",
"properties": {
"path": {
"type": "string",
"description": "Path to the DuckDB file for this profile."
},
"readonly": {
"type": "boolean",
"description": "Whether to open the DuckDB connection in read-only mode (defaults to false).",
"default": false
}
},
"additionalProperties": false
},
"drift": {
"type": "object",
"description": "Profile-specific MXCP schema drift detection manifest configuration.",
"properties": {
"path": {
"type": "string",
"description": "Path to the MXCP drift manifest file (JSON) for this profile."
}
},
"additionalProperties": false
},
"audit": {
"type": "object",
"description": "Profile-specific audit logging configuration.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to enable audit logging for this profile (defaults to false).",
"default": false
},
"path": {
"type": "string",
"description": "Path to the audit log JSONL file for this profile."
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"sql_tools": {
"type": "object",
"description": "Configuration for built-in SQL querying and schema exploration tools.",
"properties": {
"enabled": {
"type": "boolean",
"description": "Whether to enable built-in SQL querying and schema exploration tools (defaults to false).",
"default": false
}
},
"additionalProperties": false
},
"paths": {
"type": "object",
"description": "Directory paths for different types of MXCP components.",
"properties": {
"tools": {
"type": "string",
"description": "Directory path for tool definitions (defaults to 'tools').",
"default": "tools"
},
"resources": {
"type": "string",
"description": "Directory path for resource definitions (defaults to 'resources').",
"default": "resources"
},
"prompts": {
"type": "string",
"description": "Directory path for prompt definitions (defaults to 'prompts').",
"default": "prompts"
},
"evals": {
"type": "string",
"description": "Directory path for evaluation definitions (defaults to 'evals').",
"default": "evals"
},
"python": {
"type": "string",
"description": "Directory path for Python extensions and shared code (defaults to 'python').",
"default": "python"
},
"plugins": {
"type": "string",
"description": "Directory path for MXCP plugins (defaults to 'plugins').",
"default": "plugins"
},
"sql": {
"type": "string",
"description": "Directory path for SQL files (defaults to 'sql').",
"default": "sql"
},
"drift": {
"type": "string",
"description": "Directory path for drift snapshots (defaults to 'drift').",
"default": "drift"
},
"audit": {
"type": "string",
"description": "Directory path for audit logs (defaults to 'audit').",
"default": "audit"
},
"data": {
"type": "string",
"description": "Directory path for data files including DuckDB databases (defaults to 'data').",
"default": "data"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}