| 1 | import * as Context from "effect/Context"; |
| 2 | import type * as Stream from "effect/Stream"; |
| 3 | |
| 4 | import type { PlatformConnectionRegistration } from "../connection/catalog.ts"; |
| 5 | |
| 6 | export class PlatformConnectionSource extends Context.Service< |
| 7 | PlatformConnectionSource, |
| 8 | { |
| 9 | // Each emission is the full current set of platform-managed environments |
| 10 | // (the primary local environment plus any desktop-local backends running |
| 11 | // alongside it). The registry reconciles the set, so the source can drive |
| 12 | // both additions and removals by re-emitting. |
| 13 | readonly registrations: Stream.Stream<ReadonlyArray<PlatformConnectionRegistration>>; |
| 14 | } |
| 15 | >()("@t3tools/client-runtime/platform/source/PlatformConnectionSource") {} |