{
  "name": "forge-toolbelt",
  "language": "rust",
  "version": "0.2.0",
  "description": "First-class default toolbelt for Forge SDK agents \u2014 search, crawl, code intelligence, file ops, shell, memory hooks",
  "manifest": "forge-rs/crates/forge-toolbelt/Cargo.toml",
  "manifestSha256": "29c41d237c76961ffc4e8bfc94699758a702f03396e9a26dd45df3380ee6739b",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/rust/forge-toolbelt",
  "features": {},
  "files": [
    {
      "path": "forge-rs/crates/forge-toolbelt/src/config.rs",
      "sha256": "54faac2a8ca61f87f21a32c5cab2b05f02cdc716724c14475d8b3f7f7e311cc2",
      "artifactSha256": "44a65b5493f84bf0e391107d134301fa9fcbe8896b9a26be56c78adfdea5e695",
      "url": "/reference/source/forge-rs/crates/forge-toolbelt/src/config.rs.txt",
      "declarations": [
        {
          "name": "::ToolGroup",
          "line": 42,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum ToolGroup {\n    /// Search tools (OneSearch integration): search, search_images, extract_content,\n    /// crawl_site, map_site, summarize_text.\n    Search,\n    /// Web substrate tools: web_fetch, web_parse, web_extract, etc.\n    Web,\n    /// Codebase intelligence: repo_structure, dependency_graph, rank_files,\n    /// predict_impact, assemble_context.\n    Codebase,\n    /// File operations: file_read, file_stat, file_type.\n    FileOps,\n    /// Shell execution (policy-gated): shell_exec.\n    Shell,\n    /// Utility tools: current_time, uuid_generate.\n    Utility,\n}",
          "documentation": "A group of related tools that can be independently enabled or disabled.\n\n# Examples\n\n```\nuse forge_toolbelt::config::ToolGroup;\n\nlet group = ToolGroup::Search;\nassert_eq!(group.as_str(), \"search\");\n```"
        },
        {
          "name": "::ToolGroup::as_str",
          "line": 61,
          "signature": "pub fn as_str(&self) -> &'static str;",
          "documentation": "Returns the string representation of this tool group."
        },
        {
          "name": "::ToolGroup::all",
          "line": 73,
          "signature": "pub fn all() -> &'static [ToolGroup];",
          "documentation": "Returns all available tool groups."
        },
        {
          "name": "::ShellPolicy",
          "line": 106,
          "signature": "#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum ShellPolicy {\n    /// Shell execution is completely disabled.\n    Disabled,\n    /// Only read-only commands are allowed (ls, cat, find, grep, etc.).\n    #[default]\n    ReadOnly,\n    /// Read and write commands are allowed, but destructive operations\n    /// (rm, chmod, chown, etc.) require approval.\n    ReadWrite,\n    /// All commands are allowed. Use with extreme caution.\n    Unrestricted,\n}",
          "documentation": "Policy for shell command execution.\n\nControls what shell commands agents are allowed to execute.\n\n# Examples\n\n```\nuse forge_toolbelt::config::ShellPolicy;\n\nlet policy = ShellPolicy::ReadOnly;\nassert!(policy.allows_reads());\nassert!(!policy.allows_writes());\n```"
        },
        {
          "name": "::ShellPolicy::allows_reads",
          "line": 121,
          "signature": "pub fn allows_reads(&self) -> bool;",
          "documentation": "Returns whether this policy allows read operations."
        },
        {
          "name": "::ShellPolicy::allows_writes",
          "line": 126,
          "signature": "pub fn allows_writes(&self) -> bool;",
          "documentation": "Returns whether this policy allows write operations."
        },
        {
          "name": "::ShellPolicy::allows_destructive",
          "line": 131,
          "signature": "pub fn allows_destructive(&self) -> bool;",
          "documentation": "Returns whether this policy allows destructive operations."
        },
        {
          "name": "::ToolbeltConfig",
          "line": 149,
          "signature": "#[derive(Debug, Clone)]\npub struct ToolbeltConfig {\n\n}",
          "documentation": "Configuration for the Forge toolbelt.\n\nControls which tool groups are enabled and how they behave.\n\n# Examples\n\n```\nuse forge_toolbelt::config::{ToolbeltConfig, ToolGroup};\n\nlet config = ToolbeltConfig::default();\nassert!(config.is_enabled(ToolGroup::Utility));\n```"
        },
        {
          "name": "::ToolbeltConfig::builder",
          "line": 179,
          "signature": "pub fn builder() -> ToolbeltConfigBuilder;",
          "documentation": "Creates a new [`ToolbeltConfigBuilder`].\n\nThe builder starts with NO groups enabled. Call `.enable()` to\nadd specific groups.\n\n# Returns\n\nA builder for constructing a custom config."
        },
        {
          "name": "::ToolbeltConfig::is_enabled",
          "line": 188,
          "signature": "pub fn is_enabled(&self, group: ToolGroup) -> bool;",
          "documentation": "Returns whether the given tool group is enabled."
        },
        {
          "name": "::ToolbeltConfig::search_config",
          "line": 193,
          "signature": "pub fn search_config(&self) -> &SearchConfig;",
          "documentation": "Returns the search configuration."
        },
        {
          "name": "::ToolbeltConfig::shell_policy",
          "line": 198,
          "signature": "pub fn shell_policy(&self) -> &ShellPolicy;",
          "documentation": "Returns the shell execution policy."
        },
        {
          "name": "::ToolbeltConfig::enabled_groups",
          "line": 203,
          "signature": "pub fn enabled_groups(&self) -> Vec<ToolGroup>;",
          "documentation": "Returns all enabled tool groups."
        },
        {
          "name": "::ToolbeltConfigBuilder",
          "line": 225,
          "signature": "pub struct ToolbeltConfigBuilder {\n\n}",
          "documentation": "Builder for [`ToolbeltConfig`].\n\n# Examples\n\n```\nuse forge_toolbelt::config::{ToolbeltConfig, ToolGroup, ShellPolicy};\n\nlet config = ToolbeltConfig::builder()\n    .enable(ToolGroup::Search)\n    .enable(ToolGroup::Utility)\n    .shell_policy(ShellPolicy::Disabled)\n    .build();\nassert!(config.is_enabled(ToolGroup::Search));\nassert!(!config.is_enabled(ToolGroup::Shell));\n```"
        },
        {
          "name": "::ToolbeltConfigBuilder::enable",
          "line": 233,
          "signature": "pub fn enable(mut self, group: ToolGroup) -> Self;",
          "documentation": "Enables a tool group."
        },
        {
          "name": "::ToolbeltConfigBuilder::enable_all",
          "line": 239,
          "signature": "pub fn enable_all(mut self) -> Self;",
          "documentation": "Enables all tool groups."
        },
        {
          "name": "::ToolbeltConfigBuilder::search_config",
          "line": 247,
          "signature": "pub fn search_config(mut self, config: SearchConfig) -> Self;",
          "documentation": "Sets the search configuration."
        },
        {
          "name": "::ToolbeltConfigBuilder::shell_policy",
          "line": 253,
          "signature": "pub fn shell_policy(mut self, policy: ShellPolicy) -> Self;",
          "documentation": "Sets the shell execution policy."
        },
        {
          "name": "::ToolbeltConfigBuilder::build",
          "line": 259,
          "signature": "pub fn build(self) -> ToolbeltConfig;",
          "documentation": "Consumes the builder and returns the configured [`ToolbeltConfig`]."
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-toolbelt/src/error.rs",
      "sha256": "28c734e90e4ed21e68cbe303ddb2c089455472425286e8403a5ddd67479eb60e",
      "artifactSha256": "c90bdfb418040f0a602d2199f4329efb2329f7a7641deaf685c667e273307976",
      "url": "/reference/source/forge-rs/crates/forge-toolbelt/src/error.rs.txt",
      "declarations": [
        {
          "name": "::ToolbeltError",
          "line": 7,
          "signature": "#[derive(Debug, Error)]\npub enum ToolbeltError {\n    /// A tool group is not enabled in the current configuration.\n    #[error(\"tool group '{group}' is not enabled in the toolbelt configuration\")]\n    GroupNotEnabled {\n        /// The disabled group.\n        group: String,\n    },\n\n    /// Shell command execution was denied by policy.\n    #[error(\"shell command '{command}' denied by policy '{policy}': {reason}\")]\n    ShellDenied {\n        /// The command that was denied.\n        command: String,\n        /// The active policy.\n        policy: String,\n        /// Why the command was denied.\n        reason: String,\n    },\n\n    /// File operation failed.\n    #[error(\"file operation failed on '{path}': {reason}\")]\n    FileOpFailed {\n        /// The file path.\n        path: String,\n        /// What went wrong.\n        reason: String,\n    },\n}",
          "documentation": "Errors that can occur during toolbelt operations."
        },
        {
          "name": "::ToolbeltResult",
          "line": 37,
          "signature": "pub type ToolbeltResult<T> = Result<T, ToolbeltError>;",
          "documentation": "A specialized `Result` type for `forge-toolbelt` operations."
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-toolbelt/src/file_ops.rs",
      "sha256": "36e100650d8ecc59bfb4a4654a1593b1119701ecce68435dc3ea31784ccc8a1e",
      "artifactSha256": "591870d7a20322e1a656a8243ec58f6ea29124fd98106387962aa5abaf0a6ce9",
      "url": "/reference/source/forge-rs/crates/forge-toolbelt/src/file_ops.rs.txt",
      "declarations": [
        {
          "name": "::register_file_ops_tools",
          "line": 34,
          "signature": "pub fn register_file_ops_tools(registry: &mut ToolRegistry) -> Result<(), ForgeToolError>;",
          "documentation": "Registers file operation tools into the registry.\n\n# Tools\n\n- `file_read`: Read the contents of a file.\n- `file_stat`: Get file metadata (size, modified, permissions).\n- `file_type`: Detect the file type (language, classification).\n\n# Examples\n\n```\nuse forge_toolbelt::file_ops::register_file_ops_tools;\nuse forge_tool::registry::ToolRegistry;\n\nlet mut registry = ToolRegistry::new();\nregister_file_ops_tools(&mut registry).unwrap();\nassert!(registry.contains(\"file_read\"));\nassert!(registry.contains(\"file_stat\"));\nassert!(registry.contains(\"file_type\"));\n```"
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-toolbelt/src/lib.rs",
      "sha256": "037f6899e763bad663f24aa4bc08770eafc57ebf9519d1475565300b441b5fc2",
      "artifactSha256": "295a3c5d47834932245e1288dbf412b6d7e5d440d83c4ad6aaeb70c698835dcb",
      "url": "/reference/source/forge-rs/crates/forge-toolbelt/src/lib.rs.txt",
      "declarations": [
        {
          "name": "config",
          "line": 69,
          "signature": "pub mod config;",
          "documentation": "# forge-toolbelt\n\nFirst-class default toolbelt for the Forge SDK.\n\nAgents should not have to assemble basic operational tools from scratch.\nThis crate provides a curated, selectively enableable, scopable, and\noverridable set of default tools that every Forge agent can use.\n\n# Architecture\n\nThe toolbelt is organized into **tool groups** that can be independently\nenabled or disabled via [`ToolbeltConfig`]:\n\n| Group | Tools | Tier | Source |\n|-------|-------|------|--------|\n| **Search** | search, search_images, extract_content, crawl_site, map_site, summarize_text | External/Platform | `forge-search` |\n| **Web** | web_fetch, web_parse, web_extract, web_to_markdown, web_crawl, web_inspect_site, web_compact_site, web_search | External | `forge-web` |\n| **Codebase** | repo_structure, dependency_graph, rank_files, predict_impact, assemble_context | External | `forge-codebase` |\n| **File Ops** | file_read, file_stat, file_type | External | built-in |\n| **Shell** | shell_exec | External | built-in (policy-gated) |\n| **Utility** | current_time, uuid_generate | Platform | built-in |\n\n# ANVIL Tier Classification\n\n- **Platform (Tier 1)**: In-sandbox, always available. `current_time`, `uuid_generate`, `summarize_text`.\n- **External (Tier 2)**: Out-of-sandbox, Arsenal ACT required. All search, web, codebase, file, and shell tools.\n- **Embedded (Tier 3)**: Compiled into WASM module. Not used by the toolbelt.\n\n# Selective Enable / Disable\n\n```\nuse forge_toolbelt::config::{ToolbeltConfig, ToolGroup};\n\n// Enable only search and codebase tools\nlet config = ToolbeltConfig::builder()\n    .enable(ToolGroup::Search)\n    .enable(ToolGroup::Codebase)\n    .build();\n\nassert!(config.is_enabled(ToolGroup::Search));\nassert!(config.is_enabled(ToolGroup::Codebase));\nassert!(!config.is_enabled(ToolGroup::Shell));\n```\n\n# Override Support\n\nAny tool from the toolbelt can be overridden by registering a tool with\nthe same name before calling [`register_toolbelt`]. The toolbelt will\nskip already-registered tools.\n\n# Examples\n\n```\nuse forge_toolbelt::config::ToolbeltConfig;\nuse forge_toolbelt::register_toolbelt;\nuse forge_tool::registry::ToolRegistry;\n\nlet config = ToolbeltConfig::default();\nlet mut registry = ToolRegistry::new();\nregister_toolbelt(&mut registry, &config).unwrap();\n\n// All default tools are now registered\nassert!(registry.contains(\"current_time\"));\nassert!(registry.contains(\"search\"));\nassert!(registry.contains(\"repo_structure\"));\n```"
        },
        {
          "name": "error",
          "line": 70,
          "signature": "pub mod error;",
          "documentation": ""
        },
        {
          "name": "file_ops",
          "line": 71,
          "signature": "pub mod file_ops;",
          "documentation": ""
        },
        {
          "name": "shell",
          "line": 72,
          "signature": "pub mod shell;",
          "documentation": ""
        },
        {
          "name": "utility",
          "line": 73,
          "signature": "pub mod utility;",
          "documentation": ""
        },
        {
          "name": "::register_toolbelt",
          "line": 113,
          "signature": "pub fn register_toolbelt(\n    registry: &mut ToolRegistry,\n    config: &ToolbeltConfig,\n) -> Result<(), ForgeToolError>;",
          "documentation": "Registers the default toolbelt into the given [`ToolRegistry`].\n\nRespects the [`ToolbeltConfig`] for which tool groups are enabled.\nTools that are already registered in the registry are skipped (not\noverwritten), enabling callers to override specific tools before\ncalling this function.\n\n# Arguments\n\n* `registry` - The tool registry to populate.\n* `config` - The toolbelt configuration controlling which groups are enabled.\n\n# Returns\n\n`Ok(())` if all enabled tools are registered (or skipped if already present).\n\n# Errors\n\nReturns [`ForgeToolError::RegistryError`] if registration fails for a\nreason other than duplicate names.\n\n# Examples\n\n```\nuse forge_toolbelt::config::ToolbeltConfig;\nuse forge_toolbelt::register_toolbelt;\nuse forge_tool::registry::ToolRegistry;\n\nlet config = ToolbeltConfig::default();\nlet mut registry = ToolRegistry::new();\nregister_toolbelt(&mut registry, &config).unwrap();\nassert!(registry.contains(\"current_time\"));\n```"
        },
        {
          "name": "prelude",
          "line": 201,
          "signature": "pub mod prelude;",
          "documentation": "Re-exports for convenience."
        },
        {
          "name": "pub use crate::config::{ShellPolicy, ToolGroup, ToolbeltConfig};",
          "line": 202,
          "signature": "pub use crate::config::{ShellPolicy, ToolGroup, ToolbeltConfig};",
          "documentation": ""
        },
        {
          "name": "pub use crate::register_toolbelt;",
          "line": 203,
          "signature": "pub use crate::register_toolbelt;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-toolbelt/src/shell.rs",
      "sha256": "4d2ca08f89559ae1f70d94c9208d937ec70a7307bdb35e6db40f8079fa5bd917",
      "artifactSha256": "c3cdbf2103fc9f7f8043fe69a1288a2164551387f87013e80d474a81a08a1a02",
      "url": "/reference/source/forge-rs/crates/forge-toolbelt/src/shell.rs.txt",
      "declarations": [
        {
          "name": "::register_shell_tools",
          "line": 64,
          "signature": "pub fn register_shell_tools(\n    registry: &mut ToolRegistry,\n    policy: &ShellPolicy,\n) -> Result<(), ForgeToolError>;",
          "documentation": "Registers the shell execution tool into the registry.\n\nThe tool is gated by the provided [`ShellPolicy`]. If the policy is\n`Disabled`, no tool is registered.\n\n# Arguments\n\n* `registry` - The tool registry.\n* `policy` - The shell execution policy.\n\n# Examples\n\n```\nuse forge_toolbelt::shell::register_shell_tools;\nuse forge_toolbelt::config::ShellPolicy;\nuse forge_tool::registry::ToolRegistry;\n\nlet mut registry = ToolRegistry::new();\nregister_shell_tools(&mut registry, &ShellPolicy::ReadOnly).unwrap();\nassert!(registry.contains(\"shell_exec\"));\n```"
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-toolbelt/src/utility.rs",
      "sha256": "75111419a76080ffbe40d3c7aec91cb673f95969c4b9957621fd50443b71b789",
      "artifactSha256": "7b99f716563cad718b012eb83914c981f99a4fa61aa9245012d041d5e06643cc",
      "url": "/reference/source/forge-rs/crates/forge-toolbelt/src/utility.rs.txt",
      "declarations": [
        {
          "name": "::register_utility_tools",
          "line": 31,
          "signature": "pub fn register_utility_tools(registry: &mut ToolRegistry) -> Result<(), ForgeToolError>;",
          "documentation": "Registers utility tools into the registry.\n\n# Tools\n\n- `current_time`: Returns the current UTC time in ISO 8601 format.\n- `uuid_generate`: Generates a new UUIDv4.\n\n# Examples\n\n```\nuse forge_toolbelt::utility::register_utility_tools;\nuse forge_tool::registry::ToolRegistry;\n\nlet mut registry = ToolRegistry::new();\nregister_utility_tools(&mut registry).unwrap();\nassert!(registry.contains(\"current_time\"));\nassert!(registry.contains(\"uuid_generate\"));\n```"
        }
      ]
    }
  ]
}
