/**
 * Process Management Tool
 *
 * OpenClaw-inspired process management: list, poll, log, write (stdin), kill, clear, remove.
 * Manages both OS processes (via ps) and tracked managed processes (from BashTool).
 */
import type { ChildProcess } from 'child_process';
import type { ToolResult } from '../types/index.js';
export interface ProcessInfo {
    pid: number;
    command: string;
    cpuPercent?: number;
    memoryMB?: number;
    status: string;
    startTime: string;
}
export interface ManagedProcess {
    pid: number;
    command: string;
    process: ChildProcess;
    stdoutLines: string[];
    stderrLines: string[];
    startedAt: Date;
}
export declare class ProcessTool {
    private managed;
    private maxBufferLines;
    /**
     * List OS processes, optionally filtered
     */
    list(filter?: string): Promise<ToolResult>;
    /**
     * Poll whether a process is still running
     */
    poll(pid: number): Promise<ToolResult>;
    /**
     * Get log buffer for a managed process
     */
    log(pid: number, opts?: {
        lines?: number;
        stderr?: boolean;
    }): Promise<ToolResult>;
    /**
     * Write to stdin of a managed process
     */
    write(pid: number, input: string): Promise<ToolResult>;
    /**
     * Kill a process
     */
    kill(pid: number, signal?: string): Promise<ToolResult>;
    /**
     * Clear log buffer for a managed process
     */
    clear(pid: number): Promise<ToolResult>;
    /**
     * Remove a managed process from tracking
     */
    remove(pid: number): Promise<ToolResult>;
    /**
     * Register a process for tracking (called from BashTool for background processes)
     */
    trackProcess(pid: number, cmd: string, proc: ChildProcess): void;
    /**
     * Get list of managed processes
     */
    getManagedProcesses(): Map<number, ManagedProcess>;
}
export declare function getProcessTool(): ProcessTool;
export declare function resetProcessTool(): void;
