V0.11.x (#199)
* 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>
This commit is contained in:
parent
6fa1a97b41
commit
6112a3995a
1 changed files with 11854 additions and 828 deletions
|
|
@ -10,6 +10,7 @@ struct ResourceTests {
|
|||
let resource = Resource(
|
||||
name: "test_resource",
|
||||
uri: "file://test.txt",
|
||||
title: "Test Resource Title",
|
||||
description: "A test resource",
|
||||
mimeType: "text/plain",
|
||||
metadata: ["key": "value"]
|
||||
|
|
@ -17,6 +18,7 @@ struct ResourceTests {
|
|||
|
||||
#expect(resource.name == "test_resource")
|
||||
#expect(resource.uri == "file://test.txt")
|
||||
#expect(resource.title == "Test Resource Title")
|
||||
#expect(resource.description == "A test resource")
|
||||
#expect(resource.mimeType == "text/plain")
|
||||
#expect(resource.metadata?["key"] == "value")
|
||||
|
|
@ -27,6 +29,7 @@ struct ResourceTests {
|
|||
let resource = Resource(
|
||||
name: "test_resource",
|
||||
uri: "file://test.txt",
|
||||
title: "Test Resource Title",
|
||||
description: "Test resource description",
|
||||
mimeType: "text/plain",
|
||||
metadata: ["key1": "value1", "key2": "value2"]
|
||||
|
|
@ -40,6 +43,7 @@ struct ResourceTests {
|
|||
|
||||
#expect(decoded.name == resource.name)
|
||||
#expect(decoded.uri == resource.uri)
|
||||
#expect(decoded.title == resource.title)
|
||||
#expect(decoded.description == resource.description)
|
||||
#expect(decoded.mimeType == resource.mimeType)
|
||||
#expect(decoded.metadata == resource.metadata)
|
||||
|
|
@ -86,7 +90,7 @@ struct ResourceTests {
|
|||
let emptyParams = ListResources.Parameters()
|
||||
#expect(emptyParams.cursor == nil)
|
||||
}
|
||||
|
||||
|
||||
@Test("ListResources request decoding with omitted params")
|
||||
func testListResourcesRequestDecodingWithOmittedParams() throws {
|
||||
// Test decoding when params field is omitted
|
||||
|
|
@ -101,7 +105,7 @@ struct ResourceTests {
|
|||
#expect(decoded.id == "test-id")
|
||||
#expect(decoded.method == ListResources.name)
|
||||
}
|
||||
|
||||
|
||||
@Test("ListResources request decoding with null params")
|
||||
func testListResourcesRequestDecodingWithNullParams() throws {
|
||||
// Test decoding when params field is null
|
||||
|
|
|
|||
Loading…
Reference in a new issue