Skip to content

WebSocket subscriptions need cursor, from=now, and path-scoped catch-up #238

Description

@kjgbot

Problem

Pear issue AgentWorkforce/pear#82 exposed an upstream Relayfile event-subscription contract gap. The detailed finding is in AgentWorkforce/pear#82 (comment).

The current /fs/ws subscription flow replays recent workspace events as fresh events on subscribe/reconnect because the server unconditionally runs GetRecentEvents(workspaceID, 100) catch-up with no client cursor, no from=now / no-backfill mode, and no server-side path scope.

Consumers such as Pear need to subscribe to live integration events without receiving historical provider records as new notifications, and they need reconnect catch-up to honor the same semantics.

Required contract

  • New WebSocket subscriptions default to from=now, meaning no historical catch-up unless explicitly requested.
  • The SDK/server accept either from=now or an exclusive cursor for resume/catch-up.
  • Reconnect catch-up honors the selected no-backfill/cursor behavior and must not replay recent workspace history by default.
  • Subscriptions can pass exact path filters so the server only sends matching file events instead of forcing clients to receive workspace-wide events and filter locally.
  • Backward-compatible API support is needed so older clients can keep their existing behavior while updated clients can opt into the fixed contract.

Pear impact

Pear currently pins @relayfile/sdk@0.7.23. Once this is fixed and released, Pear should bump the SDK to the first version containing this contract and use the WebSocket from=now + path filter options for Track C in AgentWorkforce/pear#82.

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