fix(macos): restore swift test build

This commit is contained in:
Peter Steinberger
2026-01-01 11:04:47 +01:00
parent 3addd3420b
commit 1a539b9830
2 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
@_exported import Logging
import Foundation
import OSLog
import os
typealias Logger = Logging.Logger
@@ -96,7 +97,7 @@ extension Logger.Message.StringInterpolation {
}
struct ClawdisOSLogHandler: LogHandler {
private let osLogger: OSLog.Logger
private let osLogger: os.Logger
var metadata: Logger.Metadata = [:]
var logLevel: Logger.Level {
@@ -105,7 +106,7 @@ struct ClawdisOSLogHandler: LogHandler {
}
init(subsystem: String, category: String) {
self.osLogger = OSLog.Logger(subsystem: subsystem, category: category)
self.osLogger = os.Logger(subsystem: subsystem, category: category)
}
subscript(metadataKey key: String) -> Logger.Metadata.Value? {

View File

@@ -9,7 +9,10 @@ import Testing
presence: [],
health: ClawdisProtocol.AnyCodable(["ok": ClawdisProtocol.AnyCodable(false)]),
stateversion: StateVersion(presence: 1, health: 1),
uptimems: 123)
uptimems: 123,
configpath: nil,
statedir: nil)
let hello = HelloOk(
type: "hello",
_protocol: 2,
@@ -55,7 +58,7 @@ import Testing
}
@Test func chatEventMapsToChat() {
let payload: ClawdisProtocol.AnyCodable = ClawdisProtocol.AnyCodable([
let payload = ClawdisProtocol.AnyCodable([
"runId": ClawdisProtocol.AnyCodable("run-1"),
"sessionKey": ClawdisProtocol.AnyCodable("main"),
"state": ClawdisProtocol.AnyCodable("final"),