diff --git a/codex-rs/app-server-protocol/schema/json/ServerNotification.json b/codex-rs/app-server-protocol/schema/json/ServerNotification.json index f5cb5fcf45..6750a891fc 100644 --- a/codex-rs/app-server-protocol/schema/json/ServerNotification.json +++ b/codex-rs/app-server-protocol/schema/json/ServerNotification.json @@ -177,8 +177,49 @@ ], "type": "object" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json index 5613fc01d1..b72ef37ac7 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.schemas.json @@ -7408,6 +7408,37 @@ "title": "AgentMessageDeltaNotification", "type": "object" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageInputContent": { "oneOf": [ { @@ -7454,6 +7485,16 @@ }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/v2/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json index 60e5af98af..25170e10d6 100644 --- a/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json +++ b/codex-rs/app-server-protocol/schema/json/codex_app_server_protocol.v2.schemas.json @@ -523,6 +523,37 @@ "title": "AgentMessageDeltaNotification", "type": "object" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageInputContent": { "oneOf": [ { @@ -569,6 +600,16 @@ }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json index f4bf79f269..18590c6053 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemCompletedNotification.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json index 504b28e9b9..03fd67148d 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ItemStartedNotification.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json index f6c82a21c0..2be7bbeece 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ReviewStartResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json index cbbbb5cd04..68829f9364 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadForkResponse.json @@ -31,8 +31,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadItemsListResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadItemsListResponse.json index fdd01d6037..ccc37db027 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadItemsListResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadItemsListResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json index 5dd36f40ad..ad46c3e838 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadListResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json index bd638dc71c..c23c6c3483 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadMetadataUpdateResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json index 1e557168f5..c3e0785fb2 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadReadResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json index 9820727d2e..6e653afcf4 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadResumeResponse.json @@ -31,8 +31,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadRevertResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadRevertResponse.json index 460e911384..e3772a1921 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadRevertResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadRevertResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json index 9f89bbcbc2..7d24279f2d 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartResponse.json @@ -31,8 +31,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json index 9849fb09ad..5de7051c89 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadStartedNotification.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadTurnsListResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadTurnsListResponse.json index 730dc9423f..8397d86eca 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadTurnsListResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadTurnsListResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json index 7e6d08227d..a960ccf206 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ThreadUnarchiveResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json index 5aa18e517a..081f54cbb6 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnCompletedNotification.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json b/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json index d40cdae7f2..896122af66 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnStartResponse.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } diff --git a/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json b/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json index cd77337807..aecb15c373 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json +++ b/codex-rs/app-server-protocol/schema/json/v2/TurnStartedNotification.json @@ -11,8 +11,49 @@ ], "type": "string" }, + "AgentMessageDisplay": { + "description": "A presentation instruction for Chat to apply to this answer when recovering history.", + "properties": { + "action": { + "description": "Unknown actions must be left for the producing client to handle.", + "type": "string" + }, + "blockType": { + "type": [ + "string", + "null" + ] + }, + "checkTrustedContacts": { + "type": [ + "boolean", + "null" + ] + }, + "cyberTrustedAccess": { + "type": [ + "boolean", + "null" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, "AgentMessageModeration": { "properties": { + "display": { + "anyOf": [ + { + "$ref": "#/definitions/AgentMessageDisplay" + }, + { + "type": "null" + } + ] + }, "moderated": { "type": "boolean" } 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 85d45d7da6..80818eadfb 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 ebdb768d80..cf46d378f6 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/AgentMessageDisplay.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AgentMessageDisplay.ts new file mode 100644 index 0000000000..62f0051536 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/AgentMessageDisplay.ts @@ -0,0 +1,12 @@ +// GENERATED CODE! DO NOT MODIFY BY HAND! + +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * A presentation instruction for Chat to apply to this answer when recovering history. + */ +export type AgentMessageDisplay = { +/** + * Unknown actions must be left for the producing client to handle. + */ +action: string, blockType: string | null, cyberTrustedAccess: boolean | null, checkTrustedContacts: boolean | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/AgentMessageModeration.ts b/codex-rs/app-server-protocol/schema/typescript/v2/AgentMessageModeration.ts index baae0dd86c..b75a92acf3 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/AgentMessageModeration.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/AgentMessageModeration.ts @@ -1,5 +1,6 @@ // GENERATED CODE! DO NOT MODIFY BY HAND! // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { AgentMessageDisplay } from "./AgentMessageDisplay"; -export type AgentMessageModeration = { moderated: boolean, }; +export type AgentMessageModeration = { moderated: boolean, display: AgentMessageDisplay | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts index a648367933..53c270e729 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -22,6 +22,7 @@ export type { AdditionalNetworkPermissions } from "./AdditionalNetworkPermission export type { AdditionalPermissionProfile } from "./AdditionalPermissionProfile"; export type { AgentMessageDelivery } from "./AgentMessageDelivery"; export type { AgentMessageDeltaNotification } from "./AgentMessageDeltaNotification"; +export type { AgentMessageDisplay } from "./AgentMessageDisplay"; export type { AgentMessageModeration } from "./AgentMessageModeration"; export type { AllowDenyRequirement } from "./AllowDenyRequirement"; export type { AnalyticsConfig } from "./AnalyticsConfig"; diff --git a/codex-rs/app-server-protocol/src/protocol/thread_history.rs b/codex-rs/app-server-protocol/src/protocol/thread_history.rs index 1659dc74b2..05c4b52d74 100644 --- a/codex-rs/app-server-protocol/src/protocol/thread_history.rs +++ b/codex-rs/app-server-protocol/src/protocol/thread_history.rs @@ -638,6 +638,7 @@ impl ThreadHistoryBuilder { .as_ref() .map(|decision| AgentMessageModeration { moderated: decision.moderated, + display: decision.display.clone().map(Into::into), }), id, text: payload.message.clone(), 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 ff854bd149..c4cdf60e77 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/item.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/item.rs @@ -28,6 +28,7 @@ use codex_protocol::approvals::GuardianAssessmentDecisionSource as CoreGuardianA use codex_protocol::approvals::GuardianCommandSource as CoreGuardianCommandSource; use codex_protocol::items::AgentMessageContent as CoreAgentMessageContent; pub use codex_protocol::items::AgentMessageDelivery; +use codex_protocol::items::AgentMessageDisplay as CoreAgentMessageDisplay; use codex_protocol::items::AgentMessageModeration as CoreAgentMessageModeration; pub use codex_protocol::items::AsyncUserInputQuestion; use codex_protocol::items::CollabAgentTool as CoreCollabAgentTool; @@ -150,17 +151,42 @@ pub enum CommandAction { }, } -#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub struct AgentMessageModeration { pub moderated: bool, + pub display: Option, } impl From for AgentMessageModeration { fn from(value: CoreAgentMessageModeration) -> Self { Self { moderated: value.moderated, + display: value.display.map(Into::into), + } + } +} + +/// A presentation instruction for Chat to apply to this answer when recovering history. +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct AgentMessageDisplay { + /// Unknown actions must be left for the producing client to handle. + pub action: String, + pub block_type: Option, + pub cyber_trusted_access: Option, + pub check_trusted_contacts: Option, +} + +impl From for AgentMessageDisplay { + fn from(value: CoreAgentMessageDisplay) -> Self { + Self { + action: value.action, + block_type: value.block_type, + cyber_trusted_access: value.cyber_trusted_access, + check_trusted_contacts: value.check_trusted_contacts, } } } diff --git a/codex-rs/app-server-protocol/src/protocol/v2/tests.rs b/codex-rs/app-server-protocol/src/protocol/v2/tests.rs index 12454676d3..d6ea06fc6b 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/tests.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/tests.rs @@ -3170,6 +3170,35 @@ fn audio_references_round_trip_through_core_and_json() { ); } +#[test] +fn answer_moderation_exposes_nullable_display_fields() { + for (stored, expected) in [ + ( + json!({"moderated": false}), + json!({"moderated": false, "display": null}), + ), + ( + json!({"moderated": true, "display": { + "action": "answerHelpline", + "checkTrustedContacts": false, + }}), + json!({"moderated": true, "display": { + "action": "answerHelpline", + "blockType": null, + "cyberTrustedAccess": null, + "checkTrustedContacts": false, + }}), + ), + ] { + let core: codex_protocol::items::AgentMessageModeration = + serde_json::from_value(stored).unwrap(); + assert_eq!( + serde_json::to_value(AgentMessageModeration::from(core)).unwrap(), + expected + ); + } +} + #[test] fn core_turn_item_into_thread_item_converts_supported_variants() { let user_item = TurnItem::UserMessage(UserMessageItem { @@ -3297,7 +3326,10 @@ fn core_turn_item_into_thread_item_converts_supported_variants() { ); let agent_item_with_phase = TurnItem::AgentMessage(AgentMessageItem { - moderation: Some(codex_protocol::items::AgentMessageModeration { moderated: true }), + moderation: Some(codex_protocol::items::AgentMessageModeration { + moderated: true, + display: None, + }), id: "agent-2".to_string(), content: vec![AgentMessageContent::Text { text: "final".to_string(), @@ -3319,7 +3351,10 @@ fn core_turn_item_into_thread_item_converts_supported_variants() { assert_eq!( ThreadItemPayload::from(agent_item_with_phase), ThreadItemPayload::AgentMessage { - moderation: Some(AgentMessageModeration { moderated: true }), + moderation: Some(AgentMessageModeration { + moderated: true, + display: None + }), id: "agent-2".to_string(), text: "final".to_string(), phase: Some(MessagePhase::FinalAnswer), diff --git a/codex-rs/core/src/stream_events_utils.rs b/codex-rs/core/src/stream_events_utils.rs index ed3f20c351..ad1df3f04f 100644 --- a/codex-rs/core/src/stream_events_utils.rs +++ b/codex-rs/core/src/stream_events_utils.rs @@ -342,6 +342,7 @@ pub(crate) fn apply_answer_moderation( { answer.moderation = Some(codex_protocol::items::AgentMessageModeration { moderated: decision.moderated, + display: decision.display.clone(), }); } } diff --git a/codex-rs/core/tests/suite/model_request.rs b/codex-rs/core/tests/suite/model_request.rs index 02299217b6..431636d37f 100644 --- a/codex-rs/core/tests/suite/model_request.rs +++ b/codex-rs/core/tests/suite/model_request.rs @@ -470,7 +470,7 @@ async fn final_answer_carries_its_moderation_decision() -> Result<()> { responses::sse(vec![ responses::ev_response_created("resp-1"), json!({"type":"response.metadata","metadata":{"openai_chatgpt_moderation_metadata":{ - "final_answer_moderation":{"item_id":"msg-42","moderated":true}, + "final_answer_moderation":{"item_id":"msg-42","moderated":true,"display":{"action":"answerHelpline"}}, "generation":{"private":"classifier details"} }}}), answer, @@ -494,13 +494,16 @@ async fn final_answer_carries_its_moderation_decision() -> Result<()> { panic!("expected assistant answer"); }; let public = serde_json::to_value(&message)?; - assert_eq!(public["moderation"], json!({"moderated": true})); + assert_eq!( + public["moderation"], + json!({"moderated": true,"display":{"action":"answerHelpline"}}) + ); let [EventMsg::AgentMessage(legacy)] = &message.as_legacy_events()[..] else { panic!("expected one legacy answer"); }; assert_eq!( serde_json::to_value(&legacy.moderation)?, - json!({"item_id":"msg-42","moderated":true}) + json!({"item_id":"msg-42","moderated":true,"display":{"action":"answerHelpline"}}) ); Ok(()) } diff --git a/codex-rs/protocol/src/items.rs b/codex-rs/protocol/src/items.rs index ce16eaef54..03f5f18740 100644 --- a/codex-rs/protocol/src/items.rs +++ b/codex-rs/protocol/src/items.rs @@ -151,9 +151,30 @@ pub struct AsyncUserInputQuestion { pub options: Option>, } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize, Serialize, TS, JsonSchema)] +/// A presentation instruction for Chat to apply to this answer when recovering history. +#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, TS, JsonSchema)] +#[serde(rename_all = "camelCase")] +#[ts(export_to = "v2/")] +pub struct AgentMessageDisplay { + /// Unknown actions must be left for the producing client to handle. + pub action: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + pub block_type: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + pub cyber_trusted_access: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + pub check_trusted_contacts: Option, +} + +#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, TS, JsonSchema)] pub struct AgentMessageModeration { pub moderated: bool, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + pub display: Option, } #[derive(Debug, Clone, Deserialize, Serialize, TS, JsonSchema)] diff --git a/codex-rs/protocol/src/legacy_events.rs b/codex-rs/protocol/src/legacy_events.rs index a4df5f761e..3dc1775968 100644 --- a/codex-rs/protocol/src/legacy_events.rs +++ b/codex-rs/protocol/src/legacy_events.rs @@ -139,13 +139,14 @@ impl AgentMessageItem { questions: self.questions.clone(), }) }; - if let Some(decision) = self.moderation { + if let Some(decision) = &self.moderation { // The canonical answer has one ID even when the model supplied multiple text parts. return vec![event( texts.collect(), Some(crate::protocol::TargetedAnswerModeration { item_id: self.id.clone(), moderated: decision.moderated, + display: decision.display.clone(), }), )]; } diff --git a/codex-rs/protocol/src/protocol.rs b/codex-rs/protocol/src/protocol.rs index 58e3b3cf92..e11fb4bdfb 100644 --- a/codex-rs/protocol/src/protocol.rs +++ b/codex-rs/protocol/src/protocol.rs @@ -2400,6 +2400,9 @@ pub struct ModelVerificationEvent { pub struct TargetedAnswerModeration { pub item_id: String, pub moderated: bool, + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional)] + pub display: Option, } #[derive(Debug, Clone, Deserialize, Serialize, PartialEq, JsonSchema, TS)] diff --git a/codex-rs/thread-store/src/local/rollout_migration/legacy_event.rs b/codex-rs/thread-store/src/local/rollout_migration/legacy_event.rs index 8c8ff2d1b6..e5c8d442f0 100644 --- a/codex-rs/thread-store/src/local/rollout_migration/legacy_event.rs +++ b/codex-rs/thread-store/src/local/rollout_migration/legacy_event.rs @@ -161,6 +161,7 @@ pub(super) fn completed_item( moderation: event.moderation.as_ref().map(|decision| { codex_protocol::items::AgentMessageModeration { moderated: decision.moderated, + display: decision.display.clone(), } }), id: event diff --git a/sdk/python/src/openai_codex/generated/v2_all.py b/sdk/python/src/openai_codex/generated/v2_all.py index 4335881c6c..d6cbadd31d 100644 --- a/sdk/python/src/openai_codex/generated/v2_all.py +++ b/sdk/python/src/openai_codex/generated/v2_all.py @@ -149,6 +149,18 @@ class AgentMessageDeltaNotification(BaseModel): turn_id: Annotated[str, Field(alias="turnId")] +class AgentMessageDisplay(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + action: Annotated[ + str, Field(description="Unknown actions must be left for the producing client to handle.") + ] + block_type: Annotated[str | None, Field(alias="blockType")] = None + check_trusted_contacts: Annotated[bool | None, Field(alias="checkTrustedContacts")] = None + cyber_trusted_access: Annotated[bool | None, Field(alias="cyberTrustedAccess")] = None + + class InputTextAgentMessageInputContent(BaseModel): model_config = ConfigDict( populate_by_name=True, @@ -177,6 +189,7 @@ class AgentMessageModeration(BaseModel): model_config = ConfigDict( populate_by_name=True, ) + display: AgentMessageDisplay | None = None moderated: bool