CupertinoDataKit
June 8, 2026 ยท View on GitHub
cupertino's documentation, sample-code, and package-search read contract, expressed as protocols and value types only. Zero implementation, Foundation-only, cross-platform (Apple). It is the single source of truth for the shapes of cupertino's read surface, shared by every implementation.
It is the same idea as SwiftMCPCore, but
cupertino-named on purpose: this is cupertino's specific command and result surface,
not a general standard.
Who conforms
- cupertino conforms its real FTS-SQLite engine to this contract server-side.
- An in-process reader (for example an iOS app that embeds the corpus) conforms a different implementation.
Both sides depend only on this contract, never on each other.
Shape
The protocols are sliced for interface segregation, so a consumer pins only what it implements:
Search.DocumentReading- the core reads:search,getDocumentContent,listFrameworks,documentCount,disconnect.Search.DocumentListing- optional framework-scoped document paging for browser UIs.Search.DocumentChildrenListing- optional expandable document/topic tree browsing.Search.DocumentBrowsing- the composition of the two document-browser refinements.Search.SymbolReading- the symbol / inheritance / availability surface.Search.Database- the composition of both (what cupertino's engine conforms to).Sample.Index.Reader- the sample-code read slice.Search.PackagesSearcher- the Swift-package search read slice.
Value types live under the Search and Sample namespaces (Search.Result,
Search.MatchedSymbol, Search.PlatformAvailability, Search.AvailabilityFilter,
Search.SwiftToolsFilter, Sample.Index.Project, and so on),
all Sendable, most Codable. Contract constants are under CupertinoDataKit.Limits
and convenience constants for built-in source identifiers are under
CupertinoDataKit.SourceIDs. Source parameters remain open strings so future sources do
not require a contract redesign.
Requirements
- Swift 6 (swift-tools 6.0)
- iOS 16+, macOS 13+, tvOS 16+, watchOS 9+, visionOS 1+
Use
.package(url: "https://github.com/mihaelamj/CupertinoDataKit.git", from: "0.3.0")
License
MIT, see LICENSE.