feat(account): add managed credits and cloud gateway

Introduce optional Apple account-backed credits with scoped gateway access while preserving local and BYOK paths. Refresh assistant behavior, tests, privacy disclosures, docs, and the website for the 2.0 experience.
This commit is contained in:
Rocky
2026-08-20 11:43:21 +08:00
parent 0f9280bd00
commit 498f407585
301 changed files with 19221 additions and 10891 deletions
@@ -26,6 +26,7 @@ public protocol ConfigurationStore: Sendable {
var asrModel: String { get }
var engineMode: String { get }
var credentialSource: CredentialSource { get }
var polishIntensity: PolishIntensity { get }
var aiResponseLength: AIResponseLength { get }
var llmThinkingEnabled: Bool { get }
@@ -39,5 +40,14 @@ public protocol ConfigurationStore: Sendable {
/// Provider-specific ASR caches (e.g. Alibaba Fun-ASR vocabulary IDs).
var cloudASRPersistence: UserDefaults { get }
func makeClient() -> LLMClient
func makeClient(taskKind: ManagedGatewayTaskKind?) -> LLMClient
}
public extension ConfigurationStore {
/// Existing stores and test doubles remain BYOK unless they opt in.
var credentialSource: CredentialSource { .byok }
func makeClient() -> LLMClient {
makeClient(taskKind: nil)
}
}