0becf7829e
- Package.swift: AI (S2-owned) + DSKit (models/client/fixtures) + DSKitTests, tools 6.2, .swiftLanguageMode(.v6), .macOS(.v26) - JSONValue (Sendable AnyCodable), DSDate (value-type ISO8601FormatStyle cascade, date-only UTC), explicit-CodingKeys decoder - Models: Auth/Document(+Detail flat-compose, MD-first)/Catalog/Search+Ask/Memo/Digest; non-optional limited to id/file_type/created+updated_at/total - DSClient protocol + FixtureDSClient (Bundle.module, zero backend) + DSError + DSConfig + DownloadURL (?token= query) - Tests: 14-fixture contract acceptance (value asserts) + JSONValue number trap + Ask round-trip + AI router fallback/explicit-unavailable swift build + swift test green (19 tests). Sources/AI untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
19 lines
643 B
Swift
19 lines
643 B
Swift
import Foundation
|
|
|
|
/// Injectable base URL. Public TLS by default; Tailscale alternative uses a MagicDNS hostname
|
|
/// (NOT a hardcoded 100.x IP, which changes on node re-registration). Scaffold never makes a live
|
|
/// call, so the Tailscale host is a placeholder until FU-A.
|
|
public enum DSBaseURL: Sendable {
|
|
case publicTLS
|
|
case tailscale
|
|
case custom(URL)
|
|
|
|
public var url: URL {
|
|
switch self {
|
|
case .publicTLS: return URL(string: "https://document.hyungi.net/api")!
|
|
case .tailscale: return URL(string: "http://ds-gpu.tailnet-name.ts.net:8000/api")!
|
|
case .custom(let u): return u
|
|
}
|
|
}
|
|
}
|