# Fx.fromStream

Adapts an Effect `Stream` to a push-based `Fx`.

## Signatures

```ts
export declare const fromStream: <A, E, R>(stream: Stream.Stream<A, E, R>, options?: FromStreamOptions) => Fx.Fx<A, E, R>;
```

## Why

Stream producers can participate in `Fx` composition without wrapping their
behavior in a new abstraction. Each Stream element is offered to the sink through
`Stream.mapEffect`; Stream causes are forwarded unchanged to `sink.onFailure`.

## Ownership and lifetime

Conversion starts nothing. Each `Fx.run` starts one Stream run owned by the caller's
fiber and scope. Interruption stops the Stream and its finalizers. Delivery order
and concurrency follow Effect Stream's `mapEffect` semantics and `options`.

## Examples

```ts
import { Effect, Stream } from "effect"
import { collectAll, fromStream } from "@typed/fx/Fx"

const source = fromStream(Stream.make("a", "b"))
const values = collectAll(source)
const program = Effect.map(values, (items) => items.join(""))
```
