Build Information
Failed to build NRouter, reference main (5b62e4), with Swift 6.2 for Wasm on 6 Sep 2026 06:24:50 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-53886770-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1Build Log
========================================
RunAll
========================================
Builder version: 5.0.2
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/nRouterAI/nrouter-sdk.git
Reference: main
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
From https://github.com/nRouterAI/nrouter-sdk
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 5b62e4b feat(sdks): error envelopes, log redaction, trace routing and session context (iterations 9-10)
Cloned https://github.com/nRouterAI/nrouter-sdk.git
Revision (git rev-parse @):
5b62e4b978d59815b853ee34c8b6304007be5502
SUCCESS checkout https://github.com/nRouterAI/nrouter-sdk.git at main
========================================
Build
========================================
Selected platform: wasm
Swift version: 6.2
Building package at path: $PWD
https://github.com/nRouterAI/nrouter-sdk.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-53886770-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest swift build --swift-sdk swift-6.2-RELEASE_wasm 2>&1
wasm-6.2-latest: Pulling from saguaro1/spi-images
Digest: sha256:70428a4f4110aef5b17a27427e965f31cf3855e8cf1dfdc416ed61c780337965
Status: Image is up to date for registry.gitlab.com/saguaro1/spi-images:wasm-6.2-latest
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
[3/10] Compiling NRouter ResponseMeta.swift
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/ResponseMeta.swift:89:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
87 |
88 | /// Parse from an `HTTPURLResponse`.
89 | public init(response: HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | self.init { name in
91 | // Header names are case-insensitive on the wire; ask the way
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/ResponseMeta.swift:95:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
93 | // platforms where the case-insensitive lookup is unavailable.
94 | if #available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 9.0, *) {
95 | if let v = response.value(forHTTPHeaderField: name) { return v }
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
96 | }
97 | for (key, value) in response.allHeaderFields {
[4/11] Compiling NRouter Media.swift
[5/11] Compiling NRouter Diagnostics.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[6/11] Emitting module NRouter
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:94:48: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 |
93 | /// The session buffered JSON and multipart calls use when none is injected.
94 | public static func makeDefaultSession() -> URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | let configuration = URLSessionConfiguration.default
96 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:102:57: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 |
101 | /// The session SSE streaming and binary downloads use when none is injected.
102 | public static func makeDefaultStreamingSession() -> URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | let configuration = URLSessionConfiguration.default
104 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:119:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | public let sessionId: String?
118 | private let apiKey: String
119 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | private let streamingSession: URLSession
121 |
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:120:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
118 | private let apiKey: String
119 | private let session: URLSession
120 | private let streamingSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 |
122 | /// A body paired with the metadata the gateway reported for it.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:188:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | apiKey: String? = nil,
187 | baseURL: String = NRouter.defaultBaseURL,
188 | session: URLSession? = nil,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | streamingSession: URLSession? = nil,
190 | traceId: String? = nil,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:189:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | baseURL: String = NRouter.defaultBaseURL,
188 | session: URLSession? = nil,
189 | streamingSession: URLSession? = nil,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 | traceId: String? = nil,
191 | sessionId: String? = nil
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:688:54: error: cannot find type 'URLRequest' in scope
686 | // MARK: - Internals
687 |
688 | private func applyCustomHeaders(_ request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
689 | request.setValue("swift", forHTTPHeaderField: "x-nr-client-language")
690 | if let traceId {
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:707:56: error: cannot find type 'URLRequest' in scope
705 | /// present and is not. Copying it also means an INJECTED session's bound
706 | /// is the one that applies, with no second number to keep in step.
707 | private static func applyDeadline(_ request: inout URLRequest, from session: URLSession) {
| `- error: cannot find type 'URLRequest' in scope
708 | request.timeoutInterval = session.configuration.timeoutIntervalForRequest
709 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:707:82: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
705 | /// present and is not. Copying it also means an INJECTED session's bound
706 | /// is the one that applies, with no second number to keep in step.
707 | private static func applyDeadline(_ request: inout URLRequest, from session: URLSession) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
708 | request.timeoutInterval = session.configuration.timeoutIntervalForRequest
709 | }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:736:34: error: cannot find type 'URLRequest' in scope
734 | }
735 |
736 | private func send(_ request: URLRequest) async throws -> Response {
| `- error: cannot find type 'URLRequest' in scope
737 | var request = request
738 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:119:17: warning: stored property 'session' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
117 | public let sessionId: String?
118 | private let apiKey: String
119 | private let session: URLSession
| `- warning: stored property 'session' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
120 | private let streamingSession: URLSession
121 |
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:120:17: warning: stored property 'streamingSession' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
118 | private let apiKey: String
119 | private let session: URLSession
120 | private let streamingSession: URLSession
| `- warning: stored property 'streamingSession' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
121 |
122 | /// A body paired with the metadata the gateway reported for it.
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/ResponseMeta.swift:89:27: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
87 |
88 | /// Parse from an `HTTPURLResponse`.
89 | public init(response: HTTPURLResponse) {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
90 | self.init { name in
91 | // Header names are case-insensitive on the wire; ask the way
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
[7/11] Compiling NRouter Sampling.swift
[8/11] Compiling NRouter Prompts.swift
[9/11] Compiling NRouter NRouterError.swift
[10/11] Compiling NRouter Memory.swift
[11/11] Compiling NRouter NRouter.swift
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:94:48: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
92 |
93 | /// The session buffered JSON and multipart calls use when none is injected.
94 | public static func makeDefaultSession() -> URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
95 | let configuration = URLSessionConfiguration.default
96 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:102:57: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
100 |
101 | /// The session SSE streaming and binary downloads use when none is injected.
102 | public static func makeDefaultStreamingSession() -> URLSession {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
103 | let configuration = URLSessionConfiguration.default
104 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:119:26: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
117 | public let sessionId: String?
118 | private let apiKey: String
119 | private let session: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
120 | private let streamingSession: URLSession
121 |
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:120:35: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
118 | private let apiKey: String
119 | private let session: URLSession
120 | private let streamingSession: URLSession
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
121 |
122 | /// A body paired with the metadata the gateway reported for it.
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:188:18: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
186 | apiKey: String? = nil,
187 | baseURL: String = NRouter.defaultBaseURL,
188 | session: URLSession? = nil,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
189 | streamingSession: URLSession? = nil,
190 | traceId: String? = nil,
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:189:27: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
187 | baseURL: String = NRouter.defaultBaseURL,
188 | session: URLSession? = nil,
189 | streamingSession: URLSession? = nil,
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
190 | traceId: String? = nil,
191 | sessionId: String? = nil
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:688:54: error: cannot find type 'URLRequest' in scope
686 | // MARK: - Internals
687 |
688 | private func applyCustomHeaders(_ request: inout URLRequest) {
| `- error: cannot find type 'URLRequest' in scope
689 | request.setValue("swift", forHTTPHeaderField: "x-nr-client-language")
690 | if let traceId {
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:707:56: error: cannot find type 'URLRequest' in scope
705 | /// present and is not. Copying it also means an INJECTED session's bound
706 | /// is the one that applies, with no second number to keep in step.
707 | private static func applyDeadline(_ request: inout URLRequest, from session: URLSession) {
| `- error: cannot find type 'URLRequest' in scope
708 | request.timeoutInterval = session.configuration.timeoutIntervalForRequest
709 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:707:82: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
705 | /// present and is not. Copying it also means an INJECTED session's bound
706 | /// is the one that applies, with no second number to keep in step.
707 | private static func applyDeadline(_ request: inout URLRequest, from session: URLSession) {
| `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
708 | request.timeoutInterval = session.configuration.timeoutIntervalForRequest
709 | }
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
| `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:736:34: error: cannot find type 'URLRequest' in scope
734 | }
735 |
736 | private func send(_ request: URLRequest) async throws -> Response {
| `- error: cannot find type 'URLRequest' in scope
737 | var request = request
738 | request.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:119:17: warning: stored property 'session' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
117 | public let sessionId: String?
118 | private let apiKey: String
119 | private let session: URLSession
| `- warning: stored property 'session' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
120 | private let streamingSession: URLSession
121 |
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:120:17: warning: stored property 'streamingSession' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
118 | private let apiKey: String
119 | private let session: URLSession
120 | private let streamingSession: URLSession
| `- warning: stored property 'streamingSession' of 'Sendable'-conforming struct 'NRouter' has non-Sendable type 'URLSession' (aka 'AnyObject'); this is an error in the Swift 6 language mode
121 |
122 | /// A body paired with the metadata the gateway reported for it.
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:95:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
93 | /// The session buffered JSON and multipart calls use when none is injected.
94 | public static func makeDefaultSession() -> URLSession {
95 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
96 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
97 | configuration.timeoutIntervalForResource = defaultResourceTimeout
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:98:16: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
96 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
97 | configuration.timeoutIntervalForResource = defaultResourceTimeout
98 | return URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
99 | }
100 |
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:103:53: error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
101 | /// The session SSE streaming and binary downloads use when none is injected.
102 | public static func makeDefaultStreamingSession() -> URLSession {
103 | let configuration = URLSessionConfiguration.default
| `- error: type 'URLSessionConfiguration' (aka 'AnyObject') has no member 'default'
104 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
105 | configuration.timeoutIntervalForResource = defaultStreamingResourceTimeout
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:106:16: error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
104 | configuration.timeoutIntervalForRequest = defaultRequestTimeout
105 | configuration.timeoutIntervalForResource = defaultStreamingResourceTimeout
106 | return URLSession(configuration: configuration)
| `- error: 'URLSession' (aka 'AnyObject') cannot be constructed because it has no accessible initializers
107 | }
108 |
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:456:23: error: cannot find 'URLRequest' in scope
454 | append("\r\n--\(boundary)--\r\n")
455 |
456 | var request = URLRequest(url: try url(path))
| `- error: cannot find 'URLRequest' in scope
457 | request.httpMethod = "POST"
458 | request.setValue(
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:495:23: error: cannot find 'URLRequest' in scope
493 | /// Any `POST` path under the gateway's `/v1` root.
494 | public func post(_ path: String, _ body: [String: Any]) async throws -> Response {
495 | var request = URLRequest(url: try url(path))
| `- error: cannot find 'URLRequest' in scope
496 | request.httpMethod = "POST"
497 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:506:23: error: cannot find 'URLRequest' in scope
504 | var streamed = body
505 | streamed["stream"] = true
506 | var request = URLRequest(url: try url(path))
| `- error: cannot find 'URLRequest' in scope
507 | request.httpMethod = "POST"
508 | request.setValue("application/json", forHTTPHeaderField: "Content-Type")
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:515:31: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
513 | NRouter.applyDeadline(&request, from: streamingSession)
514 |
515 | let bytes: URLSession.AsyncBytes
| `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
516 | let response: URLResponse
517 | do {
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:516:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
514 |
515 | let bytes: URLSession.AsyncBytes
516 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
517 | do {
518 | (bytes, response) = try await streamingSession.bytes(for: request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:518:60: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
516 | let response: URLResponse
517 | do {
518 | (bytes, response) = try await streamingSession.bytes(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
519 | } catch is CancellationError {
520 | throw CancellationError()
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:524:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
522 | throw NRouterError.transport(error.localizedDescription)
523 | }
524 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
525 | throw NRouterError.transport("Response was not HTTP.")
526 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:524:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
522 | throw NRouterError.transport(error.localizedDescription)
523 | }
524 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
525 | throw NRouterError.transport("Response was not HTTP.")
526 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:528:41: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
526 | }
527 | let meta = NRouterResponseMeta(response: http)
528 | guard (200..<300).contains(http.statusCode) else {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
529 | var data = Data()
530 | for try await byte in bytes.prefix(1 << 20) { data.append(byte) }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:533:48: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
531 | let parsed = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any] ?? [:]
532 | throw NRouterError.fromCode(
533 | NRouter.errorBody(status: http.statusCode, payload: parsed, meta: meta)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
534 | )
535 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:536:33: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
534 | )
535 | }
536 | let contentType = (http.value(forHTTPHeaderField: "content-type") ?? "").lowercased()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
537 | guard contentType.contains("text/event-stream") else {
538 | throw NRouterError.transport(
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:539:42: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
537 | guard contentType.contains("text/event-stream") else {
538 | throw NRouterError.transport(
539 | "nRouter returned \(http.statusCode) with content-type '\(contentType)', " +
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
540 | "which is not an SSE stream."
541 | )
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:632:60: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
630 | continuation.onTermination = { @Sendable _ in reader.cancel() }
631 | }
632 | return StreamResponse(meta: meta, statusCode: http.statusCode, chunks: chunks)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
633 | }
634 |
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:637:23: error: cannot find 'URLRequest' in scope
635 | /// Any `GET` path under the gateway's `/v1` root.
636 | public func get(_ path: String) async throws -> Response {
637 | var request = URLRequest(url: try url(path))
| `- error: cannot find 'URLRequest' in scope
638 | request.httpMethod = "GET"
639 | return try await send(request)
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:655:23: error: cannot find 'URLRequest' in scope
653 | data: Data, meta: NRouterResponseMeta, statusCode: Int
654 | ) {
655 | var request = URLRequest(url: try url(path))
| `- error: cannot find 'URLRequest' in scope
656 | request.httpMethod = body == nil ? "GET" : "POST"
657 | if let body {
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:666:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
664 |
665 | let data: Data
666 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
667 | do {
668 | (data, response) = try await streamingSession.data(for: request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:668:59: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
666 | let response: URLResponse
667 | do {
668 | (data, response) = try await streamingSession.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
669 | } catch {
670 | throw NRouterError.transport(error.localizedDescription)
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:672:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
670 | throw NRouterError.transport(error.localizedDescription)
671 | }
672 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
673 | throw NRouterError.transport("Response was not HTTP.")
674 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:672:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
670 | throw NRouterError.transport(error.localizedDescription)
671 | }
672 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
673 | throw NRouterError.transport("Response was not HTTP.")
674 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:677:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
675 |
676 | let meta = NRouterResponseMeta(response: http)
677 | if (200..<300).contains(http.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
678 | return (data, meta, http.statusCode)
679 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:678:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
676 | let meta = NRouterResponseMeta(response: http)
677 | if (200..<300).contains(http.statusCode) {
678 | return (data, meta, http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
679 | }
680 | let parsed = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any] ?? [:]
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:682:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
680 | let parsed = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any] ?? [:]
681 | throw NRouterError.fromCode(
682 | NRouter.errorBody(status: http.statusCode, payload: parsed, meta: meta)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
683 | )
684 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:708:43: error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
706 | /// is the one that applies, with no second number to keep in step.
707 | private static func applyDeadline(_ request: inout URLRequest, from session: URLSession) {
708 | request.timeoutInterval = session.configuration.timeoutIntervalForRequest
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'configuration'
709 | }
710 |
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:743:23: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
741 |
742 | let data: Data
743 | let response: URLResponse
| `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
744 | do {
745 | (data, response) = try await session.data(for: request)
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
| `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:745:50: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
743 | let response: URLResponse
744 | do {
745 | (data, response) = try await session.data(for: request)
| `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
746 | } catch {
747 | throw NRouterError.transport(error.localizedDescription)
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:750:35: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
748 | }
749 |
750 | guard let http = response as? HTTPURLResponse else {
| `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
751 | throw NRouterError.transport("Response was not HTTP.")
752 | }
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:750:39: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
748 | }
749 |
750 | guard let http = response as? HTTPURLResponse else {
| `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
751 | throw NRouterError.transport("Response was not HTTP.")
752 | }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
| `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:756:38: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
754 | let meta = NRouterResponseMeta(response: http)
755 |
756 | if (200..<300).contains(http.statusCode) {
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
757 | // A 2xx that is not JSON is a REAL RESPONSE you were billed for —
758 | // /v1/audio/speech returns audio, video content returns bytes,
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:762:37: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
760 | // object, so the caller pays and receives nothing while the call
761 | // reports success. Refuse loudly instead.
762 | let contentType = (http.value(forHTTPHeaderField: "content-type") ?? "").lowercased()
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'value'
763 | guard contentType.contains("json") else {
764 | throw NRouterError.transport(
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:764:23: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
762 | let contentType = (http.value(forHTTPHeaderField: "content-type") ?? "").lowercased()
763 | guard contentType.contains("json") else {
764 | throw NRouterError.transport(
| `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
765 | "nRouter returned \(http.statusCode) with content-type "
766 | + "'\(contentType)', which is not JSON. Use bytes(_:_:) for binary "
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:778:46: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
776 | else {
777 | throw NRouterError.transport(
778 | "nRouter returned \(http.statusCode) with unparseable JSON; the request "
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
779 | + "was billed but the body did not arrive intact."
780 | )
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:782:70: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
780 | )
781 | }
782 | return Response(body: body, meta: meta, statusCode: http.statusCode)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
783 | }
784 | let parsed = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any] ?? [:]
/host/spi-builder-workspace/sdks/swift/Sources/NRouter/NRouter.swift:786:44: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
784 | let parsed = (try? JSONSerialization.jsonObject(with: data)) as? [String: Any] ?? [:]
785 | throw NRouterError.fromCode(
786 | NRouter.errorBody(status: http.statusCode, payload: parsed, meta: meta)
| `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
787 | )
788 | }
BUILD FAILURE 6.2 wasm