eggsact 1.2.7

Deterministic MCP and in-process utility tools for coding agents
Documentation
use crate::mcp::registry::{ToolCost, ToolExposure, ToolSpec, ToolStability};
use crate::mcp::schemas::*;
use crate::tools::*;

pub const CONFIG_TOOLS: &[ToolSpec] = &[
    ToolSpec {
        name: "dotenv_validate",
        description: "Validate .env-style key=value configuration text. Detects invalid keys, duplicate keys, missing quotes, and variable expansion syntax. Line-by-line parser, no shell evaluation.",
        handler: dotenv_validate,
        input_schema: dotenv_validate_input,
        output_schema: dotenv_validate_output,
        category: "config",
        tier: 2,
        profiles: &["full", "codegg_config"],
        tags: &["validation", "config", "env", "dotenv"],
        exposure: ToolExposure::Contextual,
        harness_use: &["config_preflight"],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "ini_validate",
        description: "Validate simple INI-style configuration files. Supports [section] headers, key=value and key:value lines, comments. Detects duplicate sections, duplicate keys, and malformed lines.",
        handler: ini_validate,
        input_schema: ini_validate_input,
        output_schema: ini_validate_output,
        category: "config",
        tier: 2,
        profiles: &["full", "codegg_config"],
        tags: &["validation", "config", "ini"],
        exposure: ToolExposure::Contextual,
        harness_use: &["config_preflight"],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "config_preflight",
        description: "Validate generated config text with format auto-detection and return a valid/invalid verdict with error location. Prefer over dotenv_validate, ini_validate, or validate_json/validate_toml when the format is unknown or mixed. Checks syntax only; never writes files.",
        handler: config_preflight,
        input_schema: config_preflight_input,
        output_schema: config_preflight_output,
        category: "config",
        tier: 1,
        profiles: &["full", "codegg_core", "codegg_core_min", "codegg_preflight", "codegg_config"],
        tags: &["config", "validation", "json", "toml", "preflight", "composite"],
        exposure: ToolExposure::Default,
        harness_use: &["config_preflight"],
        aliases: &[],
        cost: ToolCost::Heavy,
        stability: ToolStability::Stable,
        composite: true,
    },
];