Swift SDK
Swift 6 source integration and explicit ACT verification policy.
The source package exposes the OpenAgentSDK SwiftPM product and uses Swift tools 6.0. Platform declarations are macOS14, iOS17, Mac Catalyst17, tvOS17, and watchOS10. Cryptography uses the swift-crypto dependency.
The verified package root is openagent-sdk/sdks/swift, not the monorepo root. From a neighboring application use a local SwiftPM dependency:
.package(path: "../openagent-sdk/sdks/swift")Add the OpenAgentSDK product to your target dependencies. A remote package URL/tag must point to a repository root with a compatible Package.swift; do not assume the monorepo root is that package.
Verify an ACT
import OpenAgentSDK
func verifyCalendar(
token: [UInt8],
publicKey: [UInt8],
issuer: String,
audience: String
) throws -> ACT.Claims {
let verifier = try ACT.Verifier(
trustedKeys: [publicKey],
expectedIssuer: issuer,
expectedAudience: audience,
requiredScopes: [try Scope.parse("tools:calendar:invoke")]
)
return try verifier.verify(token)
}Use exact binary token bytes and a raw 32-byte key. Construction and verification can throw; a caller must not proceed after an error. The verifier provides clock/leeway controls for tests and replay analysis.
Other surfaces
Agent and Session provide the identity/authentication facade; Keys provides key helpers; Scope models required permissions. Those conveniences do not provision a broker or authority verifier for your deployment.
Swift encryption-key derivation uses HMAC-SHA256 in the current source. Cross-language custody is not interchangeable. ACT conformance must be recorded separately for the implementation revision you ship.
Source: openagent-sdk/sdks/swift/Package.swift and Sources/OpenAgentSDK/{ACT,Scope,Agent,Keys}.swift.