From f73b1de5bc729dd88f53b22260849e440609183d Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 14:48:38 -0700 Subject: [PATCH] Read App Intents Documentation Nucleic-Session: 56C5F781-4444-466B-91CE-A7734A8E117F Co-authored-by: Nucleic --- .../Shared/SessionActivityAttributes.swift | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/NucleicRemote/Shared/SessionActivityAttributes.swift b/NucleicRemote/Shared/SessionActivityAttributes.swift index 9809710..b352ef9 100644 --- a/NucleicRemote/Shared/SessionActivityAttributes.swift +++ b/NucleicRemote/Shared/SessionActivityAttributes.swift @@ -48,6 +48,30 @@ struct NucleicSessionAttributes: ActivityAttributes { /// A compact right-aligned status: its diff ("3 files +42 −7"), "2 to approve", /// "Waiting on you", "Working…", etc. var detail: String + /// The single most-urgent pending approval on this session, when it has one — the id the + /// inline Allow/Deny buttons resolve (`ApproveFromActivityIntent`). `nil` when the session + /// isn't blocked on an approval, or when the producer doesn't carry it (an older host, or a + /// summary that predates the field) — in which case the row falls back to a plain deep-link + /// tap, exactly as before. Optional so a host that omits it still decodes. + var approvalID: String? + /// Whether that approval is high-risk (destructive / network / host-exec). The surface hides + /// inline Allow on a high-risk request (§3.3) — only Deny / open-the-app is offered. `nil` + /// (treated as unknown → no inline Allow) when the producer doesn't carry it. + var approvalIsHighRisk: Bool? + + init( + id: String, title: String, project: String, backend: Backend, kind: Kind, + detail: String, approvalID: String? = nil, approvalIsHighRisk: Bool? = nil + ) { + self.id = id + self.title = title + self.project = project + self.backend = backend + self.kind = kind + self.detail = detail + self.approvalID = approvalID + self.approvalIsHighRisk = approvalIsHighRisk + } } struct ContentState: Codable, Hashable {