syntax = "proto3";

package agent.v1;

import "runme/parser/v1/parser.proto";

option go_package = "github.com/runmedev/runme/v3/api/gen/proto/go/agent/v1;agentv1";

// MessagesService generates blocks.
service MessagesService {
  // Generate generates cells. Responses are streamed.
  rpc Generate(GenerateRequest) returns (stream GenerateResponse) {}
}

message GenerateRequest {
  repeated runme.parser.v1.Cell cells = 1;
  string previous_response_id = 2;

  // openai_access_token is the OpenAI access token to use when contacting the OpenAI API.
  string openai_access_token = 3;
}

message GenerateResponse {
  repeated runme.parser.v1.Cell cells = 1;
  string response_id = 2;
}
