···11+# Composable Atmosphere Constellation
22+33+Composable Atmosphere Constellation is a Swift package for reading AT Protocol backlinks from Constellation.
44+55+It provides typed request and response models for `blue.microcosm.links.getBacklinks`, plus helpers that hydrate linked records from the author's PDS. Higher-level packages can use it to discover references across the network without coupling their own domain models to Constellation's raw response shape.
66+77+## Product
88+99+- `ComposableAtmosphereConstellation`: Constellation backlink lexicon models, XRPC request helpers, typed record hydration, and small in-flight request coalescing utilities.
1010+1111+## Installation
1212+1313+Add the package to `Package.swift`:
1414+1515+```swift
1616+.package(
1717+ url: "https://source.woody.fm/composable-atmosphere-constellation",
1818+ branch: "main"
1919+)
2020+```
2121+2222+Then depend on the library product:
2323+2424+```swift
2525+.product(
2626+ name: "ComposableAtmosphereConstellation",
2727+ package: "composable-atmosphere-constellation"
2828+)
2929+```
3030+3131+This package depends on the base `ATProto` and `XRPCClient` products from `swift-composable-atmosphere` and explicitly opts out of its default `TCA26` trait.
3232+3333+## Usage
3434+3535+Build a Constellation source from a collection and path:
3636+3737+```swift
3838+import ATProto
3939+import ComposableAtmosphereConstellation
4040+4141+let source = Constellation.BacklinkSource(
4242+ collection: "sh.tangled.repo.pull",
4343+ path: "target.repo"
4444+)
4545+```
4646+4747+Fetch backlinks for a DID or record URI:
4848+4949+```swift
5050+import XRPCClient
5151+5252+guard let repo = DID("did:plc:repo") else {
5353+ return
5454+}
5555+5656+let backlinks = try await XRPC.Client.liveValue.constellationGetBacklinks(
5757+ subject: repo,
5858+ source: source,
5959+ limit: 25
6060+)
6161+```
6262+6363+For typed record hydration, conform the referenced record value to `Constellation.BacklinkedRecordValue` and call `constellationGetBacklinkedRecords`.
6464+6565+## Development
6666+6767+Run the package checks with:
6868+6969+```sh
7070+swift build && swift test
7171+```