package io.digdag.spi;

import java.io.IOException;
import java.nio.file.Path;

public interface CommandExecutor
{
    Process start(Path projectPath, TaskRequest request, ProcessBuilder pb)
        throws IOException;
}

@@ -28,27 +28,54 @@
 ort 
-java.io.IOException
+com.fasterxml.jackson.databind.node.ObjectNode
 ;%0Aim
@@ -88,21 +88,22 @@
 ava.
-n
 io.
-file.Path
+IOException
 ;%0A%0Ap
@@ -144,80 +144,846 @@
     
-Process start(Path projectPath, TaskRequest request, ProcessBuilder pb)%0A
+/**%0A     * Starts a command and returns its state. Caller must check isFinished of the returned CommandStatus.%0A     * If it's true, the command is done. CommandStatus.getStatusCode() is ready to call. Otherwise,%0A     * caller must call poll method repeatedly with toJson of the returned CommandStatus until CommandStatus%0A     * is returned with isFinished == true.%0A     *%0A     * @param context%0A     * @param request%0A     * @return%0A     * @throws IOException%0A     */%0A    CommandStatus run(CommandContext context, CommandRequest request)%0A            throws IOException;%0A%0A    /**%0A     * Polls the command status by non-blocking and return CommandStatus.%0A     * @param context%0A     * @param previousStatusJson%0A     * @return%0A     * @throws IOException%0A     */%0A    CommandStatus poll(CommandContext context, ObjectNode previousStatusJson)%0A    
     
@@ -1007,9 +1007,8 @@
 ption;%0A%7D
-%0A

Update SPI v2