Class AwaitingToolsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Tool withConfirmation(Tool $self, Function1<String, String> messageProvider) Wrap this tool to always require confirmation before execution.
      final static Tool withConfirmation(Tool $self, String message) Wrap this tool to always require confirmation before execution.
      final static Tool withAwaiting(Tool $self, AwaitDecider decider) Wrap this tool to conditionally await before execution.
      final static <T extends Any> Tool requireType(Tool $self, Class<T> type, Function1<String, String> messageProvider) Wrap this tool to require a value of type T before execution.
      final static <T extends Any> Tool requireType(Tool $self, String message) Wrap this tool to require a value of type T before execution (reified).
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • withConfirmation

         final static Tool withConfirmation(Tool $self, Function1<String, String> messageProvider)

        Wrap this tool to always require confirmation before execution.

        Parameters:
        messageProvider - Function to generate the confirmation message from input
      • withConfirmation

         final static Tool withConfirmation(Tool $self, String message)

        Wrap this tool to always require confirmation before execution.

        Parameters:
        message - Static confirmation message
      • withAwaiting

         final static Tool withAwaiting(Tool $self, AwaitDecider decider)

        Wrap this tool to conditionally await before execution.

        Parameters:
        decider - Function that decides whether to await based on input context
      • requireType

         final static <T extends Any> Tool requireType(Tool $self, Class<T> type, Function1<String, String> messageProvider)

        Wrap this tool to require a value of type T before execution.

        Parameters:
        type - The class of the requested type
        messageProvider - Function to generate the request message from input
      • requireType

         final static <T extends Any> Tool requireType(Tool $self, String message)

        Wrap this tool to require a value of type T before execution (reified).

        Parameters:
        message - Optional message explaining what's needed