mirror of
https://github.com/openai/codex.git
synced 2026-10-27 18:48:37 +00:00
## What changed - Define `SleepItem` in `codex-extension-items` and carry `clock.sleep` events through `TurnItem::Extension`. - Preserve sleep persistence, thread-history reconstruction, and the app-server's `type: "sleep"` schema while reusing the extension-owned type. ## Testing - Add serialization coverage for the `clock.sleep` extension wire shape and its protocol wrapper. - Update sleep lifecycle and thread-history tests to exercise the extension-owned item. GitOrigin-RevId: 34bb33ed9b90a09bf4744aafdb56e019c717a168
15 lines
398 B
Rust
15 lines
398 B
Rust
use schemars::JsonSchema;
|
|
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
use ts_rs::TS;
|
|
|
|
/// Display item emitted by the interruptible `clock.sleep` tool.
|
|
#[derive(Debug, Clone, Deserialize, Serialize, TS, JsonSchema, PartialEq, Eq)]
|
|
#[serde(rename_all = "camelCase")]
|
|
#[ts(rename_all = "camelCase")]
|
|
pub struct SleepItem {
|
|
pub id: String,
|
|
#[ts(type = "number")]
|
|
pub duration_ms: u64,
|
|
}
|