feat: fetchModuleDocs wrapper (v0.10.0)

Picks up HubAdmin.FetchModuleDocs. HubClient exposes it as
fetchModuleDocs(name) returning the FetchModuleDocsResponse
verbatim — Studio maps the error_kind to friendly copy.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-05-07 20:45:59 +02:00
parent 90405e6fc3
commit 6efbdb2ff9
5 changed files with 193 additions and 1 deletions

View file

@ -56,6 +56,7 @@ typedef CuratedModel = pb.CuratedModel;
typedef ClearEventLogResponse = pb.ClearEventLogResponse;
typedef DaemonPathsResponse = pb.DaemonPathsResponse;
typedef UninstallModuleResponse = pb.UninstallModuleResponse;
typedef FetchModuleDocsResponse = pb.FetchModuleDocsResponse;
typedef ModuleInfoResponse = pb.ModuleInfoResponse;
typedef FlowSummary = pb.FlowSummary;
typedef StoreEntry = pb.StoreEntry;
@ -226,6 +227,15 @@ class HubClient {
return _admin.uninstallModule(pb.UninstallModuleRequest(name: name));
}
/// Fetch a module's README markdown via the hub. The hub
/// authenticates against the registry with FAI_REGISTRY_TOKEN
/// when set, so Studio doesn't have to handle credentials.
/// Errors come back inside [FetchModuleDocsResponse.errorKind]
/// (not as exceptions) so the UI can render fallbacks.
Future<FetchModuleDocsResponse> fetchModuleDocs(String name) {
return _admin.fetchModuleDocs(pb.FetchModuleDocsRequest(name: name));
}
/// Read-only system-AI status. `enabled=false` lets Studio
/// render "configure in Settings" without making a request.
Future<SystemAiStatusResponse> systemAiStatus() {