Pattern mitigate
log10x_pattern_mitigateReveals which mitigation paths (drop, mute, compact) are currently reachable for a log pattern by checking environment wiring.
Instructions
[FRESH-SESSION ROUTING: if this is the user first cost question of the session, call log10x_start first instead — it returns the orientation menu the user needs before any per-tool action.] Given one pattern (symbolMessage identity or tenx_hash), return the env-gated CAPABILITY MENU of which mitigation paths are reachable: drop_at_analyzer, drop_at_forwarder, mute_at_10x, compact_at_10x. Each option carries enabled (true/false), label, and disabled_reason when not reachable. This is a REACHABILITY-FIRST router: it answers "which of the four tiers can I use right now given my env wiring" — NOT "how much would each save". Per-option estimated savings (% reduction, $/mo) and paste-ready config snippets are surfaced by the next-tool chain (log10x_cost_options for the action menu, then the specific action tool for the snippet) — NOT this envelope. The agent surfaces the menu to the user; the user picks; chain to log10x_cost_options for the action-level breakdown. Action-shaped tool — calibration honesty: the envelope's recommendation_basis tells the agent WHERE the capability detection came from (envs.json, snapshot, env vars, or unknown). recommendation_audit.capability_sources carries the per-field source, and snapshot_age_seconds carries snapshot staleness. The agent SHOULD NOT auto-route to the chosen sub-tool until the user picks an option, and SHOULD verify the basis before treating capability detection as authoritative (e.g., a stale snapshot may mis-flag mute as enabled when the receiver was uninstalled). See docs/cross-pillar-primitives.md for the agent behavior contract. Call this when a previous tool surfaced a high-cost pattern and the user asks 'what should I do' / 'how do I drop this' / 'how do I reduce this'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | The pattern identity to mitigate. Pass the canonical name from a prior log10x_top_patterns / log10x_event_lookup row. | |
| service | No | Optional service scope. When set, options that target a single service (forwarder drop, exclusion filter) are scoped to it. | |
| snapshot_id | No | Snapshot from log10x_discover_env. Used to detect which 10x components are deployed in the active env (receiver, retriever, GitOps wiring). When passed, the envelope's `recommendation_audit.capability_sources` reflects which capabilities came from the snapshot vs envs.json. Without it, the tool still works but may dim PR-based options if the active env's envs.json does not list a gitops repo. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| tool | Yes | ||
| view | No | summary | |
| images | No | ||
| actions | No | ||
| summary | Yes | ||
| warnings | No | ||
| truncated | No | ||
| next_cursor | No | ||
| render_hint | No | ||
| generated_at | Yes | ||
| schema_epoch | Yes | ||
| schema_version | Yes |