OpenAgentSDK (Swift)
Unified SDKs source package and exported entry points.
Purpose
Unified SDKs package. See the linked task guide for its role in the integration.
Source contract
| Field | Value |
|---|---|
| Package | OpenAgentSDK |
| Version | source package |
| Language | Swift |
| Runtime floor | 6.0 |
| Manifest | openagent-sdk/sdks/swift/Package.swift |
| Distribution | Source package; registry publication not verified |
Manifest SHA-256: e635c5b06a224b2b031f82c87fb3144d83429ddcabebae8c4d4e580cf916c58d. The recorded Git revision identifies the containing repository; the manifest and entry-point hashes identify this working-tree snapshot.
Integration
Use the package root above from an authorized source checkout. Preserve sibling dependencies and their version/feature requirements. Install the runtime and compile the selected package before using its generated artifacts. The task guide describes configuration, trust boundaries, and error behavior. Test/conformance and deployment packages are supporting tools, not interchangeable production identity providers.
Exported entry points
The declarations below are extracted from the named entry files. This is a navigable source reference, not compiler-generated documentation of every transitive module. Feature gates and runtime requirements still apply. Private implementation files are not promoted to public APIs merely because they contain a public declaration.
openagent-sdk/sdks/swift/Sources/OpenAgentSDK/ACT.swift
Source SHA-256: 0c5283ee0fabfbdb2045e14418a395bef31ba62bfc8976f6ae4cc5967c0f021e.
public enum ACT {
public struct Claims: Sendable {
public let jti: String
public let sub: String
public let iss: String
public let aud: [String]
public let iat: Int64
public let nbf: Int64
public let exp: Int64
public let tenantId: String
public let scopes: [Scope]
public let ext: [String: String]
public struct Envelope {
public let version: Int
public let alg: String
public let claims: [UInt8]
public let sig: [UInt8]
public let kid: String?
public static func decode(_ token: [UInt8]) throws -> Envelope {
public struct Verifier: Sendable {
public typealias Clock = @Sendable () -> Int64
public init(
public func requiringScopes(_ scopes: [Scope]) -> Verifier {
public func withClock(_ nowUnixSeconds: Int64) -> Verifier {
public func verify(_ token: [UInt8]) throws -> Claims {openagent-sdk/sdks/swift/Sources/OpenAgentSDK/Agent.swift
Source SHA-256: acfde779cf2fedfbccfdf5dd2b9cffe3504e3722e9939a1863408f8cabc2dadc.
public struct Agent: Sendable {
public let keys: AgentKeys
public let did: String?
public static func create(name: String, did: String? = nil) throws -> Agent {
public static func fromSeed(_ seed: Data, did: String? = nil) throws -> Agent {
public struct Session: Sendable {
public let baseURL: URL
public let sessionToken: String
public let did: String
public let expiresAt: Int64
public let trustTier: String
public let capabilities: [String]
public var authorizationHeader: String {
public func authenticate(baseURL: URL) async throws -> Session {openagent-sdk/sdks/swift/Sources/OpenAgentSDK/CBOR.swift
Source SHA-256: 0b9666f153bd871822d2b45a78fa3497bea592f66b8a4a56b9c8874bbff74f28.
This entry point composes the application or reuses implementation modules; inspect the source file and task guide for its callable boundary.
openagent-sdk/sdks/swift/Sources/OpenAgentSDK/Errors.swift
Source SHA-256: a3dd114baab7eabf850a3d18be428ccfab6e1f7d55fffd59df11127d3c6aa479.
public enum OpenAgentError: Error, Equatable {
public var description: String {openagent-sdk/sdks/swift/Sources/OpenAgentSDK/Keys.swift
Source SHA-256: c8f811e8799d6afd0785f2392122e494250768c7eac9b9445ac2f46d6f021d0b.
public struct AgentKeys: Sendable {
public let seed: Data
public let signingKey: Data
public let verifyingKey: Data
public let encryptionSecretKey: Data
public let encryptionPublicKey: Data
public func sign(_ message: Data) throws -> Data {
public let encryptionDeriveContext = "arsenal.agent.encryption_key"
public enum Keys {
public static func fromSeed(_ seed: Data) throws -> AgentKeys {
public static func generate() throws -> AgentKeys {
public static func fromSeedHex(_ hex: String) throws -> AgentKeys {
public static func fromEnv(_ envVar: String) throws -> AgentKeys {
public static func saveSeed(_ keys: AgentKeys, to path: URL) throws {
public static func fromSeedFile(_ path: URL) throws -> AgentKeys {
public static func seedToHex(_ seed: Data) -> String {openagent-sdk/sdks/swift/Sources/OpenAgentSDK/Scope.swift
Source SHA-256: 82e0b02605fee8ddce6ec596ee2fdbf78e298f9456afb61c6379560179109431.
public struct Scope: Equatable, Hashable, Sendable, CustomStringConvertible {
public let service: String
public let resource: String
public let action: String
public static func parse(_ text: String) throws -> Scope {
public func covers(_ requested: Scope) -> Bool {
public var description: String {