mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add experimental app-server project APIs (#38940)
## What changed - Add SQLite-backed `project/list`, `project/read`, `project/create`, `project/import`, `project/update`, `project/move`, and `project/delete` endpoints with ordered roots, metadata, manual positioning, pagination, and idempotent creation. - Add project assignment to thread start, metadata updates, list filtering, and fork inheritance. Project deletion clears assignments without deleting threads. - Emit `project/changed` and `thread/project/updated` notifications after committed changes, and export the new protocol schemas and TypeScript types. ## Testing - Cover project lifecycle and ordering, idempotency, atomic imports, cursor and filter validation, thread assignment, deletion, and fork inheritance. GitOrigin-RevId: 47ae621be01ab8ef70a74a629fb29a5c5709ea33
This commit is contained in:
1 parent
1f41cc5d92
commit
3b4569a920
107 files changed
+4210
-52
No files matched your search
@@ -45,6 +45,7 @@ impl App {
|
||||
source_kinds: Some(vec![ThreadSourceKind::SubAgentThreadSpawn]),
|
||||
archived: None,
|
||||
section_id: None,
|
||||
project_id: None,
|
||||
cwd: None,
|
||||
use_state_db_only: true,
|
||||
search_term: None,
|
||||
|
||||
@@ -59,6 +59,9 @@ pub(super) fn server_notification_thread_target(
|
||||
ServerNotification::ThreadNameUpdated(notification) => {
|
||||
Some(notification.thread_id.as_str())
|
||||
}
|
||||
ServerNotification::ThreadProjectUpdated(notification) => {
|
||||
Some(notification.thread_id.as_str())
|
||||
}
|
||||
ServerNotification::ThreadTokenUsageUpdated(notification) => {
|
||||
Some(notification.thread_id.as_str())
|
||||
}
|
||||
@@ -168,7 +171,8 @@ pub(super) fn server_notification_thread_target(
|
||||
None => return ServerNotificationThreadTarget::AppScoped,
|
||||
}
|
||||
}
|
||||
ServerNotification::SkillsChanged(_)
|
||||
ServerNotification::ProjectChanged(_)
|
||||
| ServerNotification::SkillsChanged(_)
|
||||
| ServerNotification::McpServerOauthLoginCompleted(_)
|
||||
| ServerNotification::AccountUpdated(_)
|
||||
| ServerNotification::AccountRateLimitsUpdated(_)
|
||||
|
||||
@@ -144,6 +144,7 @@ mod tests {
|
||||
ephemeral: false,
|
||||
section: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
history_mode: Default::default(),
|
||||
model_provider: "openai".to_string(),
|
||||
created_at: 0,
|
||||
|
||||
@@ -3607,6 +3607,7 @@ async fn inactive_thread_started_notification_initializes_replay_session() -> Re
|
||||
ephemeral: false,
|
||||
section: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
history_mode: Default::default(),
|
||||
model_provider: "agent-provider".to_string(),
|
||||
created_at: 1,
|
||||
@@ -3705,6 +3706,7 @@ async fn inactive_thread_started_notification_preserves_primary_model_when_path_
|
||||
ephemeral: false,
|
||||
section: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
history_mode: Default::default(),
|
||||
model_provider: "agent-provider".to_string(),
|
||||
created_at: 1,
|
||||
@@ -3770,6 +3772,7 @@ async fn thread_read_session_state_does_not_reuse_primary_permission_profile() {
|
||||
ephemeral: false,
|
||||
section: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
history_mode: Default::default(),
|
||||
model_provider: "read-provider".to_string(),
|
||||
created_at: 1,
|
||||
|
||||
@@ -419,6 +419,7 @@ mod tests {
|
||||
ephemeral: false,
|
||||
section: None,
|
||||
section_entered_at: None,
|
||||
project_id: None,
|
||||
history_mode: Default::default(),
|
||||
model_provider: "read-provider".to_string(),
|
||||
created_at: 1,
|
||||
|
||||
Reference in new issue
Block a user