mcpwn API
    Preparing search index...

    Interface Rule

    A headless tamper rule (NFR-7: loadable from user files).

    interface Rule {
        action: RuleAction;
        afterCalls?: number;
        direction?: Direction;
        enabled?: boolean;
        kind?: MessageKind;
        method?: string;
        name: string;
        when?: RulePredicate;
    }
    Index
    action: RuleAction
    afterCalls?: number

    Stateful rug-pull: serve the message benign (untampered) for the first N times the rule matches, then start applying the action. Needs per-rule state threaded like the fuzz cursor — never a module global.

    direction?: Direction
    enabled?: boolean

    Restrict to request/response/notification, etc.

    method?: string

    Match on JSON-RPC method (resolved via correlation for responses).

    name: string

    Conditional gate: only apply the action when the message matches.