From eaeb52f70a1775aae7ca2d787a0758d10948d07e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 24 Jan 2026 11:27:55 +0000 Subject: [PATCH] chore: update protocol artifacts --- .../macos/Sources/ClawdbotProtocol/GatewayModels.swift | 4 ++++ .../Sources/ClawdbotProtocol/GatewayModels.swift | 4 ++++ src/infra/heartbeat-runner.ts | 10 ++-------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift b/apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift index eee403ec4..aef9a5e0e 100644 --- a/apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift +++ b/apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift @@ -964,6 +964,7 @@ public struct SessionsPreviewParams: Codable, Sendable { public struct SessionsResolveParams: Codable, Sendable { public let key: String? + public let sessionid: String? public let label: String? public let agentid: String? public let spawnedby: String? @@ -972,6 +973,7 @@ public struct SessionsResolveParams: Codable, Sendable { public init( key: String?, + sessionid: String?, label: String?, agentid: String?, spawnedby: String?, @@ -979,6 +981,7 @@ public struct SessionsResolveParams: Codable, Sendable { includeunknown: Bool? ) { self.key = key + self.sessionid = sessionid self.label = label self.agentid = agentid self.spawnedby = spawnedby @@ -987,6 +990,7 @@ public struct SessionsResolveParams: Codable, Sendable { } private enum CodingKeys: String, CodingKey { case key + case sessionid = "sessionId" case label case agentid = "agentId" case spawnedby = "spawnedBy" diff --git a/apps/shared/ClawdbotKit/Sources/ClawdbotProtocol/GatewayModels.swift b/apps/shared/ClawdbotKit/Sources/ClawdbotProtocol/GatewayModels.swift index eee403ec4..aef9a5e0e 100644 --- a/apps/shared/ClawdbotKit/Sources/ClawdbotProtocol/GatewayModels.swift +++ b/apps/shared/ClawdbotKit/Sources/ClawdbotProtocol/GatewayModels.swift @@ -964,6 +964,7 @@ public struct SessionsPreviewParams: Codable, Sendable { public struct SessionsResolveParams: Codable, Sendable { public let key: String? + public let sessionid: String? public let label: String? public let agentid: String? public let spawnedby: String? @@ -972,6 +973,7 @@ public struct SessionsResolveParams: Codable, Sendable { public init( key: String?, + sessionid: String?, label: String?, agentid: String?, spawnedby: String?, @@ -979,6 +981,7 @@ public struct SessionsResolveParams: Codable, Sendable { includeunknown: Bool? ) { self.key = key + self.sessionid = sessionid self.label = label self.agentid = agentid self.spawnedby = spawnedby @@ -987,6 +990,7 @@ public struct SessionsResolveParams: Codable, Sendable { } private enum CodingKeys: String, CodingKey { case key + case sessionid = "sessionId" case label case agentid = "agentId" case spawnedby = "spawnedBy" diff --git a/src/infra/heartbeat-runner.ts b/src/infra/heartbeat-runner.ts index 435193a0e..d02bcc581 100644 --- a/src/infra/heartbeat-runner.ts +++ b/src/infra/heartbeat-runner.ts @@ -501,9 +501,7 @@ export async function runHeartbeatOnce(opts: { return { status: "skipped", reason: "alerts-disabled" }; } - const heartbeatOkText = responsePrefix - ? `${responsePrefix} ${HEARTBEAT_TOKEN}` - : HEARTBEAT_TOKEN; + const heartbeatOkText = responsePrefix ? `${responsePrefix} ${HEARTBEAT_TOKEN}` : HEARTBEAT_TOKEN; const canAttemptHeartbeatOk = Boolean( visibility.showOk && delivery.channel !== "none" && delivery.to, ); @@ -559,11 +557,7 @@ export async function runHeartbeatOnce(opts: { } const ackMaxChars = resolveHeartbeatAckMaxChars(cfg, heartbeat); - const normalized = normalizeHeartbeatReply( - replyPayload, - responsePrefix, - ackMaxChars, - ); + const normalized = normalizeHeartbeatReply(replyPayload, responsePrefix, ackMaxChars); const shouldSkipMain = normalized.shouldSkip && !normalized.hasMedia; if (shouldSkipMain && reasoningPayloads.length === 0) { await restoreHeartbeatUpdatedAt({