Skip to content

Swift SDK: rich agents facade (list/get/remove) (TS participant SDK parity) #1157

Description

@willwashburn

What the TS participant SDK provides

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

  • list(options?): Promise<RelayAgent[]>
  • get(name): Promise<RelayAgent>
  • me(): Promise<RelayAgent>
  • register / registerOrRotate
  • update(name, input): Promise<RelayAgent>
  • delete(name): Promise<void>
  • presence(): Promise<RelayAgentPresence[]>

What the Swift AgentRelaySDK lacks

The Swift client can register / registerOrRotate / reconnect an identity and act as an agent (AgentRelayClient.swift), but has no rich agents facade: no list, get, me, update, delete, or presence. It cannot enumerate or inspect other agents in the workspace.

Proposed Swift API sketch

public struct RelayAgent: Decodable, Sendable {}
public struct RelayAgentPresence: Decodable, Sendable {}

extension AgentClient {
    public func agents(/* filters */) async throws -> [RelayAgent]
    public func agent(_ name: String) async throws -> RelayAgent
    public func me() async throws -> RelayAgent
    public func updateAgent(_ name: String, _ input: RelayUpdateAgentInput) async throws -> RelayAgent
    public func removeAgent(_ name: String) async throws
    public func presence() async throws -> [RelayAgentPresence]
}

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

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