github.com/mutagen-io/mutagen@v0.18.0-rc1/pkg/service/prompting/prompting.proto (about)

     1  syntax = "proto3";
     2  
     3  package prompting;
     4  
     5  option go_package = "github.com/mutagen-io/mutagen/pkg/service/prompting";
     6  
     7  // HostRequest encodes either an initial request to perform prompt hosting or a
     8  // follow-up response to a message or prompt.
     9  message HostRequest {
    10      // AllowPrompts indicates whether or not the hoster will allow prompts. If
    11      // not, it will only receive message requests. This field may only be set on
    12      // the initial request.
    13      bool allowPrompts = 1;
    14      // Response is the prompt response, if any. On the initial request, this
    15      // must be an empty string. When responding to a prompt, it may be any
    16      // value. When responding to a message, it must be an empty string.
    17      string response = 2;
    18  }
    19  
    20  // HostResponse encodes either an initial response to perform prompt hosting or
    21  // a follow-up request for messaging or prompting.
    22  message HostResponse {
    23      // Identifier is the prompter identifier. It is only set in the initial
    24      // response sent after the initial request.
    25      string identifier = 1;
    26      // IsPrompt indicates if the response is requesting a prompt (as opposed to
    27      // simple message display).
    28      bool isPrompt = 2;
    29      // Message is the message associated with the prompt or message.
    30      string message = 3;
    31  }
    32  
    33  // PromptRequest encodes a request for prompting by a specific prompter.
    34  message PromptRequest {
    35      // Prompter is the prompter identifier.
    36      string prompter = 1;
    37      // Prompt is the prompt to present.
    38      string prompt = 2;
    39  }
    40  
    41  // PromptResponse encodes the response from a prompter.
    42  message PromptResponse {
    43      // Response is the response returned by the prompter.
    44      string response = 1;
    45  }
    46  
    47  // Prompting allows clients to host and request prompting.
    48  service Prompting {
    49      // Host allows clients to perform prompt hosting.
    50      rpc Host(stream HostRequest) returns (stream HostResponse) {}
    51      // Prompt performs prompting using a specific prompter.
    52      rpc Prompt(PromptRequest) returns (PromptResponse) {}
    53  }