The repository publishes modular Swift Package Manager products. New libraries should depend on the narrowest product that owns the capability they use.
Add the package
dependencies: [
.package(
url: "https://github.com/scouzi1966/maclocal-api.git",
branch: "main"
)
]Products
| Product | Responsibility |
|---|---|
AFMKitCore | Provider contracts and portable core types |
AFMOpenAICompat | OpenAI-compatible request and response types |
AFMKitMLX | MLX model loading and inference |
AFMKitFoundationModels | Apple Foundation Models backend |
AFMKitFoundationModels27 | Newer OS-specific Foundation Models surface |
AFMKitDwarfStar | DwarfStar runtime integration |
AFMKitServices | Vision, Speech, and embedding services |
AFMKit | High-level headless inference facade |
AFMServer | Vapor HTTP layer |
Provider boundary
AFMKit separates portable request/session contracts from the runtime provider. That lets a consumer choose MLX or Foundation Models without importing the Vapor server. Runtime-specific capabilities remain visible instead of being flattened into false parity.
Availability
Apple framework products preserve OS availability boundaries. Keep newer Foundation Models APIs behind their documented availability checks and use the dedicated product where required. Headless products do not require the WebUI.
Examples and source contracts
The repository's AFMKit public API guide is the compatibility baseline. Runnable consumer examples live in the Examples directory.