Migrate to profile ids

This commit is contained in:
Theodor S. Midtlien
2026-06-08 14:50:25 +02:00
parent 60d2fa08b0
commit 33b1cc5449
20 changed files with 1138 additions and 349 deletions
+29 -3
View File
@@ -615,11 +615,18 @@ message GetEventsResponse {
}
message SwitchProfileRequest {
// profileName is treated as a handle: exact ID, unique ID prefix, or
// unique display name. The daemon resolves it server-side.
optional string profileName = 1;
optional string username = 2;
}
message SwitchProfileResponse {}
message SwitchProfileResponse {
// id is the resolved on-disk ID of the profile that became active.
// Lets CLI clients update their local active-profile state without
// duplicating the resolution logic.
string id = 1;
}
message SetConfigRequest {
string username = 1;
@@ -686,17 +693,29 @@ message SetConfigResponse{}
message AddProfileRequest {
string username = 1;
// profileName carries the human-readable display name for the new
// profile. The on-disk filename is a separately-generated ID.
string profileName = 2;
}
message AddProfileResponse {}
message AddProfileResponse {
// id is the generated on-disk ID of the new profile. CLI clients
// display a truncated form; UI clients can ignore it.
string id = 1;
}
message RemoveProfileRequest {
string username = 1;
// profileName is treated as a handle: an exact ID, a unique ID
// prefix, or a unique display name. Resolution happens server-side.
string profileName = 2;
}
message RemoveProfileResponse {}
message RemoveProfileResponse {
// id is the full resolved ID of the removed profile, so callers can
// confirm exactly which profile a name/prefix handle resolved to.
string id = 1;
}
message ListProfilesRequest {
string username = 1;
@@ -709,13 +728,20 @@ message ListProfilesResponse {
message Profile {
string name = 1;
bool is_active = 2;
// id is the on-disk filename stem of the profile. Always set by the
// server; older clients that ignore it continue to work via name.
string id = 3;
}
message GetActiveProfileRequest {}
message GetActiveProfileResponse {
// profileName carries the display name for backwards compatibility
// with UI clients. New callers should prefer id, which is unique.
string profileName = 1;
string username = 2;
// id is the on-disk filename stem of the active profile.
string id = 3;
}
message LogoutRequest {