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 REGEX_TOOLS: &[ToolSpec] = &[
    ToolSpec {
        name: "validate_regex",
        description: "Test a Python regular expression against sample strings and report match/fullmatch status, spans, groups, and errors.",
        handler: validate_regex,
        input_schema: validate_regex_input,
        output_schema: validate_regex_output,
        category: "regex",
        tier: 1,
        profiles: &["full", "default"],
        tags: &["text", "regex", "validation", "pattern"],
        exposure: ToolExposure::Default,
        harness_use: &["command_preflight"],
        aliases: &[],
        cost: ToolCost::Moderate,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "regex_finditer",
        description: "Find all regex matches in text with positions, line/column info, and capture groups.",
        handler: regex_finditer_tool,
        input_schema: regex_finditer_input,
        output_schema: regex_finditer_output,
        category: "regex",
        tier: 1,
        profiles: &["full", "default"],
        tags: &["text", "regex", "search", "find", "pattern"],
        exposure: ToolExposure::Default,
        harness_use: &["none"],
        aliases: &[],
        cost: ToolCost::Moderate,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "regex_safety_check",
        description: "Heuristic check for potential catastrophic backtracking risks in regex patterns. Flags nested quantifiers, repeated alternations, ambiguous dot-star, and backreferences.",
        handler: regex_safety_check_tool,
        input_schema: regex_safety_check_input,
        output_schema: regex_safety_check_output,
        category: "regex",
        tier: 1,
        profiles: &["full", "default", "codegg_shell"],
        tags: &["text", "regex", "safety", "security", "backtracking"],
        exposure: ToolExposure::Default,
        harness_use: &["command_preflight"],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
];