AgentSdkCommandRunner typedef

AgentSdkCommandRunner = Future<int> Function(String executable, List<String> arguments, {required Map<String, String> environment, required void onOutput(String line), required String workingDirectory})

Runs one command and reports its output line by line; returns its exit code. Throws ProcessException when the command cannot be started.

The seam the installer's suite replaces: npm ci needs a network and a registry, and a test that needs those tests them.

Implementation

typedef AgentSdkCommandRunner =
    Future<int> Function(
      String executable,
      List<String> arguments, {
      required String workingDirectory,
      required Map<String, String> environment,
      required void Function(String line) onOutput,
    });