Files
luma/Sources/LumaCore/Agentic/LLMCredentialStore.swift
Ole André Vadla Ravnås 873f55d238 Tidy token storage layout
Rename the on-disk directory tokens to Tokens, matching its
PascalCase siblings (Projects, HookPacks). FileTokenStore
now names files <service> or <service>.<account>; the
.token suffix and luma.llm. / re.frida.Luma prefixes are
gone. Existing entries become orphaned and users will be
prompted to enter API keys and re-auth GitHub on next run.
2026-05-11 14:39:25 +02:00

22 lines
717 B
Swift

import Foundation
public struct LLMCredentialStore: Sendable {
public let backing: TokenStore
public init(backing: TokenStore) {
self.backing = backing
}
public func apiKey(providerID: String, account: String = "default") async throws -> String? {
try await backing.get(service: providerID, account: account)
}
public func setAPIKey(_ key: String, providerID: String, account: String = "default") async throws {
try await backing.set(service: providerID, account: account, token: key)
}
public func deleteAPIKey(providerID: String, account: String = "default") async throws {
try await backing.delete(service: providerID, account: account)
}
}