Skip to content

Swift SDK: integrations + webhooks (TS participant SDK parity) #1153

Description

@willwashburn

What the TS participant SDK provides

AgentRelay.integrations and AgentRelay.webhooks (packages/sdk/src/agent-relay.ts) expose RelayMessaging['integrations'] and RelayMessaging['webhooks'] (packages/sdk/src/messaging/types.ts, readonly integrations / readonly webhooks):

  • integrations.webhooks: create / list / delete / trigger (outbound webhooks).
  • integrations.subscriptions: create / list / get / delete (event subscriptions).
  • webhooks: createInbound / subscribe / list / delete / subscriptions / unsubscribe (inbound webhooks + subscriptions).

What the Swift AgentRelaySDK lacks

AgentClient has no integrations or webhook surface at all — no event subscriptions, no inbound/outbound webhook management.

Proposed Swift API sketch

extension AgentClient {
    public var integrations: RelayIntegrations { get }   // webhooks + subscriptions
    public var webhooks: RelayWebhooks { get }            // inbound webhooks + subscribe/unsubscribe
}

public struct RelayIntegrations {
    public func createWebhook(_ input: RelayCreateWebhookInput) async throws -> RelayWebhook
    public func listWebhooks() async throws -> [RelayWebhook]
    public func deleteWebhook(_ id: String) async throws
    public func triggerWebhook(_ id: String, payload: JSONValue?) async throws -> JSONValue
    public func createSubscription(_ input: RelayCreateSubscriptionInput) async throws -> RelayEventSubscription
    public func listSubscriptions() async throws -> [RelayEventSubscription]
    // get / delete ...
}

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