handle method
Handles a node-control request; only update is acted on here.
Implementation
Future<(bool, String)> handle(NodeControl request) async {
if (request.action != 'update') {
return (true, 'acknowledged ${request.action}');
}
final target = request.parameters['target'] ?? 'os';
switch (target) {
case 'agent':
// Full remote self-update is a roadmap item; acknowledge the intent.
return (true, 'agent self-update is not yet automated');
case 'os':
return _runOsUpdate();
default:
return _runPackageUpdate(target);
}
}