mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
More aliasing
This commit is contained in:
@@ -429,7 +429,7 @@ macro_rules! server_notification_definitions {
|
||||
(
|
||||
$(
|
||||
$(#[$variant_meta:meta])*
|
||||
$variant:ident $(=> $wire:literal)? ( $payload:ty )
|
||||
$variant:ident $(=> $wire:literal $(, aliases([$($alias:literal),* $(,)?]))? )? ( $payload:ty )
|
||||
),* $(,)?
|
||||
) => {
|
||||
/// Notification sent from the server to the client.
|
||||
@@ -439,7 +439,14 @@ macro_rules! server_notification_definitions {
|
||||
pub enum ServerNotification {
|
||||
$(
|
||||
$(#[$variant_meta])*
|
||||
$(#[serde(rename = $wire)] #[ts(rename = $wire)] #[strum(serialize = $wire)])?
|
||||
$(
|
||||
#[serde(rename = $wire)]
|
||||
#[ts(rename = $wire)]
|
||||
#[strum(serialize = $wire)]
|
||||
$(
|
||||
$(#[serde(alias = $alias)])*
|
||||
)?
|
||||
)?
|
||||
$variant($payload),
|
||||
)*
|
||||
}
|
||||
@@ -582,7 +589,7 @@ server_notification_definitions! {
|
||||
TurnStarted => "turn/started" (v2::TurnStartedNotification),
|
||||
TurnCompleted => "turn/completed" (v2::TurnCompletedNotification),
|
||||
TurnDiffUpdated => "turn/diff/updated" (v2::TurnDiffUpdatedNotification),
|
||||
TurnPlanUpdated => "turn/plan/updated" (v2::TurnPlanUpdatedNotification),
|
||||
TurnPlanUpdated => "turn/plan/updated", aliases(["turn/todo/updated"]) (v2::TurnPlanUpdatedNotification),
|
||||
ItemStarted => "item/started" (v2::ItemStartedNotification),
|
||||
ItemCompleted => "item/completed" (v2::ItemCompletedNotification),
|
||||
/// This event is internal-only. Used by Codex Cloud.
|
||||
|
||||
@@ -433,7 +433,7 @@ The app-server streams JSON-RPC notifications while a turn is running. Each turn
|
||||
- `turn/started` — `{ turn }` with the turn id, empty `items`, and `status: "inProgress"`.
|
||||
- `turn/completed` — `{ turn }` where `turn.status` is `completed`, `interrupted`, or `failed`; failures carry `{ error: { message, codexErrorInfo?, additionalDetails? } }`.
|
||||
- `turn/diff/updated` — `{ threadId, turnId, diff }` represents the up-to-date snapshot of the turn-level unified diff, emitted after every FileChange item. `diff` is the latest aggregated unified diff across every file change in the turn. UIs can render this to show the full "what changed" view without stitching individual `fileChange` items.
|
||||
- `turn/plan/updated` — `{ turnId, explanation?, todo, plan }` whenever the agent shares or changes its todo list; each entry is `{ step, status }` with `status` in `pending`, `inProgress`, or `completed`. `todo` is preferred and `plan` is a deprecated legacy alias; both are emitted for compatibility. (The plan-named event and field are legacy and are unrelated to Plan mode.)
|
||||
- `turn/plan/updated` — `{ turnId, explanation?, todo, plan }` whenever the agent shares or changes its todo list; each entry is `{ step, status }` with `status` in `pending`, `inProgress`, or `completed`. `todo` is preferred and `plan` is a deprecated legacy alias; both are emitted for compatibility. Clients may also send/accept `turn/todo/updated` as a wire alias. (The plan-named event and field are legacy and are unrelated to Plan mode.)
|
||||
|
||||
Today both notifications carry an empty `items` array even when item events were streamed; rely on `item/*` notifications for the canonical item list until this is fixed.
|
||||
|
||||
|
||||
@@ -812,6 +812,7 @@ pub enum EventMsg {
|
||||
|
||||
/// Todo list update from the todo_write tool. Payload uses `todo` (preferred)
|
||||
/// and also emits `plan` as a legacy alias.
|
||||
#[serde(alias = "todo_update")]
|
||||
PlanUpdate(UpdateTodoArgs),
|
||||
|
||||
TurnAborted(TurnAbortedEvent),
|
||||
|
||||
Reference in New Issue
Block a user