diff --git a/Cargo.lock b/Cargo.lock index 8bbba0b8..fb098e8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -140,7 +140,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -274,9 +274,9 @@ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "bytes" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "cast" @@ -411,7 +411,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" dependencies = [ - "thiserror 2.0.18", + "thiserror 2.0.19", ] [[package]] @@ -685,7 +685,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -709,7 +709,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn", + "syn 2.0.118", ] [[package]] @@ -720,7 +720,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -760,7 +760,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccc2776f0c61eca1ca32528f85548abd1a4be8fb53d1b21c013e4f18da1e7090" dependencies = [ "data-encoding", - "syn", + "syn 2.0.118", ] [[package]] @@ -798,7 +798,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -808,7 +808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn", + "syn 2.0.118", ] [[package]] @@ -830,7 +830,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn", + "syn 2.0.118", "unicode-xid", ] @@ -870,7 +870,7 @@ checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -937,7 +937,7 @@ checksum = "3ed8956bd5c1f0415200516e78ff07ec9e16415ade83c056c230d7b7ea0d55b7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -1109,7 +1109,7 @@ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -1301,7 +1301,7 @@ dependencies = [ "jni 0.22.4", "rand 0.10.2", "rustls", - "thiserror 2.0.18", + "thiserror 2.0.19", "tinyvec", "tokio", "tokio-rustls", @@ -1323,7 +1323,7 @@ dependencies = [ "prefix-trie", "rand 0.10.2", "ring", - "thiserror 2.0.18", + "thiserror 2.0.19", "tinyvec", "tracing", "url", @@ -1351,7 +1351,7 @@ dependencies = [ "rustls", "smallvec", "system-configuration", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "tokio-rustls", "tracing", @@ -1806,7 +1806,7 @@ dependencies = [ "serde", "serde_json", "slotmap", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "tower", "tower-http 0.7.0", @@ -1888,7 +1888,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -1980,7 +1980,7 @@ dependencies = [ "jni-sys 0.4.1", "log", "simd_cesu8", - "thiserror 2.0.18", + "thiserror 2.0.19", "walkdir", "windows-link", ] @@ -1995,7 +1995,7 @@ dependencies = [ "quote", "rustc_version", "simd_cesu8", - "syn", + "syn 2.0.118", ] [[package]] @@ -2023,7 +2023,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -2141,9 +2141,9 @@ dependencies = [ [[package]] name = "mdns-sd" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb75febbe5fa1837a52fdbd1c735e168286c5c645fc2ddd31526f65c49941c2e" +checksum = "f18d8ec9d1869796fb2910d95f4d957072df0b6a22e247a1d760d8b4c805e17a" dependencies = [ "fastrand", "flume", @@ -2210,7 +2210,7 @@ checksum = "e2acd8b070213b0299282f884b4beba4e7b52d624fdcd504a3ad3665390c11e1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -2247,9 +2247,9 @@ dependencies = [ [[package]] name = "napi" -version = "3.10.3" +version = "3.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c71997d6f7ad4a756966e452426848ac27d3b37a295302d63afbbcce0270f93" +checksum = "6826e5ddc15589b2d68c8ad5321c18e85d40488e93e32962f362e572669bccf6" dependencies = [ "bitflags", "ctor", @@ -2269,36 +2269,36 @@ checksum = "c9c366d2c8c60b86fa632df75f745509b52f9128f91a6bad4c796e44abb505e1" [[package]] name = "napi-derive" -version = "3.5.9" +version = "3.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4ba572deef53e2c386759a8c2014175a62679d74ff83adc205c8bc0e0285727" +checksum = "b0fe526e81c105d3640516fcde83909dd1afe757c0d7a15af58830b5bc0fb9a1" dependencies = [ "convert_case 0.11.0", "ctor", "napi-derive-backend", "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] name = "napi-derive-backend" -version = "5.1.1" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd961eb2aa8965e3f29722d754f3a86907eb1984e2fbcbe3fe87b9a02d6bfba" +checksum = "514281397bcddd9ea9a876c7a21a57bff2374237a000ca9a64ea0211ec1993e2" dependencies = [ "convert_case 0.11.0", "proc-macro2", "quote", "semver", - "syn", + "syn 2.0.118", ] [[package]] name = "napi-sys" -version = "3.2.2" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f5bcdf71abd3a50d00b49c1c2c75251cb3c913777d6139cd37dabc093a5e400" +checksum = "85fbf1fa9f1babfe396d74bbbf52b3643770243e8f5b0b46715d4caf7f0dfc9a" dependencies = [ "libloading", ] @@ -2368,7 +2368,7 @@ dependencies = [ "log", "netlink-packet-core", "netlink-sys", - "thiserror 2.0.18", + "thiserror 2.0.19", ] [[package]] @@ -2442,7 +2442,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.18", + "thiserror 2.0.19", "tokio", "tokio-stream", "tracing", @@ -2470,7 +2470,7 @@ dependencies = [ "rustls-pki-types", "slab", "sorted-index-buffer", - "thiserror 2.0.18", + "thiserror 2.0.19", "tinyvec", "tracing", "web-time", @@ -2532,7 +2532,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -2759,7 +2759,7 @@ checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -2896,7 +2896,7 @@ checksum = "e0232bd009a197ceec9cc881ba46f727fcd8060a2d8d6a9dde7a69030a6fe2bb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -3425,7 +3425,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -3580,7 +3580,7 @@ checksum = "c87e960f4dca2788eeb86bbdde8dd246be8948790b7618d656e68f9b720a86e8" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -3638,7 +3638,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -3658,6 +3658,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -3675,7 +3686,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -3729,11 +3740,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" dependencies = [ - "thiserror-impl 2.0.18", + "thiserror-impl 2.0.19", ] [[package]] @@ -3744,18 +3755,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.4", ] [[package]] @@ -3859,7 +3870,7 @@ checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -4039,7 +4050,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -4297,7 +4308,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn", + "syn 2.0.118", "wasm-bindgen-shared", ] @@ -4451,7 +4462,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -4462,7 +4473,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -4692,7 +4703,7 @@ dependencies = [ "futures", "log", "serde", - "thiserror 2.0.18", + "thiserror 2.0.19", "windows", "windows-core", ] @@ -4716,7 +4727,7 @@ dependencies = [ "pharos", "rustc_version", "send_wrapper", - "thiserror 2.0.18", + "thiserror 2.0.19", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -4756,7 +4767,7 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", "synstructure", ] @@ -4777,7 +4788,7 @@ checksum = "4714fd92cf900833d49538023a9b3915155210801d1c1169eba513b2addefd71" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -4797,7 +4808,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", "synstructure", ] @@ -4818,7 +4829,7 @@ checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] @@ -4851,7 +4862,7 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.118", ] [[package]] diff --git a/docs/architecture.md b/docs/architecture.md index fefc7125..12a09276 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -39,15 +39,13 @@ Any deviation from these contracts is a bug unless explicitly documented. ┌────────────────────────▼─────────────────────────────────────┐ │ iroh-http-core (Rust) │ │ │ -│ client.rs — fetch() │ -│ server.rs — serve(), IrohHttpService + FfiDispatcher, │ -│ drain │ -│ pool.rs — moka-backed single-flight connection pool │ -│ stream.rs — slotmap handle registries, body channels │ -│ session.rs — session/WebTransport-style API │ -│ endpoint.rs — IrohEndpoint, NodeOptions, ServeOptions │ -│ io.rs — IrohStream: AsyncRead+AsyncWrite adapter │ -│ lib.rs — CoreError/ErrorCode, FFI types, re-exports │ +│ http/ — client/server pipeline and QUIC transport │ +│ endpoint/ — endpoint lifecycle, configuration, statistics │ +│ ffi/ — dispatch, handles, pumps, sessions, FFI types │ +│ addr.rs — node address parsing │ +│ crypto.rs — key generation, signing, verification │ +│ error.rs — CoreError/ErrorCode │ +│ lib.rs — public API and re-exports │ └──────┬──────────────────────────────┬────────────────────────┘ │ │ ┌──────▼──────────┐ ┌──────────▼───────────────────────┐ @@ -74,14 +72,14 @@ The Rust crate that owns all transport logic. Platform adapters depend only on i | File | Responsibility | |------|----------------| -| `client.rs` | `fetch()`. Obtains a QUIC connection via the pool, wraps it in `IrohStream`, drives hyper's HTTP/1.1 client, pumps the response body into handle-based channels. | -| `server.rs` | `serve()`. Accepts QUIC connections, spawns per-stream hyper HTTP/1.1 handlers, enforces concurrency via drain semaphore, and composes the standard `tower-http` reliability stack (`CompressionLayer`, `RequestDecompressionLayer`, `TimeoutLayer`, `ConcurrencyLimitLayer`, `LoadShedLayer`) per ADR-014. `IrohHttpService` is the thin `tower::Service, Response = Response, Error = Infallible>` shell at the hyper boundary; it delegates each request to `FfiDispatcher`, which owns the JS-bridge concerns (handle allocation, `on_request` firing, body-channel pumping, response-head rendezvous, duplex upgrade). The only bespoke layer in the stack is `HandleLayerError`, which converts `tower::timeout::Elapsed` / `tower::load_shed::Overloaded` errors into 408 / 503 responses (no `axum::error_handling::HandleErrorLayer` equivalent exists in plain tower / tower-http — see ADR-013). | -| `pool.rs` | `ConnectionPool`. moka async cache keyed by `NodeId`. `try_get_with` provides single-flight connection establishment — concurrent fetches to the same peer share one connection attempt. Failed attempts are not cached. | -| `stream.rs` | All resource handle registries (body readers, writers, fetch tokens, sessions, request heads). Uses `slotmap` for generational u64 keys. Also defines backpressure config (channel capacity, max chunk size). | -| `session.rs` | Session lifecycle: `session_connect` (non-pooled dedicated connections), bidirectional/unidirectional streams, datagrams. Session registry. | -| `endpoint.rs` | `IrohEndpoint` (cheap `Arc` clone). Bind, share, close. `NodeOptions` for QUIC transport config, discovery, relay. `ServeOptions` for server limits. `CompressionOptions` (feature-gated). | -| `io.rs` | `IrohStream`: merges Iroh's split `SendStream`/`RecvStream` into a single `AsyncRead + AsyncWrite` type that hyper can drive directly via `hyper_util::rt::TokioIo`. | -| `lib.rs` | `CoreError`/`ErrorCode` enum, `FfiResponse`, `RequestPayload`, ALPN constants, crypto helpers (sign/verify), base32 encoding, node ticket parsing, `core_error_to_json`/`format_error_json` serializers. | +| `http/client.rs` | Pure-Rust `fetch_request()`. Obtains a QUIC connection via the pool, wraps it in `IrohStream`, drives hyper's HTTP/1.1 client, and returns `Response`. The FFI wrapper and response-body pumps live in `ffi/fetch.rs`. | +| `http/server/` | `serve()`. Accepts QUIC connections, spawns per-stream hyper HTTP/1.1 handlers, enforces the global request cap through a shared tower `ConcurrencyLimitLayer`, and composes the standard `tower-http` reliability stack (`CompressionLayer`, `RequestDecompressionLayer`, `TimeoutLayer`, `LoadShedLayer`) per ADR-014. `IrohHttpService` is the concrete `tower::Service, Response = Response, Error = Infallible>` shell at the hyper boundary; it delegates each request to `FfiDispatcher`, which owns the JS-bridge concerns (handle allocation, `on_request` firing, body-channel pumping, response-head rendezvous, duplex upgrade). The only bespoke layer in the stack is `HandleLayerError`, which converts `tower::timeout::Elapsed` / `tower::load_shed::Overloaded` errors into 408 / 503 responses (no `axum::error_handling::HandleErrorLayer` equivalent exists in plain tower / tower-http — see ADR-013). | +| `http/transport/pool.rs` | `ConnectionPool`. moka async cache keyed by `NodeId`. `try_get_with` provides single-flight connection establishment — concurrent fetches to the same peer share one connection attempt. Failed attempts are not cached. | +| `http/transport/io.rs` | `IrohStream`: merges Iroh's split `SendStream`/`RecvStream` into a single `AsyncRead + AsyncWrite` type that hyper can drive directly via `hyper_util::rt::TokioIo`. | +| `endpoint/` | `IrohEndpoint` lifecycle, transport and resolver configuration, discovery, statistics, observation, and the HTTP/session runtimes. | +| `ffi/` | Resource registries, request dispatch, body pumps, session operations, and FFI-facing types. Registries use `slotmap` for generational u64 keys. | +| `addr.rs`, `crypto.rs`, `encoding.rs` | Node-address parsing, signing and verification, key handling, and base32 encoding. | +| `error.rs`, `lib.rs` | `CoreError`/`ErrorCode`, error serializers, ALPN constants, the public API, and re-exports. | ### Platform Adapters @@ -89,7 +87,7 @@ Each adapter is a thin FFI shim — no logic, no state, just type translation: | Crate | FFI | Language | |-------|-----|----------| -| `iroh-http-node` | napi-rs v2 | Node.js / Bun | +| `iroh-http-node` | napi-rs v3 | Node.js / Bun | | `iroh-http-deno` | Deno FFI (`dlopen`) | Deno | | `iroh-http-tauri` | Tauri invoke | Tauri (desktop/mobile) | @@ -156,12 +154,15 @@ Host: \r\n ## Concurrency Model -The drain semaphore in `server.rs` is the central concurrency gate: +The shared `ConcurrencyLimitLayer` built in `http/server/accept.rs` is the +central concurrency gate: -- `max_concurrency` (default: 1024) = initial semaphore permits -- One permit acquired **per QUIC bi-stream** (= per HTTP request), not per connection -- Permit drops when hyper finishes serving the request -- `drain()` acquires all permits → blocks until every in-flight request completes +- `max_concurrency` (default: 1024) sets the shared tower limiter capacity. +- One permit is held **per QUIC bi-stream** (= per HTTP request), not per connection. +- The permit is released when the request service future completes. +- Graceful drain is tracked separately by `DeliveryTracker` in + `http/server/lifecycle.rs`; an atomic in-flight counter and `Notify` wait + until responses are transport-acknowledged, stopped, or failed. This bounds total in-flight requests across all peers. Per-peer limits are enforced separately via `max_connections_per_peer`. diff --git a/docs/build-and-test.md b/docs/build-and-test.md index a6c8c459..e263c76a 100644 --- a/docs/build-and-test.md +++ b/docs/build-and-test.md @@ -119,9 +119,9 @@ Coverage by module: | `lib.rs` — base32 | `base32_encode` never panics, empty input → empty output | | `lib.rs` — crypto | sign→verify roundtrip, `secret_key_sign` / `public_key_verify` never panic on arbitrary keys | | `lib.rs` — errors | `core_error_to_json` / `format_error_json` always produce valid JSON | -| `endpoint.rs` | `parse_direct_addrs` never panics | -| `server.rs` | `respond` never panics on arbitrary status codes + headers | -| `stream.rs` | HandleStore capacity bounds, invalid-handle safety, reader/writer insert→cancel roundtrip, pending-reader store→claim roundtrip | +| `endpoint/bind.rs` | `parse_direct_addrs` never panics | +| `ffi/dispatcher.rs` | `respond` never panics on arbitrary status codes + headers | +| `ffi/handles.rs` | HandleStore capacity bounds, invalid-handle safety, reader/writer insert→cancel roundtrip, pending-reader store→claim roundtrip | When adding a new `pub fn` to the crate, add a corresponding `_never_panics` proptest so every entry point has at least a basic diff --git a/docs/roadmap.md b/docs/roadmap.md index 1647766b..a938ef9f 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -1,6 +1,6 @@ # Roadmap -## Current state — v0.2.x (testing phase) +## Current state — v0.6.x (testing phase) The library is functionally complete and published on npm and JSR, but we are in an active testing phase before calling anything "stable". Semver signals @@ -18,7 +18,7 @@ this: all packages are `0.x`. Breaking changes are possible. - [x] `CHANGELOG.md` — generated via `git-cliff` and updated each release in CI - [x] `SECURITY.md` — GitHub Security Advisories disclosure policy - [x] Repository public on GitHub -- [x] All GitHub issues resolved through v0.2.x +- [x] Planned release work through v0.6.1 shipped - [x] Node.js — napi-rs platform packages + `optionalDependencies` wiring (all 5 targets) - [x] `node.stats()` — node-wide `EndpointStats` (active connections, requests, handles, pool size) - [x] Transport events — `pool:hit`, `pool:miss`, `pool:evict`, `path:change`, `handle:sweep` @@ -70,17 +70,6 @@ the server layer. The blocker is that iroh does not yet expose stable per-connection path metadata in its public API. Track upstream; add the header once the API stabilises. -### Documentation accuracy pass - -Several feature docs were written ahead of implementation and now lag behind. -Specifically: -- [observability.md](features/observability.md) still says `stats()` is - "planned but not yet implemented" — it is implemented. -- [architecture.md](architecture.md) should reflect the finalized hyper v1 - decision and the current file layout. - ---- - ## Horizon 2 — HTTP/3 Nothing in the current architecture closes the door to HTTP/3. The diff --git a/package-lock.json b/package-lock.json index dd3507e9..49786ccc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -149,7 +149,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=20.19.0" }, @@ -194,7 +193,6 @@ } ], "license": "MIT", - "peer": true, "engines": { "node": ">=20.19.0" } @@ -545,7 +543,9 @@ "link": true }, "node_modules/@napi-rs/cli": { - "version": "3.7.2", + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@napi-rs/cli/-/cli-3.7.3.tgz", + "integrity": "sha512-iu5BOoYjYVixp5jwE7JniHvg72XuKWXUfXteu+6Gt/XY4/mslsS+Qbipleg1+3CAUGHkWc+ebaMJj7Pc93BXSQ==", "dev": true, "license": "MIT", "dependencies": { @@ -778,7 +778,6 @@ "version": "7.0.6", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@octokit/auth-token": "^6.0.0", "@octokit/graphql": "^9.0.3", @@ -972,10 +971,11 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "26.1.0", + "version": "26.1.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz", + "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~8.3.0" } @@ -1379,7 +1379,6 @@ "version": "29.1.1", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@asamuzakjp/css-color": "^5.1.11", "@asamuzakjp/dom-selector": "^7.1.1", @@ -1562,7 +1561,6 @@ "version": "4.0.4", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -1831,7 +1829,6 @@ "version": "8.1.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "lightningcss": "^1.32.0", "picomatch": "^4.0.4", @@ -2077,8 +2074,8 @@ "@momics/iroh-http-shared": "^0.6" }, "devDependencies": { - "@napi-rs/cli": "^3.7.2", - "@types/node": "^26.1.0", + "@napi-rs/cli": "^3.7.3", + "@types/node": "^26.1.1", "typescript": "^5" }, "optionalDependencies": { diff --git a/packages/iroh-http-node/package.json b/packages/iroh-http-node/package.json index 0ed40f55..1c86d497 100644 --- a/packages/iroh-http-node/package.json +++ b/packages/iroh-http-node/package.json @@ -25,8 +25,8 @@ "test:compliance": "node test/compliance.mjs" }, "devDependencies": { - "@napi-rs/cli": "^3.7.2", - "@types/node": "^26.1.0", + "@napi-rs/cli": "^3.7.3", + "@types/node": "^26.1.1", "typescript": "^5" }, "dependencies": {