chore(proto): regenerate after InvokePluginTranslate RPC
Adds HubClient.invokePluginTranslate as a typed method. Same shape as invokePluginTheme: capability + args in, typed response out. Signed-off-by: flemming-it <sf@flemming.it> Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
4a582f2b8d
commit
5604e5eaf3
4 changed files with 222 additions and 0 deletions
|
|
@ -61,6 +61,7 @@ typedef UninstallModuleResponse = pb.UninstallModuleResponse;
|
|||
typedef FetchModuleDocsResponse = pb.FetchModuleDocsResponse;
|
||||
typedef GetInstalledModuleDocsResponse = pb.GetInstalledModuleDocsResponse;
|
||||
typedef InvokePluginThemeResponse = pb.InvokePluginThemeResponse;
|
||||
typedef InvokePluginTranslateResponse = pb.InvokePluginTranslateResponse;
|
||||
typedef ListMcpClientsResponse = pb.ListMcpClientsResponse;
|
||||
typedef McpClientStatus = pb.McpClientStatus;
|
||||
typedef McpClientConfigEntry = pb.McpClientConfigEntry;
|
||||
|
|
@ -302,6 +303,33 @@ class HubClient {
|
|||
);
|
||||
}
|
||||
|
||||
/// Invoke an installed Studio plugin's `translate` hook and
|
||||
/// receive translated text. [fromLocale] may be empty
|
||||
/// (auto-detect); [toLocale] must be a BCP-47 code (the
|
||||
/// host always knows the target).
|
||||
///
|
||||
/// Errors surface as gRPC exceptions:
|
||||
/// * NOT_FOUND — plugin not installed.
|
||||
/// * FAILED_PRECONDITION — plugin returned Declined or
|
||||
/// Misconfigured (e.g. unreachable
|
||||
/// LLM endpoint).
|
||||
/// * INTERNAL — generic catch-all.
|
||||
Future<InvokePluginTranslateResponse> invokePluginTranslate({
|
||||
required String capability,
|
||||
required String text,
|
||||
required String toLocale,
|
||||
String fromLocale = '',
|
||||
}) {
|
||||
return _admin.invokePluginTranslate(
|
||||
pb.InvokePluginTranslateRequest(
|
||||
capability: capability,
|
||||
text: text,
|
||||
fromLocale: fromLocale,
|
||||
toLocale: toLocale,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// List every configured MCP server with the last-discovery
|
||||
/// snapshot. Drives Studio's MCP-clients editor.
|
||||
Future<ListMcpClientsResponse> listMcpClients() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue