Class ToolRegistration

  • All Implemented Interfaces:

    
    public final class ToolRegistration
    
                        

    Intermediate registration object returned by PlaybookTool.withTool.

    Supports both Kotlin curried syntax and Java fluent API:

    // Kotlin curried syntax
    .withTool(analyzeTool)(searchTool)
    
    // Kotlin/Java fluent syntax
    .withTool(analyzeTool).unlockedBy(searchTool)
    • Constructor Detail

    • Method Detail

      • invoke

         final PlaybookTool invoke(Tool prerequisites)

        Kotlin currying operator - unlock after specified prerequisite tool(s). When multiple tools are specified, ALL must be called (AND logic).

        Example:

        .withTool(analyzeTool)(searchTool)              // single prerequisite
        .withTool(reportTool)(searchTool, analyzeTool)  // ALL must be called
      • invoke

         final PlaybookTool invoke(KClass<?> artifactType)

        Kotlin currying operator - unlock when artifact type is produced.

        Example:

        .withTool(summarizeTool)(Document::class)
      • unlockedBy

         final PlaybookTool unlockedBy(Tool prerequisite)

        Unlock after a single prerequisite tool has been called.

        Example:

        .withTool(analyzeTool).unlockedBy(searchTool)
      • unlockedByAll

         final PlaybookTool unlockedByAll(Tool prerequisites)

        Unlock after ALL specified prerequisite tools have been called (AND logic).

        Example:

        .withTool(reportTool).unlockedByAll(searchTool, analyzeTool)
      • unlockedByAny

         final PlaybookTool unlockedByAny(Tool prerequisites)

        Unlock after ANY of the specified prerequisite tools has been called (OR logic).

        Example:

        .withTool(processTool).unlockedByAny(searchTool, fetchTool)
      • unlockedByArtifact

         final PlaybookTool unlockedByArtifact(Class<?> artifactType)

        Unlock when an artifact of the specified type is produced.

        Example:

        .withTool(summarizeTool).unlockedByArtifact(Document.class)
      • unlockedByArtifactMatching

         final PlaybookTool unlockedByArtifactMatching(Predicate<Object> predicate)

        Unlock when any artifact matches the given predicate.

        Example:

        .withTool(processTool).unlockedByArtifactMatching(a -> a instanceof Document && ((Document) a).isValid())
      • unlockedByBlackboard

         final PlaybookTool unlockedByBlackboard(Class<?> type)

        Unlock when an object of the specified type exists on the blackboard.

        Example:

        .withTool(processTool).unlockedByBlackboard(Document.class)