[codex] Add thread catalog subscriptions

This commit is contained in:
Brent Traut
2026-07-08 10:51:27 -07:00
parent f56595f4bc
commit a18f769372
22 changed files with 1415 additions and 2 deletions
@@ -7,6 +7,7 @@ use super::Thread;
use super::ThreadHistoryMode;
use super::ThreadItem;
use super::ThreadSource;
use super::ThreadSummary;
use super::Turn;
use super::TurnEnvironmentParams;
use super::TurnItemsView;
@@ -1200,6 +1201,11 @@ pub struct ThreadListResponse {
pub backwards_cursor: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct ThreadCatalogSubscribeResponse {}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
@@ -1461,6 +1467,22 @@ pub struct ThreadUnarchivedNotification {
pub thread_id: String,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(tag = "type", rename_all = "camelCase")]
#[ts(tag = "type", rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub enum ThreadCatalogChangedNotification {
Upsert {
thread: Box<ThreadSummary>,
},
#[serde(rename_all = "camelCase")]
#[ts(rename_all = "camelCase")]
Delete {
thread_id: String,
},
Invalidate,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]