getToolsPlugins method

Future<PluginMountList?> getToolsPlugins({
  1. String? all,
})

Reports what this deployment actually mounted: every subsystem the composition root declared and whether it is switched on.

Reports what this deployment actually mounted: every subsystem the composition root declared and whether it is switched on. A plugin here is MOUNTED CODE that extends the deployment's own surface — not a tool an agent calls — so this is an inventory and not a tool source. It is read off the same boot snapshot every traced request resolves its subsystem label against, so it cannot drift from what is serving. Enabled-only by default, because a caller asking what this deployment can do wants what is running; ?all=true adds the configured-but-off ones.

Parameters:

  • String all: All includes the configured-but-disabled subsystems too, but only when it is exactly the string "true". Otherwise only the running ones are reported.

Implementation

Future<PluginMountList?> getToolsPlugins({ String? all, }) async {
  final response = await getToolsPluginsWithHttpInfo( all: all, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PluginMountList',) as PluginMountList;

  }
  return null;
}