/**
* Core type definitions for Kali MCP Server
*/
/**
* Result of command execution
*/
export interface ExecutionResult {
success: boolean;
exitCode: number;
stdout: string;
stderr: string;
command: string;
duration: number;
timedOut: boolean;
}
/**
* Options for command execution
*/
export interface ExecutionOptions {
/** Timeout in milliseconds (default: 300000 = 5 minutes) */
timeout?: number;
/** Working directory for command execution */
cwd?: string;
/** Environment variables */
env?: NodeJS.ProcessEnv;
/** Maximum output size in bytes (default: 10MB) */
maxOutputSize?: number;
/** Whether to capture stderr separately */
separateStderr?: boolean;
}
/**
* Tool result structure - re-export from MCP SDK for compatibility
*/
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
export type ToolResult = CallToolResult;
/**
* Tool categories
*/
export enum ToolCategory {
NETWORK = "network",
WEB = "web",
PASSWORD = "password",
EXPLOIT = "exploit",
WIRELESS = "wireless",
WINDOWS = "windows",
OSINT = "osint",
FORENSICS = "forensics",
SHELLS = "shells",
ANONYMITY = "anonymity",
MOBILE = "mobile",
}
/**
* Nmap scan types
*/
export enum NmapScanType {
TCP_SYN = "tcp_syn",
TCP_CONNECT = "tcp_connect",
UDP = "udp",
ACK = "ack",
NULL = "null",
FIN = "fin",
XMAS = "xmas",
}
/**
* Nmap timing templates
*/
export enum NmapTiming {
PARANOID = "paranoid",
SNEAKY = "sneaky",
POLITE = "polite",
NORMAL = "normal",
AGGRESSIVE = "aggressive",
INSANE = "insane",
}
/**
* Output formats
*/
export enum OutputFormat {
TEXT = "text",
JSON = "json",
XML = "xml",
MARKDOWN = "markdown",
GREPABLE = "grepable",
}
/**
* Scan result metadata
*/
export interface ScanMetadata {
toolName: string;
toolVersion?: string;
startTime: string;
endTime: string;
duration: number;
target: string;
}
/**
* Rate limit configuration
*/
export interface RateLimitConfig {
maxPerMinute: number;
maxPerHour: number;
}
/**
* Tool execution context
*/
export interface ExecutionContext {
toolName: string;
timestamp: number;
userId?: string;
}