---
title: "Cua Policy Diff"
method: POST
path: "/cua/policy/diff"
---

# Cua Policy Diff

`POST /cua/policy/diff`

## Request

- Base URL: `https://aihcc.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://aihcc.cloud/cua/policy/diff`
- Auth: none declared

本地策略预检：校验 + 与服务端默认策略 diff。纯规则、0 LLM、不占额度。

返回：ok / errors（未知字段、非法 regex、坏 whitelist_rules）/ summary（解析结果）
/ diff_vs_default（whitelist_apps 中不在服务端默认集 BENIGN_EDITOR_APPS 的项——
这些应用在路径 A /cua/classify 中不会被豁免，仍会显示「需确认」）。

## Request body

- CuaPolicyDiffRequest
  - `yaml_text` string, nullable
  - `policy` object, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/aihcc/apis/hallucc-api.md) · [All operations](https://skmtc.dev/aihcc/apis/hallucc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aihcc/apis/hallucc-api/revisions/5818dff6d4c6?raw)
