feat: planSetup — guided-setup plan preview over the hub connection
Some checks failed
Security / Security check (push) Failing after 2s

Wraps the new HubAdmin.PlanSetup RPC (pure plan assembly, no state
change). Regenerated stubs from the updated proto.

Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-07-17 00:59:01 +02:00
parent 622ed096b2
commit aca36102e4
4 changed files with 371 additions and 0 deletions

View file

@ -597,6 +597,21 @@ class HubAdminClient extends $grpc.Client {
return $createUnaryCall(_$authStatus, request, options: options);
}
/// Assemble the guided-setup plan for the given answers a pure
/// computation (chain_core::guided_setup::assemble), no state
/// change, nothing written. Lets a GUI render the setup preview
/// over its existing hub connection instead of spawning the CLI:
/// on macOS that subprocess can be the app's first file-system
/// touch and trigger a permission prompt BEFORE the operator has
/// seen what would be set up the wrong order for trust. Apply
/// remains a deliberate separate step.
$grpc.ResponseFuture<$0.PlanSetupResponse> planSetup(
$0.PlanSetupRequest request, {
$grpc.CallOptions? options,
}) {
return $createUnaryCall(_$planSetup, request, options: options);
}
/// List host services declared in the operator config. Each
/// entry carries name + endpoint; reachability is operator-side
/// (on-demand `chain service status` or Studio probe).
@ -997,6 +1012,11 @@ class HubAdminClient extends $grpc.Client {
'/chain.v1.HubAdmin/AuthStatus',
($1.Empty value) => value.writeToBuffer(),
$0.AuthStatusResponse.fromBuffer);
static final _$planSetup =
$grpc.ClientMethod<$0.PlanSetupRequest, $0.PlanSetupResponse>(
'/chain.v1.HubAdmin/PlanSetup',
($0.PlanSetupRequest value) => value.writeToBuffer(),
$0.PlanSetupResponse.fromBuffer);
static final _$listServices = $grpc.ClientMethod<$1.Empty, $0.ServiceList>(
'/chain.v1.HubAdmin/ListServices',
($1.Empty value) => value.writeToBuffer(),
@ -1359,6 +1379,13 @@ abstract class HubAdminServiceBase extends $grpc.Service {
false,
($core.List<$core.int> value) => $1.Empty.fromBuffer(value),
($0.AuthStatusResponse value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$0.PlanSetupRequest, $0.PlanSetupResponse>(
'PlanSetup',
planSetup_Pre,
false,
false,
($core.List<$core.int> value) => $0.PlanSetupRequest.fromBuffer(value),
($0.PlanSetupResponse value) => value.writeToBuffer()));
$addMethod($grpc.ServiceMethod<$1.Empty, $0.ServiceList>(
'ListServices',
listServices_Pre,
@ -1799,6 +1826,14 @@ abstract class HubAdminServiceBase extends $grpc.Service {
$async.Future<$0.AuthStatusResponse> authStatus(
$grpc.ServiceCall call, $1.Empty request);
$async.Future<$0.PlanSetupResponse> planSetup_Pre($grpc.ServiceCall $call,
$async.Future<$0.PlanSetupRequest> $request) async {
return planSetup($call, await $request);
}
$async.Future<$0.PlanSetupResponse> planSetup(
$grpc.ServiceCall call, $0.PlanSetupRequest request);
$async.Future<$0.ServiceList> listServices_Pre(
$grpc.ServiceCall $call, $async.Future<$1.Empty> $request) async {
return listServices($call, await $request);