Object CdpTrapCheck

  • All Implemented Interfaces:

    
    public class CdpTrapCheck
    
                        

    CDP (Chrome DevTools Protocol) pitfall awareness for Browser4 browser-driver development.

    Encodes the three known CDP pitfalls documented in AGENTS.md as keyword → advisory rules. coding.trapCheck(path) scans a file for the keywords and surfaces the matching advisories, so an agent editing browser-driver code is reminded of the traps before they bite.

    Pure data + regex matching — zero dependencies, no runtime cost unless used.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class CdpTrapCheck.Trap

      A CDP pitfall rule: keywords that trigger it + the advisory.

    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final List<CdpTrapCheck.Trap> check(String content) Scan content for CDP trap keywords and return the matching advisories.
      final String format(String content) Format the advisories for the agent.
      final List<CdpTrapCheck.Trap> getTRAPS() The three known CDP pitfalls from AGENTS.md, keyed by the code constructs that involve them.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • check

         final List<CdpTrapCheck.Trap> check(String content)

        Scan content for CDP trap keywords and return the matching advisories. Returns an empty list when the file is unrelated to browser-driver code.

      • getTRAPS

         final List<CdpTrapCheck.Trap> getTRAPS()

        The three known CDP pitfalls from AGENTS.md, keyed by the code constructs that involve them. Keywords are the DANGER constructs (the fix constructs — setSelectionRange, randomDelayMillis — are deliberately NOT keywords, so applying the documented fix does not keep tripping the check).