Skip to content

Swift SDK: rich channels facade (list/create/delete) (TS participant SDK parity) #1158

Description

@willwashburn

What the TS participant SDK provides

AgentRelay.channels (packages/sdk/src/agent-relay.ts) exposes RelayMessaging['channels'] (packages/sdk/src/messaging/types.ts, readonly channels):

  • list / get / create / update / archive
  • join / leave / invite
  • members
  • mute / unmute

What the Swift AgentRelaySDK lacks

The Swift client only resolves a channel handle and subscribes/posts (channel(_), RelayChannel.subscribe() / .post(_), plus post(to:message:) in AgentRelayClient.swift). It cannot list, create, update, archive, join/leave, invite, list members, or mute/unmute channels.

Proposed Swift API sketch

public struct RelayChannelInfo: Decodable, Sendable {}
public struct RelayChannelMember: Decodable, Sendable {}

extension AgentClient {
    public func channels(/* filters */) async throws -> [RelayChannelInfo]
    public func channelInfo(_ name: String) async throws -> RelayChannelInfo
    public func createChannel(_ input: RelayCreateChannelInput) async throws -> RelayChannelInfo
    public func archiveChannel(_ name: String) async throws
    public func joinChannel(_ name: String) async throws
    public func leaveChannel(_ name: String) async throws
    public func invite(_ agent: String, to channel: String) async throws
    public func members(of channel: String) async throws -> [RelayChannelMember]
    // update / mute / unmute ...
}

Part of bringing the Swift AgentRelaySDK to parity with the TS participant SDK (follow-up to #1143 / #1147).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions