> For AI agents: the complete documentation index is available at /cafleet/llms.txt, the full documentation bundle is available at /cafleet/llms-full.txt.

# Message envelope

A message is a durable point-to-point delivery. The recipient owns its inbox and explicitly acknowledges consumption.

## Persisted shape

The [messages table](/cafleet/spec/data-model.md#messages) stores typed routing/status columns, exact body text and internal `notified_at` state. Required values decode with typed errors.

The ordered public record is:

```json
{
  "message_id": 42,
  "from_member_id": 7,
  "to_member_id": 3,
  "created_at": "2026-05-05T05:42:11.123456+00:00",
  "status_state": "input_required",
  "status_timestamp": "2026-05-05T05:42:11.123456+00:00",
  "text": "build OK"
}
```

`to_member_id` is always an integer. ACK changes `status_state` to `completed` and stamps `status_timestamp`; completion means the delivery was consumed, independently of the assignment's progress.

## Rendered shape

[Output shapes](/cafleet/spec/cli-options.md#output-shapes) owns each command's wrapper. Poll returns an array of full records; show/ACK wrap one record as `message`; send adds `notification_sent`. Wait returns full poll records inside its finite receive result. [Listen](/cafleet/spec/cli-options.md#message-listen) emits that same full record inside a tagged `message` envelope, with separate `ready`/`closed` lifecycle records and explicit ACK consumption.

### Text-mode projection

| Field                                 | Text rendering                      |
| ------------------------------------- | ----------------------------------- |
| `message_id`                          | Bracketed ID on the first line      |
| `from_member_id`                      | `from:` segment                     |
| `status_timestamp`                    | Timestamp on the first line         |
| `text`                                | Body on the next line when nonempty |
| Recipient, creation and status fields | Available in full JSON              |

```text
[42 | from:7 | 2026-05-05T05:42:11.123456+00:00]
build OK
```

Text bodies use `CAFLEET_MAX_TEXT_LEN` codepoints plus `…`; JSON preserves the complete exact text. A pane notification line folds the full body under its own [line contract](/cafleet/spec/multiplexer-backends.md#push-notifications), independent of `CAFLEET_MAX_TEXT_LEN`.
