What the TS participant SDK provides
AgentRelay.deliveries (packages/sdk/src/agent-relay.ts) exposes RelayMessaging['deliveries'] (packages/sdk/src/messaging/types.ts, readonly deliveries):
ack(messageId): Promise<RelayDeliveryResult>
fail(messageId, reason?): Promise<RelayDeliveryResult>
defer(messageId, deferUntil?): Promise<RelayDeliveryResult>
These let a participant acknowledge, reject, or defer a delivered message so the relay can track delivery state and stop redelivering.
What the Swift AgentRelaySDK lacks
AgentClient receives messages via the events / inboundMessages streams but has no way to ack/fail/defer a delivery by messageId. Without this, delivered messages cannot be marked handled from the Swift side.
Proposed Swift API sketch
public struct RelayDeliveryResult: Decodable, Sendable {}
extension AgentClient {
public func ackDelivery(_ messageId: String) async throws -> RelayDeliveryResult
public func failDelivery(_ messageId: String, reason: String? = nil) async throws -> RelayDeliveryResult
public func deferDelivery(_ messageId: String, until: Date? = nil) async throws -> RelayDeliveryResult
}
Part of bringing the Swift AgentRelaySDK to parity with the TS participant SDK (follow-up to #1143 / #1147).
What the TS participant SDK provides
AgentRelay.deliveries(packages/sdk/src/agent-relay.ts) exposesRelayMessaging['deliveries'](packages/sdk/src/messaging/types.ts,readonly deliveries):ack(messageId): Promise<RelayDeliveryResult>fail(messageId, reason?): Promise<RelayDeliveryResult>defer(messageId, deferUntil?): Promise<RelayDeliveryResult>These let a participant acknowledge, reject, or defer a delivered message so the relay can track delivery state and stop redelivering.
What the Swift
AgentRelaySDKlacksAgentClientreceives messages via theevents/inboundMessagesstreams but has no way to ack/fail/defer a delivery bymessageId. Without this, delivered messages cannot be marked handled from the Swift side.Proposed Swift API sketch
Part of bringing the Swift
AgentRelaySDKto parity with the TS participant SDK (follow-up to #1143 / #1147).