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 f028a393cc..db7b940a89 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 @@ -10406,6 +10406,16 @@ } ] }, + "otel": { + "anyOf": [ + { + "$ref": "#/definitions/v2/OtelRequirements" + }, + { + "type": "null" + } + ] + }, "sqliteHome": { "type": [ "string", @@ -16522,6 +16532,211 @@ ], "title": "Nullable_GetAccountTokenUsageParams" }, + "OtelExporter": { + "oneOf": [ + { + "enum": [ + "none", + "statsig" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "otlp-http": { + "properties": { + "endpoint": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Exporter request headers.", + "type": "object" + }, + "protocol": { + "$ref": "#/definitions/v2/OtelHttpProtocol" + }, + "tls": { + "anyOf": [ + { + "$ref": "#/definitions/v2/OtelTlsConfig" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "endpoint", + "headers", + "protocol" + ], + "type": "object" + } + }, + "required": [ + "otlp-http" + ], + "title": "OtlpHttpOtelExporter", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "otlp-grpc": { + "properties": { + "endpoint": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Exporter request headers.", + "type": "object" + }, + "tls": { + "anyOf": [ + { + "$ref": "#/definitions/v2/OtelTlsConfig" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "endpoint", + "headers" + ], + "type": "object" + } + }, + "required": [ + "otlp-grpc" + ], + "title": "OtlpGrpcOtelExporter", + "type": "object" + } + ] + }, + "OtelHttpProtocol": { + "enum": [ + "binary", + "json" + ], + "type": "string" + }, + "OtelRequirements": { + "properties": { + "environment": { + "type": [ + "string", + "null" + ] + }, + "exporter": { + "anyOf": [ + { + "$ref": "#/definitions/v2/OtelExporter" + }, + { + "type": "null" + } + ] + }, + "log_agent_responses": { + "type": [ + "boolean", + "null" + ] + }, + "log_guardian_assessments": { + "type": [ + "boolean", + "null" + ] + }, + "log_user_prompt": { + "type": [ + "boolean", + "null" + ] + }, + "metrics_exporter": { + "anyOf": [ + { + "$ref": "#/definitions/v2/OtelExporter" + }, + { + "type": "null" + } + ] + }, + "tool_result": { + "anyOf": [ + { + "$ref": "#/definitions/v2/OtelToolResultLogConfig" + }, + { + "type": "null" + } + ] + }, + "trace_exporter": { + "anyOf": [ + { + "$ref": "#/definitions/v2/OtelExporter" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "OtelTlsConfig": { + "properties": { + "ca-certificate": { + "type": [ + "string", + "null" + ] + }, + "client-certificate": { + "type": [ + "string", + "null" + ] + }, + "client-private-key": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "OtelToolResultLogConfig": { + "properties": { + "max_bytes": { + "format": "uint", + "minimum": 0.0, + "type": "integer" + } + }, + "required": [ + "max_bytes" + ], + "type": "object" + }, "OverriddenMetadata": { "properties": { "effectiveValue": true, 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 f39124d246..38d9613415 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 @@ -6222,6 +6222,16 @@ } ] }, + "otel": { + "anyOf": [ + { + "$ref": "#/definitions/OtelRequirements" + }, + { + "type": "null" + } + ] + }, "sqliteHome": { "type": [ "string", @@ -12514,6 +12524,211 @@ ], "title": "Nullable_GetAccountTokenUsageParams" }, + "OtelExporter": { + "oneOf": [ + { + "enum": [ + "none", + "statsig" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "otlp-http": { + "properties": { + "endpoint": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Exporter request headers.", + "type": "object" + }, + "protocol": { + "$ref": "#/definitions/OtelHttpProtocol" + }, + "tls": { + "anyOf": [ + { + "$ref": "#/definitions/OtelTlsConfig" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "endpoint", + "headers", + "protocol" + ], + "type": "object" + } + }, + "required": [ + "otlp-http" + ], + "title": "OtlpHttpOtelExporter", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "otlp-grpc": { + "properties": { + "endpoint": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Exporter request headers.", + "type": "object" + }, + "tls": { + "anyOf": [ + { + "$ref": "#/definitions/OtelTlsConfig" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "endpoint", + "headers" + ], + "type": "object" + } + }, + "required": [ + "otlp-grpc" + ], + "title": "OtlpGrpcOtelExporter", + "type": "object" + } + ] + }, + "OtelHttpProtocol": { + "enum": [ + "binary", + "json" + ], + "type": "string" + }, + "OtelRequirements": { + "properties": { + "environment": { + "type": [ + "string", + "null" + ] + }, + "exporter": { + "anyOf": [ + { + "$ref": "#/definitions/OtelExporter" + }, + { + "type": "null" + } + ] + }, + "log_agent_responses": { + "type": [ + "boolean", + "null" + ] + }, + "log_guardian_assessments": { + "type": [ + "boolean", + "null" + ] + }, + "log_user_prompt": { + "type": [ + "boolean", + "null" + ] + }, + "metrics_exporter": { + "anyOf": [ + { + "$ref": "#/definitions/OtelExporter" + }, + { + "type": "null" + } + ] + }, + "tool_result": { + "anyOf": [ + { + "$ref": "#/definitions/OtelToolResultLogConfig" + }, + { + "type": "null" + } + ] + }, + "trace_exporter": { + "anyOf": [ + { + "$ref": "#/definitions/OtelExporter" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "OtelTlsConfig": { + "properties": { + "ca-certificate": { + "type": [ + "string", + "null" + ] + }, + "client-certificate": { + "type": [ + "string", + "null" + ] + }, + "client-private-key": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "OtelToolResultLogConfig": { + "properties": { + "max_bytes": { + "format": "uint", + "minimum": 0.0, + "type": "integer" + } + }, + "required": [ + "max_bytes" + ], + "type": "object" + }, "OverriddenMetadata": { "properties": { "effectiveValue": true, diff --git a/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json b/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json index 79f84b629d..2df50dbc7b 100644 --- a/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json +++ b/codex-rs/app-server-protocol/schema/json/v2/ConfigRequirementsReadResponse.json @@ -654,6 +654,16 @@ } ] }, + "otel": { + "anyOf": [ + { + "$ref": "#/definitions/OtelRequirements" + }, + { + "type": "null" + } + ] + }, "sqliteHome": { "type": [ "string", @@ -1138,6 +1148,211 @@ }, "type": "object" }, + "OtelExporter": { + "oneOf": [ + { + "enum": [ + "none", + "statsig" + ], + "type": "string" + }, + { + "additionalProperties": false, + "properties": { + "otlp-http": { + "properties": { + "endpoint": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Exporter request headers.", + "type": "object" + }, + "protocol": { + "$ref": "#/definitions/OtelHttpProtocol" + }, + "tls": { + "anyOf": [ + { + "$ref": "#/definitions/OtelTlsConfig" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "endpoint", + "headers", + "protocol" + ], + "type": "object" + } + }, + "required": [ + "otlp-http" + ], + "title": "OtlpHttpOtelExporter", + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "otlp-grpc": { + "properties": { + "endpoint": { + "type": "string" + }, + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "Exporter request headers.", + "type": "object" + }, + "tls": { + "anyOf": [ + { + "$ref": "#/definitions/OtelTlsConfig" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "endpoint", + "headers" + ], + "type": "object" + } + }, + "required": [ + "otlp-grpc" + ], + "title": "OtlpGrpcOtelExporter", + "type": "object" + } + ] + }, + "OtelHttpProtocol": { + "enum": [ + "binary", + "json" + ], + "type": "string" + }, + "OtelRequirements": { + "properties": { + "environment": { + "type": [ + "string", + "null" + ] + }, + "exporter": { + "anyOf": [ + { + "$ref": "#/definitions/OtelExporter" + }, + { + "type": "null" + } + ] + }, + "log_agent_responses": { + "type": [ + "boolean", + "null" + ] + }, + "log_guardian_assessments": { + "type": [ + "boolean", + "null" + ] + }, + "log_user_prompt": { + "type": [ + "boolean", + "null" + ] + }, + "metrics_exporter": { + "anyOf": [ + { + "$ref": "#/definitions/OtelExporter" + }, + { + "type": "null" + } + ] + }, + "tool_result": { + "anyOf": [ + { + "$ref": "#/definitions/OtelToolResultLogConfig" + }, + { + "type": "null" + } + ] + }, + "trace_exporter": { + "anyOf": [ + { + "$ref": "#/definitions/OtelExporter" + }, + { + "type": "null" + } + ] + } + }, + "type": "object" + }, + "OtelTlsConfig": { + "properties": { + "ca-certificate": { + "type": [ + "string", + "null" + ] + }, + "client-certificate": { + "type": [ + "string", + "null" + ] + }, + "client-private-key": { + "type": [ + "string", + "null" + ] + } + }, + "type": "object" + }, + "OtelToolResultLogConfig": { + "properties": { + "max_bytes": { + "format": "uint", + "minimum": 0.0, + "type": "integer" + } + }, + "required": [ + "max_bytes" + ], + "type": "object" + }, "ReasoningEffort": { "description": "A non-empty reasoning effort value advertised by the model.", "minLength": 1, 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 22316631ce..9920c48d60 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 73e21e8ce4..972259a204 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/ConfigRequirements.ts b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigRequirements.ts index c8e40d1541..c9cf1cfe53 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/ConfigRequirements.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/ConfigRequirements.ts @@ -13,6 +13,7 @@ import type { ComputerUseRequirements } from "./ComputerUseRequirements"; import type { FeedbackRequirements } from "./FeedbackRequirements"; import type { InAppBrowserRequirements } from "./InAppBrowserRequirements"; import type { ModelsRequirements } from "./ModelsRequirements"; +import type { OtelRequirements } from "./OtelRequirements"; import type { ResidencyRequirement } from "./ResidencyRequirement"; import type { SandboxMode } from "./SandboxMode"; import type { WindowsSandboxImplementation } from "./WindowsSandboxImplementation"; @@ -27,4 +28,4 @@ modelProviders: { [key in string]?: JsonValue } | null, /** * Effective login methods after managed, forced-login, and workspace restrictions. * An empty list permits no login method. Older servers may omit this field. */ -allowedLoginMethods: Array | null, cliAuthCredentialsStore: CliAuthCredentialsStoreMode | null, chatgptBaseUrl: string | null, additionalDeveloperInstructions: string | null, allowedApprovalPolicies: Array | null, allowedSandboxModes: Array | null, allowedWindowsSandboxImplementations: Array | null, allowedPermissionProfiles: { [key in string]?: boolean } | null, defaultPermissions: string | null, allowedWebSearchModes: Array | null, allowManagedHooksOnly: boolean | null, allowBrowserAndComputerUse: boolean | null, allowAppshots: boolean | null, allowRemoteControl: boolean | null, computerUse: ComputerUseRequirements | null, browserUse: BrowserUseRequirements | null, inAppBrowser: InAppBrowserRequirements | null, featureRequirements: { [key in string]?: boolean } | null, enforceResidency: ResidencyRequirement | null, autoReview: AutoReviewRequirements | null, models: ModelsRequirements | null, sqliteHome: PathUri | null, logDir: PathUri | null, modelCatalogJson: PathUri | null, checkForUpdateOnStartup: boolean | null, allowLoginShell: boolean | null, feedback: FeedbackRequirements | null}; +allowedLoginMethods: Array | null, cliAuthCredentialsStore: CliAuthCredentialsStoreMode | null, chatgptBaseUrl: string | null, additionalDeveloperInstructions: string | null, allowedApprovalPolicies: Array | null, allowedSandboxModes: Array | null, allowedWindowsSandboxImplementations: Array | null, allowedPermissionProfiles: { [key in string]?: boolean } | null, defaultPermissions: string | null, allowedWebSearchModes: Array | null, allowManagedHooksOnly: boolean | null, allowBrowserAndComputerUse: boolean | null, allowAppshots: boolean | null, allowRemoteControl: boolean | null, computerUse: ComputerUseRequirements | null, browserUse: BrowserUseRequirements | null, inAppBrowser: InAppBrowserRequirements | null, featureRequirements: { [key in string]?: boolean } | null, enforceResidency: ResidencyRequirement | null, autoReview: AutoReviewRequirements | null, models: ModelsRequirements | null, sqliteHome: PathUri | null, logDir: PathUri | null, modelCatalogJson: PathUri | null, checkForUpdateOnStartup: boolean | null, allowLoginShell: boolean | null, feedback: FeedbackRequirements | null, otel: OtelRequirements | null}; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/OtelExporter.ts b/codex-rs/app-server-protocol/schema/typescript/v2/OtelExporter.ts new file mode 100644 index 0000000000..bc0df2c2c7 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/OtelExporter.ts @@ -0,0 +1,15 @@ +// 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 { OtelHttpProtocol } from "./OtelHttpProtocol"; +import type { OtelTlsConfig } from "./OtelTlsConfig"; + +export type OtelExporter = "none" | "statsig" | { "otlp-http": { endpoint: string, +/** + * Exporter request headers. + */ +headers: { [key in string]?: string }, protocol: OtelHttpProtocol, tls: OtelTlsConfig | null, } } | { "otlp-grpc": { endpoint: string, +/** + * Exporter request headers. + */ +headers: { [key in string]?: string }, tls: OtelTlsConfig | null, } }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/OtelHttpProtocol.ts b/codex-rs/app-server-protocol/schema/typescript/v2/OtelHttpProtocol.ts new file mode 100644 index 0000000000..dc24d2e226 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/OtelHttpProtocol.ts @@ -0,0 +1,5 @@ +// 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. + +export type OtelHttpProtocol = "binary" | "json"; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/OtelRequirements.ts b/codex-rs/app-server-protocol/schema/typescript/v2/OtelRequirements.ts new file mode 100644 index 0000000000..6b1fa9d6bc --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/OtelRequirements.ts @@ -0,0 +1,7 @@ +// 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 { OtelExporter } from "./OtelExporter"; +import type { OtelToolResultLogConfig } from "./OtelToolResultLogConfig"; + +export type OtelRequirements = { tool_result: OtelToolResultLogConfig | null, log_user_prompt: boolean | null, log_agent_responses: boolean | null, log_guardian_assessments: boolean | null, environment: string | null, exporter: OtelExporter | null, trace_exporter: OtelExporter | null, metrics_exporter: OtelExporter | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/OtelTlsConfig.ts b/codex-rs/app-server-protocol/schema/typescript/v2/OtelTlsConfig.ts new file mode 100644 index 0000000000..db35d2cc0c --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/OtelTlsConfig.ts @@ -0,0 +1,5 @@ +// 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. + +export type OtelTlsConfig = { "ca-certificate": string | null, "client-certificate": string | null, "client-private-key": string | null, }; diff --git a/codex-rs/app-server-protocol/schema/typescript/v2/OtelToolResultLogConfig.ts b/codex-rs/app-server-protocol/schema/typescript/v2/OtelToolResultLogConfig.ts new file mode 100644 index 0000000000..61c6c2f4c4 --- /dev/null +++ b/codex-rs/app-server-protocol/schema/typescript/v2/OtelToolResultLogConfig.ts @@ -0,0 +1,5 @@ +// 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. + +export type OtelToolResultLogConfig = { max_bytes: number, }; 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 c36b59f3e3..3a130bde44 100644 --- a/codex-rs/app-server-protocol/schema/typescript/v2/index.ts +++ b/codex-rs/app-server-protocol/schema/typescript/v2/index.ts @@ -348,6 +348,11 @@ export type { NetworkRequirements } from "./NetworkRequirements"; export type { NetworkUnixSocketPermission } from "./NetworkUnixSocketPermission"; export type { NewThreadModelDefaults } from "./NewThreadModelDefaults"; export type { NonSteerableTurnKind } from "./NonSteerableTurnKind"; +export type { OtelExporter } from "./OtelExporter"; +export type { OtelHttpProtocol } from "./OtelHttpProtocol"; +export type { OtelRequirements } from "./OtelRequirements"; +export type { OtelTlsConfig } from "./OtelTlsConfig"; +export type { OtelToolResultLogConfig } from "./OtelToolResultLogConfig"; export type { OverriddenMetadata } from "./OverriddenMetadata"; export type { PatchApplyStatus } from "./PatchApplyStatus"; export type { PatchChangeKind } from "./PatchChangeKind"; diff --git a/codex-rs/app-server-protocol/src/protocol/v2/config.rs b/codex-rs/app-server-protocol/src/protocol/v2/config.rs index f88df60376..c8364ae2e5 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/config.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/config.rs @@ -456,6 +456,7 @@ pub struct ConfigRequirements { pub check_for_update_on_startup: Option, pub allow_login_shell: Option, pub feedback: Option, + pub otel: Option, } #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)] @@ -499,6 +500,65 @@ pub struct FeedbackRequirements { pub enabled: Option, } +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "snake_case")] +#[ts(export_to = "v2/")] +pub struct OtelRequirements { + pub tool_result: Option, + pub log_user_prompt: Option, + pub log_agent_responses: Option, + pub log_guardian_assessments: Option, + pub environment: Option, + pub exporter: Option, + pub trace_exporter: Option, + pub metrics_exporter: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "snake_case")] +#[ts(export_to = "v2/")] +pub struct OtelToolResultLogConfig { + pub max_bytes: usize, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "kebab-case")] +#[ts(export_to = "v2/", rename_all = "kebab-case")] +pub enum OtelExporter { + None, + Statsig, + OtlpHttp { + endpoint: String, + /// Exporter request headers. + headers: HashMap, + protocol: OtelHttpProtocol, + tls: Option, + }, + OtlpGrpc { + endpoint: String, + /// Exporter request headers. + headers: HashMap, + tls: Option, + }, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "kebab-case")] +#[ts(export_to = "v2/", rename_all = "kebab-case")] +pub enum OtelHttpProtocol { + Binary, + Json, +} + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] +#[serde(rename_all = "kebab-case")] +#[ts(export_to = "v2/", rename_all = "kebab-case")] +pub struct OtelTlsConfig { + pub ca_certificate: Option, + pub client_certificate: Option, + pub client_private_key: Option, +} + #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)] #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] 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 c33bb6a634..4580410ea9 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2/tests.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2/tests.rs @@ -2226,6 +2226,7 @@ fn config_requirements_granular_allowed_approval_policy_is_marked_experimental() check_for_update_on_startup: None, allow_login_shell: None, feedback: None, + otel: None, }); assert_eq!(reason, Some("askForApproval.granular")); diff --git a/codex-rs/app-server/src/request_processors/config_processor.rs b/codex-rs/app-server/src/request_processors/config_processor.rs index 3726468eeb..dc8a3e02d7 100644 --- a/codex-rs/app-server/src/request_processors/config_processor.rs +++ b/codex-rs/app-server/src/request_processors/config_processor.rs @@ -591,6 +591,7 @@ pub(crate) fn map_requirements_to_api( service_tier: new_thread.service_tier, }), }), + otel: None, sqlite_home: requirements.sqlite_home.map(Into::into), log_dir: requirements.log_dir.map(Into::into), model_catalog_json: requirements.model_catalog_json.map(Into::into), diff --git a/sdk/python/src/openai_codex/generated/v2_all.py b/sdk/python/src/openai_codex/generated/v2_all.py index 8c265a7d2b..22c937d43f 100644 --- a/sdk/python/src/openai_codex/generated/v2_all.py +++ b/sdk/python/src/openai_codex/generated/v2_all.py @@ -2977,6 +2977,32 @@ class NullableGetAccountTokenUsageParams(RootModel[GetAccountTokenUsageParams | ] +class OtelExporterValue(Enum): + none = "none" + statsig = "statsig" + + +class OtelHttpProtocol(Enum): + binary = "binary" + json = "json" + + +class OtelTlsConfig(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + ca_certificate: Annotated[str | None, Field(alias="ca-certificate")] = None + client_certificate: Annotated[str | None, Field(alias="client-certificate")] = None + client_private_key: Annotated[str | None, Field(alias="client-private-key")] = None + + +class OtelToolResultLogConfig(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + max_bytes: Annotated[int, Field(ge=0)] + + class PatchApplyStatus(Enum): in_progress = "inProgress" completed = "completed" @@ -9126,6 +9152,59 @@ class NewThreadModelDefaults(BaseModel): service_tier: Annotated[str | None, Field(alias="serviceTier")] = None +class OtlpHttp(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + endpoint: str + headers: Annotated[dict[str, str], Field(description="Exporter request headers.")] + protocol: OtelHttpProtocol + tls: OtelTlsConfig | None = None + + +class OtlpHttpOtelExporter(BaseModel): + model_config = ConfigDict( + extra="forbid", + populate_by_name=True, + ) + otlp_http: Annotated[OtlpHttp, Field(alias="otlp-http")] + + +class OtlpGrpc(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + endpoint: str + headers: Annotated[dict[str, str], Field(description="Exporter request headers.")] + tls: OtelTlsConfig | None = None + + +class OtlpGrpcOtelExporter(BaseModel): + model_config = ConfigDict( + extra="forbid", + populate_by_name=True, + ) + otlp_grpc: Annotated[OtlpGrpc, Field(alias="otlp-grpc")] + + +class OtelExporter(RootModel[OtelExporterValue | OtlpHttpOtelExporter | OtlpGrpcOtelExporter]): + root: OtelExporterValue | OtlpHttpOtelExporter | OtlpGrpcOtelExporter + + +class OtelRequirements(BaseModel): + model_config = ConfigDict( + populate_by_name=True, + ) + environment: str | None = None + exporter: OtelExporter | None = None + log_agent_responses: bool | None = None + log_guardian_assessments: bool | None = None + log_user_prompt: bool | None = None + metrics_exporter: OtelExporter | None = None + tool_result: OtelToolResultLogConfig | None = None + trace_exporter: OtelExporter | None = None + + class OverriddenMetadata(BaseModel): model_config = ConfigDict( populate_by_name=True, @@ -12264,6 +12343,7 @@ class ConfigRequirements(BaseModel): ), ] = None models: ModelsRequirements | None = None + otel: OtelRequirements | None = None sqlite_home: Annotated[str | None, Field(alias="sqliteHome")] = None