@sriinnu/runic 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +8 -1
  3. package/RuniciOS/Core/RunicTypographyiOS.swift +24 -0
  4. package/RuniciOS/Views/ProviderDetailView.swift +9 -9
  5. package/RuniciOS/Views/ProviderListView.swift +10 -10
  6. package/RuniciOS/Widgets/LargeWidget.swift +14 -14
  7. package/RuniciOS/Widgets/LiveActivity.swift +19 -19
  8. package/RuniciOS/Widgets/LockScreenWidget.swift +15 -15
  9. package/RuniciOS/Widgets/MediumWidget.swift +10 -10
  10. package/RuniciOS/Widgets/RunicWidget.swift +5 -5
  11. package/RuniciOS/Widgets/SmallWidget.swift +9 -9
  12. package/Sources/Runic/About.swift +3 -3
  13. package/Sources/Runic/AppNotifications.swift +5 -3
  14. package/Sources/Runic/Controllers/StatusItemController+Actions.swift +7 -3
  15. package/Sources/Runic/Controllers/StatusItemController+Animation.swift +5 -4
  16. package/Sources/Runic/Controllers/StatusItemController+ChartSubmenus.swift +30 -16
  17. package/Sources/Runic/Controllers/StatusItemController+CustomProviders.swift +6 -3
  18. package/Sources/Runic/Controllers/StatusItemController+Menu.swift +18 -13
  19. package/Sources/Runic/Controllers/StatusItemController+MenuCards.swift +6 -4
  20. package/Sources/Runic/Controllers/StatusItemController+MenuHelpers.swift +40 -12
  21. package/Sources/Runic/Controllers/StatusItemController.swift +43 -43
  22. package/Sources/Runic/Core/BudgetNotificationManager.swift +2 -1
  23. package/Sources/Runic/Core/Login/ClaudeLoginRunner.swift +2 -2
  24. package/Sources/Runic/Core/Login/CodexLoginRunner.swift +1 -1
  25. package/Sources/Runic/Core/Login/CursorLoginRunner.swift +4 -4
  26. package/Sources/Runic/Core/Login/GeminiLoginRunner.swift +1 -1
  27. package/Sources/Runic/Core/Rendering/IconRenderer.swift +91 -85
  28. package/Sources/Runic/Core/Rendering/IconView.swift +3 -1
  29. package/Sources/Runic/Core/RunicColors.swift +6 -6
  30. package/Sources/Runic/Core/RunicSpacing.swift +7 -7
  31. package/Sources/Runic/Core/RunicTypography.swift +206 -0
  32. package/Sources/Runic/Core/Stores/AuggieTokenStore.swift +1 -3
  33. package/Sources/Runic/Core/Stores/AzureOpenAITokenStore.swift +1 -3
  34. package/Sources/Runic/Core/Stores/CerebrasTokenStore.swift +1 -3
  35. package/Sources/Runic/Core/Stores/CohereTokenStore.swift +1 -3
  36. package/Sources/Runic/Core/Stores/CopilotTokenStore.swift +1 -3
  37. package/Sources/Runic/Core/Stores/CustomProviderStore.swift +10 -10
  38. package/Sources/Runic/Core/Stores/DeepSeekTokenStore.swift +1 -3
  39. package/Sources/Runic/Core/Stores/FireworksTokenStore.swift +1 -3
  40. package/Sources/Runic/Core/Stores/GroqTokenStore.swift +1 -3
  41. package/Sources/Runic/Core/Stores/KimiTokenStore.swift +1 -3
  42. package/Sources/Runic/Core/Stores/MiniMaxCookieHeaderStore.swift +1 -3
  43. package/Sources/Runic/Core/Stores/MiniMaxGroupIDStore.swift +1 -3
  44. package/Sources/Runic/Core/Stores/MiniMaxTokenStore.swift +1 -3
  45. package/Sources/Runic/Core/Stores/MistralTokenStore.swift +1 -3
  46. package/Sources/Runic/Core/Stores/OpenRouterTokenStore.swift +1 -3
  47. package/Sources/Runic/Core/Stores/PerplexityTokenStore.swift +1 -3
  48. package/Sources/Runic/Core/Stores/ProviderToggleStore.swift +1 -1
  49. package/Sources/Runic/Core/Stores/QwenTokenStore.swift +1 -3
  50. package/Sources/Runic/Core/Stores/SambaNovaTokenStore.swift +1 -3
  51. package/Sources/Runic/Core/Stores/SettingsStore.swift +89 -51
  52. package/Sources/Runic/Core/Stores/TogetherTokenStore.swift +1 -3
  53. package/Sources/Runic/Core/Stores/UsageStore+Accessors.swift +19 -6
  54. package/Sources/Runic/Core/Stores/UsageStore+TokenCost.swift +1 -1
  55. package/Sources/Runic/Core/Stores/UsageStore+WidgetSnapshot.swift +1 -1
  56. package/Sources/Runic/Core/Stores/UsageStore.swift +187 -161
  57. package/Sources/Runic/Core/Stores/XAITokenStore.swift +1 -3
  58. package/Sources/Runic/Core/Stores/ZaiTokenStore.swift +1 -2
  59. package/Sources/Runic/Core/UsageExporter.swift +8 -4
  60. package/Sources/Runic/ProviderRegistry.swift +1 -1
  61. package/Sources/Runic/Providers/Antigravity/AntigravityProviderImplementation.swift +1 -1
  62. package/Sources/Runic/Providers/Auggie/AuggieProviderImplementation.swift +1 -1
  63. package/Sources/Runic/Providers/Azure/AzureProviderImplementation.swift +1 -1
  64. package/Sources/Runic/Providers/Bedrock/BedrockProviderImplementation.swift +1 -1
  65. package/Sources/Runic/Providers/Cerebras/CerebrasProviderImplementation.swift +1 -1
  66. package/Sources/Runic/Providers/Codex/CodexProviderImplementation.swift +1 -1
  67. package/Sources/Runic/Providers/Cohere/CohereProviderImplementation.swift +1 -1
  68. package/Sources/Runic/Providers/Cursor/CursorProviderImplementation.swift +1 -1
  69. package/Sources/Runic/Providers/DeepSeek/DeepSeekProviderImplementation.swift +1 -1
  70. package/Sources/Runic/Providers/Factory/FactoryProviderImplementation.swift +1 -1
  71. package/Sources/Runic/Providers/Fireworks/FireworksProviderImplementation.swift +1 -1
  72. package/Sources/Runic/Providers/Gemini/GeminiProviderImplementation.swift +1 -1
  73. package/Sources/Runic/Providers/Groq/GroqProviderImplementation.swift +1 -1
  74. package/Sources/Runic/Providers/Kimi/KimiProviderImplementation.swift +1 -1
  75. package/Sources/Runic/Providers/MiniMax/MiniMaxProviderImplementation.swift +1 -1
  76. package/Sources/Runic/Providers/Mistral/MistralProviderImplementation.swift +1 -1
  77. package/Sources/Runic/Providers/OpenRouter/OpenRouterProviderImplementation.swift +1 -1
  78. package/Sources/Runic/Providers/Perplexity/PerplexityProviderImplementation.swift +1 -1
  79. package/Sources/Runic/Providers/SambaNova/SambaNovaProviderImplementation.swift +1 -1
  80. package/Sources/Runic/Providers/Shared/ProviderImplementation.swift +5 -2
  81. package/Sources/Runic/Providers/Shared/ProviderImplementationRegistry.swift +1 -1
  82. package/Sources/Runic/Providers/Shared/ProviderSettingsDescriptors.swift +1 -1
  83. package/Sources/Runic/Providers/Together/TogetherProviderImplementation.swift +1 -1
  84. package/Sources/Runic/Providers/XAI/XAIProviderImplementation.swift +1 -1
  85. package/Sources/Runic/Providers/Zai/ZaiProviderImplementation.swift +1 -1
  86. package/Sources/Runic/Resources/Fonts/Caveat-Bold.ttf +0 -0
  87. package/Sources/Runic/Resources/Fonts/Caveat-Regular.ttf +0 -0
  88. package/Sources/Runic/Resources/Fonts/FiraCode-Bold.ttf +0 -0
  89. package/Sources/Runic/Resources/Fonts/FiraCode-Light.ttf +0 -0
  90. package/Sources/Runic/Resources/Fonts/FiraCode-Medium.ttf +0 -0
  91. package/Sources/Runic/Resources/Fonts/FiraCode-Regular.ttf +0 -0
  92. package/Sources/Runic/Resources/Fonts/FiraCode-SemiBold.ttf +0 -0
  93. package/Sources/Runic/Resources/Fonts/IBMPlexMono-Bold.ttf +0 -0
  94. package/Sources/Runic/Resources/Fonts/IBMPlexMono-Medium.ttf +0 -0
  95. package/Sources/Runic/Resources/Fonts/IBMPlexMono-Regular.ttf +0 -0
  96. package/Sources/Runic/Resources/Fonts/IBMPlexMono-SemiBold.ttf +0 -0
  97. package/Sources/Runic/Resources/Fonts/Inconsolata-Bold.ttf +0 -0
  98. package/Sources/Runic/Resources/Fonts/Inconsolata-Medium.ttf +0 -0
  99. package/Sources/Runic/Resources/Fonts/Inconsolata-Regular.ttf +0 -0
  100. package/Sources/Runic/Resources/Fonts/Inconsolata-SemiBold.ttf +0 -0
  101. package/Sources/Runic/Resources/Fonts/JetBrainsMono-Bold.ttf +0 -0
  102. package/Sources/Runic/Resources/Fonts/JetBrainsMono-Medium.ttf +0 -0
  103. package/Sources/Runic/Resources/Fonts/JetBrainsMono-Regular.ttf +0 -0
  104. package/Sources/Runic/Resources/Fonts/JetBrainsMono-SemiBold.ttf +0 -0
  105. package/Sources/Runic/Resources/Fonts/SpaceMono-Bold.ttf +0 -0
  106. package/Sources/Runic/Resources/Fonts/SpaceMono-Regular.ttf +0 -0
  107. package/Sources/Runic/RunicApp.swift +46 -36
  108. package/Sources/Runic/SessionQuotaNotifications.swift +2 -2
  109. package/Sources/Runic/UsagePaceText.swift +1 -1
  110. package/Sources/Runic/UsageProgressBar.swift +13 -9
  111. package/Sources/Runic/Utilities/LoadingPattern.swift +4 -2
  112. package/Sources/Runic/Utilities/PerformanceConstants.swift +28 -28
  113. package/Sources/Runic/Views/Menu/AlertsMenuView.swift +19 -21
  114. package/Sources/Runic/Views/Menu/CostComparativeChartMenuView.swift +19 -19
  115. package/Sources/Runic/Views/Menu/CostHistoryChartMenuView.swift +7 -7
  116. package/Sources/Runic/Views/Menu/CreditsHistoryChartMenuView.swift +5 -5
  117. package/Sources/Runic/Views/Menu/EfficiencyMetricsMenuView.swift +29 -30
  118. package/Sources/Runic/Views/Menu/HeroStatCardsMenuView.swift +20 -17
  119. package/Sources/Runic/Views/Menu/HourlyActivityChartMenuView.swift +14 -14
  120. package/Sources/Runic/Views/Menu/InlineUsageChartView.swift +12 -10
  121. package/Sources/Runic/Views/Menu/MenuCardEntranceModifier.swift +3 -4
  122. package/Sources/Runic/Views/Menu/MenuCardSidebarView.swift +5 -25
  123. package/Sources/Runic/Views/Menu/MenuCardSkeletonView.swift +1 -1
  124. package/Sources/Runic/Views/Menu/MenuCardView.swift +120 -131
  125. package/Sources/Runic/Views/Menu/MenuContent.swift +11 -8
  126. package/Sources/Runic/Views/Menu/MenuDescriptor.swift +4 -2
  127. package/Sources/Runic/Views/Menu/MenuHighlightStyle.swift +1 -8
  128. package/Sources/Runic/Views/Menu/ModelBreakdownMenuView.swift +20 -14
  129. package/Sources/Runic/Views/Menu/OverviewMenuView.swift +18 -15
  130. package/Sources/Runic/Views/Menu/ProjectBreakdownMenuView.swift +16 -11
  131. package/Sources/Runic/Views/Menu/ProjectBudgetMenuView.swift +27 -27
  132. package/Sources/Runic/Views/Menu/ProviderTabBarView.swift +4 -6
  133. package/Sources/Runic/Views/Menu/SubscriptionUtilizationChartMenuView.swift +24 -11
  134. package/Sources/Runic/Views/Menu/UsageBreakdownChartMenuView.swift +5 -5
  135. package/Sources/Runic/Views/Menu/UsageHeatmapMenuView.swift +7 -8
  136. package/Sources/Runic/Views/Menu/UsageTimelineChartMenuView.swift +22 -17
  137. package/Sources/Runic/Views/Menu/UsageWindowComparisonChartMenuView.swift +8 -7
  138. package/Sources/Runic/Views/Menu/WeeklyActivityChartMenuView.swift +7 -7
  139. package/Sources/Runic/Views/Performance/PerformanceDashboardView.swift +50 -47
  140. package/Sources/Runic/Views/Preferences/LiquidComponents.swift +15 -14
  141. package/Sources/Runic/Views/Preferences/PreferencesAboutPane.swift +7 -7
  142. package/Sources/Runic/Views/Preferences/PreferencesAdvancedPane.swift +27 -27
  143. package/Sources/Runic/Views/Preferences/PreferencesAlertsPane.swift +38 -42
  144. package/Sources/Runic/Views/Preferences/PreferencesAnalyticsPane.swift +39 -43
  145. package/Sources/Runic/Views/Preferences/PreferencesBudgetsPane.swift +21 -21
  146. package/Sources/Runic/Views/Preferences/PreferencesComponents.swift +7 -7
  147. package/Sources/Runic/Views/Preferences/PreferencesCustomProvidersPane.swift +49 -50
  148. package/Sources/Runic/Views/Preferences/PreferencesDebugPane.swift +10 -10
  149. package/Sources/Runic/Views/Preferences/PreferencesGeneralPane.swift +40 -21
  150. package/Sources/Runic/Views/Preferences/PreferencesHelpPane.swift +7 -7
  151. package/Sources/Runic/Views/Preferences/PreferencesIntegrationsPane.swift +44 -39
  152. package/Sources/Runic/Views/Preferences/PreferencesPerformancePane.swift +26 -23
  153. package/Sources/Runic/Views/Preferences/PreferencesProvidersPane.swift +271 -226
  154. package/Sources/Runic/Views/Preferences/PreferencesSelection.swift +6 -2
  155. package/Sources/Runic/Views/Preferences/PreferencesSyncPane.swift +7 -5
  156. package/Sources/Runic/Views/Preferences/PreferencesView.swift +38 -31
  157. package/Sources/Runic/Views/Rating/QualityRatingView.swift +11 -11
  158. package/Sources/Runic/Views/Team/TeamDashboardView.swift +29 -24
  159. package/Sources/Runic/Views/Team/TeamInviteSheet.swift +16 -16
  160. package/Sources/Runic/Views/Team/TeamManagementView.swift +50 -49
  161. package/Sources/Runic/Views/Team/TeamMemberRow.swift +8 -8
  162. package/Sources/RunicCLI/CLIEntry.swift +83 -42
  163. package/Sources/RunicCLI/CLIRenderer.swift +1 -1
  164. package/Sources/RunicCLI/Commands/EnhancedUsageCommand.swift +60 -60
  165. package/Sources/RunicCLI/Commands/ModelsCommand.swift +45 -44
  166. package/Sources/RunicCLI/Commands/ProjectsCommand.swift +83 -69
  167. package/Sources/RunicCLI/Commands/ResetCommand.swift +50 -49
  168. package/Sources/RunicCLI/Commands/UsageLedgerSourceFactory.swift +31 -32
  169. package/Sources/RunicClaudeWebProbe/main.swift +1 -1
  170. package/Sources/RunicCore/AlertRuleStore.swift +20 -20
  171. package/Sources/RunicCore/BrowserCookieImportOrder.swift +3 -3
  172. package/Sources/RunicCore/CostUsageModels.swift +1 -1
  173. package/Sources/RunicCore/CustomProviders/CustomProviderModels.swift +29 -30
  174. package/Sources/RunicCore/CustomProviders/GenericProviderFetcher.swift +73 -75
  175. package/Sources/RunicCore/CustomProviders/ProviderTemplates.swift +53 -109
  176. package/Sources/RunicCore/Host/PTY/TTYCommandRunner.swift +3 -3
  177. package/Sources/RunicCore/Integrations/GitHubIntegration.swift +3 -3
  178. package/Sources/RunicCore/Models/EnhancedUsageModels.swift +47 -48
  179. package/Sources/RunicCore/OpenAIWeb/OpenAIDashboardBrowserCookieImporter.swift +1 -1
  180. package/Sources/RunicCore/OpenAIWeb/OpenAIDashboardFetcher.swift +1 -1
  181. package/Sources/RunicCore/Performance/PerformanceModels.swift +4 -4
  182. package/Sources/RunicCore/Performance/PerformanceStorageImpl.swift +81 -64
  183. package/Sources/RunicCore/Policy/UsagePolicyEngine.swift +2 -2
  184. package/Sources/RunicCore/ProjectBudgetStore.swift +15 -12
  185. package/Sources/RunicCore/Providers/Antigravity/AntigravityProviderDescriptor.swift +4 -2
  186. package/Sources/RunicCore/Providers/Antigravity/AntigravityStatusProbe.swift +2 -2
  187. package/Sources/RunicCore/Providers/Auggie/AuggieProviderDescriptor.swift +2 -2
  188. package/Sources/RunicCore/Providers/Auggie/AuggieUsageFetcher.swift +3 -3
  189. package/Sources/RunicCore/Providers/Azure/AzureProviderDescriptor.swift +8 -8
  190. package/Sources/RunicCore/Providers/Azure/AzureUsageFetcher.swift +3 -3
  191. package/Sources/RunicCore/Providers/Bedrock/BedrockProviderDescriptor.swift +6 -6
  192. package/Sources/RunicCore/Providers/Bedrock/BedrockUsageFetcher.swift +3 -7
  193. package/Sources/RunicCore/Providers/Cerebras/CerebrasProviderDescriptor.swift +2 -2
  194. package/Sources/RunicCore/Providers/Cerebras/CerebrasUsageFetcher.swift +2 -2
  195. package/Sources/RunicCore/Providers/Claude/ClaudeOAuth/ClaudeOAuthUsageFetcher.swift +3 -3
  196. package/Sources/RunicCore/Providers/Claude/ClaudeProviderDescriptor.swift +4 -2
  197. package/Sources/RunicCore/Providers/Claude/ClaudeStatusProbe.swift +4 -4
  198. package/Sources/RunicCore/Providers/Claude/ClaudeUsageDataSource.swift +3 -1
  199. package/Sources/RunicCore/Providers/Claude/ClaudeWeb/ClaudeWebAPIFetcher.swift +1 -1
  200. package/Sources/RunicCore/Providers/Codex/CodexOAuth/CodexOAuthUsageFetcher.swift +1 -1
  201. package/Sources/RunicCore/Providers/Codex/CodexProviderDescriptor.swift +4 -2
  202. package/Sources/RunicCore/Providers/Codex/CodexUsageDataSource.swift +3 -1
  203. package/Sources/RunicCore/Providers/Codex/CodexWebDashboardStrategy.swift +5 -3
  204. package/Sources/RunicCore/Providers/Cohere/CohereProviderDescriptor.swift +2 -2
  205. package/Sources/RunicCore/Providers/Cohere/CohereUsageFetcher.swift +3 -3
  206. package/Sources/RunicCore/Providers/Copilot/CopilotGitHubCLITokenReader.swift +7 -4
  207. package/Sources/RunicCore/Providers/Copilot/CopilotProviderDescriptor.swift +4 -4
  208. package/Sources/RunicCore/Providers/Copilot/CopilotUsageFetcher.swift +5 -3
  209. package/Sources/RunicCore/Providers/Copilot/CopilotVSCodeTokenReader.swift +9 -10
  210. package/Sources/RunicCore/Providers/Cursor/CursorProviderDescriptor.swift +4 -2
  211. package/Sources/RunicCore/Providers/DeepSeek/DeepSeekProviderDescriptor.swift +2 -2
  212. package/Sources/RunicCore/Providers/DeepSeek/DeepSeekUsageFetcher.swift +2 -2
  213. package/Sources/RunicCore/Providers/Factory/FactoryLocalStorageImporter.swift +4 -4
  214. package/Sources/RunicCore/Providers/Factory/FactoryProviderDescriptor.swift +4 -2
  215. package/Sources/RunicCore/Providers/Factory/FactoryStatusProbe.swift +2 -2
  216. package/Sources/RunicCore/Providers/Fireworks/FireworksProviderDescriptor.swift +2 -2
  217. package/Sources/RunicCore/Providers/Fireworks/FireworksUsageFetcher.swift +2 -2
  218. package/Sources/RunicCore/Providers/Gemini/GeminiProviderDescriptor.swift +4 -2
  219. package/Sources/RunicCore/Providers/Gemini/GeminiStatusProbe.swift +5 -2
  220. package/Sources/RunicCore/Providers/Groq/GroqProviderDescriptor.swift +2 -2
  221. package/Sources/RunicCore/Providers/Groq/GroqUsageFetcher.swift +2 -2
  222. package/Sources/RunicCore/Providers/Kimi/KimiProviderDescriptor.swift +2 -2
  223. package/Sources/RunicCore/Providers/Kimi/KimiUsageFetcher.swift +2 -2
  224. package/Sources/RunicCore/Providers/MiniMax/MiniMaxProviderDescriptor.swift +10 -5
  225. package/Sources/RunicCore/Providers/MiniMax/MiniMaxUsageFetcher.swift +7 -7
  226. package/Sources/RunicCore/Providers/MiniMax/MiniMaxWebUsageFetcher.swift +10 -10
  227. package/Sources/RunicCore/Providers/Mistral/MistralProviderDescriptor.swift +2 -2
  228. package/Sources/RunicCore/Providers/Mistral/MistralUsageFetcher.swift +2 -2
  229. package/Sources/RunicCore/Providers/OpenRouter/OpenRouterProviderDescriptor.swift +2 -2
  230. package/Sources/RunicCore/Providers/OpenRouter/OpenRouterUsageFetcher.swift +23 -10
  231. package/Sources/RunicCore/Providers/Perplexity/PerplexityProviderDescriptor.swift +2 -2
  232. package/Sources/RunicCore/Providers/Perplexity/PerplexityUsageFetcher.swift +2 -2
  233. package/Sources/RunicCore/Providers/ProviderFetchPlan.swift +2 -2
  234. package/Sources/RunicCore/Providers/ProviderTokenResolver.swift +2 -2
  235. package/Sources/RunicCore/Providers/Qwen/QwenProviderDescriptor.swift +5 -3
  236. package/Sources/RunicCore/Providers/Qwen/QwenUsageStats.swift +26 -13
  237. package/Sources/RunicCore/Providers/SambaNova/SambaNovaProviderDescriptor.swift +2 -2
  238. package/Sources/RunicCore/Providers/SambaNova/SambaNovaUsageFetcher.swift +2 -2
  239. package/Sources/RunicCore/Providers/Together/TogetherProviderDescriptor.swift +2 -2
  240. package/Sources/RunicCore/Providers/Together/TogetherUsageFetcher.swift +2 -2
  241. package/Sources/RunicCore/Providers/VertexAI/VertexAIProviderDescriptor.swift +5 -5
  242. package/Sources/RunicCore/Providers/VertexAI/VertexAISettingsReader.swift +1 -1
  243. package/Sources/RunicCore/Providers/VertexAI/VertexAIUsageFetcher.swift +3 -3
  244. package/Sources/RunicCore/Providers/XAI/XAIProviderDescriptor.swift +2 -2
  245. package/Sources/RunicCore/Providers/XAI/XAIUsageFetcher.swift +2 -2
  246. package/Sources/RunicCore/Providers/Zai/ZaiProviderDescriptor.swift +4 -2
  247. package/Sources/RunicCore/Providers/Zai/ZaiUsageStats.swift +48 -21
  248. package/Sources/RunicCore/Sync/BackgroundSyncManager.swift +76 -77
  249. package/Sources/RunicCore/Sync/SyncConflictResolver.swift +55 -58
  250. package/Sources/RunicCore/Sync/SyncProtocol.swift +21 -22
  251. package/Sources/RunicCore/Sync/SyncRecord.swift +46 -49
  252. package/Sources/RunicCore/Sync/SyncUsageExample.swift +44 -50
  253. package/Sources/RunicCore/Sync/TeamSyncRecords.swift +94 -101
  254. package/Sources/RunicCore/Sync/iCloudSyncEngine.swift +51 -46
  255. package/Sources/RunicCore/Team/TeamModels.swift +111 -110
  256. package/Sources/RunicCore/Team/TeamStore.swift +126 -109
  257. package/Sources/RunicCore/UsageFetcher.swift +2 -2
  258. package/Sources/RunicCore/UsageFormatter.swift +25 -25
  259. package/Sources/RunicCore/UsageLedger/ClaudeUsageLogSource.swift +27 -13
  260. package/Sources/RunicCore/UsageLedger/CodexUsageLogSource.swift +11 -3
  261. package/Sources/RunicCore/UsageLedger/LedgerCache.swift +5 -2
  262. package/Sources/RunicCore/UsageLedger/OTelGenAILedgerAdapter.swift +1 -1
  263. package/Sources/RunicCore/UsageLedger/UsageLedgerAggregator.swift +40 -25
  264. package/Sources/RunicCore/UsageLedger/UsageLedgerInsightsAdvisor.swift +1 -1
  265. package/Sources/RunicCore/UsageLedger/UsageLedgerProjectIdentity.swift +55 -16
  266. package/Sources/RunicCore/Vendored/CostUsage/CostUsageCache.swift +6 -6
  267. package/Sources/RunicCore/Vendored/CostUsage/CostUsageJsonl.swift +1 -1
  268. package/Sources/RunicCore/Vendored/CostUsage/CostUsagePricing.swift +2 -2
  269. package/Sources/RunicCore/Vendored/CostUsage/CostUsageScanner.swift +5 -5
  270. package/Tests/RunicTests/AppDelegateTests.swift +8 -3
  271. package/Tests/RunicTests/BrowserCookieOrderLabelTests.swift +2 -3
  272. package/Tests/RunicTests/CLIArgumentParsingTests.swift +3 -4
  273. package/Tests/RunicTests/CLICostTests.swift +6 -7
  274. package/Tests/RunicTests/CLIProviderSelectionTests.swift +2 -3
  275. package/Tests/RunicTests/CLISnapshotTests.swift +3 -4
  276. package/Tests/RunicTests/CLIWebFallbackTests.swift +3 -4
  277. package/Tests/RunicTests/ClaudeOAuthTests.swift +11 -12
  278. package/Tests/RunicTests/ClaudeResilienceTests.swift +3 -4
  279. package/Tests/RunicTests/ClaudeUsageTests.swift +20 -21
  280. package/Tests/RunicTests/CodexOAuthTests.swift +7 -8
  281. package/Tests/RunicTests/CodexUsageLogSourceTests.swift +1 -3
  282. package/Tests/RunicTests/CopilotTokenResolverTests.swift +5 -6
  283. package/Tests/RunicTests/CopilotVSCodeTokenReaderTests.swift +4 -5
  284. package/Tests/RunicTests/CostUsageDecodingTests.swift +15 -17
  285. package/Tests/RunicTests/CostUsagePricingTests.swift +5 -7
  286. package/Tests/RunicTests/CostUsageScannerTests.swift +10 -12
  287. package/Tests/RunicTests/CursorStatusProbeTests.swift +15 -16
  288. package/Tests/RunicTests/FactoryStatusProbeTests.swift +3 -5
  289. package/Tests/RunicTests/GeminiLoginAlertTests.swift +3 -4
  290. package/Tests/RunicTests/GeminiStatusProbeAPITests.swift +11 -11
  291. package/Tests/RunicTests/GeminiStatusProbePlanTests.swift +8 -8
  292. package/Tests/RunicTests/GeminiStatusProbeTests.swift +20 -21
  293. package/Tests/RunicTests/GoogleWorkspaceStatusTests.swift +2 -3
  294. package/Tests/RunicTests/InstallOriginTests.swift +1 -2
  295. package/Tests/RunicTests/KeyboardShortcutsBundleTests.swift +2 -2
  296. package/Tests/RunicTests/LiveAccountTests.swift +3 -3
  297. package/Tests/RunicTests/LoadingPatternTests.swift +3 -4
  298. package/Tests/RunicTests/MenuCardModelTests.swift +33 -34
  299. package/Tests/RunicTests/MiniMaxCookieHeaderStoreTestSupport.swift +4 -1
  300. package/Tests/RunicTests/MiniMaxGroupIDStoreTestSupport.swift +4 -1
  301. package/Tests/RunicTests/MiniMaxParsingTests.swift +4 -5
  302. package/Tests/RunicTests/MiniMaxTokenStoreTestSupport.swift +4 -1
  303. package/Tests/RunicTests/OTelGenAILedgerAdapterTests.swift +4 -6
  304. package/Tests/RunicTests/OpenAIDashboardBrowserCookieImporterTests.swift +1 -2
  305. package/Tests/RunicTests/OpenAIDashboardFetcherCreditsWaitTests.swift +5 -6
  306. package/Tests/RunicTests/OpenAIDashboardOffscreenHostTests.swift +2 -3
  307. package/Tests/RunicTests/OpenAIDashboardParserTests.swift +12 -13
  308. package/Tests/RunicTests/OpenAIWebAccountSwitchTests.swift +17 -6
  309. package/Tests/RunicTests/OpenRouterTokenStoreTestSupport.swift +52 -13
  310. package/Tests/RunicTests/PathBuilderTests.swift +14 -15
  311. package/Tests/RunicTests/ProviderFetchPipelineTests.swift +3 -4
  312. package/Tests/RunicTests/ProviderIconResourcesTests.swift +1 -2
  313. package/Tests/RunicTests/ProviderMetadataStatusLinkTests.swift +1 -2
  314. package/Tests/RunicTests/ProviderSettingsDescriptorTests.swift +53 -19
  315. package/Tests/RunicTests/ProviderToggleStoreTests.swift +10 -11
  316. package/Tests/RunicTests/RunicTests.swift +6 -7
  317. package/Tests/RunicTests/SessionQuotaNotificationLogicTests.swift +5 -6
  318. package/Tests/RunicTests/SettingsStoreTests.swift +149 -45
  319. package/Tests/RunicTests/StatusItemAnimationTests.swift +8 -3
  320. package/Tests/RunicTests/StatusMenuTests.swift +63 -22
  321. package/Tests/RunicTests/StatusProbeTests.swift +28 -29
  322. package/Tests/RunicTests/SubprocessRunnerTests.swift +1 -3
  323. package/Tests/RunicTests/SubscriptionDetectionTests.swift +8 -9
  324. package/Tests/RunicTests/TTYCommandRunnerTests.swift +8 -9
  325. package/Tests/RunicTests/TeamShowbackExporterTests.swift +2 -4
  326. package/Tests/RunicTests/TextParsingTests.swift +1 -2
  327. package/Tests/RunicTests/UsageFormatterTests.swift +15 -16
  328. package/Tests/RunicTests/UsageLedgerAnomalyDetectionTests.swift +12 -14
  329. package/Tests/RunicTests/UsageLedgerForecastTests.swift +4 -6
  330. package/Tests/RunicTests/UsageLedgerInsightsAdvisorTests.swift +7 -9
  331. package/Tests/RunicTests/UsageLedgerProjectNameTests.swift +6 -8
  332. package/Tests/RunicTests/UsagePaceTests.swift +5 -6
  333. package/Tests/RunicTests/UsagePaceTextTests.swift +8 -9
  334. package/Tests/RunicTests/UsagePolicyEngineTests.swift +3 -5
  335. package/Tests/RunicTests/WidgetSnapshotTests.swift +1 -3
  336. package/Tests/RunicTests/ZaiProviderTests.swift +3 -5
  337. package/Tests/RunicTests/ZaiTokenStoreTestSupport.swift +4 -1
  338. package/appcast.xml +36 -76
  339. package/package.json +1 -1
  340. package/runic.png +0 -0
  341. package/runic.svg +15 -0
  342. package/version.env +2 -2
