input-capture: public init for PermissionState (app-engine request 1)

Cross-lane edit, authorised by the lead. The struct declared two public
lets and no init, so the memberwise one was internal and no other target
could build a value — `EngineSnapshot.permissions` had to default to
`Permissions.preflight()`, i.e. a TCC query, just to have a value to
hold. The default is now `PermissionState(listen: false, post: false)`,
which is also the honest value before `start()` has read anything.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
lucioandClaude Opus 5 committed 2026-09-16 03:57:27 -07:00
1 parent 8125cb1ede
commit 76d1053aaf
3 files changed
+16 -3

No files matched your search

+2 -1
View File
@@ -300,7 +300,8 @@ public final class Cursor: Sendable {
var isDecoupled: Bool { get }
func restoreEverything() // atexit / signal handler
}
public struct PermissionState: Equatable, Sendable { let listen, post: Bool; var isComplete: Bool }
public struct PermissionState: Equatable, Sendable { public init(listen: Bool, post: Bool)
let listen, post: Bool; var isComplete: Bool }
public enum Permissions {
static let healthCheckInterval: TimeInterval // 5
static func preflight() -> PermissionState