core: populate guardian parent ids for direct reviews

Populate parent tool item ids for direct guardian-reviewed tool actions while preserving distinct network approval review ids.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Charles Cunningham
2026-03-23 20:24:09 -07:00
co-authored by Codex
parent ecd19feeb4
commit e2494aeaa1
15 changed files with 65 additions and 23 deletions
+1 -1
View File
@@ -881,7 +881,7 @@ All items emit shared lifecycle events:
- `item/autoApprovalReview/started` — [UNSTABLE] temporary guardian notification carrying `{threadId, turnId, targetItemId, reviewId, parentToolItemId, review, action?}` when guardian approval review begins.
- `item/autoApprovalReview/completed` — [UNSTABLE] temporary guardian notification carrying `{threadId, turnId, targetItemId, reviewId, parentToolItemId, review, action?}` when guardian approval review resolves.
`review` is [UNSTABLE] and currently has `{status, riskScore?, riskLevel?, rationale?}`, where `status` is one of `inProgress`, `approved`, `denied`, or `aborted`. `action` is the guardian action summary payload from core when available and is intended to support temporary standalone pending-review UI. `reviewId` is the stable guardian review id for matching started/completed notifications. `targetItemId` is a deprecated alias for `reviewId` retained for backwards compatibility. `parentToolItemId` points at the reviewed parent tool item when app-server can attribute the review to one, including attributed `network_access` reviews. These notifications are separate from the target item's own `item/completed` lifecycle and are intentionally temporary while the guardian app protocol is still being designed.
`review` is [UNSTABLE] and currently has `{status, riskScore?, riskLevel?, rationale?}`, where `status` is one of `inProgress`, `approved`, `denied`, or `aborted`. `action` is the guardian action summary payload from core when available and is intended to support temporary standalone pending-review UI. `reviewId` is the stable guardian review id for matching started/completed notifications. `targetItemId` is a deprecated alias for `reviewId` retained for backwards compatibility. `parentToolItemId` points at the reviewed parent tool item; for direct tool reviews it matches `reviewId`, while attributed `network_access` reviews may point at a different parent item and can remain absent when attribution is unavailable. These notifications are separate from the target item's own `item/completed` lifecycle and are intentionally temporary while the guardian app protocol is still being designed.
There are additional item-specific events: