Files
codex-proxy-rs/backend/migrations/0026_codex_privacy_policy.sql
T
ZyyandCodex 78b2250faa feat(settings): add configurable Codex privacy policies (#375)
Add configurable privacy rules and shared previews for Codex metadata, Desktop context, request bodies and headers. Freeze policy per request and preserve atomic failure handling across HTTP and WebSocket transports.

Include settings presets, persistence, API contracts, migration and transport regressions.

Co-authored-by: Codex <noreply@openai.com>
2026-10-10 00:41:25 +08:00

12 lines
599 B
SQL

-- 隐私规则默认关闭,保留既有请求行为
alter table runtime_settings
add column codex_privacy_policy_json jsonb not null
default '{"enabled":false,"onError":"skip_rule","rules":[]}'::jsonb
check (
jsonb_typeof(codex_privacy_policy_json) = 'object'
and jsonb_typeof(codex_privacy_policy_json->'enabled') = 'boolean'
and codex_privacy_policy_json->>'onError' in ('skip_rule', 'reject_request')
and jsonb_typeof(codex_privacy_policy_json->'rules') = 'array'
and codex_privacy_policy_json ?& array['enabled', 'onError', 'rules']
);