The Swift Package Index logo.Swift Package Index

Build Information

Failed to build CopilotSDK, reference v2.5.3 (dd3448), with Swift 6.1 for macOS (SPM) on 22 Aug 2026 13:48:38 UTC.

Build Command

env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64

Build Log

========================================
RunAll
========================================
Builder version: 5.0.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/jeremiahjordanisaacson/copilot-sdk-supercharged.git
Reference: v2.5.3
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/jeremiahjordanisaacson/copilot-sdk-supercharged
 * tag               v2.5.3     -> FETCH_HEAD
HEAD is now at dd34489 chore: release v2.5.3
Updating files:  73% (3692/5007)
Updating files:  74% (3706/5007)
Updating files:  75% (3756/5007)
Updating files:  76% (3806/5007)
Updating files:  77% (3856/5007)
Updating files:  78% (3906/5007)
Updating files:  79% (3956/5007)
Updating files:  80% (4006/5007)
Updating files:  81% (4056/5007)
Updating files:  82% (4106/5007)
Updating files:  83% (4156/5007)
Updating files:  84% (4206/5007)
Updating files:  85% (4256/5007)
Updating files:  86% (4307/5007)
Updating files:  87% (4357/5007)
Updating files:  88% (4407/5007)
Updating files:  89% (4457/5007)
Updating files:  90% (4507/5007)
Updating files:  91% (4557/5007)
Updating files:  92% (4607/5007)
Updating files:  93% (4657/5007)
Updating files:  94% (4707/5007)
Updating files:  95% (4757/5007)
Updating files:  96% (4807/5007)
Updating files:  97% (4857/5007)
Updating files:  98% (4907/5007)
Updating files:  99% (4957/5007)
Updating files: 100% (5007/5007)
Updating files: 100% (5007/5007), done.
Cloned https://github.com/jeremiahjordanisaacson/copilot-sdk-supercharged.git
Revision (git rev-parse @):
dd34489d54addfa020a7ec5b7c5c8b61c6b99f8c
SUCCESS checkout https://github.com/jeremiahjordanisaacson/copilot-sdk-supercharged.git at v2.5.3
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/jeremiahjordanisaacson/copilot-sdk-supercharged.git
https://github.com/jeremiahjordanisaacson/copilot-sdk-supercharged.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "CopilotSDK",
  "name" : "CopilotSDK",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "13.0"
    },
    {
      "name" : "ios",
      "version" : "16.0"
    },
    {
      "name" : "tvos",
      "version" : "16.0"
    },
    {
      "name" : "watchos",
      "version" : "9.0"
    }
  ],
  "products" : [
    {
      "name" : "CopilotSDK",
      "targets" : [
        "CopilotSDK"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    },
    {
      "name" : "BasicExample",
      "targets" : [
        "BasicExample"
      ],
      "type" : {
        "executable" : null
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "CopilotSDK",
      "module_type" : "SwiftTarget",
      "name" : "CopilotSDK",
      "path" : "swift/Sources/CopilotSDK",
      "product_memberships" : [
        "CopilotSDK",
        "BasicExample"
      ],
      "sources" : [
        "CopilotClient.swift",
        "CopilotSession.swift",
        "DefineTool.swift",
        "JsonRpcClient.swift",
        "SdkProtocolVersion.swift",
        "Types.swift"
      ],
      "type" : "library"
    },
    {
      "c99name" : "BasicExample",
      "module_type" : "SwiftTarget",
      "name" : "BasicExample",
      "path" : "swift/Examples/BasicExample",
      "product_memberships" : [
        "BasicExample"
      ],
      "sources" : [
        "main.swift"
      ],
      "target_dependencies" : [
        "CopilotSDK"
      ],
      "type" : "executable"
    }
  ],
  "tools_version" : "5.9"
}
Running build ...
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
Building for debugging...
[0/7] Write sources
[0/7] Write BasicExample-entitlement.plist
[3/7] Write swift-version-2F0A5646E1D333AE.txt
[5/14] Compiling CopilotSDK SdkProtocolVersion.swift
[6/14] Compiling CopilotSDK JsonRpcClient.swift
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/JsonRpcClient.swift:342:36: warning: non-sendable result type '[String : Any]?' cannot be sent from nonisolated context in call to let 'handler'; this is an error in the Swift 6 language mode
340 |
341 |         do {
342 |             let result = try await handler(params)
    |                                    `- warning: non-sendable result type '[String : Any]?' cannot be sent from nonisolated context in call to let 'handler'; this is an error in the Swift 6 language mode
343 |             sendResponse(id: id, result: result)
344 |         } catch let error as JsonRpcError {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/JsonRpcClient.swift:342:36: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
340 |
341 |         do {
342 |             let result = try await handler(params)
    |                                    |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
    |                                    `- note: sending 'self'-isolated 'params' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
343 |             sendResponse(id: id, result: result)
344 |         } catch let error as JsonRpcError {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/JsonRpcClient.swift:328:26: warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
326 |             continuation.resume(throwing: JsonRpcError(code: code, message: msg, data: data))
327 |         } else if let result = message["result"] as? [String: Any] {
328 |             continuation.resume(returning: result)
    |                          |- warning: sending 'result' risks causing data races; this is an error in the Swift 6 language mode
    |                          `- note: 'self'-isolated 'result' is passed as a 'sending' parameter; Uses in callee may race with later 'self'-isolated uses
329 |         } else {
330 |             // Some responses have non-dict results (e.g. null). Return empty dict.
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/JsonRpcClient.swift:300:42: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
298 |             } else {
299 |                 // Server notification
300 |                 await notificationHandler?(method, params)
    |                                          |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
    |                                          `- note: sending 'self'-isolated 'params' to nonisolated callee risks causing data races between nonisolated and 'self'-isolated uses
301 |             }
302 |         } else if hasId {
[7/14] Compiling CopilotSDK DefineTool.swift
[8/14] Compiling CopilotSDK CopilotSession.swift
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:96:44: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 94 |         }
 95 |
 96 |         let response = try await rpcClient.sendRequest(method: "session.send", params: params)
    |                                            `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 97 |         guard let messageId = response["messageId"] as? String else {
 98 |             throw CopilotError.invalidResponse("Missing messageId in session.send response")
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:124:28: warning: no 'async' operations occur within 'await' expression
122 |                 try await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000_000))
123 |                 if state.tryResume() {
124 |                     Task { await self.removeEventHandler(handlerId) }
    |                            `- warning: no 'async' operations occur within 'await' expression
