The Swift Package Index logo.Swift Package Index

Build Information

Successful build of LiveAndAiChat, reference main (7316ff), with Swift 6.1 for macOS (SPM) on 7 Nov 2026 21:46:36 UTC.

Swift 6 data race errors: 8

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures

Build Log

  9 | /// Audio session category is `.ambient` so playback respects the user's
 10 | /// silent-mode switch and never ducks other audio.
 11 | public final class NotificationTone {
    |                    `- note: class 'NotificationTone' does not conform to the 'Sendable' protocol
 12 |
 13 |     public static let shared = NotificationTone()
    |                       |- warning: static property 'shared' is not concurrency-safe because non-'Sendable' type 'NotificationTone' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'shared' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 14 |
 15 |     public var isEnabled: Bool = true
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Audio/NotificationTone.swift:32:13: warning: capture of 'self' with non-sendable type 'NotificationTone?' in a '@Sendable' closure
  9 | /// Audio session category is `.ambient` so playback respects the user's
 10 | /// silent-mode switch and never ducks other audio.
 11 | public final class NotificationTone {
    |                    `- note: class 'NotificationTone' does not conform to the 'Sendable' protocol
 12 |
 13 |     public static let shared = NotificationTone()
    :
 30 |         guard isEnabled else { return }
 31 |         queue.async { [weak self] in
 32 |             self?.playInternal()
    |             `- warning: capture of 'self' with non-sendable type 'NotificationTone?' in a '@Sendable' closure
 33 |         }
 34 |     }
[36/48] Compiling LiveAndAiChat ConnectionState.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Diagnostics/DiagnosticLog.swift:16:24: warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 |     private static let lock = NSLock()
16 |     private static var _handler: Handler?
   |                        |- warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert '_handler' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: add '@MainActor' to make static property '_handler' part of global actor 'MainActor'
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 |     /// Install (or remove) the global diagnostic log handler. Passing
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 686 |         }
 687 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:215:9: warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 213 |         // calling destroy() explicitly. As a defensive measure, stop the
 214 |         // network monitor (safe from any thread).
 215 |         networkMonitor.stop()
     |         `- warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 216 |     }
 217 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/NetworkMonitor.swift:11:13: note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
 9 | /// Mirrors Android's `NetworkMonitor` semantics: `isOnline` only flips
10 | /// true when the path is satisfied AND not expensive-only / unsatisfied.
11 | final class NetworkMonitor: ObservableObject {
   |             `- note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
12 |     @Published private(set) var isOnline: Bool = true
13 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                               `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated value of non-Sendable type '[String : Any]' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'vars.some' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated value of non-Sendable type '(Double) -> Void' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated 'self.uploader' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                               `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                           `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 686 |         }
 687 |     }
[37/48] Compiling LiveAndAiChat DiagnosticLog.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Diagnostics/DiagnosticLog.swift:16:24: warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 |     private static let lock = NSLock()
16 |     private static var _handler: Handler?
   |                        |- warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert '_handler' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: add '@MainActor' to make static property '_handler' part of global actor 'MainActor'
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 |     /// Install (or remove) the global diagnostic log handler. Passing
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 686 |         }
 687 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:215:9: warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 213 |         // calling destroy() explicitly. As a defensive measure, stop the
 214 |         // network monitor (safe from any thread).
 215 |         networkMonitor.stop()
     |         `- warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 216 |     }
 217 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/NetworkMonitor.swift:11:13: note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
 9 | /// Mirrors Android's `NetworkMonitor` semantics: `isOnline` only flips
10 | /// true when the path is satisfied AND not expensive-only / unsatisfied.
11 | final class NetworkMonitor: ObservableObject {
   |             `- note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
