47 lines
1.8 KiB
Markdown
47 lines
1.8 KiB
Markdown
---
|
|
id: deferred-iroh-adapters
|
|
name: Iroh spoke and hub adapters (deferred)
|
|
status: blocked
|
|
depends_on: [review-worker-adapter]
|
|
scope: system
|
|
risk: critical
|
|
impact: project
|
|
level: implementation
|
|
---
|
|
|
|
## Description
|
|
|
|
The Iroh adapters (spoke and hub) are explicitly deferred pending the fork of `@rayhanadev/iroh` as `@alkdev/iroh` with Linux + WASM platform targets. The current `@rayhanadev/iroh` has one author and no tests, making it unsuitable for production use.
|
|
|
|
This task is a placeholder to track the dependency. It cannot proceed until:
|
|
1. The iroh-ts fork exists as `@alkdev/iroh` with Linux native + WASM builds
|
|
2. The API surface (10 methods documented in `iroh-transport.md`) is validated against the fork
|
|
3. The fork has basic test coverage
|
|
|
|
The architecture docs specify:
|
|
- **Iroh Spoke**: `createIrohSpokeEventTarget({ endpoint, hubNodeId, alpn? })` — connects to hub, opens bidirectional QUIC stream, implements subscription forwarding
|
|
- **Iroh Hub**: `createIrohHubEventTarget({ endpoint, alpn? })` — accepts connections, manages fan-out with subscription tracking
|
|
- Both use length-prefixed JSON framing (4-byte big-endian length prefix)
|
|
- Both use `__subscribe`/`__unsubscribe` control protocol
|
|
|
|
Do NOT start implementation until the fork is ready.
|
|
|
|
## Acceptance Criteria
|
|
|
|
- [ ] `@alkdev/iroh` package is available with Linux + WASM builds
|
|
- [ ] Basic iroh API validation (connect, openBi, acceptBi, sendStream, recvStream)
|
|
- [ ] This task should be split into separate tasks for spoke and hub once the fork is ready
|
|
|
|
## References
|
|
|
|
- docs/architecture/iroh-transport.md
|
|
- docs/architecture/event-targets/iroh-spoke.md
|
|
- docs/architecture/event-targets/iroh-hub.md
|
|
|
|
## Notes
|
|
|
|
> Blocked on @alkdev/iroh fork. Do not start until fork is ready.
|
|
|
|
## Summary
|
|
|
|
> To be filled on completion |