mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-04 03:14:04 +00:00
Adds a default-enabled SwiftPM Talk trait for OpenClawKit so chat-only consumers can opt out with traits: [] and avoid resolving ElevenLabsKit. Default traits preserve existing talk/TTS API and bundled app behavior; macOS CI now verifies the trait-off dependency graph and build. Verification: - CI at85f00ebc04passed macos-swift and Real behavior proof. - Local Swift 6.3.2: trait-off dependency graph omitted ElevenLabsKit; full swift build with default traits disabled built through OpenClawChatUI; default dependency graph still included ElevenLabsKit; trait-off OpenClawKit target build passed. - merge-tree against latest origin/main4eba3e5d7dwas clean. - Current main already fails plugin-SDK declaration gates in unrelated TS files; reproduced locally with node scripts/run-tsgo.mjs -p tsconfig.plugin-sdk.dts.json --declaration true. Thanks @mochiexists. Co-authored-by: mochiexists <259077624+mochiexists@users.noreply.github.com> Co-authored-by: atlascodesai <76924051+atlascodesai@users.noreply.github.com>
66 lines
2.2 KiB
Swift
66 lines
2.2 KiB
Swift
// swift-tools-version: 6.2
|
|
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "OpenClawKit",
|
|
platforms: [
|
|
.iOS(.v18),
|
|
.macOS(.v15),
|
|
],
|
|
products: [
|
|
.library(name: "OpenClawProtocol", targets: ["OpenClawProtocol"]),
|
|
.library(name: "OpenClawKit", targets: ["OpenClawKit"]),
|
|
.library(name: "OpenClawChatUI", targets: ["OpenClawChatUI"]),
|
|
],
|
|
traits: [
|
|
.trait(name: "Talk", description: "ElevenLabs cloud TTS / talk support"),
|
|
.default(enabledTraits: ["Talk"]),
|
|
],
|
|
dependencies: [
|
|
.package(url: "https://github.com/steipete/ElevenLabsKit", exact: "0.1.1"),
|
|
.package(url: "https://github.com/gonzalezreal/textual", exact: "0.3.1"),
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "OpenClawProtocol",
|
|
path: "Sources/OpenClawProtocol",
|
|
swiftSettings: [
|
|
.enableUpcomingFeature("StrictConcurrency"),
|
|
]),
|
|
.target(
|
|
name: "OpenClawKit",
|
|
dependencies: [
|
|
"OpenClawProtocol",
|
|
.product(name: "ElevenLabsKit", package: "ElevenLabsKit", condition: .when(traits: ["Talk"])),
|
|
],
|
|
path: "Sources/OpenClawKit",
|
|
resources: [
|
|
.process("Resources"),
|
|
],
|
|
swiftSettings: [
|
|
.enableUpcomingFeature("StrictConcurrency"),
|
|
]),
|
|
.target(
|
|
name: "OpenClawChatUI",
|
|
dependencies: [
|
|
"OpenClawKit",
|
|
.product(
|
|
name: "Textual",
|
|
package: "textual",
|
|
condition: .when(platforms: [.macOS, .iOS])),
|
|
],
|
|
path: "Sources/OpenClawChatUI",
|
|
swiftSettings: [
|
|
.enableUpcomingFeature("StrictConcurrency"),
|
|
]),
|
|
.testTarget(
|
|
name: "OpenClawKitTests",
|
|
dependencies: ["OpenClawKit", "OpenClawChatUI"],
|
|
path: "Tests/OpenClawKitTests",
|
|
swiftSettings: [
|
|
.enableUpcomingFeature("StrictConcurrency"),
|
|
.enableExperimentalFeature("SwiftTesting"),
|
|
]),
|
|
])
|