12 |     @Published private(set) var isOnline: Bool = true
13 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                               `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated value of non-Sendable type '[String : Any]' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'vars.some' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated value of non-Sendable type '(Double) -> Void' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated 'self.uploader' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                               `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                           `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 686 |         }
 687 |     }
[38/48] Compiling LiveAndAiChat Haptics.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Diagnostics/DiagnosticLog.swift:16:24: warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 |     private static let lock = NSLock()
16 |     private static var _handler: Handler?
   |                        |- warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert '_handler' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: add '@MainActor' to make static property '_handler' part of global actor 'MainActor'
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 |     /// Install (or remove) the global diagnostic log handler. Passing
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 686 |         }
 687 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:215:9: warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 213 |         // calling destroy() explicitly. As a defensive measure, stop the
 214 |         // network monitor (safe from any thread).
 215 |         networkMonitor.stop()
     |         `- warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 216 |     }
 217 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/NetworkMonitor.swift:11:13: note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
 9 | /// Mirrors Android's `NetworkMonitor` semantics: `isOnline` only flips
10 | /// true when the path is satisfied AND not expensive-only / unsatisfied.
11 | final class NetworkMonitor: ObservableObject {
   |             `- note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
12 |     @Published private(set) var isOnline: Bool = true
13 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                               `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated value of non-Sendable type '[String : Any]' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'vars.some' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated value of non-Sendable type '(Double) -> Void' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated 'self.uploader' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                               `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                           `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 686 |         }
 687 |     }
[39/48] Compiling LiveAndAiChat LiveAndAiChat.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Diagnostics/DiagnosticLog.swift:16:24: warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 |     private static let lock = NSLock()
16 |     private static var _handler: Handler?
   |                        |- warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert '_handler' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: add '@MainActor' to make static property '_handler' part of global actor 'MainActor'
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 |     /// Install (or remove) the global diagnostic log handler. Passing
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 686 |         }
 687 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:215:9: warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 213 |         // calling destroy() explicitly. As a defensive measure, stop the
 214 |         // network monitor (safe from any thread).
 215 |         networkMonitor.stop()
     |         `- warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 216 |     }
 217 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/NetworkMonitor.swift:11:13: note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
 9 | /// Mirrors Android's `NetworkMonitor` semantics: `isOnline` only flips
10 | /// true when the path is satisfied AND not expensive-only / unsatisfied.
11 | final class NetworkMonitor: ObservableObject {
   |             `- note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
12 |     @Published private(set) var isOnline: Bool = true
13 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                               `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated value of non-Sendable type '[String : Any]' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'vars.some' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated value of non-Sendable type '(Double) -> Void' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated 'self.uploader' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                               `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                           `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 686 |         }
 687 |     }
[40/48] Compiling LiveAndAiChat LiveAndAiChatConfig.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Diagnostics/DiagnosticLog.swift:16:24: warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
14 |
15 |     private static let lock = NSLock()
16 |     private static var _handler: Handler?
   |                        |- warning: static property '_handler' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
   |                        |- note: convert '_handler' to a 'let' constant to make 'Sendable' shared state immutable
   |                        |- note: add '@MainActor' to make static property '_handler' part of global actor 'MainActor'
   |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
17 |
18 |     /// Install (or remove) the global diagnostic log handler. Passing
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 686 |         }
 687 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      `- warning: non-sendable result type '[String : Any]' cannot be sent from nonisolated context in call to instance method 'execute(query:variables:operationName:)'; this is an error in the Swift 6 language mode
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:215:9: warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 213 |         // calling destroy() explicitly. As a defensive measure, stop the
 214 |         // network monitor (safe from any thread).
 215 |         networkMonitor.stop()
     |         `- warning: cannot access property 'networkMonitor' with a non-sendable type 'NetworkMonitor' from nonisolated deinit; this is an error in the Swift 6 language mode
 216 |     }
 217 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/NetworkMonitor.swift:11:13: note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
 9 | /// Mirrors Android's `NetworkMonitor` semantics: `isOnline` only flips
10 | /// true when the path is satisfied AND not expensive-only / unsatisfied.
11 | final class NetworkMonitor: ObservableObject {
   |             `- note: class 'NetworkMonitor' does not conform to the 'Sendable' protocol
