DaemonClient class

Constructors

DaemonClient({String host = HostType.LOCALHOST, int port = DAEMON_DEFAULT_PORT})

Properties

hashCode int
The hash code for this object.
no setterinherited
host String
getter/setter pair
manageDio ↔ Dio
getter/setter pair
port int
getter/setter pair
prefix String
getter/setter pair
protocol String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverDio ↔ Dio
getter/setter pair
serverSse SseClient
getter/setter pair
toolDio ↔ Dio
getter/setter pair
toolSse SseClient
getter/setter pair

Methods

buildServer(BuildInfoDto buildInfoDto, {required void onStart(EventMessageDto startMessage), required void onData(CommandOutputDto commandOutput), required void onDone(EventMessageDto startMessage), void onError(Object error, StackTrace stackTrace)?}) Future<void>
POST /servers/build
callTool(String toolId, FunctionCall functionCall) Future<ToolReturn>
POST /tools/{toolId}/call
createApiKey({required String sudoToken, String? name}) Future<ApiKeyDto>
POST /apiKey
deleteApiKey({required String sudoToken, required String apiKey}) Future<void>
DELETE /apiKey/{apiKey}
deleteServer(String serverId) Future<ServerIdDto>
DELETE /servers/{server_id}
deleteServerDetailed(String serverId) Future<ServerDeleteResultDto>
DELETE /servers/{server_id}, including artifact cleanup information.
deleteTool(String toolId) Future<ToolIdDto>
DELETE /tools/{toolId}
exportServer(String serverId, String targetPath) Future<ServerIdDto>
GET /servers/{serverId}/export
getVersion() Future<VersionDto>
GET /version
importServer(String sourcePath) Future<OpenToolServerDto>
POST /servers/import
listApiKeys({required String sudoToken}) Future<List<ApiKeyDto>>
GET /apiKeys
listServer() Future<List<OpenToolServerDto>>
Server API: /opentool-daemon/servers ========== GET /servers/list
listTool(String? all) Future<List<ToolDto>>
Tool API: /opentool-daemon/tools ========== GET /tools/list?all=0
listToolWithApiKeys(String? all, {required String daemonApiKey}) Future<List<ToolWithApiKeyDto>>
GET /tools/listWithApiKeys?all=0
loadTool(String toolId) Future<OpenTool?>
GET /tools/{toolId}/load
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pullServer(PullInfoDto pullInfo, {required void onStart(PullStartDto pullStart), required void onDownload(PullDownloadDto pullDownload), required void onDone(PullDoneDto result), required void onPullError(PullErrorDto error), void onError(Object error, StackTrace stackTrace)?}) Future<void>
POST /servers/pull
pullServerEvents(PullInfoDto pullInfo) Stream<PullEvent>
A typed pull stream. Cancelling the subscription closes the underlying HTTP request, which in turn triggers daemon-side pull cancellation.
runServer(String serverId, String? hostType, {int timeoutSeconds = -1, List<String>? extraCmds}) Future<CommandResultDto>
POST /tools/create
setAliasServer(String serverId, String? alias) Future<OpenToolServerDto>
POST /servers/{serverId}/alias?alias=<target_alias>
setAliasTool(String toolId, String alias) Future<ToolDto>
POST /tools/{toolId}/alias?alias=<target_alias>
startTool(String toolId, {required void onData(CommandResultDto commandOutput), required void onError(CommandResultDto commandOutput), void onStreamError(Object error, StackTrace stackTrace)?, int timeoutSeconds = -1}) Future<void>
POST /tools/{toolId}/start
stopTool(String toolId) Future<ToolIdDto>
POST /tools/{toolId}/stop
streamCallTool(String toolId, FunctionCall functionCall, {required void onEvent(String event, Map<String, dynamic> data), void onError(Object error, StackTrace stackTrace)?}) Future<void>
POST /tools/{toolId}/streamCall
subscribeToolEvents({String? daemonApiKey, String? hostToken, bool snapshot = true}) Future<Stream<ToolLifecycleEventDto>>
GET /tools/events?snapshot=1
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited