Add experimental thread queue APIs to app server (#38456)

## What changed

- Add experimental `thread/queue/add`, `list`, `update`, `delete`, `reorder`, and `start` requests for persistent queued user submissions.
- Automatically dispatch queued submissions in FIFO order after completed or failed turns, while leaving the queue paused after interruption.
- Emit `thread/queue/changed` notifications and expose paginated queue contents with stable submission and client message IDs.
- Export the new protocol types through the generated JSON Schema and TypeScript bindings.

## Testing

- Add app-server integration coverage for capability gating, CRUD, pagination, capacity limits, notifications, automatic dispatch, cold-thread resume, interruption, and explicit queue starts.

GitOrigin-RevId: 89caf5577192199bda77cf6c372a59d26cdd910e
This commit is contained in:
efrazer-oai authored and copyberry committed 2026-08-13 23:38:02 +00:00
1 parent 4d9f3021c8
commit 9341b38310
35 files changed
+1952 -105

No files matched your search

+8
View File
@@ -1168,6 +1168,14 @@ impl Session {
self.services.elicitations.subscribe()
}
pub(crate) fn mark_interrupted(&self) {
self.agent_status.send_replace(AgentStatus::Interrupted);
}
pub(crate) fn is_interrupted(&self) -> bool {
matches!(*self.agent_status.borrow(), AgentStatus::Interrupted)
}
pub(crate) fn get_tx_event(&self) -> Sender<Event> {
self.tx_event.clone()
}