Skip to content
mercury framework
GitHub

Provider

Provider = Notifier & object

Defined in: types/channel-types/index.ts:229

What a provider (terminal, Google Chat, HTTP, future ones) must supply to plug into the turn pipeline and proactive notification. Opaque addressing strings: each provider owns its own addressing model, nothing above this layer parses them.

start(handleTurn): Promise<void>

Runs the provider’s inbound driver, calling handleTurn once per message that needs the model. Deterministic pre-interception (a confirm token, /dump) is the provider’s, before this. Resolves when the provider stops.

HandleTurn

Promise<void>

optional stop(): Promise<void>

Optional lifecycle stop for a channel with a background resource (a Pub/Sub subscription, an HTTP server); the composition root calls it on shutdown. A channel with nothing to release omits it.

Promise<void>