The Swift Package Index logo.Swift Package Index

Build Information

Successful build of agy-usage-stats, reference v1.1.91 (87af28), with Swift 6.1 for macOS (SPM) on 5 Nov 2026 18:45:04 UTC.

Swift 6 data race errors: 0

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

========================================
RunAll
========================================
Builder version: 5.1.4
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/sameerbajaj/agy-usage-stats.git
Reference: v1.1.91
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/sameerbajaj/agy-usage-stats
 * tag               v1.1.91    -> FETCH_HEAD
HEAD is now at 87af28d test: decouple historical GCP attribution test from fixed calendar date
Cloned https://github.com/sameerbajaj/agy-usage-stats.git
Revision (git rev-parse @):
87af28d7362dce2b59705eb7d13c547bd36b0f28
SPI manifest file found: $PWD/.spi.yml
SUCCESS checkout https://github.com/sameerbajaj/agy-usage-stats.git at v1.1.91
========================================
Build
========================================
Selected platform:         macosSpm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/sameerbajaj/agy-usage-stats.git
https://github.com/sameerbajaj/agy-usage-stats.git
{
  "dependencies" : [
  ],
  "manifest_display_name" : "agy-usage-stats",
  "name" : "agy-usage-stats",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "15.0"
    }
  ],
  "products" : [
    {
      "name" : "agy-usage-stats",
      "targets" : [
        "agy-usage-stats"
      ],
      "type" : {
        "executable" : null
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "agy_usage_statsTests",
      "module_type" : "SwiftTarget",
      "name" : "agy-usage-statsTests",
      "path" : "agy-usage-statsTests",
      "sources" : [
        "AgyStatsServiceTests.swift",
        "OverviewTabViewTests.swift",
        "agy_usage_statsTests.swift"
      ],
      "target_dependencies" : [
        "agy-usage-stats"
      ],
      "type" : "test"
    },
    {
      "c99name" : "agy_usage_stats",
      "module_type" : "SwiftTarget",
      "name" : "agy-usage-stats",
      "path" : "agy-usage-stats",
      "product_memberships" : [
        "agy-usage-stats"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Assets.xcassets",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "ContentView.swift",
        "Models/AgyModels.swift",
        "Services/AgyFileWatcher.swift",
        "Services/AgyQuotaService.swift",
        "Services/AgyStatsService.swift",
        "Services/SelfUpdater.swift",
        "Services/UpdateChecker.swift",
        "ViewModels/AgyStatsViewModel.swift",
        "Views/ActivityTabView.swift",
        "Views/AppTheme.swift",
        "Views/CostTabView.swift",
        "Views/HistoryTabView.swift",
        "Views/MenuBarPopover.swift",
        "Views/OverviewTabView.swift",
        "Views/SettingsTabView.swift",
        "Views/StatsTabView.swift",
        "Views/Styles.swift",
        "Views/WorkspacesTabView.swift",
        "agy_usage_statsApp.swift"
      ],
      "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
[1/7] Write agy-usage-stats-entitlement.plist
[2/7] Copying Assets.xcassets
[3/7] Write swift-version-2F0A5646E1D333AE.txt
[5/26] Compiling agy_usage_stats SettingsTabView.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/SettingsTabView.swift:409:45: warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
407 |                     Button(action: {
408 |                         Task {
409 |                             await viewModel.checkForUpdates(showUpToDateFeedback: true)
    |                                             |- warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
    |                                             `- note: sending main actor-isolated 'self.viewModel' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
410 |                         }
411 |                     }) {
[6/26] Compiling agy_usage_stats StatsTabView.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/SettingsTabView.swift:409:45: warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
407 |                     Button(action: {
408 |                         Task {
409 |                             await viewModel.checkForUpdates(showUpToDateFeedback: true)
    |                                             |- warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
    |                                             `- note: sending main actor-isolated 'self.viewModel' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
410 |                         }
411 |                     }) {
[7/26] Compiling agy_usage_stats Styles.swift
[8/26] Compiling agy_usage_stats WorkspacesTabView.swift
[9/28] Compiling agy_usage_stats agy_usage_statsApp.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/agy_usage_statsApp.swift:175:23: warning: static property 'menuBarFont' is not concurrency-safe because non-'Sendable' type 'NSFont' may have shared mutable state; this is an error in the Swift 6 language mode
173 |     }
174 |
175 |     public static let menuBarFont: NSFont = {
    |                       |- warning: static property 'menuBarFont' is not concurrency-safe because non-'Sendable' type 'NSFont' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'menuBarFont' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
176 |         let baseDesc = NSFont.systemFont(ofSize: 11.0, weight: .bold).fontDescriptor.withDesign(.rounded)
177 |         if let baseDesc {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:24:12: note: class 'NSFont' does not conform to the 'Sendable' protocol
 22 | APPKIT_EXTERN const CGFloat * NSFontIdentityMatrix;
 23 |
 24 | @interface NSFont : NSObject <NSCopying, NSSecureCoding>
    |            `- note: class 'NSFont' does not conform to the 'Sendable' protocol
 25 |
 26 | /********* Factory *********/
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/agy_usage_statsApp.swift:428:24: warning: static property 'cachedAntigravityIcon' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
426 |
427 | public enum AgyMenuBarRenderer {
428 |     private static var cachedAntigravityIcon: (key: String, image: NSImage)? = nil
    |                        |- warning: static property 'cachedAntigravityIcon' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'cachedAntigravityIcon' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'cachedAntigravityIcon' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
429 |
430 |     public static func makeAntigravityImage(
[10/28] Compiling agy_usage_stats resource_bundle_accessor.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/agy_usage_statsApp.swift:175:23: warning: static property 'menuBarFont' is not concurrency-safe because non-'Sendable' type 'NSFont' may have shared mutable state; this is an error in the Swift 6 language mode
173 |     }
174 |
175 |     public static let menuBarFont: NSFont = {
    |                       |- warning: static property 'menuBarFont' is not concurrency-safe because non-'Sendable' type 'NSFont' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'menuBarFont' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
176 |         let baseDesc = NSFont.systemFont(ofSize: 11.0, weight: .bold).fontDescriptor.withDesign(.rounded)
177 |         if let baseDesc {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:24:12: note: class 'NSFont' does not conform to the 'Sendable' protocol
 22 | APPKIT_EXTERN const CGFloat * NSFontIdentityMatrix;
 23 |
 24 | @interface NSFont : NSObject <NSCopying, NSSecureCoding>
    |            `- note: class 'NSFont' does not conform to the 'Sendable' protocol
 25 |
 26 | /********* Factory *********/
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/agy_usage_statsApp.swift:428:24: warning: static property 'cachedAntigravityIcon' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
426 |
427 | public enum AgyMenuBarRenderer {
428 |     private static var cachedAntigravityIcon: (key: String, image: NSImage)? = nil
    |                        |- warning: static property 'cachedAntigravityIcon' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'cachedAntigravityIcon' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'cachedAntigravityIcon' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
429 |
430 |     public static func makeAntigravityImage(
[11/28] Compiling agy_usage_stats UpdateChecker.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:61:23: warning: static property 'minimum' is not concurrency-safe because non-'Sendable' type 'IconQuotaLimitTarget' may have shared mutable state; this is an error in the Swift 6 language mode
  52 | }
  53 |
  54 | public enum IconQuotaLimitTarget: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconQuotaLimitTarget' conform to the 'Sendable' protocol
  55 |     case fiveHour = "5-Hour Limit"
  56 |     case weekly = "Weekly Limit"
     :
  59 |     public var id: String { rawValue }
  60 |
  61 |     public static let minimum: IconQuotaLimitTarget = .auto
     |                       |- warning: static property 'minimum' is not concurrency-safe because non-'Sendable' type 'IconQuotaLimitTarget' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'minimum' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  62 |
  63 |     public init?(rawValue: String) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:80:23: warning: static property 'usageRemaining' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
  71 | }
  72 |
  73 | public enum IconCircleFillMetric: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconCircleFillMetric' conform to the 'Sendable' protocol
  74 |     case weekly = "Weekly Limit"
  75 |     case fiveHour = "5-Hour Limit"
     :
  78 |     public var id: String { rawValue }
  79 |
  80 |     public static let usageRemaining: IconCircleFillMetric = .matchNumber
     |                       |- warning: static property 'usageRemaining' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'usageRemaining' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  81 |     public static let timeUntilReset: IconCircleFillMetric = .weekly
  82 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:81:23: warning: static property 'timeUntilReset' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
  71 | }
  72 |
  73 | public enum IconCircleFillMetric: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconCircleFillMetric' conform to the 'Sendable' protocol
  74 |     case weekly = "Weekly Limit"
  75 |     case fiveHour = "5-Hour Limit"
     :
  79 |
  80 |     public static let usageRemaining: IconCircleFillMetric = .matchNumber
  81 |     public static let timeUntilReset: IconCircleFillMetric = .weekly
     |                       |- warning: static property 'timeUntilReset' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'timeUntilReset' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  82 |
  83 |     public init?(rawValue: String) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:414:24: warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 412 |     }
 413 |
 414 |     private static let isoFormatter = ISO8601DateFormatter()
     |                        |- warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: add '@MainActor' to make static property 'isoFormatter' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 415 |     private static let relativeDateTimeFormatter: RelativeDateTimeFormatter = {
 416 |         let formatter = RelativeDateTimeFormatter()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:415:24: warning: static property 'relativeDateTimeFormatter' is not concurrency-safe because non-'Sendable' type 'RelativeDateTimeFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 413 |
 414 |     private static let isoFormatter = ISO8601DateFormatter()
 415 |     private static let relativeDateTimeFormatter: RelativeDateTimeFormatter = {
     |                        |- warning: static property 'relativeDateTimeFormatter' is not concurrency-safe because non-'Sendable' type 'RelativeDateTimeFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: add '@MainActor' to make static property 'relativeDateTimeFormatter' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 416 |         let formatter = RelativeDateTimeFormatter()
 417 |         formatter.unitsStyle = .short
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSRelativeDateTimeFormatter.h:27:12: note: class 'RelativeDateTimeFormatter' does not conform to the 'Sendable' protocol
25 |  */
26 | API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
27 | @interface NSRelativeDateTimeFormatter : NSFormatter
   |            `- note: class 'RelativeDateTimeFormatter' does not conform to the 'Sendable' protocol
28 | #if !__OBJC2__
29 | {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:920:37: warning: capture of 'self' with non-sendable type 'AgyStatsViewModel?' in a '@Sendable' closure
 105 |
 106 | @Observable
 107 | public final class AgyStatsViewModel {
     |                    `- note: class 'AgyStatsViewModel' does not conform to the 'Sendable' protocol
 108 |     private let userDefaults: UserDefaults
 109 |
     :
 918 |         let interval = adaptivePollingInterval
 919 |         let timer = Timer(timeInterval: interval, repeats: false) { [weak self] _ in
 920 |             Task { @MainActor [weak self] in
     |                                     `- warning: capture of 'self' with non-sendable type 'AgyStatsViewModel?' in a '@Sendable' closure
 921 |                 await self?.refreshQuotaOnly()
 922 |                 self?.scheduleAdaptiveQuotaPolling()
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/UpdateChecker.swift:29:9: warning: code after 'return' will never be executed
 27 |         #endif
 28 |
 29 |         if Bundle.main.bundlePath.contains("DerivedData") {
    |         `- warning: code after 'return' will never be executed
 30 |             return nil
 31 |         }
macro expansion @ObservationTracked:7:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:118:6: note: expanded code originates here
 116 |             Task { await refresh() }
 117 |         }
 118 |     }
     +--- macro expansion @ObservationTracked --------------------------
     | 5 |             AgyStatsService.clearCaches()
     | 6 |             restartWatcher()
     | 7 |             Task {
     |   |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
     | 8 |                 await refresh()
     |   |                       `- note: closure captures 'self' which is accessible to code in the current task
     | 9 |             }
     |10 |         }
     +------------------------------------------------------------------
 119 |
 120 |     public var menuBarDisplayMode: MenuBarDisplayMode {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:953:32: warning: sending 'loadedStats' risks causing data races; this is an error in the Swift 6 language mode
 950 |         let connected = FileManager.default.fileExists(atPath: path)
 951 |
 952 |         await MainActor.run {
     |                             `- note: access can happen concurrently
 953 |             var updatedStats = loadedStats
     |                                |- warning: sending 'loadedStats' risks causing data races; this is an error in the Swift 6 language mode
     |                                `- note: 'loadedStats' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 954 |             if updatedStats.quotaInfo == nil, let existingQuota = self.stats.quotaInfo {
 955 |                 updatedStats.quotaInfo = existingQuota
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:944:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 942 |
 943 |         await MainActor.run {
 944 |             isRefreshing = true
     |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 945 |         }
 946 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:954:67: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 952 |         await MainActor.run {
 953 |             var updatedStats = loadedStats
 954 |             if updatedStats.quotaInfo == nil, let existingQuota = self.stats.quotaInfo {
     |                                                                   |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                                                                   `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 955 |                 updatedStats.quotaInfo = existingQuota
 956 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:899:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 897 |
 898 |         // Initial load
 899 |         Task {
     |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 900 |             await refresh()
     |                   `- note: closure captures 'self' which is accessible to code in the current task
 901 |             await checkForUpdates()
 902 |         }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:875:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 873 |         watcher.onFileChanged = { [weak self] in
 874 |             Task { @MainActor [weak self] in
 875 |                 self?.lastFileChangedAt = Date()
     |                 |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                 `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 876 |                 self?.scheduleAdaptiveQuotaPolling()
 877 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:878:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 876 |                 self?.scheduleAdaptiveQuotaPolling()
 877 |             }
 878 |             Task { [weak self] in
     |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 879 |                 // Do NOT block UI updates waiting on slow network timeouts or clear verified quota.
 880 |                 // Refresh stats immediately, preserving existing quotaInfo.
 881 |                 await self?.refresh()
     |                       `- note: closure captures 'self' which is accessible to code in the current task
 882 |                 await MainActor.run { [weak self] in
 883 |                     self?.scheduleAdaptiveQuotaPolling()
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:934:16: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 932 |         guard let quota = await AgyQuotaService.fetchQuota(forceRefresh: forceRefresh) else { return }
 933 |         await MainActor.run {
 934 |             if self.stats.quotaInfo != quota {
     |                |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 935 |                 self.stats.quotaInfo = quota
 936 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:883:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 881 |                 await self?.refresh()
 882 |                 await MainActor.run { [weak self] in
 883 |                     self?.scheduleAdaptiveQuotaPolling()
     |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 884 |                 }
 885 |                 // Fast follow-up: language server quota accounting may take 1-2s to settle after streaming
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:889:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 887 |                 await self?.refreshQuotaOnly(forceRefresh: true)
 888 |                 await MainActor.run { [weak self] in
 889 |                     self?.scheduleAdaptiveQuotaPolling()
     |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 890 |                 }
 891 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:996:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 994 |     public func checkForUpdates(showUpToDateFeedback: Bool = false) async {
 995 |         await MainActor.run {
 996 |             isCheckingForUpdates = true
     |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 997 |             if showUpToDateFeedback {
 998 |                 updateCheckMessage = nil
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1005:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
1003 |
1004 |         await MainActor.run {
1005 |             isCheckingForUpdates = false
     |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
1006 |             availableUpdate = update
1007 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1020:20: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
1018 |             try? await Task.sleep(for: .seconds(4))
1019 |             await MainActor.run {
1020 |                 if availableUpdate == nil {
     |                    |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                    `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
1021 |                     updateCheckMessage = nil
1022 |                 }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1034:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1032 |         guard let update = availableUpdate, let dmgURL = update.downloadURL else { return }
1033 |
1034 |         Task {
     |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1035 |             let didInstall = await SelfUpdater.update(
1036 |                 dmgURL: dmgURL,
1037 |                 publishedAt: update.publishedAt,
1038 |                 version: update.version
1039 |             ) { [weak self] state in
     |                       `- note: closure captures 'self' which is accessible to code in the current task
1040 |                 Task { @MainActor in
1041 |                     self?.selfUpdateState = state
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1041:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
1039 |             ) { [weak self] state in
1040 |                 Task { @MainActor in
1041 |                     self?.selfUpdateState = state
     |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
1042 |                 }
1043 |             }
[12/28] Compiling agy_usage_stats AgyStatsViewModel.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:61:23: warning: static property 'minimum' is not concurrency-safe because non-'Sendable' type 'IconQuotaLimitTarget' may have shared mutable state; this is an error in the Swift 6 language mode
  52 | }
  53 |
  54 | public enum IconQuotaLimitTarget: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconQuotaLimitTarget' conform to the 'Sendable' protocol
  55 |     case fiveHour = "5-Hour Limit"
  56 |     case weekly = "Weekly Limit"
     :
  59 |     public var id: String { rawValue }
  60 |
  61 |     public static let minimum: IconQuotaLimitTarget = .auto
     |                       |- warning: static property 'minimum' is not concurrency-safe because non-'Sendable' type 'IconQuotaLimitTarget' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'minimum' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  62 |
  63 |     public init?(rawValue: String) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:80:23: warning: static property 'usageRemaining' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
  71 | }
  72 |
  73 | public enum IconCircleFillMetric: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconCircleFillMetric' conform to the 'Sendable' protocol
  74 |     case weekly = "Weekly Limit"
  75 |     case fiveHour = "5-Hour Limit"
     :
  78 |     public var id: String { rawValue }
  79 |
  80 |     public static let usageRemaining: IconCircleFillMetric = .matchNumber
     |                       |- warning: static property 'usageRemaining' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'usageRemaining' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  81 |     public static let timeUntilReset: IconCircleFillMetric = .weekly
  82 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:81:23: warning: static property 'timeUntilReset' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
  71 | }
  72 |
  73 | public enum IconCircleFillMetric: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconCircleFillMetric' conform to the 'Sendable' protocol
  74 |     case weekly = "Weekly Limit"
  75 |     case fiveHour = "5-Hour Limit"
     :
  79 |
  80 |     public static let usageRemaining: IconCircleFillMetric = .matchNumber
  81 |     public static let timeUntilReset: IconCircleFillMetric = .weekly
     |                       |- warning: static property 'timeUntilReset' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'timeUntilReset' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  82 |
  83 |     public init?(rawValue: String) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:414:24: warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 412 |     }
 413 |
 414 |     private static let isoFormatter = ISO8601DateFormatter()
     |                        |- warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: add '@MainActor' to make static property 'isoFormatter' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 415 |     private static let relativeDateTimeFormatter: RelativeDateTimeFormatter = {
 416 |         let formatter = RelativeDateTimeFormatter()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:415:24: warning: static property 'relativeDateTimeFormatter' is not concurrency-safe because non-'Sendable' type 'RelativeDateTimeFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 413 |
 414 |     private static let isoFormatter = ISO8601DateFormatter()
 415 |     private static let relativeDateTimeFormatter: RelativeDateTimeFormatter = {
     |                        |- warning: static property 'relativeDateTimeFormatter' is not concurrency-safe because non-'Sendable' type 'RelativeDateTimeFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: add '@MainActor' to make static property 'relativeDateTimeFormatter' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 416 |         let formatter = RelativeDateTimeFormatter()
 417 |         formatter.unitsStyle = .short
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSRelativeDateTimeFormatter.h:27:12: note: class 'RelativeDateTimeFormatter' does not conform to the 'Sendable' protocol
25 |  */
26 | API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
27 | @interface NSRelativeDateTimeFormatter : NSFormatter
   |            `- note: class 'RelativeDateTimeFormatter' does not conform to the 'Sendable' protocol
28 | #if !__OBJC2__
29 | {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:920:37: warning: capture of 'self' with non-sendable type 'AgyStatsViewModel?' in a '@Sendable' closure
 105 |
 106 | @Observable
 107 | public final class AgyStatsViewModel {
     |                    `- note: class 'AgyStatsViewModel' does not conform to the 'Sendable' protocol
 108 |     private let userDefaults: UserDefaults
 109 |
     :
 918 |         let interval = adaptivePollingInterval
 919 |         let timer = Timer(timeInterval: interval, repeats: false) { [weak self] _ in
 920 |             Task { @MainActor [weak self] in
     |                                     `- warning: capture of 'self' with non-sendable type 'AgyStatsViewModel?' in a '@Sendable' closure
 921 |                 await self?.refreshQuotaOnly()
 922 |                 self?.scheduleAdaptiveQuotaPolling()
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/UpdateChecker.swift:29:9: warning: code after 'return' will never be executed
 27 |         #endif
 28 |
 29 |         if Bundle.main.bundlePath.contains("DerivedData") {
    |         `- warning: code after 'return' will never be executed
 30 |             return nil
 31 |         }
macro expansion @ObservationTracked:7:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:118:6: note: expanded code originates here
 116 |             Task { await refresh() }
 117 |         }
 118 |     }
     +--- macro expansion @ObservationTracked --------------------------
     | 5 |             AgyStatsService.clearCaches()
     | 6 |             restartWatcher()
     | 7 |             Task {
     |   |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
     | 8 |                 await refresh()
     |   |                       `- note: closure captures 'self' which is accessible to code in the current task
     | 9 |             }
     |10 |         }
     +------------------------------------------------------------------
 119 |
 120 |     public var menuBarDisplayMode: MenuBarDisplayMode {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:953:32: warning: sending 'loadedStats' risks causing data races; this is an error in the Swift 6 language mode
 950 |         let connected = FileManager.default.fileExists(atPath: path)
 951 |
 952 |         await MainActor.run {
     |                             `- note: access can happen concurrently
 953 |             var updatedStats = loadedStats
     |                                |- warning: sending 'loadedStats' risks causing data races; this is an error in the Swift 6 language mode
     |                                `- note: 'loadedStats' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 954 |             if updatedStats.quotaInfo == nil, let existingQuota = self.stats.quotaInfo {
 955 |                 updatedStats.quotaInfo = existingQuota
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:944:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 942 |
 943 |         await MainActor.run {
 944 |             isRefreshing = true
     |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 945 |         }
 946 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:954:67: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 952 |         await MainActor.run {
 953 |             var updatedStats = loadedStats
 954 |             if updatedStats.quotaInfo == nil, let existingQuota = self.stats.quotaInfo {
     |                                                                   |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                                                                   `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 955 |                 updatedStats.quotaInfo = existingQuota
 956 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:899:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 897 |
 898 |         // Initial load
 899 |         Task {
     |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 900 |             await refresh()
     |                   `- note: closure captures 'self' which is accessible to code in the current task
 901 |             await checkForUpdates()
 902 |         }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:875:17: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 873 |         watcher.onFileChanged = { [weak self] in
 874 |             Task { @MainActor [weak self] in
 875 |                 self?.lastFileChangedAt = Date()
     |                 |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                 `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 876 |                 self?.scheduleAdaptiveQuotaPolling()
 877 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:878:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 876 |                 self?.scheduleAdaptiveQuotaPolling()
 877 |             }
 878 |             Task { [weak self] in
     |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
 879 |                 // Do NOT block UI updates waiting on slow network timeouts or clear verified quota.
 880 |                 // Refresh stats immediately, preserving existing quotaInfo.
 881 |                 await self?.refresh()
     |                       `- note: closure captures 'self' which is accessible to code in the current task
 882 |                 await MainActor.run { [weak self] in
 883 |                     self?.scheduleAdaptiveQuotaPolling()
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:934:16: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 932 |         guard let quota = await AgyQuotaService.fetchQuota(forceRefresh: forceRefresh) else { return }
 933 |         await MainActor.run {
 934 |             if self.stats.quotaInfo != quota {
     |                |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 935 |                 self.stats.quotaInfo = quota
 936 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:883:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 881 |                 await self?.refresh()
 882 |                 await MainActor.run { [weak self] in
 883 |                     self?.scheduleAdaptiveQuotaPolling()
     |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 884 |                 }
 885 |                 // Fast follow-up: language server quota accounting may take 1-2s to settle after streaming
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:889:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 887 |                 await self?.refreshQuotaOnly(forceRefresh: true)
 888 |                 await MainActor.run { [weak self] in
 889 |                     self?.scheduleAdaptiveQuotaPolling()
     |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 890 |                 }
 891 |             }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:996:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
 994 |     public func checkForUpdates(showUpToDateFeedback: Bool = false) async {
 995 |         await MainActor.run {
 996 |             isCheckingForUpdates = true
     |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
 997 |             if showUpToDateFeedback {
 998 |                 updateCheckMessage = nil
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1005:13: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
1003 |
1004 |         await MainActor.run {
1005 |             isCheckingForUpdates = false
     |             |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |             `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
1006 |             availableUpdate = update
1007 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1020:20: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
1018 |             try? await Task.sleep(for: .seconds(4))
1019 |             await MainActor.run {
1020 |                 if availableUpdate == nil {
     |                    |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                    `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
1021 |                     updateCheckMessage = nil
1022 |                 }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1034:14: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1032 |         guard let update = availableUpdate, let dmgURL = update.downloadURL else { return }
1033 |
1034 |         Task {
     |              `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
1035 |             let didInstall = await SelfUpdater.update(
1036 |                 dmgURL: dmgURL,
1037 |                 publishedAt: update.publishedAt,
1038 |                 version: update.version
1039 |             ) { [weak self] state in
     |                       `- note: closure captures 'self' which is accessible to code in the current task
1040 |                 Task { @MainActor in
1041 |                     self?.selfUpdateState = state
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:1041:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
1039 |             ) { [weak self] state in
1040 |                 Task { @MainActor in
1041 |                     self?.selfUpdateState = state
     |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
     |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
1042 |                 }
1043 |             }
[13/28] Compiling agy_usage_stats ContentView.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:276:24: warning: static property 'iso8601Formatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
274 |     }
275 |
276 |     private static let iso8601Formatter = ISO8601DateFormatter()
    |                        |- warning: static property 'iso8601Formatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'iso8601Formatter' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
277 |     private static let iso8601FractionalFormatter: ISO8601DateFormatter = {
278 |         let f = ISO8601DateFormatter()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:277:24: warning: static property 'iso8601FractionalFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
275 |
276 |     private static let iso8601Formatter = ISO8601DateFormatter()
277 |     private static let iso8601FractionalFormatter: ISO8601DateFormatter = {
    |                        |- warning: static property 'iso8601FractionalFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'iso8601FractionalFormatter' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
278 |         let f = ISO8601DateFormatter()
279 |         f.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:430:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AgyUsageStats' may have shared mutable state; this is an error in the Swift 6 language mode
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
    :
428 |     public var accountWeeklyTotals: [String: Double]
429 |
430 |     public static let empty = AgyUsageStats(
    |                       |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AgyUsageStats' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'empty' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
431 |         totalQueries: 0,
432 |         queriesToday: 0,
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:478:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AgySettings' may have shared mutable state; this is an error in the Swift 6 language mode
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
    :
476 |     public var gcp: GcpConfig?
477 |
478 |     public static let `default` = AgySettings(
    |                       |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AgySettings' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
479 |         colorScheme: "dark",
480 |         enableTelemetry: false,
[14/28] Compiling agy_usage_stats AgyModels.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:276:24: warning: static property 'iso8601Formatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
274 |     }
275 |
276 |     private static let iso8601Formatter = ISO8601DateFormatter()
    |                        |- warning: static property 'iso8601Formatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'iso8601Formatter' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
277 |     private static let iso8601FractionalFormatter: ISO8601DateFormatter = {
278 |         let f = ISO8601DateFormatter()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:277:24: warning: static property 'iso8601FractionalFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
275 |
276 |     private static let iso8601Formatter = ISO8601DateFormatter()
277 |     private static let iso8601FractionalFormatter: ISO8601DateFormatter = {
    |                        |- warning: static property 'iso8601FractionalFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'iso8601FractionalFormatter' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
278 |         let f = ISO8601DateFormatter()
279 |         f.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:430:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AgyUsageStats' may have shared mutable state; this is an error in the Swift 6 language mode
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
    :
428 |     public var accountWeeklyTotals: [String: Double]
429 |
430 |     public static let empty = AgyUsageStats(
    |                       |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AgyUsageStats' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'empty' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
431 |         totalQueries: 0,
432 |         queriesToday: 0,
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:478:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AgySettings' may have shared mutable state; this is an error in the Swift 6 language mode
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
    :
476 |     public var gcp: GcpConfig?
477 |
478 |     public static let `default` = AgySettings(
    |                       |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AgySettings' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
479 |         colorScheme: "dark",
480 |         enableTelemetry: false,
[15/28] Compiling agy_usage_stats AgyFileWatcher.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyFileWatcher.swift:68:30: warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
 10 |
 11 | @Observable
 12 | public final class AgyFileWatcher {
    |                    `- note: class 'AgyFileWatcher' does not conform to the 'Sendable' protocol
 13 |     public var isWatching = false
 14 |     public var onFileChanged: (() -> Void)?
    :
 66 |
 67 |         queue.async { [weak self] in
 68 |             guard let self = self else { return }
    |                              `- warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
 69 |             self.lastSignature = self.currentSignature()
 70 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyFileWatcher.swift:149:13: warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
 10 |
 11 | @Observable
 12 | public final class AgyFileWatcher {
    |                    `- note: class 'AgyFileWatcher' does not conform to the 'Sendable' protocol
 13 |     public var isWatching = false
 14 |     public var onFileChanged: (() -> Void)?
    :
147 |         isWatching = false
148 |         queue.async { [weak self] in
149 |             self?.timerSource?.cancel()
    |             `- warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
150 |             self?.timerSource = nil
151 |             self?.historySource?.cancel()
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:213:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
211 |     public static func fetchQuota(forceRefresh: Bool = false) async -> AgyQuotaInfo? {
212 |         if !forceRefresh {
213 |             quotaLock.lock()
    |                       `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
214 |             if let cached = cachedQuota {
215 |                 let ttl = cached.info != nil ? cacheTTL : nilCacheTTL
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:218:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
216 |                 if Date().timeIntervalSince(cached.timestamp) < ttl {
217 |                     let info = cached.info?.normalizedForCurrentTime()
218 |                     quotaLock.unlock()
    |                               `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
219 |                     return info
220 |                 }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:222:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
220 |                 }
221 |             }
222 |             quotaLock.unlock()
    |                       `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
223 |         }
224 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:227:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
225 |         return await Task.detached(priority: .userInitiated) {
226 |             // Try last active port first if available
227 |             quotaLock.lock()
    |                       `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
228 |             let knownPort = lastActivePort
229 |             quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:229:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
227 |             quotaLock.lock()
228 |             let knownPort = lastActivePort
229 |             quotaLock.unlock()
    |                       `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
230 |
231 |             if let port = knownPort {
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:234:31: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
232 |                 if let info = await fetchFromPort(port), !info.groups.isEmpty {
233 |                     savePersistedQuota(info)
234 |                     quotaLock.lock()
    |                               `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
235 |                     cachedQuota = CachedQuota(info: info, timestamp: Date())
236 |                     quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:236:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
234 |                     quotaLock.lock()
235 |                     cachedQuota = CachedQuota(info: info, timestamp: Date())
236 |                     quotaLock.unlock()
    |                               `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
237 |                     return info
238 |                 }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:244:27: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
242 |             let portsToProbe = detectedPorts.filter { $0 != knownPort }
243 |             guard !portsToProbe.isEmpty else {
244 |                 quotaLock.lock()
    |                           `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
245 |                 lastActivePort = nil
246 |                 let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:248:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
246 |                 let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
247 |                 cachedQuota = CachedQuota(info: fallback, timestamp: Date())
248 |                 quotaLock.unlock()
    |                           `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
249 |                 return fallback
250 |             }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:257:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
255 |             }
256 |
257 |             quotaLock.lock()
    |                       `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
258 |             if let (port, info) = found {
259 |                 lastActivePort = port
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:261:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
259 |                 lastActivePort = port
260 |                 cachedQuota = CachedQuota(info: info, timestamp: Date())
261 |                 quotaLock.unlock()
    |                           `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
262 |                 savePersistedQuota(info)
263 |                 return info
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:268:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
266 |                 let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
267 |                 cachedQuota = CachedQuota(info: fallback, timestamp: Date())
268 |                 quotaLock.unlock()
    |                           `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
269 |                 return fallback
270 |             }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyFileWatcher.swift:175:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
173 |             let workItem = DispatchWorkItem { [weak self] in
174 |                 DispatchQueue.main.async {
175 |                     self?.onFileChanged?()
    |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
176 |                 }
177 |             }
[16/28] Compiling agy_usage_stats AgyQuotaService.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyFileWatcher.swift:68:30: warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
 10 |
 11 | @Observable
 12 | public final class AgyFileWatcher {
    |                    `- note: class 'AgyFileWatcher' does not conform to the 'Sendable' protocol
 13 |     public var isWatching = false
 14 |     public var onFileChanged: (() -> Void)?
    :
 66 |
 67 |         queue.async { [weak self] in
 68 |             guard let self = self else { return }
    |                              `- warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
 69 |             self.lastSignature = self.currentSignature()
 70 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyFileWatcher.swift:149:13: warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
 10 |
 11 | @Observable
 12 | public final class AgyFileWatcher {
    |                    `- note: class 'AgyFileWatcher' does not conform to the 'Sendable' protocol
 13 |     public var isWatching = false
 14 |     public var onFileChanged: (() -> Void)?
    :
147 |         isWatching = false
148 |         queue.async { [weak self] in
149 |             self?.timerSource?.cancel()
    |             `- warning: capture of 'self' with non-sendable type 'AgyFileWatcher?' in a '@Sendable' closure
150 |             self?.timerSource = nil
151 |             self?.historySource?.cancel()
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:213:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
211 |     public static func fetchQuota(forceRefresh: Bool = false) async -> AgyQuotaInfo? {
212 |         if !forceRefresh {
213 |             quotaLock.lock()
    |                       `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
214 |             if let cached = cachedQuota {
215 |                 let ttl = cached.info != nil ? cacheTTL : nilCacheTTL
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:218:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
216 |                 if Date().timeIntervalSince(cached.timestamp) < ttl {
217 |                     let info = cached.info?.normalizedForCurrentTime()
218 |                     quotaLock.unlock()
    |                               `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
219 |                     return info
220 |                 }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:222:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
220 |                 }
221 |             }
222 |             quotaLock.unlock()
    |                       `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
223 |         }
224 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:227:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
225 |         return await Task.detached(priority: .userInitiated) {
226 |             // Try last active port first if available
227 |             quotaLock.lock()
    |                       `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
228 |             let knownPort = lastActivePort
229 |             quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:229:23: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
227 |             quotaLock.lock()
228 |             let knownPort = lastActivePort
229 |             quotaLock.unlock()
    |                       `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
230 |
231 |             if let port = knownPort {
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:234:31: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
232 |                 if let info = await fetchFromPort(port), !info.groups.isEmpty {
233 |                     savePersistedQuota(info)
234 |                     quotaLock.lock()
    |                               `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
235 |                     cachedQuota = CachedQuota(info: info, timestamp: Date())
236 |                     quotaLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:236:31: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
234 |                     quotaLock.lock()
235 |                     cachedQuota = CachedQuota(info: info, timestamp: Date())
236 |                     quotaLock.unlock()
    |                               `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
237 |                     return info
238 |                 }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:244:27: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
242 |             let portsToProbe = detectedPorts.filter { $0 != knownPort }
243 |             guard !portsToProbe.isEmpty else {
244 |                 quotaLock.lock()
    |                           `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
245 |                 lastActivePort = nil
246 |                 let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:248:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
246 |                 let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
247 |                 cachedQuota = CachedQuota(info: fallback, timestamp: Date())
248 |                 quotaLock.unlock()
    |                           `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
249 |                 return fallback
250 |             }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:257:23: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
255 |             }
256 |
257 |             quotaLock.lock()
    |                       `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
258 |             if let (port, info) = found {
259 |                 lastActivePort = port
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:261:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
259 |                 lastActivePort = port
260 |                 cachedQuota = CachedQuota(info: info, timestamp: Date())
261 |                 quotaLock.unlock()
    |                           `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
262 |                 savePersistedQuota(info)
263 |                 return info
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyQuotaService.swift:268:27: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
266 |                 let fallback = (cachedQuota?.info ?? _lastKnownSubscriptionQuota ?? loadPersistedQuotaUnlocked())?.normalizedForCurrentTime()
267 |                 cachedQuota = CachedQuota(info: fallback, timestamp: Date())
268 |                 quotaLock.unlock()
    |                           `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
269 |                 return fallback
270 |             }
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyFileWatcher.swift:175:21: warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
173 |             let workItem = DispatchWorkItem { [weak self] in
174 |                 DispatchQueue.main.async {
175 |                     self?.onFileChanged?()
    |                     |- warning: sending 'self' risks causing data races; this is an error in the Swift 6 language mode
    |                     `- note: task-isolated 'self' is captured by a main actor-isolated closure. main actor-isolated uses in closure may race against later nonisolated uses
176 |                 }
177 |             }
[17/28] Emitting module agy_usage_stats
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:276:24: warning: static property 'iso8601Formatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
274 |     }
275 |
276 |     private static let iso8601Formatter = ISO8601DateFormatter()
    |                        |- warning: static property 'iso8601Formatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'iso8601Formatter' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
277 |     private static let iso8601FractionalFormatter: ISO8601DateFormatter = {
278 |         let f = ISO8601DateFormatter()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:277:24: warning: static property 'iso8601FractionalFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
275 |
276 |     private static let iso8601Formatter = ISO8601DateFormatter()
277 |     private static let iso8601FractionalFormatter: ISO8601DateFormatter = {
    |                        |- warning: static property 'iso8601FractionalFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: add '@MainActor' to make static property 'iso8601FractionalFormatter' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
278 |         let f = ISO8601DateFormatter()
279 |         f.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:430:23: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AgyUsageStats' may have shared mutable state; this is an error in the Swift 6 language mode
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
    :
428 |     public var accountWeeklyTotals: [String: Double]
429 |
430 |     public static let empty = AgyUsageStats(
    |                       |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AgyUsageStats' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'empty' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
431 |         totalQueries: 0,
432 |         queriesToday: 0,
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:478:23: warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AgySettings' may have shared mutable state; this is an error in the Swift 6 language mode
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
    :
476 |     public var gcp: GcpConfig?
477 |
478 |     public static let `default` = AgySettings(
    |                       |- warning: static property 'default' is not concurrency-safe because non-'Sendable' type 'AgySettings' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'default' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
479 |         colorScheme: "dark",
480 |         enableTelemetry: false,
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:80:24: warning: static property 'conversationCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  78 |     }
  79 |
  80 |     private static var conversationCache: [String: ConversationCacheEntry] = [:]
     |                        |- warning: static property 'conversationCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'conversationCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'conversationCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  81 |     private static let conversationCacheLock = NSLock()
  82 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:83:24: warning: static property 'historyCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  81 |     private static let conversationCacheLock = NSLock()
  82 |
  83 |     private static var historyCache: HistoryCacheEntry? = nil
     |                        |- warning: static property 'historyCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'historyCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'historyCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  84 |     private static let historyCacheLock = NSLock()
  85 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:86:24: warning: static property 'authCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  84 |     private static let historyCacheLock = NSLock()
  85 |
  86 |     private static var authCache: AuthCacheEntry? = nil
     |                        |- warning: static property 'authCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'authCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'authCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  87 |     private static let authCacheLock = NSLock()
  88 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:89:24: warning: static property 'logFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  87 |     private static let authCacheLock = NSLock()
  88 |
  89 |     private static var logFileCache: [String: LogFileEntry] = [:]
     |                        |- warning: static property 'logFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'logFileCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'logFileCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  90 |     private static let logFileCacheLock = NSLock()
  91 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:116:24: warning: static property 'modelTransitionCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 114 |     }
 115 |
 116 |     private static var modelTransitionCache: ModelTransitionCacheEntry? = nil
     |                        |- warning: static property 'modelTransitionCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'modelTransitionCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'modelTransitionCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 117 |     private static let modelTransitionCacheLock = NSLock()
 118 |     private static var modelLogFileCache: [String: ModelLogFileEntry] = [:]
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:118:24: warning: static property 'modelLogFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 116 |     private static var modelTransitionCache: ModelTransitionCacheEntry? = nil
 117 |     private static let modelTransitionCacheLock = NSLock()
 118 |     private static var modelLogFileCache: [String: ModelLogFileEntry] = [:]
     |                        |- warning: static property 'modelLogFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'modelLogFileCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'modelLogFileCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 119 |     private static let modelLogFileCacheLock = NSLock()
 120 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:149:24: warning: static property 'statsCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 147 |     }
 148 |
 149 |     private static var statsCache: StatsCacheEntry? = nil
     |                        |- warning: static property 'statsCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'statsCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'statsCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 150 |     private static let statsCacheLock = NSLock()
 151 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:22: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                      `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:22: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                      `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:27: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                           `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:27: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                           `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:352:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 350 |
 351 |             // Fast cache check: if history.jsonl, conversations dir, GCP dual-box files, and settings haven't changed today, return immediately
 352 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 353 |             if let cached = statsCache,
 354 |                cached.cliDir == expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:367:32: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 365 |                cached.gcpConversationsSig == gcpConvSig {
 366 |                 var cachedStats = cached.stats
 367 |                 statsCacheLock.unlock()
     |                                `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 368 |
 369 |                 // Fetch fresh quota without blocking UI if already cached
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:377:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 375 |                 return (cachedStats, settings)
 376 |             }
 377 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 378 |
 379 |             let tStart = ContinuousClock.now
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:733:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 731 |             print("TIME: quotaInfo await = \(tQuota.duration(to: .now))")
 732 |
 733 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 734 |             let previousCachedQuota = statsCache?.stats.quotaInfo
 735 |             statsCacheLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:735:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 733 |             statsCacheLock.lock()
 734 |             let previousCachedQuota = statsCache?.stats.quotaInfo
 735 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 736 |             let quotaInfo = fetchedQuota ?? existingQuota ?? previousCachedQuota
 737 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1247:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1245 |             )
1246 |
1247 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1248 |             statsCache = StatsCacheEntry(
1249 |                 cliDir: expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1263:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1261 |                 stats: stats
1262 |             )
1263 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1264 |
1265 |             let dAuth = tStart.duration(to: tHist)
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1286:11: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1284 |             print(timingSummary)
1285 |             return (stats, settings)
1286 |         }.value
     |           `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1287 |     }
1288 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1286:11: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1284 |             print(timingSummary)
1285 |             return (stats, settings)
1286 |         }.value
     |           `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1287 |     }
1288 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/SelfUpdater.swift:274:9: warning: stored property 'onProgress' of 'Sendable'-conforming class 'DownloadDelegate' has non-sendable type '(Double) -> Void'; this is an error in the Swift 6 language mode
272 |
273 | private final class DownloadDelegate: NSObject, URLSessionDownloadDelegate {
274 |     let onProgress: (Double) -> Void
    |         |- warning: stored property 'onProgress' of 'Sendable'-conforming class 'DownloadDelegate' has non-sendable type '(Double) -> Void'; this is an error in the Swift 6 language mode
    |         `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
275 |
276 |     init(progress: @escaping (Double) -> Void) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:61:23: warning: static property 'minimum' is not concurrency-safe because non-'Sendable' type 'IconQuotaLimitTarget' may have shared mutable state; this is an error in the Swift 6 language mode
  52 | }
  53 |
  54 | public enum IconQuotaLimitTarget: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconQuotaLimitTarget' conform to the 'Sendable' protocol
  55 |     case fiveHour = "5-Hour Limit"
  56 |     case weekly = "Weekly Limit"
     :
  59 |     public var id: String { rawValue }
  60 |
  61 |     public static let minimum: IconQuotaLimitTarget = .auto
     |                       |- warning: static property 'minimum' is not concurrency-safe because non-'Sendable' type 'IconQuotaLimitTarget' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'minimum' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  62 |
  63 |     public init?(rawValue: String) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:80:23: warning: static property 'usageRemaining' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
  71 | }
  72 |
  73 | public enum IconCircleFillMetric: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconCircleFillMetric' conform to the 'Sendable' protocol
  74 |     case weekly = "Weekly Limit"
  75 |     case fiveHour = "5-Hour Limit"
     :
  78 |     public var id: String { rawValue }
  79 |
  80 |     public static let usageRemaining: IconCircleFillMetric = .matchNumber
     |                       |- warning: static property 'usageRemaining' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'usageRemaining' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  81 |     public static let timeUntilReset: IconCircleFillMetric = .weekly
  82 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:81:23: warning: static property 'timeUntilReset' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
  71 | }
  72 |
  73 | public enum IconCircleFillMetric: String, Codable, CaseIterable, Identifiable {
     |             `- note: consider making enum 'IconCircleFillMetric' conform to the 'Sendable' protocol
  74 |     case weekly = "Weekly Limit"
  75 |     case fiveHour = "5-Hour Limit"
     :
  79 |
  80 |     public static let usageRemaining: IconCircleFillMetric = .matchNumber
  81 |     public static let timeUntilReset: IconCircleFillMetric = .weekly
     |                       |- warning: static property 'timeUntilReset' is not concurrency-safe because non-'Sendable' type 'IconCircleFillMetric' may have shared mutable state; this is an error in the Swift 6 language mode
     |                       |- note: add '@MainActor' to make static property 'timeUntilReset' part of global actor 'MainActor'
     |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  82 |
  83 |     public init?(rawValue: String) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:414:24: warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 412 |     }
 413 |
 414 |     private static let isoFormatter = ISO8601DateFormatter()
     |                        |- warning: static property 'isoFormatter' is not concurrency-safe because non-'Sendable' type 'ISO8601DateFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: add '@MainActor' to make static property 'isoFormatter' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 415 |     private static let relativeDateTimeFormatter: RelativeDateTimeFormatter = {
 416 |         let formatter = RelativeDateTimeFormatter()
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSISO8601DateFormatter.h:46:12: note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
44 |
45 | API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
46 | @interface NSISO8601DateFormatter : NSFormatter <NSSecureCoding> {
   |            `- note: class 'ISO8601DateFormatter' does not conform to the 'Sendable' protocol
47 | @private
48 |     CFDateFormatterRef _formatter;
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:415:24: warning: static property 'relativeDateTimeFormatter' is not concurrency-safe because non-'Sendable' type 'RelativeDateTimeFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
 413 |
 414 |     private static let isoFormatter = ISO8601DateFormatter()
 415 |     private static let relativeDateTimeFormatter: RelativeDateTimeFormatter = {
     |                        |- warning: static property 'relativeDateTimeFormatter' is not concurrency-safe because non-'Sendable' type 'RelativeDateTimeFormatter' may have shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: add '@MainActor' to make static property 'relativeDateTimeFormatter' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 416 |         let formatter = RelativeDateTimeFormatter()
 417 |         formatter.unitsStyle = .short
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSRelativeDateTimeFormatter.h:27:12: note: class 'RelativeDateTimeFormatter' does not conform to the 'Sendable' protocol
25 |  */
26 | API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0))
27 | @interface NSRelativeDateTimeFormatter : NSFormatter
   |            `- note: class 'RelativeDateTimeFormatter' does not conform to the 'Sendable' protocol
28 | #if !__OBJC2__
29 | {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/agy_usage_statsApp.swift:175:23: warning: static property 'menuBarFont' is not concurrency-safe because non-'Sendable' type 'NSFont' may have shared mutable state; this is an error in the Swift 6 language mode
173 |     }
174 |
175 |     public static let menuBarFont: NSFont = {
    |                       |- warning: static property 'menuBarFont' is not concurrency-safe because non-'Sendable' type 'NSFont' may have shared mutable state; this is an error in the Swift 6 language mode
    |                       |- note: add '@MainActor' to make static property 'menuBarFont' part of global actor 'MainActor'
    |                       `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
176 |         let baseDesc = NSFont.systemFont(ofSize: 11.0, weight: .bold).fontDescriptor.withDesign(.rounded)
177 |         if let baseDesc {
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSFont.h:24:12: note: class 'NSFont' does not conform to the 'Sendable' protocol
 22 | APPKIT_EXTERN const CGFloat * NSFontIdentityMatrix;
 23 |
 24 | @interface NSFont : NSObject <NSCopying, NSSecureCoding>
    |            `- note: class 'NSFont' does not conform to the 'Sendable' protocol
 25 |
 26 | /********* Factory *********/
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/agy_usage_statsApp.swift:428:24: warning: static property 'cachedAntigravityIcon' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
426 |
427 | public enum AgyMenuBarRenderer {
428 |     private static var cachedAntigravityIcon: (key: String, image: NSImage)? = nil
    |                        |- warning: static property 'cachedAntigravityIcon' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
    |                        |- note: convert 'cachedAntigravityIcon' to a 'let' constant to make 'Sendable' shared state immutable
    |                        |- note: add '@MainActor' to make static property 'cachedAntigravityIcon' part of global actor 'MainActor'
    |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
429 |
430 |     public static func makeAntigravityImage(
macro expansion @ObservationTracked:7:18: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
`- /Users/admin/builder/spi-builder-workspace/agy-usage-stats/ViewModels/AgyStatsViewModel.swift:118:6: note: expanded code originates here
 116 |             Task { await refresh() }
 117 |         }
 118 |     }
     +--- macro expansion @ObservationTracked --------------------------
     | 5 |             AgyStatsService.clearCaches()
     | 6 |             restartWatcher()
     | 7 |             Task {
     |   |                  `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
     | 8 |                 await refresh()
     |   |                       `- note: closure captures 'self' which is accessible to code in the current task
     | 9 |             }
     |10 |         }
     +------------------------------------------------------------------
 119 |
 120 |     public var menuBarDisplayMode: MenuBarDisplayMode {
[18/28] Compiling agy_usage_stats MenuBarPopover.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/OverviewTabView.swift:747:28: warning: value 'pinned' was defined but never used; consider replacing with boolean test
 745 |                     Spacer()
 746 |
 747 |                     if let pinned = pinnedBucket {
     |                            `- warning: value 'pinned' was defined but never used; consider replacing with boolean test
 748 |                         Button {
 749 |                             withAnimation(.spring(response: 0.2, dampingFraction: 0.8)) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/MenuBarPopover.swift:75:33: warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
 73 |             viewModel.setup()
 74 |             Task {
 75 |                 await viewModel.refreshQuotaOnly(forceRefresh: true)
    |                                 |- warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
    |                                 `- note: sending main actor-isolated 'self.viewModel' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 76 |             }
 77 |         }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/MenuBarPopover.swift:115:49: warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
113 |                         Button {
114 |                             Task {
115 |                                 await viewModel.refresh()
    |                                                 |- warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
    |                                                 `- note: sending main actor-isolated 'self.viewModel' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
116 |                             }
117 |                         } label: {
[19/28] Compiling agy_usage_stats OverviewTabView.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/OverviewTabView.swift:747:28: warning: value 'pinned' was defined but never used; consider replacing with boolean test
 745 |                     Spacer()
 746 |
 747 |                     if let pinned = pinnedBucket {
     |                            `- warning: value 'pinned' was defined but never used; consider replacing with boolean test
 748 |                         Button {
 749 |                             withAnimation(.spring(response: 0.2, dampingFraction: 0.8)) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/MenuBarPopover.swift:75:33: warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
 73 |             viewModel.setup()
 74 |             Task {
 75 |                 await viewModel.refreshQuotaOnly(forceRefresh: true)
    |                                 |- warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
    |                                 `- note: sending main actor-isolated 'self.viewModel' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
 76 |             }
 77 |         }
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Views/MenuBarPopover.swift:115:49: warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
113 |                         Button {
114 |                             Task {
115 |                                 await viewModel.refresh()
    |                                                 |- warning: sending 'self.viewModel' risks causing data races; this is an error in the Swift 6 language mode
    |                                                 `- note: sending main actor-isolated 'self.viewModel' to nonisolated callee risks causing data races between nonisolated and main actor-isolated uses
116 |                             }
117 |                         } label: {
[20/28] Compiling agy_usage_stats CostTabView.swift
[21/28] Compiling agy_usage_stats HistoryTabView.swift
[22/28] Compiling agy_usage_stats ActivityTabView.swift
[23/28] Compiling agy_usage_stats AppTheme.swift
[24/28] Compiling agy_usage_stats AgyStatsService.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:80:24: warning: static property 'conversationCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  78 |     }
  79 |
  80 |     private static var conversationCache: [String: ConversationCacheEntry] = [:]
     |                        |- warning: static property 'conversationCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'conversationCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'conversationCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  81 |     private static let conversationCacheLock = NSLock()
  82 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:83:24: warning: static property 'historyCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  81 |     private static let conversationCacheLock = NSLock()
  82 |
  83 |     private static var historyCache: HistoryCacheEntry? = nil
     |                        |- warning: static property 'historyCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'historyCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'historyCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  84 |     private static let historyCacheLock = NSLock()
  85 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:86:24: warning: static property 'authCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  84 |     private static let historyCacheLock = NSLock()
  85 |
  86 |     private static var authCache: AuthCacheEntry? = nil
     |                        |- warning: static property 'authCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'authCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'authCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  87 |     private static let authCacheLock = NSLock()
  88 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:89:24: warning: static property 'logFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  87 |     private static let authCacheLock = NSLock()
  88 |
  89 |     private static var logFileCache: [String: LogFileEntry] = [:]
     |                        |- warning: static property 'logFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'logFileCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'logFileCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  90 |     private static let logFileCacheLock = NSLock()
  91 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:116:24: warning: static property 'modelTransitionCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 114 |     }
 115 |
 116 |     private static var modelTransitionCache: ModelTransitionCacheEntry? = nil
     |                        |- warning: static property 'modelTransitionCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'modelTransitionCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'modelTransitionCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 117 |     private static let modelTransitionCacheLock = NSLock()
 118 |     private static var modelLogFileCache: [String: ModelLogFileEntry] = [:]
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:118:24: warning: static property 'modelLogFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 116 |     private static var modelTransitionCache: ModelTransitionCacheEntry? = nil
 117 |     private static let modelTransitionCacheLock = NSLock()
 118 |     private static var modelLogFileCache: [String: ModelLogFileEntry] = [:]
     |                        |- warning: static property 'modelLogFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'modelLogFileCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'modelLogFileCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 119 |     private static let modelLogFileCacheLock = NSLock()
 120 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:149:24: warning: static property 'statsCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 147 |     }
 148 |
 149 |     private static var statsCache: StatsCacheEntry? = nil
     |                        |- warning: static property 'statsCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'statsCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'statsCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 150 |     private static let statsCacheLock = NSLock()
 151 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:22: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                      `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:22: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                      `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:27: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                           `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:27: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                           `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:352:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 350 |
 351 |             // Fast cache check: if history.jsonl, conversations dir, GCP dual-box files, and settings haven't changed today, return immediately
 352 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 353 |             if let cached = statsCache,
 354 |                cached.cliDir == expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:367:32: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 365 |                cached.gcpConversationsSig == gcpConvSig {
 366 |                 var cachedStats = cached.stats
 367 |                 statsCacheLock.unlock()
     |                                `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 368 |
 369 |                 // Fetch fresh quota without blocking UI if already cached
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:377:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 375 |                 return (cachedStats, settings)
 376 |             }
 377 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 378 |
 379 |             let tStart = ContinuousClock.now
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:733:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 731 |             print("TIME: quotaInfo await = \(tQuota.duration(to: .now))")
 732 |
 733 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 734 |             let previousCachedQuota = statsCache?.stats.quotaInfo
 735 |             statsCacheLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:735:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 733 |             statsCacheLock.lock()
 734 |             let previousCachedQuota = statsCache?.stats.quotaInfo
 735 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 736 |             let quotaInfo = fetchedQuota ?? existingQuota ?? previousCachedQuota
 737 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1247:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1245 |             )
1246 |
1247 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1248 |             statsCache = StatsCacheEntry(
1249 |                 cliDir: expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1263:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1261 |                 stats: stats
1262 |             )
1263 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1264 |
1265 |             let dAuth = tStart.duration(to: tHist)
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1286:11: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1284 |             print(timingSummary)
1285 |             return (stats, settings)
1286 |         }.value
     |           `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1287 |     }
1288 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1286:11: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1284 |             print(timingSummary)
1285 |             return (stats, settings)
1286 |         }.value
     |           `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1287 |     }
1288 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1723:85: warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1721 |         for file in logFiles {
1722 |             let fullPath = (logDir as NSString).appendingPathComponent(file)
1723 |             guard let text = try? String(contentsOfFile: fullPath, encoding: .utf8) ?? String(contentsOfFile: fullPath, encoding: .ascii) else { continue }
     |                                                                                     `- warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1724 |
1725 |             let isConsumer = text.contains("authMethod=consumer") || text.contains("daily-cloudcode-pa.googleapis.com")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/SelfUpdater.swift:274:9: warning: stored property 'onProgress' of 'Sendable'-conforming class 'DownloadDelegate' has non-sendable type '(Double) -> Void'; this is an error in the Swift 6 language mode
272 |
273 | private final class DownloadDelegate: NSObject, URLSessionDownloadDelegate {
274 |     let onProgress: (Double) -> Void
    |         |- warning: stored property 'onProgress' of 'Sendable'-conforming class 'DownloadDelegate' has non-sendable type '(Double) -> Void'; this is an error in the Swift 6 language mode
    |         `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
275 |
276 |     init(progress: @escaping (Double) -> Void) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:2143:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
2141 |         let results = await withTaskGroup(of: (DbConversationData, [String: Int], Bool).self) { group in
2142 |             for file in dbFiles {
2143 |                 group.addTask {
     |                               `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
2144 |                     return parseDbConversationAndToolStats(file: file, conversationsDir: conversationsDir, fm: fm, isGcpOrigin: isGcpOrigin)
     |                                                                                                                `- note: closure captures 'fm' which is accessible to code in the current task
2145 |                 }
2146 |             }
[25/28] Compiling agy_usage_stats SelfUpdater.swift
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:80:24: warning: static property 'conversationCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  78 |     }
  79 |
  80 |     private static var conversationCache: [String: ConversationCacheEntry] = [:]
     |                        |- warning: static property 'conversationCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'conversationCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'conversationCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  81 |     private static let conversationCacheLock = NSLock()
  82 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:83:24: warning: static property 'historyCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  81 |     private static let conversationCacheLock = NSLock()
  82 |
  83 |     private static var historyCache: HistoryCacheEntry? = nil
     |                        |- warning: static property 'historyCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'historyCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'historyCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  84 |     private static let historyCacheLock = NSLock()
  85 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:86:24: warning: static property 'authCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  84 |     private static let historyCacheLock = NSLock()
  85 |
  86 |     private static var authCache: AuthCacheEntry? = nil
     |                        |- warning: static property 'authCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'authCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'authCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  87 |     private static let authCacheLock = NSLock()
  88 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:89:24: warning: static property 'logFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
  87 |     private static let authCacheLock = NSLock()
  88 |
  89 |     private static var logFileCache: [String: LogFileEntry] = [:]
     |                        |- warning: static property 'logFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'logFileCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'logFileCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
  90 |     private static let logFileCacheLock = NSLock()
  91 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:116:24: warning: static property 'modelTransitionCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 114 |     }
 115 |
 116 |     private static var modelTransitionCache: ModelTransitionCacheEntry? = nil
     |                        |- warning: static property 'modelTransitionCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'modelTransitionCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'modelTransitionCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 117 |     private static let modelTransitionCacheLock = NSLock()
 118 |     private static var modelLogFileCache: [String: ModelLogFileEntry] = [:]
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:118:24: warning: static property 'modelLogFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 116 |     private static var modelTransitionCache: ModelTransitionCacheEntry? = nil
 117 |     private static let modelTransitionCacheLock = NSLock()
 118 |     private static var modelLogFileCache: [String: ModelLogFileEntry] = [:]
     |                        |- warning: static property 'modelLogFileCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'modelLogFileCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'modelLogFileCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 119 |     private static let modelLogFileCacheLock = NSLock()
 120 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:149:24: warning: static property 'statsCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
 147 |     }
 148 |
 149 |     private static var statsCache: StatsCacheEntry? = nil
     |                        |- warning: static property 'statsCache' is not concurrency-safe because it is nonisolated global shared mutable state; this is an error in the Swift 6 language mode
     |                        |- note: convert 'statsCache' to a 'let' constant to make 'Sendable' shared state immutable
     |                        |- note: add '@MainActor' to make static property 'statsCache' part of global actor 'MainActor'
     |                        `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
 150 |     private static let statsCacheLock = NSLock()
 151 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:22: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                      `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:22: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                      `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:27: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                           `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:317:27: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 315 |
 316 |     public static func loadStats(cliDir: String, gcpCliDir: String? = nil, existingQuota: AgyQuotaInfo? = nil) async -> (AgyUsageStats, AgySettings) {
 317 |         return await Task.detached(priority: .userInitiated) {
     |                           `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
 318 |             let expandedDir = cliDir.replacingOccurrences(of: "~", with: NSHomeDirectory())
 319 |             let historyPath = (expandedDir as NSString).appendingPathComponent("history.jsonl")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:352:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 350 |
 351 |             // Fast cache check: if history.jsonl, conversations dir, GCP dual-box files, and settings haven't changed today, return immediately
 352 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 353 |             if let cached = statsCache,
 354 |                cached.cliDir == expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:367:32: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 365 |                cached.gcpConversationsSig == gcpConvSig {
 366 |                 var cachedStats = cached.stats
 367 |                 statsCacheLock.unlock()
     |                                `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 368 |
 369 |                 // Fetch fresh quota without blocking UI if already cached
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:377:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 375 |                 return (cachedStats, settings)
 376 |             }
 377 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 378 |
 379 |             let tStart = ContinuousClock.now
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:733:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 731 |             print("TIME: quotaInfo await = \(tQuota.duration(to: .now))")
 732 |
 733 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 734 |             let previousCachedQuota = statsCache?.stats.quotaInfo
 735 |             statsCacheLock.unlock()
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:735:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 733 |             statsCacheLock.lock()
 734 |             let previousCachedQuota = statsCache?.stats.quotaInfo
 735 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
 736 |             let quotaInfo = fetchedQuota ?? existingQuota ?? previousCachedQuota
 737 |
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1247:28: warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1245 |             )
1246 |
1247 |             statsCacheLock.lock()
     |                            `- warning: instance method 'lock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1248 |             statsCache = StatsCacheEntry(
1249 |                 cliDir: expandedDir,
Foundation.NSLock.lock:2:11: note: 'lock()' declared here
1 | class NSLock {
2 | open func lock()}
  |           `- note: 'lock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1263:28: warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1261 |                 stats: stats
1262 |             )
1263 |             statsCacheLock.unlock()
     |                            `- warning: instance method 'unlock' is unavailable from asynchronous contexts; Use async-safe scoped locking instead; this is an error in the Swift 6 language mode
1264 |
1265 |             let dAuth = tStart.duration(to: tHist)
Foundation.NSLock.unlock:2:11: note: 'unlock()' declared here
1 | class NSLock {
2 | open func unlock()}
  |           `- note: 'unlock()' declared here
3 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1286:11: warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1284 |             print(timingSummary)
1285 |             return (stats, settings)
1286 |         }.value
     |           `- warning: type 'AgyUsageStats' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1287 |     }
1288 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:393:15: note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
391 | }
392 |
393 | public struct AgyUsageStats: Codable, Equatable {
    |               `- note: consider making struct 'AgyUsageStats' conform to the 'Sendable' protocol
394 |     public var totalQueries: Int
395 |     public var queriesToday: Int
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1286:11: warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1284 |             print(timingSummary)
1285 |             return (stats, settings)
1286 |         }.value
     |           `- warning: type 'AgySettings' does not conform to the 'Sendable' protocol; this is an error in the Swift 6 language mode
1287 |     }
1288 |
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Models/AgyModels.swift:471:15: note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
469 | }
470 |
471 | public struct AgySettings: Codable, Equatable {
    |               `- note: consider making struct 'AgySettings' conform to the 'Sendable' protocol
472 |     public var colorScheme: String?
473 |     public var enableTelemetry: Bool?
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:1723:85: warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1721 |         for file in logFiles {
1722 |             let fullPath = (logDir as NSString).appendingPathComponent(file)
1723 |             guard let text = try? String(contentsOfFile: fullPath, encoding: .utf8) ?? String(contentsOfFile: fullPath, encoding: .ascii) else { continue }
     |                                                                                     `- warning: left side of nil coalescing operator '??' has non-optional type 'String', so the right side is never used
1724 |
1725 |             let isConsumer = text.contains("authMethod=consumer") || text.contains("daily-cloudcode-pa.googleapis.com")
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/SelfUpdater.swift:274:9: warning: stored property 'onProgress' of 'Sendable'-conforming class 'DownloadDelegate' has non-sendable type '(Double) -> Void'; this is an error in the Swift 6 language mode
272 |
273 | private final class DownloadDelegate: NSObject, URLSessionDownloadDelegate {
274 |     let onProgress: (Double) -> Void
    |         |- warning: stored property 'onProgress' of 'Sendable'-conforming class 'DownloadDelegate' has non-sendable type '(Double) -> Void'; this is an error in the Swift 6 language mode
    |         `- note: a function type must be marked '@Sendable' to conform to 'Sendable'
275 |
276 |     init(progress: @escaping (Double) -> Void) {
/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Services/AgyStatsService.swift:2143:31: warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
2141 |         let results = await withTaskGroup(of: (DbConversationData, [String: Int], Bool).self) { group in
2142 |             for file in dbFiles {
2143 |                 group.addTask {
     |                               `- warning: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure; this is an error in the Swift 6 language mode
2144 |                     return parseDbConversationAndToolStats(file: file, conversationsDir: conversationsDir, fm: fm, isGcpOrigin: isGcpOrigin)
     |                                                                                                                `- note: closure captures 'fm' which is accessible to code in the current task
2145 |                 }
2146 |             }
[25/28] Write Objects.LinkFileList
[26/28] Linking agy-usage-stats
[27/28] Applying agy-usage-stats
Build complete! (16.49s)
Build complete.
{
  "dependencies" : [
  ],
  "manifest_display_name" : "agy-usage-stats",
  "name" : "agy-usage-stats",
  "path" : "/Users/admin/builder/spi-builder-workspace",
  "platforms" : [
    {
      "name" : "macos",
      "version" : "15.0"
    }
  ],
  "products" : [
    {
      "name" : "agy-usage-stats",
      "targets" : [
        "agy-usage-stats"
      ],
      "type" : {
        "executable" : null
      }
    }
  ],
  "targets" : [
    {
      "c99name" : "agy_usage_statsTests",
      "module_type" : "SwiftTarget",
      "name" : "agy-usage-statsTests",
      "path" : "agy-usage-statsTests",
      "sources" : [
        "AgyStatsServiceTests.swift",
        "OverviewTabViewTests.swift",
        "agy_usage_statsTests.swift"
      ],
      "target_dependencies" : [
        "agy-usage-stats"
      ],
      "type" : "test"
    },
    {
      "c99name" : "agy_usage_stats",
      "module_type" : "SwiftTarget",
      "name" : "agy-usage-stats",
      "path" : "agy-usage-stats",
      "product_memberships" : [
        "agy-usage-stats"
      ],
      "resources" : [
        {
          "path" : "/Users/admin/builder/spi-builder-workspace/agy-usage-stats/Assets.xcassets",
          "rule" : {
            "process" : {
            }
          }
        }
      ],
      "sources" : [
        "ContentView.swift",
        "Models/AgyModels.swift",
        "Services/AgyFileWatcher.swift",
        "Services/AgyQuotaService.swift",
        "Services/AgyStatsService.swift",
        "Services/SelfUpdater.swift",
        "Services/UpdateChecker.swift",
        "ViewModels/AgyStatsViewModel.swift",
        "Views/ActivityTabView.swift",
        "Views/AppTheme.swift",
        "Views/CostTabView.swift",
        "Views/HistoryTabView.swift",
        "Views/MenuBarPopover.swift",
        "Views/OverviewTabView.swift",
        "Views/SettingsTabView.swift",
        "Views/StatsTabView.swift",
        "Views/Styles.swift",
        "Views/WorkspacesTabView.swift",
        "agy_usage_statsApp.swift"
      ],
      "type" : "executable"
    }
  ],
  "tools_version" : "5.9"
}
Done.