Implementation:ARCANGEL0 EVA ToolSpec
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Tool_Installation, Data_Models |
| Last Updated | 2026-10-29 14:00 GMT |
Overview
Concrete data model for catalog entries in the armory — defining tool identity, packages, executables, and install methods across multiple ecosystems.
Description
The ToolSpec dataclass represents a single tool in the armory catalog (165+ tools). It defines:
- Identity: `id` (catalog slug), `name` (display name), `category_id` (one of 17 categories), `description`.
- Packages: A dict mapping package manager IDs (apt-get, pacman, dnf, zypper, apk) to native package names.
- Executables: A tuple of binary names to check for installation status.
- Install methods: A tuple of `InstallMethod` objects representing ecosystem install paths (go, cargo, pipx, gem, git, python-source, official-script).
The companion InstallMethod dataclass defines a single ecosystem install path with `kind`, `package`, `executable`, `source`, `prerequisite_packages`, `supported_managers`, and `requirements_file`.
Usage
- Tool inspection: `inspect_tool` checks if a ToolSpec is installed by querying packages and executables.
- Install script generation: `build_install_script` reads the ToolSpec's packages and install_methods to generate the install command.
- Catalog browsing: The armory catalog is a collection of ToolSpec objects indexed by ID.
Code Reference
Source Location
- Repository: Mitsu
- File: armory/catalog.py
Signature
@dataclass(frozen=True)
class InstallMethod:
kind: str
package: str
executable: str
source: str = ""
prerequisite_packages: dict[str, tuple[str, ...]] | None = None
supported_managers: tuple[str, ...] = ()
requirements_file: str = ""
@property
def id(self) -> str: ...
@dataclass(frozen=True)
class ToolSpec:
id: str
name: str
category_id: str
description: str
packages: dict[str, str]
executables: tuple[str, ...]
install_methods: tuple[InstallMethod, ...] = ()
Import
from mitsu.armory.catalog import ToolSpec, InstallMethod
I/O Contract
Fields
| Name | Type | Description |
|---|---|---|
| id | str | Catalog identifier (e.g., "nmap") |
| name | str | Display name (e.g., "Nmap") |
| category_id | str | Category ID (e.g., "network-mapping") |
| description | str | Tool description |
| packages | dict[str, str] | Package manager ID → package name |
| executables | tuple[str, ...] | Binary names to check for installation |
| install_methods | tuple[InstallMethod, ...] | Ecosystem install paths |
Usage Examples
Access a Tool from the Catalog
from mitsu.armory import TOOL_BY_ID
nmap = TOOL_BY_ID["nmap"]
print(f"Name: {nmap.name}")
print(f"Packages: {nmap.packages}")
# {'apt-get': 'nmap', 'pacman': 'nmap', 'dnf': 'nmap', ...}
print(f"Executables: {nmap.executables}")
# ('nmap',)
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment