---
slug: "Stream"
name: "Stream"
type: "Data Structures"
layer: "Infrastructure"
ref: "Stream#ffa6"
sema_id: "sema:Stream#mh:SHA-256:ffa6e636cc2ca9f13c23f5862e60aceb0885a35686fb60f12da157316b159b53"
tags: ["Infrastructure","Data Structures"]
updated: 2026-11-11
mindscape: "bootstrap"
index_url: https://mindscape.pages.dev/bootstrap/index.json
url: https://mindscape.pages.dev/bootstrap/Stream/
related: ["Message","Event","ExplainBeacon","InvariantFilter","Queue"]
---

# Stream

Continuous data flow

Layer: Infrastructure · Category: Data Structures

## Mechanism

An ordered, potentially unbounded sequence of Messages. Represents real-time data pipes, log feeds, or conversational histories. Streams support operations like mapping, filtering, and backpressure. Utilizes [Message](https://mindscape.pages.dev/bootstrap/Message.md).

## Invariants

- Ordering: Messages M_n and M_n+1 maintain relative sequence.
- Causality: Effects cannot precede causes in the stream.

## Preconditions

- A Source emitting Messages

## Failure modes

—

## Data schema

```json
{
  "type": "object",
  "required": [
    "stream_id"
  ],
  "properties": {
    "stream_id": {
      "type": "string",
      "description": "Unique stream identifier"
    },
    "messages": {
      "type": "array",
      "description": "Ordered sequence of messages"
    },
    "cursor": {
      "type": "integer",
      "description": "Current read position in the stream"
    },
    "bounded": {
      "type": "boolean",
      "description": "Whether the stream has a known end"
    }
  }
}
```

## Builds on

- [Message](https://mindscape.pages.dev/bootstrap/Message.md) (Infrastructure; References)

## Used by

- [Event](https://mindscape.pages.dev/bootstrap/Event.md) (Infrastructure; References)
- [ExplainBeacon](https://mindscape.pages.dev/bootstrap/ExplainBeacon.md) (Infrastructure; References)
- [InvariantFilter](https://mindscape.pages.dev/bootstrap/InvariantFilter.md) (Society; References)
- [Queue](https://mindscape.pages.dev/bootstrap/Queue.md) (Infrastructure; References)

## Identity

- Sema ID: `sema:Stream#mh:SHA-256:ffa6e636cc2ca9f13c23f5862e60aceb0885a35686fb60f12da157316b159b53`
- Ref: `Stream#ffa6`
- Supersedes:
  - `sema:Stream#mh:SHA-256:6b47aafa55e0339455fa2d82d2077ffbf2c2dea744bd7034a99a3b77cfacfaec`

## Links

- [Pattern page](https://mindscape.pages.dev/bootstrap/Stream/)
- [View in the interactive graph](https://mindscape.pages.dev/bootstrap/#Stream)
- [JSON](https://mindscape.pages.dev/bootstrap/Stream.json)
- [Index of all patterns](https://mindscape.pages.dev/bootstrap/index.json)
