Package ai.wanaku.cli.main.support
Class ToolHelper
java.lang.Object
ai.wanaku.cli.main.support.ToolHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidimportToolset(ToolReference toolReference, String host) Imports a single tool reference to the specified host.static voidimportToolset(List<ToolReference> toolReferences, String host) Imports a list of tool references to the specified host.
-
Method Details
-
importToolset
public static void importToolset(List<ToolReference> toolReferences, String host) throws IOException Imports a list of tool references to the specified host.Creates a Quarkus REST client for the
ToolsServiceat the given host and adds each tool reference from the provided list to the service.- Parameters:
toolReferences- a list of tool references to importhost- the base URI of the host where the ToolsService is deployed- Throws:
IllegalArgumentException- if the host URI is invalidRuntimeException- if there's an error connecting to or communicating with the serviceIOException
-
importToolset
Imports a single tool reference to the specified host.Convenience method that wraps the single tool reference in a list and delegates to
importToolset(List, String).- Parameters:
toolReference- the tool reference to importhost- the base URI of the host where the ToolsService is deployed- Throws:
IllegalArgumentException- if the host URI is invalidRuntimeException- if there's an error connecting to or communicating with the serviceIOException- See Also:
-