Skip to main content
Version: MVP

Messaging channel adapter

3 min readReference · previewUpdated 2026-05-19

What you'll find here

The first messaging channel adapter — a fixture for controlled gateway ingress. It does not connect to Slack, Discord, email, SMS, or any external service. It defines the normalized behavior every future messaging adapter must keep.

Fixture, not delivery.

Inbound normalization · paired identity context · policy envelope linkage · redacted receipts · outbound payload construction — without delivery.

Setup

No provider setup is required. Runtime callers use craik.runtime.channels.messaging to build the default craik.channel_adapter_contract, normalize a message, and produce a craik.capability_receipt.

from craik.runtime.channels.messaging import (
default_messaging_channel_contract,
inbound_message_receipt,
normalize_inbound_message,
)

contract = default_messaging_channel_contract()
event = normalize_inbound_message(
event_id="message_1",
sender_id="external:alice",
text="run the status check",
identity_id="channel_identity_alice",
policy_envelope_id="policy_gateway",
)
receipt = inbound_message_receipt(
event=event,
task_id="task_gateway",
actor="adapter:messaging_fixture",
policy_profile="strict",
policy_envelope_id="policy_gateway",
)

Inbound normalization

Normalized inbound messages include:

event_id

channel

Set to messaging.

received_at

sender.external_id

Paired sender.identity_id

Optional.

sender.policy_envelope_id

Optional.

Message text

thread_id

Optional.

Adapter metadata

The message text is part of the inbound event so downstream policy and task creation can inspect it. Receipts redact message text.

Receipts

inbound_message_receipt emits a craik.capability_receipt for channel.message.receive. Receipt metadata preserves the policy envelope id, event id, sender external id, paired identity id, channel, and redaction fields.

Limitations

No external messaging provider contacted

No channel credentials stored

No outbound response delivered

Identity pairing & allowlists

Enforced by later gateway layers.

Policy envelopes & grants

Required before privileged action.

What's next