Initial implementation of SwiftDBAI
Chat with any SQLite database using natural language. Built on AnyLanguageModel (HuggingFace) for LLM-agnostic provider support and GRDB for SQLite access. Core features: - Auto schema introspection from sqlite_master (zero config) - NL → SQL generation via any AnyLanguageModel provider - Three rendering modes: text summary, data table, Swift Charts - Drop-in DataChatView (SwiftUI) and headless ChatEngine - Operation allowlist with read-only default - Mutation policy with per-table control - ToolExecutionDelegate for destructive operation confirmation - Multi-turn conversation context - 352 tests across 24 suites, all passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
41
Package.swift
Normal file
41
Package.swift
Normal file
@@ -0,0 +1,41 @@
|
||||
// swift-tools-version: 6.1
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SwiftDBAI",
|
||||
platforms: [
|
||||
.iOS(.v17),
|
||||
.macOS(.v14),
|
||||
.visionOS(.v1),
|
||||
],
|
||||
products: [
|
||||
.library(
|
||||
name: "SwiftDBAI",
|
||||
targets: ["SwiftDBAI"]
|
||||
),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/groue/GRDB.swift.git", from: "7.0.0"),
|
||||
.package(url: "https://github.com/huggingface/AnyLanguageModel.git", branch: "main"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "SwiftDBAI",
|
||||
dependencies: [
|
||||
.product(name: "GRDB", package: "GRDB.swift"),
|
||||
.product(name: "AnyLanguageModel", package: "AnyLanguageModel"),
|
||||
],
|
||||
swiftSettings: [
|
||||
.swiftLanguageMode(.v6),
|
||||
]
|
||||
),
|
||||
.testTarget(
|
||||
name: "SwiftDBAITests",
|
||||
dependencies: ["SwiftDBAI"],
|
||||
swiftSettings: [
|
||||
.swiftLanguageMode(.v6),
|
||||
]
|
||||
),
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user