// 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.

edition = "2024";

package personal_context.proto;

import "components/personal_context/proto/features/common_data.proto";

option optimize_for = LITE_RUNTIME;

message AutoTodosRequest {
  // Existing todos stored for the user to deduplicate against.
  repeated AutoTodoItem existing_todos = 1;
}

message AutoTodosResponse {
  // The list of Todos to be given to the user, consisting only of new or
  // updated existing todos.
  repeated AutoTodoItem todos = 1;
}

message AutoTodoItem {
  // The title of the Todo (e.g., "Flight check-in").
  string title = 1;

  // The description of the Todo (e.g., "Check in for your upcoming flight to
  // SFO").
  string description = 2;

  // The references/sources where the Todo was extracted from.
  repeated SourceReference source_references = 3;

  // The URL where the user can complete the Todo.
  string actionable_url = 4;

  // Importance score of the Todo from 0.0 to 1.0.
  float importance_score = 5;

  enum Status {
    STATUS_UNSPECIFIED = 0;
    STATUS_ACTIVE = 1;
    STATUS_COMPLETED = 2;
    STATUS_DISMISSED = 3;
  }
  // The status of the Todo.
  Status status = 6;

  // Unique identifier for the todo.
  string id = 7;
}