@@ -0,0 +1,206 @@
1
+ import CoreText
2
+ import SwiftUI
3
+
4
+ // MARK: - Typography tokens
5
+
6
+ /// App-wide font design token.
7
+ enum RunicTypography {
8
+ static let typeSize: DynamicTypeSize = .xLarge
9
+
10
+ /// Register all TTF/OTF fonts found in the app bundle's Fonts directory.
11
+ /// Call once at launch before any UI is created.
12
+ static func registerFonts() {
13
+ guard let fontsURL = Bundle.main.url(forResource: "Fonts", withExtension: nil)
14
+ ?? Bundle.main.resourceURL?.appendingPathComponent("Fonts")
15
+ else { return }
16
+ guard let enumerator = FileManager.default.enumerator(
17
+ at: fontsURL,
18
+ includingPropertiesForKeys: nil,
19
+ options: [.skipsHiddenFiles])
20
+ else { return }
21
+ for case let fileURL as URL in enumerator
22
+ where fileURL.pathExtension.lowercased() == "ttf" || fileURL.pathExtension.lowercased() == "otf"
23
+ {
24
+ CTFontManagerRegisterFontsForURL(fileURL as CFURL, .process, nil)
25
+ }
26
+ }
27
+
28
+ /// Discover bundled font family names from the Fonts directory.
29
+ static func discoverBundledFontFamilies() -> [String] {
30
+ guard let fontsURL = Bundle.main.url(forResource: "Fonts", withExtension: nil)
31
+ ?? Bundle.main.resourceURL?.appendingPathComponent("Fonts")
32
+ else { return [] }
33
+ guard let enumerator = FileManager.default.enumerator(
34
+ at: fontsURL,
35
+ includingPropertiesForKeys: nil,
36
+ options: [.skipsHiddenFiles])
37
+ else { return [] }
38
+ var families = Set<String>()
39
+ for case let fileURL as URL in enumerator
40
+ where fileURL.pathExtension.lowercased() == "ttf" || fileURL.pathExtension.lowercased() == "otf"
41
+ {
42
+ if let descriptors = CTFontManagerCreateFontDescriptorsFromURL(fileURL as CFURL) as? [CTFontDescriptor] {
43
+ for desc in descriptors {
44
+ if let name = CTFontDescriptorCopyAttribute(desc, kCTFontFamilyNameAttribute) as? String {
45
+ families.insert(name)
46
+ }
47
+ }
48
+ }
49
+ }
50
+ return families.sorted()
51
+ }
52
+ }
53
+
54
+ // MARK: - Available font choices
55
+
56
+ /// A selectable font option shown in preferences.
57
+ struct RunicFontChoice: Identifiable, Hashable {
58
+ let id: String
59
+ let displayName: String
60
+
61
+ /// System fonts — always available, no bundling.
62
+ static let sfPro = RunicFontChoice(id: "__sf_pro__", displayName: "SF Pro")
63
+ static let sfMono = RunicFontChoice(id: "__sf_mono__", displayName: "SF Mono")
64
+
65
+ /// Font used to render this choice's name in the picker (preview in its own typeface).
66
+ var previewFont: Font {
67
+ switch self.id {
68
+ case Self.sfPro.id: .system(.body)
69
+ case Self.sfMono.id: .system(.body, design: .monospaced)
70
+ default: Font.custom(self.id, fixedSize: 13)
71
+ }
72
+ }
73
+
74
+ /// Build the full list: system fonts first, then bundled custom fonts.
75
+ static func availableChoices() -> [RunicFontChoice] {
76
+ var choices: [RunicFontChoice] = [.sfPro, .sfMono]
77
+ for family in RunicTypography.discoverBundledFontFamilies() {
78
+ choices.append(RunicFontChoice(id: family, displayName: family))
79
+ }
80
+ return choices
81
+ }
82
+ }
83
+
84
+ // MARK: - Dynamic SwiftUI Font Scale
85
+
86
+ @MainActor
87
+ enum RunicFont {
88
+ /// The active font family identifier. Updated from SettingsStore.
89
+ static var family: String = "Fira Code"
90
+
91
+ private static var isSystemFont: Bool {
92
+ family.hasPrefix("__")
93
+ }
94
+
95
+ /// Font design used by `.runicTypography()` for system-font fallback.
96
+ static var systemFallbackDesign: Font.Design {
97
+ family == RunicFontChoice.sfPro.id ? .default : .monospaced
98
+ }
99
+
100
+ // MARK: Semantic sizes
101
+
102
+ static var caption2: Font {
103
+ makeFont(size: 10, relativeTo: .caption2)
104
+ }
105
+
106
+ static var caption: Font {
107
+ makeFont(size: 11, relativeTo: .caption)
108
+ }
109
+
110
+ static var footnote: Font {
111
+ makeFont(size: 12, relativeTo: .footnote)
112
+ }
113
+
114
+ static var callout: Font {
115
+ makeFont(size: 13, relativeTo: .callout)
116
+ }
117
+
118
+ static var body: Font {
119
+ makeFont(size: 13, relativeTo: .body)
120
+ }
121
+
122
+ static var subheadline: Font {
123
+ makeFont(size: 12, relativeTo: .subheadline)
124
+ }
125
+
126
+ static var headline: Font {
127
+ makeFont(size: 13, relativeTo: .headline).weight(.bold)
128
+ }
129
+
130
+ static var title3: Font {
131
+ makeFont(size: 15, relativeTo: .title3)
132
+ }
133
+
134
+ static var title2: Font {
135
+ makeFont(size: 17, relativeTo: .title2)
136
+ }
137
+
138
+ static var title: Font {
139
+ makeFont(size: 22, relativeTo: .title)
140
+ }
141
+
142
+ static var largeTitle: Font {
143
+ makeFont(size: 26, relativeTo: .largeTitle)
144
+ }
145
+
146
+ /// Custom fixed size.
147
+ static func system(size: CGFloat) -> Font {
148
+ switch self.family {
149
+ case RunicFontChoice.sfPro.id: .system(size: size)
150
+ case RunicFontChoice.sfMono.id: .system(size: size, design: .monospaced)
151
+ default: Font.custom(self.family, fixedSize: size)
152
+ }
153
+ }
154
+
155
+ /// Custom fixed size with weight.
156
+ static func system(size: CGFloat, weight: Font.Weight) -> Font {
157
+ switch self.family {
158
+ case RunicFontChoice.sfPro.id: .system(size: size, weight: weight)
159
+ case RunicFontChoice.sfMono.id: .system(size: size, weight: weight, design: .monospaced)
160
+ default: Font.custom(self.family, fixedSize: size).weight(weight)
161
+ }
162
+ }
163
+
164
+ // MARK: Private
165
+
166
+ private static func makeFont(size: CGFloat, relativeTo style: Font.TextStyle) -> Font {
167
+ switch self.family {
168
+ case RunicFontChoice.sfPro.id: .system(style)
169
+ case RunicFontChoice.sfMono.id: .system(style, design: .monospaced)
170
+ default: Font.custom(self.family, size: size, relativeTo: style)
171
+ }
172
+ }
173
+ }
174
+
175
+ // MARK: - AppKit NSFont
176
+
177
+ extension RunicFont {
178
+ static func nsFont(size: CGFloat, weight: NSFont.Weight = .regular) -> NSFont {
179
+ switch self.family {
180
+ case RunicFontChoice.sfPro.id:
181
+ return .systemFont(ofSize: size, weight: weight)
182
+ case RunicFontChoice.sfMono.id:
183
+ return .monospacedSystemFont(ofSize: size, weight: weight)
184
+ default:
185
+ let traits: [NSFontDescriptor.TraitKey: Any] = [.weight: weight]
186
+ let descriptor = NSFontDescriptor(fontAttributes: [
187
+ .family: family,
188
+ .traits: traits,
189
+ ])
190
+ return NSFont(descriptor: descriptor, size: size)
191
+ ?? .monospacedSystemFont(ofSize: size, weight: weight)
192
+ }
193
+ }
194
+ }
195
+
196
+ // MARK: - View modifier
197
+
198
+ extension View {
199
+ /// Apply the selected font as the default, with system fallback design and xLarge dynamic type.
200
+ func runicTypography() -> some View {
201
+ self
202
+ .font(RunicFont.body)
203
+ .fontDesign(RunicFont.systemFallbackDesign)
204
+ .dynamicTypeSize(RunicTypography.typeSize)
205
+ }
206
+ }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol AuggieTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainAuggieTokenStore: AuggieTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainAuggieTokenStore: AuggieTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol AzureOpenAITokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainAzureOpenAITokenStore: AzureOpenAITokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainAzureOpenAITokenStore: AzureOpenAITokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol CerebrasTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainCerebrasTokenStore: CerebrasTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainCerebrasTokenStore: CerebrasTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol CohereTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainCohereTokenStore: CohereTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainCohereTokenStore: CohereTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol CopilotTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainCopilotTokenStore: CopilotTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainCopilotTokenStore: CopilotTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -12,20 +12,20 @@ enum CustomProviderStoreError: LocalizedError {
12
12
  var errorDescription: String? {
13
13
  switch self {
14
14
  case let .providerNotFound(id):
15
- return "Provider with ID '\(id)' not found."
15
+ "Provider with ID '\(id)' not found."
16
16
  case let .duplicateProvider(id):
17
- return "Provider with ID '\(id)' already exists."
17
+ "Provider with ID '\(id)' already exists."
18
18
  case .invalidData:
19
- return "Invalid provider data."
19
+ "Invalid provider data."
20
20
  case let .fileSystemError(message):
21
- return "File system error: \(message)"
21
+ "File system error: \(message)"
22
22
  }
23
23
  }
24
24
  }
