LocalCommandRegistry.withLocalDefaults constructor

LocalCommandRegistry.withLocalDefaults()

Creates a registry with the subset of built-ins that need no Hub connection, for local mode (omnyshell local).

Omits the commands that require a connected client or live remote session (:latency, :ping, :tunnel, :tree, :detach); the rest read only the (synthetic) node descriptor and local state. Native local embedders add the AI command with ..addAiCommand() but NOT the file-transfer commands (those operate against a remote node).

Implementation

factory LocalCommandRegistry.withLocalDefaults() {
  final registry = LocalCommandRegistry();
  for (final command in _localBuiltIns) {
    registry.register(command);
  }
  return registry;
}