/** * log10x_pattern_mitigate * * Single user-facing entry point for "this pattern costs too much, what * are my options". Replaces the prior split where the user had to know * the difference between an exclusion filter, a forwarder drop, a 10x * mute PR, and a 10x compact PR — each exposed via a different tool. * * The tool: * 1. Reads env capability (receiver deployed? retriever deployed? * GitOps repo configured?) from the active env's config + an * optional snapshot. * 2. Renders a four-option menu in user terms (drop @ analyzer / drop * @ forwarder / mute @ 10x / compact @ 10x), DIMMING options that * aren't available in this env so the user never picks a path that * requires infra they don't have. * 3. Emits structured NEXT_ACTIONS pointing at the right sub-tool for * each option, so the agent can route on the user's choice in one * hop. * 4. Always lists log10x_dependency_check as a required pre-action for * the drop/mute options — keeps the deterministic safety gate * enforced. * * Discoverability surface: * - top_patterns / whats_changing / event_lookup already point users at * mitigation paths via their agent-only NEXT_ACTIONS. Those routes * point at THIS tool. * - System-prompt rule (separately): when a cost-bearing tool surfaces * a pattern and the user's framing is cost-related, the agent should * proactively offer "want me to show you options for reducing this?" * — and call this tool when they say yes. */ import { z } from 'zod'; export declare const patternMitigateSchema: { pattern: z.ZodString; service: z.ZodOptional; snapshot_id: z.ZodOptional; }; export interface PatternMitigateArgs { pattern: string; service?: string; snapshot_id?: string; } /** * Top-level call status. Agent branches on this BEFORE reading the menu. * - `success`: ≥1 mitigation option is enabled and routable. * - `no_signal`: pattern is valid but NO option crossed the capability * gate. Setup hint surfaces what's missing. * - `insufficient_data`: pattern arg failed validation. * - `error`: structural failure (env-load crashed, snapshot fetch * errored, etc.). */ export type PatternMitigateStatus = 'success' | 'no_signal' | 'insufficient_data' | 'error'; /** * Where the capability-detection facts came from. Same role as * `threshold_basis` in the cross-pillar tools — surfaces the * provenance the agent's decision is downstream of. */ export type RecommendationBasis = 'env_config' | 'snapshot' | 'cached_snapshot' | 'env_config_plus_snapshot' | 'env_vars_only' | 'unknown'; export declare function executePatternMitigate(args: PatternMitigateArgs): Promise;