12 |     @Published private(set) var isOnline: Bool = true
13 |
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:163:42: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 161 |         self.store = ChatStore(
 162 |             fetchConversation: { conversationId in
 163 |                 let data = try await gql.execute(
     |                                          |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 164 |                     query: Operations.getConversationState,
 165 |                     variables: ["conversationId": conversationId]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:177:31: warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
 175 |                 if let score { vars["score"] = score }
 176 |                 if let comment { vars["comment"] = comment }
 177 |                 try await gql.execute(query: Operations.rateConversation, variables: vars)
     |                               |- warning: sending 'gql' risks causing data races; this is an error in the Swift 6 language mode
     |                               `- note: sending main actor-isolated 'gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 178 |             }
 179 |         )
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:736:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 734 |
 735 |     private func fetchBootstrap() async {
 736 |         guard let data = try? await gql.execute(query: Operations.getLiveChatBootstrap),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 737 |               let node = data["getLiveChatBootstrap"]
 738 |         else { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:819:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 817 |
 818 |     private func loadInitialHistory(conversationId: String) async {
 819 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 820 |             query: Operations.getMessages,
 821 |             variables: ["conversationId": conversationId, "limit": 200]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:771:42: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 769 |         if let savedConv = session.conversationId {
 770 |             // Hydrate existing conversation, then load message history.
 771 |             if let data = try? await gql.execute(
     |                                          |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                          `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 772 |                 query: Operations.getConversationState,
 773 |                 variables: ["conversationId": savedConv]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending value of non-Sendable type '[String : Any]' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated value of non-Sendable type '[String : Any]' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:786:34: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 784 |
 785 |         // Fresh init.
 786 |         let data = try await gql.execute(query: Operations.initChat, variables: ["input": initChatInput()])
     |                                  |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                  `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 787 |         guard let result = data["initCsAiChat"] as? [String: Any],
 788 |               let convId = result["conversationId"] as? String, !convId.isEmpty
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:743:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 741 |
 742 |     private func fetchOrgConfig() async {
 743 |         guard let data = try? await gql.execute(query: Operations.getCsConfig),
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 744 |               let node = data["getCsConfig"],
 745 |               let cfg = try? GqlClient.decode(OrgChatConfig.self, from: node)
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'vars.some' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'vars.some' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:1148:38: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
1146 |                 }
1147 |             }
1148 |             let data = try await gql.execute(query: Operations.sendMessage, variables: vars)
     |                                      |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
1149 |             guard let payload = data["sendCsCustomerMessage"] as? [String: Any] else { return }
1150 |             if let echo = payload["customerMessage"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending value of non-Sendable type '(Double) -> Void' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated value of non-Sendable type '(Double) -> Void' to nonisolated callee risks causing races in between main actor-isolated and nonisolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:496:57: warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
 494 |                     self.notifyAttachment(itemId)
 495 |                 }
 496 |                 let publicUrl = try await self.uploader.upload(
     |                                                         |- warning: sending 'self.uploader' risks causing data races; this is an error in the Swift 6 language mode
     |                                                         `- note: sending main actor-isolated 'self.uploader' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 497 |                     data: resolved.data,
 498 |                     name: resolved.name,
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:638:47: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 636 |                 var vars: [String: Any] = ["conversationId": convId]
 637 |                 if let r = reason, !r.isEmpty { vars["reason"] = r }
 638 |                 let data = try await self.gql.execute(query: Operations.requestHandoff, variables: vars)
     |                                               |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                               `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 639 |                 guard let payload = data["requestCsHandoff"] as? [String: Any],
 640 |                       let assignmentDict = payload["assignment"] as? [String: Any],
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:663:27: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 661 |         }
 662 |         do {
 663 |             try await gql.execute(query: Operations.answerElicitation, variables: vars)
     |                           |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                           `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 664 |         } catch {
 665 |             if let e = error as? LiveAndAiChatError { emitError(e) }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:871:41: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 869 |
 870 |         SseLog.debug("gap-fill fetching getCsMessages for conv=\(conversationId.suffix(8))")
 871 |         guard let data = try? await gql.execute(
     |                                         |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                         `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 872 |             query: Operations.getMessages,
 873 |             variables: ["conversationId": conversationId, "limit": 500]
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:677:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 675 |             var vars: [String: Any] = ["conversationId": convId]
 676 |             if let name = self.user?.customerName { vars["userName"] = name }
 677 |             _ = try? await self.gql.execute(query: Operations.sendTypingStart, variables: vars)
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 678 |         }
 679 |     }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/LiveAndAiChat.swift:685:37: warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
 683 |         Task { [weak self] in
 684 |             guard let self else { return }
 685 |             _ = try? await self.gql.execute(query: Operations.sendTypingStop, variables: ["conversationId": convId])
     |                                     |- warning: sending 'self.gql' risks causing data races; this is an error in the Swift 6 language mode
     |                                     `- note: sending main actor-isolated 'self.gql' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 686 |         }
 687 |     }
[41/48] Compiling LiveAndAiChat ChatScreen.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:57:23: warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
 55 |     /// Spec-default light palette — matches the JSON in the user-facing
 56 |     /// spec and the gql-server `appearanceDefaults.ts`.
 57 |     public static let lightDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'lightDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 58 |         primary: hex("#9333EA"),
 59 |         background: hex("#F7F7FB"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:103:23: warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
101 |     /// for backgrounds, brand purple slightly desaturated to reduce
102 |     /// eye strain at low ambient brightness, near-white text.
103 |     public static let darkDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'darkDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 |         primary: hex("#A855F7"),
105 |         background: hex("#0F0F14"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:232:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
230 |
231 | private struct ChatColorsKey: EnvironmentKey {
232 |     static let defaultValue: ChatColors = .lightDefault
    |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
233 | }
234 |
[42/48] Compiling LiveAndAiChat ChatTheme.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:57:23: warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
 55 |     /// Spec-default light palette — matches the JSON in the user-facing
 56 |     /// spec and the gql-server `appearanceDefaults.ts`.
 57 |     public static let lightDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'lightDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 58 |         primary: hex("#9333EA"),
 59 |         background: hex("#F7F7FB"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:103:23: warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
101 |     /// for backgrounds, brand purple slightly desaturated to reduce
102 |     /// eye strain at low ambient brightness, near-white text.
103 |     public static let darkDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'darkDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 |         primary: hex("#A855F7"),
105 |         background: hex("#0F0F14"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:232:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
230 |
231 | private struct ChatColorsKey: EnvironmentKey {
232 |     static let defaultValue: ChatColors = .lightDefault
    |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
233 | }
234 |
[43/48] Compiling LiveAndAiChat ChatThemeOverride.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:57:23: warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
 55 |     /// Spec-default light palette — matches the JSON in the user-facing
 56 |     /// spec and the gql-server `appearanceDefaults.ts`.
 57 |     public static let lightDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'lightDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 58 |         primary: hex("#9333EA"),
 59 |         background: hex("#F7F7FB"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:103:23: warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
101 |     /// for backgrounds, brand purple slightly desaturated to reduce
102 |     /// eye strain at low ambient brightness, near-white text.
103 |     public static let darkDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'darkDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 |         primary: hex("#A855F7"),
105 |         background: hex("#0F0F14"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:232:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
230 |
231 | private struct ChatColorsKey: EnvironmentKey {
232 |     static let defaultValue: ChatColors = .lightDefault
    |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
233 | }
234 |
[44/48] Compiling LiveAndAiChat Composer.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:57:23: warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
 55 |     /// Spec-default light palette — matches the JSON in the user-facing
 56 |     /// spec and the gql-server `appearanceDefaults.ts`.
 57 |     public static let lightDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'lightDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'lightDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 58 |         primary: hex("#9333EA"),
 59 |         background: hex("#F7F7FB"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:103:23: warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
101 |     /// for backgrounds, brand purple slightly desaturated to reduce
102 |     /// eye strain at low ambient brightness, near-white text.
103 |     public static let darkDefault: ChatColors = ChatColors(
    |                       |- warning: static property 'darkDefault' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'darkDefault' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
104 |         primary: hex("#A855F7"),
105 |         background: hex("#0F0F14"),
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/UI/ChatTheme.swift:232:16: warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
  5 | /// the spec defaults so the UI looks right before the merchant config
  6 | /// resolves.
  7 | public struct ChatColors: Equatable {
    |               `- note: consider making struct 'ChatColors' conform to the 'Sendable' protocol
  8 |     public var primary: Color
  9 |     public var background: Color
    :
230 |
231 | private struct ChatColorsKey: EnvironmentKey {
232 |     static let defaultValue: ChatColors = .lightDefault
    |                |- warning: static property 'defaultValue' is not concurrency-safe because non-'Sendable' type 'ChatColors' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'defaultValue' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
233 | }
234 |
[45/48] Compiling LiveAndAiChat SseSubscriptionClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:107:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
105 |     func start() {
106 |         queue.async { [weak self] in
107 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:118:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
116 |     func stop() {
117 |         queue.async { [weak self] in
118 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
119 |             self.stopped = true
120 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:316:27: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
314 |         await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
315 |             queue.async { [weak self] in
316 |                 guard let self else {
    |                           `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
317 |                     cont.resume()
318 |                     return
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:344:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
342 |     private func onStreamOpened() {
343 |         queue.async { [weak self] in
344 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
345 |             self.attempts = 0
346 |             self.lastEventAt = Date()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:430:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
428 |     private func onStreamClosed() {
429 |         queue.async { [weak self] in
430 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
431 |             SseLog.debug("stream CLOSED (stopped=\(self.stopped))")
432 |             self.eventSource = nil
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:158:16: warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
156 |     }
157 |
158 |     static let connectionInitFrame: [String: Any] = ["type": "connection_init", "payload": [String: Any]()]
    |                |- warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'connectionInitFrame' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
159 |
160 |     private func openWs() {
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:82:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 80 |     func start() {
 81 |         queue.async { [weak self] in
 82 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:93:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 91 |     func stop() {
 92 |         queue.async { [weak self] in
 93 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 94 |             self.stopped = true
 95 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:172:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
170 |         guard let t = task else { return }
171 |         t.receive { [weak self] result in
172 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
173 |             switch result {
174 |             case .failure:
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:110:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
110 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
111 |                 await self?.connectLoop()
112 |             }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:85:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
 85 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
 86 |                 await self?.connectLoop()
 87 |             }
[46/48] Compiling LiveAndAiChat SubscriptionClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:107:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
105 |     func start() {
106 |         queue.async { [weak self] in
107 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:118:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
116 |     func stop() {
117 |         queue.async { [weak self] in
118 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
119 |             self.stopped = true
120 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:316:27: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
314 |         await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
315 |             queue.async { [weak self] in
316 |                 guard let self else {
    |                           `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
317 |                     cont.resume()
318 |                     return
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:344:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
342 |     private func onStreamOpened() {
343 |         queue.async { [weak self] in
344 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
345 |             self.attempts = 0
346 |             self.lastEventAt = Date()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:430:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
428 |     private func onStreamClosed() {
429 |         queue.async { [weak self] in
430 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
431 |             SseLog.debug("stream CLOSED (stopped=\(self.stopped))")
432 |             self.eventSource = nil
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:158:16: warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
156 |     }
157 |
158 |     static let connectionInitFrame: [String: Any] = ["type": "connection_init", "payload": [String: Any]()]
    |                |- warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'connectionInitFrame' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
159 |
160 |     private func openWs() {
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:82:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 80 |     func start() {
 81 |         queue.async { [weak self] in
 82 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:93:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 91 |     func stop() {
 92 |         queue.async { [weak self] in
 93 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 94 |             self.stopped = true
 95 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:172:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
170 |         guard let t = task else { return }
171 |         t.receive { [weak self] result in
172 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
173 |             switch result {
174 |             case .failure:
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:110:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
110 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
111 |                 await self?.connectLoop()
112 |             }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:85:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
 85 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
 86 |                 await self?.connectLoop()
 87 |             }
[47/48] Compiling LiveAndAiChat WsSubscriptionClient.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:107:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
105 |     func start() {
106 |         queue.async { [weak self] in
107 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:118:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
116 |     func stop() {
117 |         queue.async { [weak self] in
118 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
119 |             self.stopped = true
120 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:316:27: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
314 |         await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
315 |             queue.async { [weak self] in
316 |                 guard let self else {
    |                           `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
317 |                     cont.resume()
318 |                     return
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:344:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
342 |     private func onStreamOpened() {
343 |         queue.async { [weak self] in
344 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
345 |             self.attempts = 0
346 |             self.lastEventAt = Date()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:430:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
428 |     private func onStreamClosed() {
429 |         queue.async { [weak self] in
430 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
431 |             SseLog.debug("stream CLOSED (stopped=\(self.stopped))")
432 |             self.eventSource = nil
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:158:16: warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
156 |     }
157 |
158 |     static let connectionInitFrame: [String: Any] = ["type": "connection_init", "payload": [String: Any]()]
    |                |- warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'connectionInitFrame' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
159 |
160 |     private func openWs() {
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:82:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 80 |     func start() {
 81 |         queue.async { [weak self] in
 82 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:93:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 91 |     func stop() {
 92 |         queue.async { [weak self] in
 93 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 94 |             self.stopped = true
 95 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:172:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
170 |         guard let t = task else { return }
171 |         t.receive { [weak self] result in
172 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
173 |             switch result {
174 |             case .failure:
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:110:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
110 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
111 |                 await self?.connectLoop()
112 |             }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:85:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
 85 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
 86 |                 await self?.connectLoop()
 87 |             }
[48/48] Compiling LiveAndAiChat ChatPresenter.swift
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:107:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
105 |     func start() {
106 |         queue.async { [weak self] in
107 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:118:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
116 |     func stop() {
117 |         queue.async { [weak self] in
118 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
119 |             self.stopped = true
120 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:316:27: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
314 |         await withCheckedContinuation { (cont: CheckedContinuation<Void, Never>) in
315 |             queue.async { [weak self] in
316 |                 guard let self else {
    |                           `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
317 |                     cont.resume()
318 |                     return
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:344:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
342 |     private func onStreamOpened() {
343 |         queue.async { [weak self] in
344 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
345 |             self.attempts = 0
346 |             self.lastEventAt = Date()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:430:23: warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
 33 | /// API is near-identical (`addEventListener('next', ...)`, `close()`),
 34 | /// so the routing layer below can be mirrored exactly.
 35 | final class SseSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'SseSubscriptionClient' does not conform to the 'Sendable' protocol
 36 |
 37 |     // MARK: - Public surface
    :
428 |     private func onStreamClosed() {
429 |         queue.async { [weak self] in
430 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'SseSubscriptionClient?' in a '@Sendable' closure
431 |             SseLog.debug("stream CLOSED (stopped=\(self.stopped))")
432 |             self.eventSource = nil
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:158:16: warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
156 |     }
157 |
158 |     static let connectionInitFrame: [String: Any] = ["type": "connection_init", "payload": [String: Any]()]
    |                |- warning: static property 'connectionInitFrame' is not concurrency-safe because non-'Sendable' type '[String : Any]' may have shared mutable state; this is an error in the Swift 6 language mode
    |                |- note: add '@MainActor' to make static property 'connectionInitFrame' part of global actor 'MainActor'
    |                `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
159 |
160 |     private func openWs() {
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:82:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 80 |     func start() {
 81 |         queue.async { [weak self] in
 82 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:93:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
 91 |     func stop() {
 92 |         queue.async { [weak self] in
 93 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 94 |             self.stopped = true
 95 |             self.connectTask?.cancel()
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:172:23: warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
 29 | ///   - client → server: connection_init, subscribe, complete, ping
 30 | ///   - server → client: connection_ack, next, error, complete, ping, pong
 31 | final class WsSubscriptionClient: NSObject, SubscriptionClient {
    |             `- note: class 'WsSubscriptionClient' does not conform to the 'Sendable' protocol
 32 |
 33 |     private let _connectionState = CurrentValueSubject<ConnectionState, Never>(.idle)
    :
170 |         guard let t = task else { return }
171 |         t.receive { [weak self] result in
172 |             guard let self else { return }
    |                       `- warning: capture of 'self' with non-sendable type 'WsSubscriptionClient?' in a '@Sendable' closure
173 |             switch result {
174 |             case .failure:
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/SseSubscriptionClient.swift:110:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
108 |             if self.stopped { return }
109 |             if self.connectTask != nil { return }
110 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
111 |                 await self?.connectLoop()
112 |             }
/Users/admin/builder/spi-builder-workspace/Sources/LiveAndAiChat/Transport/WsSubscriptionClient.swift:85:37: warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
 83 |             if self.stopped { return }
 84 |             if self.connectTask != nil { return }
 85 |             self.connectTask = Task.detached { [weak self] in
    |                              |      |- warning: sending value of non-Sendable type '() async -> Void' risks causing data races; this is an error in the Swift 6 language mode
    |                              |      `- note: Passing value of non-Sendable type '() async -> Void' as a 'sending' argument risks causing races in between local and caller code
    |                              `- note: access can happen concurrently
 86 |                 await self?.connectLoop()
 87 |             }
Build complete! (10.89s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "LiveAndAiChat",
  "name" : "LiveAndAiChat",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "ios",
      "version" : "14.0"
    },
    {
      "name" : "macos",
      "version" : "11.0"
    }
  ],
  "products" : [
    {
      "name" : "LiveAndAiChat",
      "targets" : [
        "LiveAndAiChat"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "LiveAndAiChatTests",
      "module_type" : "SwiftTarget",
      "name" : "LiveAndAiChatTests",
      "path" : "Tests/LiveAndAiChatTests",
      "sources" : [
        "AttachmentSourceTests.swift",
        "AuthModeTests.swift",
        "BackoffTests.swift",
        "ChatCardLayoutTests.swift",
        "ChatStoreTests.swift",
        "ElicitationTests.swift",
        "HeaderGradientTests.swift",
        "LiveAndAiChatConfigTests.swift",
        "RatingStoreTests.swift",
        "SerializationTests.swift",
        "SseEventParserTests.swift",
        "StateForwardingTests.swift",
        "TitleCaseTests.swift"
      ],
      "target_dependencies" : [
        "LiveAndAiChat"
      ],
      "type" : "test"
    },
    {
      "c99name" : "LiveAndAiChat",
      "module_type" : "SwiftTarget",
      "name" : "LiveAndAiChat",
      "path" : "Sources/LiveAndAiChat",
      "product_memberships" : [
        "LiveAndAiChat"
      ],
      "sources" : [
        "AttachmentSource.swift",
        "Audio/NotificationTone.swift",
        "Caching/CachedAsyncImage.swift",
        "Caching/ImageCache.swift",
        "ChatCloseEvent.swift",
        "ConnectionState.swift",
        "Diagnostics/DiagnosticLog.swift",
        "Haptics/Haptics.swift",
        "LiveAndAiChat.swift",
        "LiveAndAiChatConfig.swift",
        "LiveAndAiChatError.swift",
        "Models/Bootstrap.swift",
        "Models/ChatMessage.swift",
        "Models/Conversation.swift",
        "Models/ElicitationValue.swift",
        "Models/OrgChatConfig.swift",
        "Operations/Operations.swift",
        "Session/SessionManager.swift",
        "Store/ChatStore.swift",
        "Transport/Backoff.swift",
        "Transport/ChatCredential.swift",
        "Transport/GqlClient.swift",
        "Transport/HTTP1EventSource.swift",
        "Transport/NetworkMonitor.swift",
        "Transport/SseEventParser.swift",
        "Transport/SseSubscriptionClient.swift",
        "Transport/SubscriptionClient.swift",
        "Transport/WsSubscriptionClient.swift",
        "UI/ChatPresenter.swift",
        "UI/ChatScreen.swift",
        "UI/ChatTheme.swift",
        "UI/ChatThemeOverride.swift",
        "UI/Composer.swift",
        "UI/ElicitationCard.swift",
        "UI/HeaderGradient.swift",
        "UI/ImageViewer.swift",
        "UI/MessageList.swift",
        "UI/MessageRow.swift",
        "UI/RatingCard.swift",
        "Upload/AttachmentQueue.swift",
        "Upload/AttachmentSourceResolver.swift",
        "Upload/FileUploader.swift",
        "Vendor/EventSource/LACEvent.swift",
        "Vendor/EventSource/LACEventSource.swift",
        "Vendor/EventSource/LACEventStreamParser.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.9"
}
Done.