fix: use canonical main session keys in apps
This commit is contained in:
@@ -245,6 +245,31 @@ public struct StateVersion: Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
public struct SessionDefaults: Codable, Sendable {
|
||||
public let defaultagentid: String
|
||||
public let mainkey: String
|
||||
public let mainsessionkey: String
|
||||
public let scope: String?
|
||||
|
||||
public init(
|
||||
defaultagentid: String,
|
||||
mainkey: String,
|
||||
mainsessionkey: String,
|
||||
scope: String?
|
||||
) {
|
||||
self.defaultagentid = defaultagentid
|
||||
self.mainkey = mainkey
|
||||
self.mainsessionkey = mainsessionkey
|
||||
self.scope = scope
|
||||
}
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case defaultagentid = "defaultAgentId"
|
||||
case mainkey = "mainKey"
|
||||
case mainsessionkey = "mainSessionKey"
|
||||
case scope
|
||||
}
|
||||
}
|
||||
|
||||
public struct Snapshot: Codable, Sendable {
|
||||
public let presence: [PresenceEntry]
|
||||
public let health: AnyCodable
|
||||
@@ -252,6 +277,7 @@ public struct Snapshot: Codable, Sendable {
|
||||
public let uptimems: Int
|
||||
public let configpath: String?
|
||||
public let statedir: String?
|
||||
public let sessiondefaults: SessionDefaults?
|
||||
|
||||
public init(
|
||||
presence: [PresenceEntry],
|
||||
@@ -259,7 +285,8 @@ public struct Snapshot: Codable, Sendable {
|
||||
stateversion: StateVersion,
|
||||
uptimems: Int,
|
||||
configpath: String?,
|
||||
statedir: String?
|
||||
statedir: String?,
|
||||
sessiondefaults: SessionDefaults?
|
||||
) {
|
||||
self.presence = presence
|
||||
self.health = health
|
||||
@@ -267,6 +294,7 @@ public struct Snapshot: Codable, Sendable {
|
||||
self.uptimems = uptimems
|
||||
self.configpath = configpath
|
||||
self.statedir = statedir
|
||||
self.sessiondefaults = sessiondefaults
|
||||
}
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case presence
|
||||
@@ -275,6 +303,7 @@ public struct Snapshot: Codable, Sendable {
|
||||
case uptimems = "uptimeMs"
|
||||
case configpath = "configPath"
|
||||
case statedir = "stateDir"
|
||||
case sessiondefaults = "sessionDefaults"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user