refactor(permission-system): simplify policy and autoreview flow

This commit is contained in:
云服务部-叶林立
2026-09-03 02:01:06 +08:00
parent 180da95ab7
commit 6e7effa792
112 changed files with 911 additions and 10346 deletions
@@ -89,9 +89,8 @@ export interface ForwardedRequestServerDeps {
* judges a forwarded ask on the same evidence as a local one (ADR 0008; #635).
*
* The display `surface` and the fact `surface` are distinct and both belong
* here: the former is the child's tool name (what the UI shows), the latter the
* gate surface the rule fired on (what the bounded-delegation checkpoint
* excludes on).
* here: the former is the child's tool name (what the UI shows), while the
* latter preserves the gate surface as authorizer evidence.
*/
function buildForwardedAskDetails(
request: ForwardedPermissionRequest,
@@ -113,9 +112,8 @@ function buildForwardedAskDetails(
...(request.sessionApproval
? { sessionApproval: request.sessionApproval }
: {}),
// Absent for a version-skew request that carried no intent — which the
// delegation envelope reads as "surface undetermined" and fail-safes to
// excluded, so absence must stay absence rather than become `undefined`.
// Absent for a version-skew request that carried no access intent; preserve
// that absence rather than manufacturing authorizer evidence.
...(request.accessIntent
? { accessIntent: toAccessFacts(request.accessIntent) }
: {}),