// Copyright 2026 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package skills.proto;

// Contains information about a single Skill, as passed down from the server.
message Skill {
  // A unique identifier for this Skill.
  optional string id = 1;

  // The user-facing name of this Skill.
  optional string name = 2;

  // The category of this Skill, e.g. "Shopping", "Writing", etc.
  optional string category = 3;

  // The icon to use when rendering this Skill.
  optional string icon = 4;

  // The prompt to execute the Skill.
  optional string prompt = 5;

  // A user-facing short description of the Skill.
  optional string description = 6;

  // The image to use when rendering this Skill. The number here should match
  // exactly with the proto defined in
  // google3/chrome/breve/cacao/boq/skills/config/skill.proto.
  optional string image_url = 8;

  // The name of the curator for this skill, if any.
  optional string curated_by = 9;
}

// Contains special topics information for the chrome://skills/browse page.
message TopicInfo {
  // The actual category name, such as "PartnerPicks".
  optional string category_name = 1;
  // The title for the special topic, such as "Partner Spotlight".
  optional string display_name = 2;
}

// Contains a list of Skills received from the server.
//
// This is used as the metadata associated with the SKILLS Optimization type.
// This is also used to download the full list of first-party Skills.
message SkillsList {
  // List of first party skills.
  repeated Skill skills = 1;
  // List of special topics on the chrome://skills page (ie TopPicks,
  // PartnerPicks). DEPRECATED in favor of topics_info_list.
  repeated string topics_list = 2 [deprecated = true];

  // List of topics to be displayed on chrome://skills/browse.
  repeated TopicInfo topics_info_list = 3;
}
