// Input service for key processing.

syntax = "proto3";
package reovim.v2;

service InputService {
  // Send keys to the editor (vim notation).
  rpc SendKeys(SendKeysRequest) returns (SendKeysResponse);
}

message SendKeysRequest {
  // Keys in vim notation (e.g., "iHello<Esc>", "<C-w>h").
  string keys = 1;

  // #483 Phase 5: client_id removed — caller identity comes from
  // x-reovim-token header (resolved by AuthInterceptor).
  reserved 2, 3;
  reserved "client_id", "target_client_id";
}

message SendKeysResponse {
  bool ok = 1;
  KeyStatus status = 2;
  // Server signals client should disconnect (e.g., :q command).
  bool should_quit = 3;
}

enum KeyStatus {
  KEY_STATUS_UNSPECIFIED = 0;
  KEY_STATUS_EXECUTED = 1;
  KEY_STATUS_PENDING = 2;
  KEY_STATUS_NOT_FOUND = 3;
}
