You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(client-pull): promote discovery/probe/endpoint/provider into public decdn-client-pull modules #1021
decdn-client-pull — already a proper library: stream_fetch_tracked, open_progressive_pull, open_channel/ensure_allowance (buyer_channel.rs), and BuyerChannelStore/RedbBuyerChannelStore live here and are reusable.
decdn-cli (bin crate) — but discovery, probe, the client iroh-endpoint builder, and the provider builder live in crates/cli/src/commands/, which the workspace marks "only ever a dev-dependency." Nothing can depend on it.
That means there is one shared, tested "discover → probe → open/reuse channel → paid-fetch" path, but half of it (the discovery half) is unreachable as a library. Any non-CLI client is blocked on this.
Proposal (pure refactor, no behavior change)
Promote the bin-locked modules into publicdecdn-client-pull modules:
Then repoint crates/cli/src/commands/fetch.rs and bundle_pull.rs to import from decdn-client-pull, and move the accompanying unit tests alongside the moved code.
Discovery stays registry+probe (CapacityBond.getActiveNodes → cdn/probe/v1 has_blob → rank, per ADR 019/030); cdn/dht/v1 (ADR 022) can slot behind the same discovery interface later.
Why now / value on its own
Removes a duplicated discovery implementation and gives the repo one documented public client-fetch surface shared by the CLI and any future client.
Activity
refactor(client-pull): promote discovery/probe/endpoint/provider to p…