Represent terminal input in approval reviews (#40528)

## What changed

- Add a `writeStdin` Guardian action carrying the approval, process, input, and working-directory details.
- Distinguish `command` and `writeStdin` execution approval requests while defaulting missing kinds to `command` for compatibility with older events.
- Render terminal-input review progress, denials, timeouts, and retry actions in the TUI, and record the action separately in analytics.
- Keep terminal-input reviews as child approvals so they do not change the parent command item's lifecycle or reconstructed history.

## Testing

- Cover Guardian serialization, app-server protocol conversion, command history reconstruction, analytics classification, and TUI review flows for terminal input.

GitOrigin-RevId: b083d5e2963bdd23b928644ec03c7eb68ebf2950
This commit is contained in:
Dylan Hurd authored and copyberry committed 2026-08-25 03:08:33 +00:00
1 parent a7b86b6201
commit 9c9675d3d0
51 files changed
+833 -26

No files matched your search

@@ -612,6 +612,7 @@ pub(crate) async fn apply_bespoke_event_handling(
.map(CommandExecutionApprovalDecision::from)
.collect::<Vec<_>>();
let ExecApprovalRequestEvent {
kind,
call_id,
plugin_id,
script_path,
@@ -697,6 +698,7 @@ pub(crate) async fn apply_bespoke_event_handling(
additional_permissions.map(V2AdditionalPermissionProfile::from);
let params = CommandExecutionRequestApprovalParams {
kind: kind.into(),
thread_id: conversation_id.to_string(),
turn_id: turn_id.clone(),
item_id: call_id.clone(),