syntax = "proto3";

package api;

option go_package = "github.com/owenthereal/upterm/host/api";

service AdminService {
  rpc GetSession(GetSessionRequest) returns (GetSessionResponse) {}
}

message GetSessionRequest {}

message GetSessionResponse {
  string session_id = 1;
  repeated string command = 2;
  repeated string force_command = 3;
  string host = 4;
  string node_addr = 5;
  repeated Client connected_clients = 6;
  repeated AuthorizedKey authorized_keys = 7;
  string ssh_user = 8; // SSH username for client connections
  bool sftp_disabled = 9; // true if SFTP is disabled (--no-sftp)
}

message AuthorizedKey {
  repeated string public_key_fingerprints = 1;
  string comment = 2;
}

message Client {
  string id = 1;
  string version = 2;
  string addr = 3;
  string public_key_fingerprint = 4;
}

message Identifier {
  string id = 1;
  Type type = 2;
  string node_addr = 3;

  enum Type {
    HOST = 0;
    CLIENT = 1;
  }
}