125 |                     continuation.resume(
126 |                         throwing: CopilotError.timeout(
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:160:25: warning: no 'async' operations occur within 'await' expression
158 |                     if state.tryResume() {
159 |                         timeoutTask.cancel()
160 |                         await self.removeEventHandler(handlerId)
    |                         `- warning: no 'async' operations occur within 'await' expression
161 |                         continuation.resume(throwing: error)
162 |                     }
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:411:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
409 |     /// - Returns: A dictionary containing the session metadata.
410 |     public func getMetadata() async throws -> [String: Any] {
411 |         return try await rpcClient.sendRequest(
    |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
412 |             method: "session.getMetadata",
413 |             params: ["sessionId": sessionId]
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:423:44: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
421 |     /// - Returns: An array of all session events.
422 |     public func getMessages() async throws -> [SessionEvent] {
423 |         let response = try await rpcClient.sendRequest(
    |                                            `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
424 |             method: "session.getMessages",
425 |             params: ["sessionId": sessionId]
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:442:37: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
440 |     /// handlers and tool handlers are cleared.
441 |     public func destroy() async throws {
442 |         let _ = try await rpcClient.sendRequest(
    |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
443 |             method: "session.destroy",
444 |             params: ["sessionId": sessionId]
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:461:37: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
459 |     /// The session remains valid and can continue to be used for new messages.
460 |     public func abort() async throws {
461 |         let _ = try await rpcClient.sendRequest(
    |                                     `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
462 |             method: "session.abort",
463 |             params: ["sessionId": sessionId]
[9/14] Emitting module CopilotSDK
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:91:16: warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  89 |     public let toolCallId: String
  90 |     public let toolName: String
  91 |     public let arguments: Any? // The decoded JSON arguments
     |                `- warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  92 |
  93 |     public init(sessionId: String, toolCallId: String, toolName: String, arguments: Any?) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:110:16: warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 108 |     public let name: String
 109 |     public let description: String?
 110 |     public let parameters: [String: Any]?
     |                `- warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 111 |     public let handler: ToolHandler
 112 |     /// Tool deferral policy: `ToolDefer.auto` (default) or `ToolDefer.never`.
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:244:16: warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 242 |     public let kind: String
 243 |     public let toolCallId: String?
 244 |     public let rawData: [String: Any]
     |                `- warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 245 |
 246 |     public init(kind: String, toolCallId: String? = nil, rawData: [String: Any] = [:]) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:1346:16: warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1344 |     public let ephemeral: Bool?
1345 |     public let type: String
1346 |     public let data: [String: Any]
     |                `- warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1347 |
1348 |     public init(
[10/14] Compiling CopilotSDK Types.swift
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:91:16: warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  89 |     public let toolCallId: String
  90 |     public let toolName: String
  91 |     public let arguments: Any? // The decoded JSON arguments
     |                `- warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  92 |
  93 |     public init(sessionId: String, toolCallId: String, toolName: String, arguments: Any?) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:110:16: warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 108 |     public let name: String
 109 |     public let description: String?
 110 |     public let parameters: [String: Any]?
     |                `- warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 111 |     public let handler: ToolHandler
 112 |     /// Tool deferral policy: `ToolDefer.auto` (default) or `ToolDefer.never`.
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:244:16: warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 242 |     public let kind: String
 243 |     public let toolCallId: String?
 244 |     public let rawData: [String: Any]
     |                `- warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 245 |
 246 |     public init(kind: String, toolCallId: String? = nil, rawData: [String: Any] = [:]) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:1346:16: warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1344 |     public let ephemeral: Bool?
1345 |     public let type: String
1346 |     public let data: [String: Any]
     |                `- warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1347 |
1348 |     public init(
[11/14] Compiling CopilotSDK CopilotClient.swift
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:270:38: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 268 |         await injectTraceContext(&params)
 269 |
 270 |         let response = try await rpc.sendRequest(method: "session.create", params: params)
     |                                      `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 271 |
 272 |         guard let sessionId = response["sessionId"] as? String else {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:352:38: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 350 |         await injectTraceContext(&params)
 351 |
 352 |         let response = try await rpc.sendRequest(method: "session.resume", params: params)
     |                                      `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 353 |
 354 |         guard let resumedSessionId = response["sessionId"] as? String else {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:396:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 394 |         if let msg = message { params["message"] = msg }
 395 |
 396 |         let result = try await rpc.sendRequest(method: "ping", params: params)
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 397 |
 398 |         guard let msg = result["message"] as? String,
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:418:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 416 |             throw CopilotError.notConnected
 417 |         }
 418 |         let result = try await rpc.sendRequest(method: "status.get", params: [:])
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 419 |         let data = try JSONSerialization.data(withJSONObject: result, options: [])
 420 |         return try JSONDecoder().decode(GetStatusResponse.self, from: data)
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:428:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 426 |             throw CopilotError.notConnected
 427 |         }
 428 |         let result = try await rpc.sendRequest(method: "auth.getStatus", params: [:])
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 429 |         let data = try JSONSerialization.data(withJSONObject: result, options: [])
 430 |         return try JSONDecoder().decode(GetAuthStatusResponse.self, from: data)
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:446:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 444 |         }
 445 |
 446 |         let result = try await rpc.sendRequest(method: "models.list", params: [:])
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 447 |
 448 |         guard let modelsArray = result["models"] as? [[String: Any]] else {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:465:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 463 |             throw CopilotError.notConnected
 464 |         }
 465 |         let result = try await rpc.sendRequest(method: "session.getLastId", params: [:])
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 466 |         return result["sessionId"] as? String
 467 |     }
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:474:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 472 |             throw CopilotError.notConnected
 473 |         }
 474 |         let result = try await rpc.sendRequest(
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 475 |             method: "session.getMetadata", params: ["sessionId": sessionId])
 476 |         return result
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:484:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 482 |             throw CopilotError.notConnected
 483 |         }
 484 |         let result = try await rpc.sendRequest(
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 485 |             method: "session.delete", params: ["sessionId": sessionId])
 486 |         let success = result["success"] as? Bool ?? false
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:499:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 497 |             throw CopilotError.notConnected
 498 |         }
 499 |         let result = try await rpc.sendRequest(method: "session.list", params: [:])
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 500 |         guard let sessionsArray = result["sessions"] as? [[String: Any]] else {
 501 |             throw CopilotError.invalidResponse("Invalid session.list response")
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:523:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 521 |             throw CopilotError.notConnected
 522 |         }
 523 |         let result = try await rpc.sendRequest(method: "session.getForeground", params: [:])
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 524 |         return result["sessionId"] as? String
 525 |     }
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:532:36: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 530 |             throw CopilotError.notConnected
 531 |         }
 532 |         let result = try await rpc.sendRequest(
     |                                    `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 533 |             method: "session.setForeground", params: ["sessionId": sessionId])
 534 |         let success = result["success"] as? Bool ?? false
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:563:27: warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 561 |         if let conv = conventions { params["conventions"] = conv }
 562 |
 563 |         _ = try await rpc.sendRequest(method: "sessionFs.setProvider", params: params)
     |                           `- warning: non-sendable result type '[String : Any]' cannot be sent from actor-isolated context in call to instance method 'sendRequest(method:params:)'; this is an error in the Swift 6 language mode
 564 |     }
 565 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:659:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleToolCall'; this is an error in the Swift 6 language mode
 657 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 658 |             }
 659 |             return try await self.handleToolCall(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleToolCall'; this is an error in the Swift 6 language mode
 660 |         }
 661 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:666:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handlePermissionRequest'; this is an error in the Swift 6 language mode
 664 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 665 |             }
 666 |             return try await self.handlePermissionRequest(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handlePermissionRequest'; this is an error in the Swift 6 language mode
 667 |         }
 668 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:673:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleUserInputRequest'; this is an error in the Swift 6 language mode
 671 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 672 |             }
 673 |             return try await self.handleUserInputRequest(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleUserInputRequest'; this is an error in the Swift 6 language mode
 674 |         }
 675 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:680:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleHooksInvoke'; this is an error in the Swift 6 language mode
 678 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 679 |             }
 680 |             return try await self.handleHooksInvoke(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleHooksInvoke'; this is an error in the Swift 6 language mode
 681 |         }
 682 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:687:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleExitPlanModeRequest'; this is an error in the Swift 6 language mode
 685 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 686 |             }
 687 |             return try await self.handleExitPlanModeRequest(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleExitPlanModeRequest'; this is an error in the Swift 6 language mode
 688 |         }
 689 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:693:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsReadFile'; this is an error in the Swift 6 language mode
 691 |         await rpc.setRequestHandler(method: "sessionFs.readFile") { [weak self] params in
 692 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 693 |             return try await self.handleSessionFsReadFile(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsReadFile'; this is an error in the Swift 6 language mode
 694 |         }
 695 |         await rpc.setRequestHandler(method: "sessionFs.writeFile") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:697:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsWriteFile'; this is an error in the Swift 6 language mode
 695 |         await rpc.setRequestHandler(method: "sessionFs.writeFile") { [weak self] params in
 696 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 697 |             return try await self.handleSessionFsWriteFile(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsWriteFile'; this is an error in the Swift 6 language mode
 698 |         }
 699 |         await rpc.setRequestHandler(method: "sessionFs.appendFile") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:701:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsAppendFile'; this is an error in the Swift 6 language mode
 699 |         await rpc.setRequestHandler(method: "sessionFs.appendFile") { [weak self] params in
 700 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 701 |             return try await self.handleSessionFsAppendFile(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsAppendFile'; this is an error in the Swift 6 language mode
 702 |         }
 703 |         await rpc.setRequestHandler(method: "sessionFs.exists") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:705:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsExists'; this is an error in the Swift 6 language mode
 703 |         await rpc.setRequestHandler(method: "sessionFs.exists") { [weak self] params in
 704 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 705 |             return try await self.handleSessionFsExists(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsExists'; this is an error in the Swift 6 language mode
 706 |         }
 707 |         await rpc.setRequestHandler(method: "sessionFs.stat") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:709:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsStat'; this is an error in the Swift 6 language mode
 707 |         await rpc.setRequestHandler(method: "sessionFs.stat") { [weak self] params in
 708 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 709 |             return try await self.handleSessionFsStat(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsStat'; this is an error in the Swift 6 language mode
 710 |         }
 711 |         await rpc.setRequestHandler(method: "sessionFs.mkdir") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:713:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsMkdir'; this is an error in the Swift 6 language mode
 711 |         await rpc.setRequestHandler(method: "sessionFs.mkdir") { [weak self] params in
 712 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 713 |             return try await self.handleSessionFsMkdir(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsMkdir'; this is an error in the Swift 6 language mode
 714 |         }
 715 |         await rpc.setRequestHandler(method: "sessionFs.readdir") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:717:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsReaddir'; this is an error in the Swift 6 language mode
 715 |         await rpc.setRequestHandler(method: "sessionFs.readdir") { [weak self] params in
 716 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 717 |             return try await self.handleSessionFsReaddir(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsReaddir'; this is an error in the Swift 6 language mode
 718 |         }
 719 |         await rpc.setRequestHandler(method: "sessionFs.readdirWithTypes") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:721:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsReaddirWithTypes'; this is an error in the Swift 6 language mode
 719 |         await rpc.setRequestHandler(method: "sessionFs.readdirWithTypes") { [weak self] params in
 720 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 721 |             return try await self.handleSessionFsReaddirWithTypes(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsReaddirWithTypes'; this is an error in the Swift 6 language mode
 722 |         }
 723 |         await rpc.setRequestHandler(method: "sessionFs.rm") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:725:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsRm'; this is an error in the Swift 6 language mode
 723 |         await rpc.setRequestHandler(method: "sessionFs.rm") { [weak self] params in
 724 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 725 |             return try await self.handleSessionFsRm(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsRm'; this is an error in the Swift 6 language mode
 726 |         }
 727 |         await rpc.setRequestHandler(method: "sessionFs.rename") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:729:35: warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsRename'; this is an error in the Swift 6 language mode
 727 |         await rpc.setRequestHandler(method: "sessionFs.rename") { [weak self] params in
 728 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 729 |             return try await self.handleSessionFsRename(params)
     |                                   `- warning: non-sendable result type '[String : Any]?' cannot be sent from actor-isolated context in call to instance method 'handleSessionFsRename'; this is an error in the Swift 6 language mode
 730 |         }
 731 |     }
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:839:39: warning: non-sendable result type 'Any?' cannot be sent from nonisolated context in call to let 'handler'; this is an error in the Swift 6 language mode
 837 |
 838 |         do {
 839 |             let rawResult = try await handler(params["arguments"], invocation)
     |                                       `- warning: non-sendable result type 'Any?' cannot be sent from nonisolated context in call to let 'handler'; this is an error in the Swift 6 language mode
 840 |             let resultObj = normalizeToolResult(rawResult)
 841 |             return ["result": encodeToDictionary(resultObj) ?? [:]]
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:910:40: warning: non-sendable result type 'Any?' cannot be sent from actor-isolated context in call to instance method 'handleHooksInvoke(hookType:input:)'; this is an error in the Swift 6 language mode
 908 |         }
 909 |
 910 |         let output = try await session.handleHooksInvoke(hookType: hookType, input: params["input"])
     |                                        `- warning: non-sendable result type 'Any?' cannot be sent from actor-isolated context in call to instance method 'handleHooksInvoke(hookType:input:)'; this is an error in the Swift 6 language mode
 911 |         if let output = output {
 912 |             return ["output": output]
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:270:38: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 268 |         await injectTraceContext(&params)
 269 |
 270 |         let response = try await rpc.sendRequest(method: "session.create", params: params)
     |                                      |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending 'self'-isolated 'params' to actor-isolated instance method 'sendRequest(method:params:)' risks causing data races between actor-isolated and 'self'-isolated uses
 271 |
 272 |         guard let sessionId = response["sessionId"] as? String else {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:352:38: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 350 |         await injectTraceContext(&params)
 351 |
 352 |         let response = try await rpc.sendRequest(method: "session.resume", params: params)
     |                                      |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                      `- note: sending 'self'-isolated 'params' to actor-isolated instance method 'sendRequest(method:params:)' risks causing data races between actor-isolated and 'self'-isolated uses
 353 |
 354 |         guard let resumedSessionId = response["sessionId"] as? String else {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:650:28: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 648 |             notificationHandler: { [weak self] method, params in
 649 |                 guard let self = self else { return }
 650 |                 await self.handleNotification(method: method, params: params)
     |                            |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                            `- note: sending task-isolated 'params' to actor-isolated instance method 'handleNotification(method:params:)' risks causing data races between actor-isolated and task-isolated uses
 651 |             }
 652 |         )
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:839:39: warning: sending value of non-Sendable type 'Any?' risks causing data races; this is an error in the Swift 6 language mode
 837 |
 838 |         do {
 839 |             let rawResult = try await handler(params["arguments"], invocation)
     |                                       |- warning: sending value of non-Sendable type 'Any?' risks causing data races; this is an error in the Swift 6 language mode
     |                                       `- note: sending 'self'-isolated value of non-Sendable type 'Any?' to nonisolated callee risks causing races in between 'self'-isolated and nonisolated uses
 840 |             let resultObj = normalizeToolResult(rawResult)
 841 |             return ["result": encodeToDictionary(resultObj) ?? [:]]
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:659:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 657 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 658 |             }
 659 |             return try await self.handleToolCall(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleToolCall' risks causing data races between actor-isolated and task-isolated uses
 660 |         }
 661 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:867:44: warning: sending 'requestData' risks causing data races; this is an error in the Swift 6 language mode
 865 |
 866 |         do {
 867 |             let result = try await session.handlePermissionRequest(requestData)
     |                                            |- warning: sending 'requestData' risks causing data races; this is an error in the Swift 6 language mode
     |                                            `- note: sending 'self'-isolated 'requestData' to actor-isolated instance method 'handlePermissionRequest' risks causing data races between actor-isolated and 'self'-isolated uses
 868 |             return ["result": encodeToDictionary(result) ?? [:]]
 869 |         } catch {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:666:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 664 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 665 |             }
 666 |             return try await self.handlePermissionRequest(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handlePermissionRequest' risks causing data races between actor-isolated and task-isolated uses
 667 |         }
 668 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:673:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 671 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 672 |             }
 673 |             return try await self.handleUserInputRequest(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleUserInputRequest' risks causing data races between actor-isolated and task-isolated uses
 674 |         }
 675 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:910:40: warning: sending value of non-Sendable type 'Any?' risks causing data races; this is an error in the Swift 6 language mode
 908 |         }
 909 |
 910 |         let output = try await session.handleHooksInvoke(hookType: hookType, input: params["input"])
     |                                        |- warning: sending value of non-Sendable type 'Any?' risks causing data races; this is an error in the Swift 6 language mode
     |                                        `- note: sending 'self'-isolated value of non-Sendable type 'Any?' to actor-isolated instance method 'handleHooksInvoke(hookType:input:)' risks causing races in between 'self'-isolated and actor-isolated uses
 911 |         if let output = output {
 912 |             return ["output": output]
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:680:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 678 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 679 |             }
 680 |             return try await self.handleHooksInvoke(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleHooksInvoke' risks causing data races between actor-isolated and task-isolated uses
 681 |         }
 682 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:687:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 685 |                 throw JsonRpcError(code: -32000, message: "Client deallocated")
 686 |             }
 687 |             return try await self.handleExitPlanModeRequest(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleExitPlanModeRequest' risks causing data races between actor-isolated and task-isolated uses
 688 |         }
 689 |
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:693:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 691 |         await rpc.setRequestHandler(method: "sessionFs.readFile") { [weak self] params in
 692 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 693 |             return try await self.handleSessionFsReadFile(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsReadFile' risks causing data races between actor-isolated and task-isolated uses
 694 |         }
 695 |         await rpc.setRequestHandler(method: "sessionFs.writeFile") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:697:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 695 |         await rpc.setRequestHandler(method: "sessionFs.writeFile") { [weak self] params in
 696 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 697 |             return try await self.handleSessionFsWriteFile(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsWriteFile' risks causing data races between actor-isolated and task-isolated uses
 698 |         }
 699 |         await rpc.setRequestHandler(method: "sessionFs.appendFile") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:701:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 699 |         await rpc.setRequestHandler(method: "sessionFs.appendFile") { [weak self] params in
 700 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 701 |             return try await self.handleSessionFsAppendFile(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsAppendFile' risks causing data races between actor-isolated and task-isolated uses
 702 |         }
 703 |         await rpc.setRequestHandler(method: "sessionFs.exists") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:705:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 703 |         await rpc.setRequestHandler(method: "sessionFs.exists") { [weak self] params in
 704 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 705 |             return try await self.handleSessionFsExists(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsExists' risks causing data races between actor-isolated and task-isolated uses
 706 |         }
 707 |         await rpc.setRequestHandler(method: "sessionFs.stat") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:709:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 707 |         await rpc.setRequestHandler(method: "sessionFs.stat") { [weak self] params in
 708 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 709 |             return try await self.handleSessionFsStat(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsStat' risks causing data races between actor-isolated and task-isolated uses
 710 |         }
 711 |         await rpc.setRequestHandler(method: "sessionFs.mkdir") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:713:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 711 |         await rpc.setRequestHandler(method: "sessionFs.mkdir") { [weak self] params in
 712 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 713 |             return try await self.handleSessionFsMkdir(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsMkdir' risks causing data races between actor-isolated and task-isolated uses
 714 |         }
 715 |         await rpc.setRequestHandler(method: "sessionFs.readdir") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:717:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 715 |         await rpc.setRequestHandler(method: "sessionFs.readdir") { [weak self] params in
 716 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 717 |             return try await self.handleSessionFsReaddir(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsReaddir' risks causing data races between actor-isolated and task-isolated uses
 718 |         }
 719 |         await rpc.setRequestHandler(method: "sessionFs.readdirWithTypes") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:721:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 719 |         await rpc.setRequestHandler(method: "sessionFs.readdirWithTypes") { [weak self] params in
 720 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 721 |             return try await self.handleSessionFsReaddirWithTypes(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsReaddirWithTypes' risks causing data races between actor-isolated and task-isolated uses
 722 |         }
 723 |         await rpc.setRequestHandler(method: "sessionFs.rm") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:725:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 723 |         await rpc.setRequestHandler(method: "sessionFs.rm") { [weak self] params in
 724 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 725 |             return try await self.handleSessionFsRm(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsRm' risks causing data races between actor-isolated and task-isolated uses
 726 |         }
 727 |         await rpc.setRequestHandler(method: "sessionFs.rename") { [weak self] params in
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotClient.swift:729:35: warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
 727 |         await rpc.setRequestHandler(method: "sessionFs.rename") { [weak self] params in
 728 |             guard let self = self else { throw JsonRpcError(code: -32000, message: "Client deallocated") }
 729 |             return try await self.handleSessionFsRename(params)
     |                                   |- warning: sending 'params' risks causing data races; this is an error in the Swift 6 language mode
     |                                   `- note: sending task-isolated 'params' to actor-isolated instance method 'handleSessionFsRename' risks causing data races between actor-isolated and task-isolated uses
 730 |         }
 731 |     }
[12/16] Emitting module BasicExample
[13/16] Compiling BasicExample main.swift
/Users/admin/builder/spi-builder-workspace/swift/Examples/BasicExample/main.swift:53:35: error: expression is 'async' but is not marked with 'await'
51 |             SessionConfig(tools: [lookupFactTool])
52 |         )
53 |         print("Session created: \(session.sessionId)\n")
   |                                   |- error: expression is 'async' but is not marked with 'await'
   |                                   `- note: property access is 'async'
54 |
55 |         // Subscribe to all events
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/4] Write swift-version-2F0A5646E1D333AE.txt
[2/11] Compiling CopilotSDK SdkProtocolVersion.swift
[3/11] Compiling CopilotSDK JsonRpcClient.swift
[4/11] Compiling CopilotSDK DefineTool.swift
[5/11] Compiling CopilotSDK CopilotSession.swift
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:124:28: warning: no 'async' operations occur within 'await' expression
122 |                 try await Task.sleep(nanoseconds: UInt64(timeout * 1_000_000_000))
123 |                 if state.tryResume() {
124 |                     Task { await self.removeEventHandler(handlerId) }
    |                            `- warning: no 'async' operations occur within 'await' expression
125 |                     continuation.resume(
126 |                         throwing: CopilotError.timeout(
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/CopilotSession.swift:160:25: warning: no 'async' operations occur within 'await' expression
158 |                     if state.tryResume() {
159 |                         timeoutTask.cancel()
160 |                         await self.removeEventHandler(handlerId)
    |                         `- warning: no 'async' operations occur within 'await' expression
161 |                         continuation.resume(throwing: error)
162 |                     }
[6/11] Compiling CopilotSDK Types.swift
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:91:16: warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  89 |     public let toolCallId: String
  90 |     public let toolName: String
  91 |     public let arguments: Any? // The decoded JSON arguments
     |                `- warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  92 |
  93 |     public init(sessionId: String, toolCallId: String, toolName: String, arguments: Any?) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:110:16: warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 108 |     public let name: String
 109 |     public let description: String?
 110 |     public let parameters: [String: Any]?
     |                `- warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 111 |     public let handler: ToolHandler
 112 |     /// Tool deferral policy: `ToolDefer.auto` (default) or `ToolDefer.never`.
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:244:16: warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 242 |     public let kind: String
 243 |     public let toolCallId: String?
 244 |     public let rawData: [String: Any]
     |                `- warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 245 |
 246 |     public init(kind: String, toolCallId: String? = nil, rawData: [String: Any] = [:]) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:1346:16: warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1344 |     public let ephemeral: Bool?
1345 |     public let type: String
1346 |     public let data: [String: Any]
     |                `- warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1347 |
1348 |     public init(
[7/11] Emitting module CopilotSDK
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:91:16: warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  89 |     public let toolCallId: String
  90 |     public let toolName: String
  91 |     public let arguments: Any? // The decoded JSON arguments
     |                `- warning: stored property 'arguments' of 'Sendable'-conforming struct 'ToolInvocation' has non-sendable type 'Any?'; this is an error in the Swift 6 language mode
  92 |
  93 |     public init(sessionId: String, toolCallId: String, toolName: String, arguments: Any?) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:110:16: warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 108 |     public let name: String
 109 |     public let description: String?
 110 |     public let parameters: [String: Any]?
     |                `- warning: stored property 'parameters' of 'Sendable'-conforming struct 'Tool' has non-sendable type '[String : Any]?'; this is an error in the Swift 6 language mode
 111 |     public let handler: ToolHandler
 112 |     /// Tool deferral policy: `ToolDefer.auto` (default) or `ToolDefer.never`.
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:244:16: warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 242 |     public let kind: String
 243 |     public let toolCallId: String?
 244 |     public let rawData: [String: Any]
     |                `- warning: stored property 'rawData' of 'Sendable'-conforming struct 'PermissionRequest' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
 245 |
 246 |     public init(kind: String, toolCallId: String? = nil, rawData: [String: Any] = [:]) {
/Users/admin/builder/spi-builder-workspace/swift/Sources/CopilotSDK/Types.swift:1346:16: warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1344 |     public let ephemeral: Bool?
1345 |     public let type: String
1346 |     public let data: [String: Any]
     |                `- warning: stored property 'data' of 'Sendable'-conforming struct 'SessionEvent' has non-sendable type '[String : Any]'; this is an error in the Swift 6 language mode
1347 |
1348 |     public init(
[8/11] Compiling CopilotSDK CopilotClient.swift
[9/13] Emitting module BasicExample
[10/13] Compiling BasicExample main.swift
/Users/admin/builder/spi-builder-workspace/swift/Examples/BasicExample/main.swift:53:35: error: expression is 'async' but is not marked with 'await'
51 |             SessionConfig(tools: [lookupFactTool])
52 |         )
53 |         print("Session created: \(session.sessionId)\n")
   |                                   |- error: expression is 'async' but is not marked with 'await'
   |                                   `- note: property access is 'async'
54 |
55 |         // Subscribe to all events
BUILD FAILURE 6.1 macosSpm