import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
import type { TaskAction, TaskCommand } from '@teachagenthub/contracts';
import { AuboKnowledgeProvider } from './aubo-knowledge.provider';
import type { RiskLevel, ToolValidationResult } from './knowledge.types';
interface ToolContext {
    ipcIp: string;
}
export interface ResolvedToolCall {
    toolName: string;
    args: Record<string, unknown>;
    riskLevel: RiskLevel;
    action: TaskAction;
    confidence: number;
    evidence: string[];
}
export declare class AuboMcpService implements OnModuleDestroy, OnModuleInit {
    private readonly knowledgeProvider;
    constructor(knowledgeProvider: AuboKnowledgeProvider);
    private readonly logger;
    private stdioSession?;
    private stdioSessionPromise?;
    private readonly stdioHealthCheckTtlMs;
    private readonly stdioHealthCheckTool;
    private readonly stdioHealthCheckDefaultIp;
    private readonly toolPolicy;
    private readonly knowledge;
    resolveToolCallFromText(text: string, context: ToolContext): ResolvedToolCall;
    inferToolCallFromCommand(command: TaskCommand): ResolvedToolCall;
    validateToolCall(toolName: string, args: Record<string, unknown>): ToolValidationResult;
    callToolRpc(toolName: string, args: Record<string, unknown>): Promise<{
        accepted: boolean;
        message: string;
        raw: unknown;
    }>;
    private callToolViaStdio;
    onModuleDestroy(): Promise<void>;
    onModuleInit(): Promise<void>;
    private getOrCreateStdioSession;
    private createStdioSession;
    private ensureStdioSessionHealthy;
    private closeStdioSession;
    private summarizeArgs;
    private callToolViaRpcurl;
    private searchKnowledge;
    private tokenize;
    private parseAxisMove;
    private parseNumberList;
    private parseWebscopeNavigateArgs;
    private canBuildMinimalArgs;
    private parseSessionId;
    private parseArgsJson;
    private readNumber;
    private normalizeIp;
    private extractIp;
    private validateArgType;
    private validateArgRange;
    private validateWebscopeNavigateArgs;
    private matchAliasKey;
    private tool;
    private call;
    private getKnowledge;
    private getToolPolicy;
    private getRpcUrl;
    private getTransportMode;
    private mergeEnv;
    private readMcpServersConfig;
    private resolveMcpServersFilePath;
    private buildMcpServersFileCandidates;
    private resolveTeachAgentHubHome;
    private parseMcpServersFromJson;
    private normalizeStringRecord;
    private parseStringArrayEnv;
    private parseMaybeJson;
    private runCommand;
    private getPositiveInt;
    private readJsonPayload;
    private isLegacyAckPayload;
    private isJsonRpcError;
    private readJsonRpcResult;
    private extractErrorMessage;
    private extractResultMessage;
    private describeFetchError;
    private errorCauseToText;
}
export {};
