Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:6.0
// swift-tools-version:6.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -7,14 +7,16 @@ import PackageDescription
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/mattt/eventsource.git", from: "1.1.0")
.package(url: "https://github.com/mattt/eventsource.git", from: "1.1.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: "EventSource", package: "eventsource", condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS]))
.product(
name: "EventSource", package: "eventsource",
condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS])),
]

let package = Package(
Expand All @@ -39,7 +41,11 @@ let package = Package(
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "MCP",
dependencies: targetDependencies),
dependencies: targetDependencies,
swiftSettings: [
.enableUpcomingFeature("StrictConcurrency")
]
),
.testTarget(
name: "MCPTests",
dependencies: ["MCP"] + targetDependencies),
Expand Down
49 changes: 49 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// swift-tools-version:6.0
// 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/mattt/eventsource.git", from: "1.1.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: "EventSource", package: "eventsource",
condition: .when(platforms: [.macOS, .iOS, .tvOS, .visionOS, .watchOS])),
]

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"])
],
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),
.testTarget(
name: "MCPTests",
dependencies: ["MCP"] + targetDependencies),
]
)
2 changes: 1 addition & 1 deletion Sources/MCP/Base/Messages.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extension Value: NotRequired {
// MARK: -

/// A method that can be used to send requests and receive responses.
public protocol Method {
public protocol Method: Sendable {
/// The parameters of the method.
associatedtype Parameters: Codable, Hashable, Sendable = Empty
/// The result of the method.
Expand Down