swift-apple-intelligence-grpc/Package.swift
Mathias Beaulieu-Duncan 638656e7ca Add vision support, gRPC reflection toggle, and chat improvements
- Add Vision framework integration for image analysis (OCR, classification)
- Add image attachment support in chat UI with drag & drop
- Add recent images sidebar from Downloads/Desktop
- Add copy to clipboard button for assistant responses
- Add gRPC reflection service with toggle in settings
- Create proper .proto file and generate Swift code
- Add server restart when toggling reflection setting
- Fix port number formatting in settings (remove comma grouping)
- Update gRPC dependencies to v2.x

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 16:18:06 -05:00

67 lines
2.5 KiB
Swift

// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "AppleIntelligenceGRPC",
platforms: [
.macOS(.v26)
],
products: [
.executable(name: "AppleIntelligenceServer", targets: ["AppleIntelligenceServer"]),
.executable(name: "AppleIntelligenceApp", targets: ["AppleIntelligenceApp"]),
],
dependencies: [
.package(url: "https://github.com/grpc/grpc-swift-2.git", from: "2.0.0"),
.package(url: "https://github.com/grpc/grpc-swift-nio-transport.git", from: "2.0.0"),
.package(url: "https://github.com/grpc/grpc-swift-protobuf.git", from: "2.0.0"),
.package(url: "https://github.com/grpc/grpc-swift-extras.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.28.0"),
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.3.0"),
],
targets: [
// Shared library with gRPC service code
.target(
name: "AppleIntelligenceCore",
dependencies: [
.product(name: "GRPCCore", package: "grpc-swift-2"),
.product(name: "GRPCNIOTransportHTTP2", package: "grpc-swift-nio-transport"),
.product(name: "GRPCProtobuf", package: "grpc-swift-protobuf"),
.product(name: "GRPCReflectionService", package: "grpc-swift-extras"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
],
resources: [
.copy("Resources/apple_intelligence.pb")
],
swiftSettings: [
.unsafeFlags(["-Xfrontend", "-suppress-warnings"])
]
),
// CLI server (original)
.executableTarget(
name: "AppleIntelligenceServer",
dependencies: [
"AppleIntelligenceCore",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
swiftSettings: [
.unsafeFlags(["-parse-as-library"]),
.unsafeFlags(["-Xfrontend", "-suppress-warnings"])
]
),
// Menu bar app
.executableTarget(
name: "AppleIntelligenceApp",
dependencies: [
"AppleIntelligenceCore",
],
exclude: [
"Info.plist"
],
swiftSettings: [
.unsafeFlags(["-parse-as-library"]),
.unsafeFlags(["-Xfrontend", "-suppress-warnings"])
]
),
]
)