Engine drives device.enableSpawnGating() per armed-session intent; matched spawns re-attach via the existing attach path and misses resume immediately. Engagement intent is in-memory only so launches don't auto-engage gating for sessions armed in a previous run. ProcessSession gains armingState and lastArmPattern, mirrored in the SQLite schema. RuntimeEvent.Source.spawnGating carries the captured/released outcome with wire encoding. Lab protocol adds update-arming as a SessionOp variant; armed-only sessions announce themselves with pid 0 and phase detached so peers can see them before any capture. Engine.onUserNotification surfaces gating-enable failures using the clean Frida.Error message.
30 lines
658 B
Swift
30 lines
658 B
Swift
import Foundation
|
|
|
|
public struct UserNotification: Sendable, Identifiable {
|
|
public enum Severity: String, Sendable {
|
|
case info
|
|
case warning
|
|
case error
|
|
}
|
|
|
|
public let id: UUID
|
|
public let severity: Severity
|
|
public let title: String
|
|
public let message: String?
|
|
public let timestamp: Date
|
|
|
|
public init(
|
|
id: UUID = UUID(),
|
|
severity: Severity,
|
|
title: String,
|
|
message: String? = nil,
|
|
timestamp: Date = .now
|
|
) {
|
|
self.id = id
|
|
self.severity = severity
|
|
self.title = title
|
|
self.message = message
|
|
self.timestamp = timestamp
|
|
}
|
|
}
|