// Bash classifier stub — mirrors the external (non-ant) build of bashClassifier.ts. // The ML-based Haiku classifier is ant-only and completely dead in public builds. // All functions here return empty / disabled results so the permission flow // short-circuits the classifier branches without removing them. /// Result of a bash command classification check. class ClassifierResult { final bool matches; final String confidence; // 'high' | 'low' final String reason; final String? matchedDescription; const ClassifierResult({ required this.matches, required this.confidence, required this.reason, this.matchedDescription, }); } /// Always false in external builds. bool isClassifierPermissionsEnabled() => false; /// Stub context type used by the public-facing description getters. /// The real implementation takes a ToolPermissionContext; callers pass whatever /// context object they have, so we just accept dynamic here. List getBashPromptAllowDescriptions(dynamic context) => const []; List getBashPromptDenyDescriptions(dynamic context) => const []; List getBashPromptAskDescriptions(dynamic context) => const []; /// Always returns { matches: false, confidence: 'high' } in external builds. Future classifyBashCommand( String command, String cwd, List descriptions, String behavior, ) async { return const ClassifierResult( matches: false, confidence: 'high', reason: 'This feature is disabled', ); }