syntax = "proto3";

package worldmonitor.intelligence.v1;

import "buf/validate/validate.proto";
import "sebuf/http/annotations.proto";

// GetCountryIntelBriefRequest specifies which country to generate a brief for.
message GetCountryIntelBriefRequest {
  // ISO 3166-1 alpha-2 country code.
  string country_code = 1 [
    (buf.validate.field).required = true,
    (buf.validate.field).string.len = 2,
    (buf.validate.field).string.pattern = "^[A-Z]{2}$",
    (sebuf.http.query) = {name: "country_code"}
  ];
  // Optional analytical framework instructions to append to system prompt. Max 2000 chars enforced at handler level.
  string framework = 2 [(sebuf.http.query) = {name: "framework"}];
}

// GetCountryIntelBriefResponse contains an AI-generated intelligence brief for a country.
message GetCountryIntelBriefResponse {
  // ISO 3166-1 alpha-2 country code.
  string country_code = 1;
  // Country name.
  string country_name = 2;
  // AI-generated intelligence brief text.
  string brief = 3;
  // AI model used for generation.
  string model = 4;
  // Brief generation time, as Unix epoch milliseconds.
  int64 generated_at = 5 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER];
}
