diff --git a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst index 708b89be3b..9eda51adc9 100644 Binary files a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst and b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-experimental.json.zst differ diff --git a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst index d194c82851..e199e847d5 100644 Binary files a/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst and b/codex-rs/app-server-protocol/schema/precomputed/app-server-exports-stable.json.zst differ diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts index 5338795c96..f93eda554e 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ThreadItem.ts @@ -38,11 +38,11 @@ export type ThreadItem = { /** * Unix timestamp in milliseconds when the item started, if recorded. */ -startedAtMs: number | null, +startedAtMs?: number | null, /** * Unix timestamp in milliseconds when the item completed, if recorded. */ -completedAtMs: number | null, } & ({ "type": "userMessage", id: string, clientId: string | null, content: Array, } | { "type": "hookPrompt", id: string, fragments: Array, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, memoryCitation: MemoryCitation | null, delivery: AgentMessageDelivery | null, questions: Array | null, } | { "type": "functionCallOutput", id: string, name: string, namespace: string | null, output: FunctionCallOutputBody, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, +completedAtMs?: number | null, } & ({ "type": "userMessage", id: string, clientId: string | null, content: Array, } | { "type": "hookPrompt", id: string, fragments: Array, } | { "type": "agentMessage", id: string, text: string, phase: MessagePhase | null, memoryCitation: MemoryCitation | null, delivery: AgentMessageDelivery | null, questions: Array | null, } | { "type": "functionCallOutput", id: string, name: string, namespace: string | null, output: FunctionCallOutputBody, } | { "type": "plan", id: string, text: string, } | { "type": "reasoning", id: string, summary: Array, content: Array, } | { "type": "commandExecution", id: string, /** * Trusted first-party plugin id when this command resolves to one plugin script. */ diff --git a/codex-rs/app-server-protocol/src/export.rs b/codex-rs/app-server-protocol/src/export.rs index 6e1e5f48be..0e0ebe9e5d 100644 --- a/codex-rs/app-server-protocol/src/export.rs +++ b/codex-rs/app-server-protocol/src/export.rs @@ -2411,6 +2411,8 @@ mod tests { && field_prefix.trim() == "threadUsage?") || (path == Path::new("v2/ThreadUsage.ts") && field_prefix.trim() == "nativeUsageUsdMicros?") + || (path == Path::new("v2/ThreadItem.ts") + && matches!(field_prefix.trim(), "startedAtMs?" | "completedAtMs?")) || (path == Path::new("v2/McpServerOauthLoginCompletedNotification.ts") && field_prefix.trim() == "loginId?") || (path == Path::new("v2/MisalignmentErrorDetails.ts") diff --git a/codex-rs/app-server-protocol/src/protocol/v2/item.rs b/codex-rs/app-server-protocol/src/protocol/v2/item.rs index 8997b722e2..f496ef172b 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/item.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/item.rs @@ -240,11 +240,11 @@ pub struct ThreadItem { pub payload: ThreadItemPayload, /// Unix timestamp in milliseconds when the item started, if recorded. #[serde(default)] - #[ts(type = "number | null")] + #[ts(type = "number | null", optional)] pub started_at_ms: Option, /// Unix timestamp in milliseconds when the item completed, if recorded. #[serde(default)] - #[ts(type = "number | null")] + #[ts(type = "number | null", optional)] pub completed_at_ms: Option, }