25
25
 
26
26
  // MARK: - Store
27
27
 
28
- public struct CustomProviderStore {
28
+ public enum CustomProviderStore {
29
29
  private static let log = RunicLog.logger("custom-provider-store")
30
30
 
31
31
  // MARK: - Storage Location
@@ -41,8 +41,8 @@ public struct CustomProviderStore {
41
41
 
42
42
  /// Load all custom providers from disk.
43
43
  public static func load() -> CustomProvidersData {
44
- guard FileManager.default.fileExists(atPath: storageURL.path) else {
45
- Self.log.info("No custom providers file found, returning empty data.")
44
+ guard FileManager.default.fileExists(atPath: self.storageURL.path) else {
45
+ self.log.info("No custom providers file found, returning empty data.")
46
46
  return CustomProvidersData()
47
47
  }
48
48
 
@@ -54,7 +54,7 @@ public struct CustomProviderStore {
54
54
  Self.log.info("Loaded \(providersData.providers.count) custom provider(s).")
55
55
  return providersData
56
56
  } catch {
57
- Self.log.error("Failed to load custom providers: \(error)")
57
+ self.log.error("Failed to load custom providers: \(error)")
58
58
  return CustomProvidersData()
59
59
  }
60
60
  }
@@ -67,7 +67,7 @@ public struct CustomProviderStore {
67
67
 
68
68
  do {
69
69
  let data = try encoder.encode(providersData)
70
- try data.write(to: storageURL, options: .atomic)
70
+ try data.write(to: self.storageURL, options: .atomic)
71
71
  Self.log.info("Saved \(providersData.providers.count) custom provider(s).")
72
72
  } catch {
73
73
  Self.log.error("Failed to save custom providers: \(error)")
@@ -153,6 +153,6 @@ public struct CustomProviderStore {
153
153
  /// - Returns: Array of enabled custom provider configurations.
154
154
  public static func getEnabledProviders() -> [CustomProviderConfig] {
155
155
  let data = Self.load()
156
- return data.providers.filter { $0.enabled }
156
+ return data.providers.filter(\.enabled)
157
157
  }
158
158
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol DeepSeekTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainDeepSeekTokenStore: DeepSeekTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainDeepSeekTokenStore: DeepSeekTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol FireworksTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainFireworksTokenStore: FireworksTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainFireworksTokenStore: FireworksTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol GroqTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainGroqTokenStore: GroqTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainGroqTokenStore: GroqTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol KimiTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainKimiTokenStore: KimiTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainKimiTokenStore: KimiTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol MiniMaxCookieHeaderStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainMiniMaxCookieHeaderStore: MiniMaxCookieHeaderStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainMiniMaxCookieHeaderStore: MiniMaxCookieHeaderStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol MiniMaxGroupIDStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainMiniMaxGroupIDStore: MiniMaxGroupIDStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainMiniMaxGroupIDStore: MiniMaxGroupIDStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol MiniMaxTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainMiniMaxTokenStore: MiniMaxTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainMiniMaxTokenStore: MiniMaxTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol MistralTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainMistralTokenStore: MistralTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainMistralTokenStore: MistralTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol OpenRouterTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainOpenRouterTokenStore: OpenRouterTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainOpenRouterTokenStore: OpenRouterTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol PerplexityTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainPerplexityTokenStore: PerplexityTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainPerplexityTokenStore: PerplexityTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
 
4
4
  struct ProviderToggleStore {
5
5
  private let userDefaults: UserDefaults
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol QwenTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainQwenTokenStore: QwenTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainQwenTokenStore: QwenTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }
@@ -1,5 +1,5 @@
1
- import RunicCore
2
1
  import Foundation
2
+ import RunicCore
3
3
  import Security
4
4
 
5
5
  protocol SambaNovaTokenStoring: Sendable {
@@ -64,7 +64,6 @@ struct KeychainSambaNovaTokenStore: SambaNovaTokenStoring {
64
64
  addQuery[kSecValueData as String] = data
65
65
  addQuery[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlock
66
66
 
67
-
68
67
  let addStatus = SecItemAdd(addQuery as CFDictionary, nil)
69
68
  guard addStatus == errSecSuccess else {
70
69
  Self.log.error("Keychain add failed: \(addStatus)")
@@ -115,5 +114,4 @@ struct KeychainSambaNovaTokenStore: SambaNovaTokenStoring {
115
114
  }
116
115
  return q
117
116
  }
118
-
119
117
  }