syntax = "proto3";

package runme.notebook.v1alpha1;

import "google/protobuf/wrappers.proto";
import "runme/parser/v1/parser.proto";
import "runme/runner/v1/runner.proto";

option go_package = "github.com/runmedev/runme/v3/api/gen/proto/go/runme/notebook/v1alpha1;notebookv1alpha1";

message ResolveNotebookRequest {
  runme.parser.v1.Notebook notebook = 1;

  runme.runner.v1.CommandMode command_mode = 2;

  google.protobuf.UInt32Value cell_index = 3;
}

message ResolveNotebookResponse {
  string script = 1;
}

service NotebookService {
  // ResolveNotebook takes [runme.parser.v1.Notebook] and a cell index and
  // returns a script that runs the cell taking the whole notebook into account.
  rpc ResolveNotebook(ResolveNotebookRequest) returns (ResolveNotebookResponse) {}
}
