-
-
Notifications
You must be signed in to change notification settings - Fork 957
Expand file tree
/
Copy pathPackage.swift
More file actions
60 lines (57 loc) · 2.32 KB
/
Package.swift
File metadata and controls
60 lines (57 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// swift-tools-version: 6.0
import PackageDescription
// Root shim: re-exports CuaDriverCore and CuaDriverServer so Swift packages
// can consume them directly from the trycua/cua monorepo without knowing the
// internal layout. Sources live in libs/cua-driver/Sources/; this file uses
// path: to forward there.
//
// IMPORTANT — SPM version resolution:
// SPM's `from:` / `upToNextMajor` only recognises semver tags ("0.1.0",
// "v0.1.0"). This repo uses "cua-driver-v*" tags for the CLI releases, which
// SPM cannot parse. Until plain semver tags are published, pin by revision:
//
// .package(url: "https://github.com/trycua/cua.git", .revision("cua-driver-v0.1.0"))
//
// When the repo starts publishing semver tags alongside the CLI tags, use:
//
// .package(url: "https://github.com/trycua/cua.git", from: "0.1.0")
//
// Then in your target's dependencies:
//
// .product(name: "CuaDriverCore", package: "cua") // AX, input, capture, recording
// .product(name: "CuaDriverServer", package: "cua") // MCP tool handlers + daemon layer
let package = Package(
name: "cua",
platforms: [.macOS(.v14)],
products: [
// Accessibility, input, capture, app-launch, recording primitives.
// No external dependencies — system frameworks only.
.library(name: "CuaDriverCore", targets: ["CuaDriverCore"]),
// MCP tool handlers and daemon server built on top of CuaDriverCore.
// Depends on modelcontextprotocol/swift-sdk for the MCP protocol types.
.library(name: "CuaDriverServer", targets: ["CuaDriverServer"]),
],
dependencies: [
.package(
url: "https://github.com/modelcontextprotocol/swift-sdk.git",
from: "0.9.0"
),
],
targets: [
// NOTE: if libs/cua-driver/Package.swift ever gains resources:,
// swiftSettings:, linkerSettings:, or exclude: on these targets,
// mirror those changes here to avoid a silent build mismatch.
.target(
name: "CuaDriverCore",
path: "libs/cua-driver/Sources/CuaDriverCore"
),
.target(
name: "CuaDriverServer",
dependencies: [
"CuaDriverCore",
.product(name: "MCP", package: "swift-sdk"),
],
path: "libs/cua-driver/Sources/CuaDriverServer"
),
]
)