blueclaw

Connector

A connector is the adapter that turns one platform's message into the normalized event the runtime handles.

The platforms the protocol knows are api and buzz (protocol/generated/json-schema/connector-platform.schema.json). Every inbound event arrives at POST /connectors/<platform>/events with the same body:

{
  "conversationID": "opaque-conversation-id",
  "messageID": "opaque-message-id",
  "senderID": "opaque-sender-id",
  "replyTargetID": "opaque-reply-target-id",
  "prompt": "current user message",
  "context": {
    "messages": [{ "speaker": "admin", "text": "previous visible message" }],
    "hasMoreBefore": true,
    "historyCursor": "opaque-history-cursor"
  }
}

The api connector identifies the sender by email and serves replies at GET /agent/api/replies?conversationID=. Messenger platforms go through chatd, the TypeScript bridge in chatd/, which holds the platform credentials, normalizes inbound messages and renders outbound replies. It ships adapters for Buzz and Mattermost. connectors.chatd configures it (endpoint, default http://127.0.0.1:18090; timeoutSecond; enabledPlatforms), and a platform listed in enabledPlatforms beyond the protocol's own is registered with a warning.

Durability

Inbound events persist in raw_event with a pending, running, succeeded or failed status, and replies enqueue into connector_outbox. Background workers claim stale rows with retry and backoff, and a duplicate inbound event returns the stored result instead of running again.

Control commands

An exact /stop or /stop-all (trimmed, lowercase) cancels the sender's task or tasks and gets a fixed acknowledgement (internal/connectors/task_control.go). It is the only reply blueclaw composes without a model.

On this page