* Support 2025-06-18 Spec (#167) * Support OpenAI _meta for Tool * Update init * Add title and outputSchema * Concurreny issue * General fields * Add Generate Fields to Server elements * 4 tab spacing * Update Version * Elicitation * Format * More tests and inits * Elicitation in README * Fix orphaned test * Add title to more structs * Public init * Fix meta validation and make tests more generic * Format and make Result properties public again * Revert more visibility changes * feat: 2025-11-25 phase 1, includes Version, Icon, Progress (#181) * chore: fixed unit tests * feat: added icon and progess base structs * feat: added progress notification and meta to callTool * feat: added tests * feat: simplified RequestMeta encoding/decoding * tests: added unit test to track progress * chore: rebased v0.11.x * feat: implemented cancellation * feat: added overloaded callTool method * fix: encoding Response _meta fix * chore: added old version to the versions list * feat: 2025-11-25 phase 2; added Logging and Completions (#196) * feat: added Logging and Completions * feat: updated EmbeddedResource for the latest spec * chore: changed encoding of meta in Prompts to encodeIfPresent * feat: compliance tests + http server transport (#197) * feat: http server transport * feat: added http server transport * feat: removed unused files * feat: added conformance tests * feat: improved conformace testing * chore: removed redundant files * feat/2025-11-25: sampling, elicitation, roots (#198) * feat: Roots implementation * feat: added unit testing * feat: improved unit tests and fixed NetworkTransport crash * feat: implemented sampling and elicitation * feat: improved sampling tests * feat: improved elicitation tests * feat: improved confirmance tests * feat: improved Prompts unit tests * feat: removed test code * feat: updated conformance tests * chore: removed redundant commas * chore: removed 6.0.3 swift version from ci * chore: improved unit tests a little bit * chore: update README.md * chore: add server progress tracking example to README.md * chore: updated README.md * chore: updated transports table formatting * chore: updated MockNetworkConnection --------- Co-authored-by: Austin Evans <austinjevans@me.com> Co-authored-by: yehorsobko <yehorsobko@macpaw.com>
73 lines
2.8 KiB
Swift
73 lines
2.8 KiB
Swift
// swift-tools-version:6.1
|
|
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
|
|
|
import PackageDescription
|
|
|
|
// Base dependencies needed on all platforms
|
|
var dependencies: [Package.Dependency] = [
|
|
.package(url: "https://github.com/apple/swift-system.git", from: "1.0.0"),
|
|
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.0"),
|
|
.package(url: "https://github.com/apple/swift-async-algorithms.git", from: "1.0.0"),
|
|
.package(url: "https://github.com/mattt/eventsource.git", from: "1.1.0"),
|
|
.package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"),
|
|
]
|
|
|
|
// Target dependencies needed on all platforms
|
|
var targetDependencies: [Target.Dependency] = [
|
|
.product(name: "SystemPackage", package: "swift-system"),
|
|
.product(name: "Logging", package: "swift-log"),
|
|
.product(name: "AsyncAlgorithms", package: "swift-async-algorithms"),
|
|
.product(
|
|
name: "EventSource", package: "eventsource",
|
|
condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS, .macCatalyst])),
|
|
.product(name: "NIOCore", package: "swift-nio"),
|
|
.product(name: "NIOPosix", package: "swift-nio"),
|
|
.product(name: "NIOHTTP1", package: "swift-nio"),
|
|
]
|
|
|
|
let package = Package(
|
|
name: "mcp-swift-sdk",
|
|
platforms: [
|
|
.macOS("13.0"),
|
|
.macCatalyst("16.0"),
|
|
.iOS("16.0"),
|
|
.watchOS("9.0"),
|
|
.tvOS("16.0"),
|
|
.visionOS("1.0"),
|
|
],
|
|
products: [
|
|
// Products define the executables and libraries a package produces, making them visible to other packages.
|
|
.library(
|
|
name: "MCP",
|
|
targets: ["MCP"]),
|
|
.executable(
|
|
name: "mcp-everything-server",
|
|
targets: ["MCPConformanceServer"]),
|
|
.executable(
|
|
name: "mcp-everything-client",
|
|
targets: ["MCPConformanceClient"])
|
|
],
|
|
dependencies: dependencies,
|
|
targets: [
|
|
// Targets are the basic building blocks of a package, defining a module or a test suite.
|
|
// Targets can depend on other targets in this package and products from dependencies.
|
|
.target(
|
|
name: "MCP",
|
|
dependencies: targetDependencies,
|
|
swiftSettings: [
|
|
.enableUpcomingFeature("StrictConcurrency")
|
|
]
|
|
),
|
|
.testTarget(
|
|
name: "MCPTests",
|
|
dependencies: ["MCP"] + targetDependencies),
|
|
.executableTarget(
|
|
name: "MCPConformanceServer",
|
|
dependencies: ["MCP"] + targetDependencies,
|
|
path: "Sources/MCPConformance/Server"),
|
|
.executableTarget(
|
|
name: "MCPConformanceClient",
|
|
dependencies: ["MCP"] + targetDependencies,
|
|
path: "Sources/MCPConformance/Client")
|
|
]
|
|
)
|