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 REPO_TOOLS: &[ToolSpec] = &[
    ToolSpec {
        name: "repo_manifest_inspect",
        description: "Classify project manifests from a bounded path list. Detects Rust, Python, Node, Go, mixed, or unknown projects and emits tool hints for downstream inspection and command policy.",
        handler: repo_manifest_inspect,
        input_schema: repo_manifest_inspect_input,
        output_schema: repo_manifest_inspect_output,
        category: "repo",
        tier: 2,
        profiles: &["full", "codegg_repo_audit"],
        tags: &["repo", "manifest", "project", "classification", "inspection"],
        exposure: ToolExposure::Contextual,
        harness_use: &[],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "config_file_inspect",
        description: "Composite: inspect a single config file beyond syntax validity. Detects risky keys, secret-like values, insecure URLs, debug flags, command hooks, and TLS/hostname issues. Returns structured findings with severity and disposition. YAML analysis is heuristic-only (no YAML parser dependency): the analysis_mode result field reports \"heuristic\" and parse_ok must not be read as YAML syntax validity.",
        handler: config_file_inspect,
        input_schema: config_file_inspect_input,
        output_schema: config_file_inspect_output,
        category: "repo",
        tier: 2,
        profiles: &["full", "codegg_config", "codegg_repo_audit"],
        tags: &[
            "config",
            "inspection",
            "secrets",
            "security",
            "risk",
            "preflight",
            "composite",
        ],
        exposure: ToolExposure::Contextual,
        harness_use: &["config_file_inspect"],
        aliases: &[],
        cost: ToolCost::Moderate,
        stability: ToolStability::Stable,
        composite: true,
    },
    ToolSpec {
        name: "test_command_suggest",
        description: "Suggest verification commands (build, test, lint, format) from repository paths and manifest content. Heuristic: returns confidence scores for each suggestion.",
        handler: test_command_suggest,
        input_schema: test_command_suggest_input,
        output_schema: test_command_suggest_output,
        category: "repo",
        tier: 2,
        profiles: &["full", "codegg_core", "codegg_repo_audit", "codegg_shell"],
        tags: &["repo", "test", "commands", "suggest", "verification"],
        exposure: ToolExposure::Contextual,
        harness_use: &[],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "repo_language_detect",
        description: "Detect programming languages and ecosystems from repository file paths and manifest content. Uses file extensions, manifest presence, and optional content heuristics.",
        handler: repo_language_detect,
        input_schema: repo_language_detect_input,
        output_schema: repo_language_detect_output,
        category: "repo",
        tier: 2,
        profiles: &["full", "codegg_core", "codegg_repo_audit"],
        tags: &["repo", "language", "detect", "ecosystem", "classification"],
        exposure: ToolExposure::Contextual,
        harness_use: &[],
        aliases: &[],
        cost: ToolCost::Cheap,
        stability: ToolStability::Stable,
        composite: false,
    },
    ToolSpec {
        name: "repo_tree_summarize",
        description: "Summarize repository shape from a bounded path list and optional metadata. Provides path bucketing, entrypoint/config/test/source/generated/vendor classification, and recommended next tools.",
        handler: repo_tree_summarize,
        input_schema: repo_tree_summarize_input,
        output_schema: repo_tree_summarize_output,
        category: "repo",
        tier: 2,
        profiles: &["full", "codegg_repo_audit"],
        tags: &["repo", "tree", "summarize", "classification", "structure"],
        exposure: ToolExposure::Contextual,
        harness_use: &[],
        aliases: &[],
        cost: ToolCost::Moderate,
        stability: ToolStability::Stable,
        composite: false,
    },
];