Backplane.McpProtocol.Server.Modern.Subscription (backplane_mcp_protocol v0.6.0)

Copy Markdown

Immutable data and filtering helpers for one modern MCP subscription.

Subscription ownership and subscriber monitoring live in the hub; this module only validates filters and builds protocol envelopes.

Summary

Types

t()

@type t() :: %Backplane.McpProtocol.Server.Modern.Subscription{
  notifications: map(),
  ref: reference(),
  request_id: String.t() | integer(),
  request_meta: map(),
  server_info: map() | nil,
  subscriber: pid()
}

Functions

acknowledged(subscription)

@spec acknowledged(t()) :: map()

complete(subscription)

@spec complete(t()) :: map()

deliver(subscription, notification)

@spec deliver(t(), map()) :: {:ok, map()} | :ignore

new(subscriber, request_context)

@spec new(pid(), map()) :: {:ok, t()} | {:error, Backplane.McpProtocol.MCP.Error.t()}