ruvnet / ruvnet/midstream

midstreamer@0.3.1 is unusable as published — no "." export; main/module point at an unshipped dist/

Open
#95 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
147
Forks
39
Avg merge
16h 39m
Merged PRs (30d)
2

Description

Summary

The published midstreamer@0.3.1 tarball cannot be imported by its advertised
default entry. main/module reference a dist/ directory that is not
included in the tarball
, and the exports map only exposes the ./quic
subpath — so import 'midstreamer' throws ERR_PACKAGE_PATH_NOT_EXPORTED by
construction. The WASM temporal-compare / scheduling surface described in the
README is therefore unreachable from the published package.

Reproduction
mkdir /tmp/midstreamer-probe && cd /tmp/midstreamer-probe
npm init -y >/dev/null
npm i midstreamer@0.3.1
node --input-type=module -e "import('midstreamer').then(m => console.log(Object.keys(m)))"
# → throws ERR_PACKAGE_PATH_NOT_EXPORTED (or MODULE_NOT_FOUND for dist/)

Inspect the shipped files:

npm pack midstreamer@0.3.1
tar -tzf midstreamer-0.3.1.tgz
# → package.json, quic.js, and docs only — no dist/
Evidence
  1. Default entry broken as published. main/module point at dist/…,
    but the tarball's files/pack output contains only package.json, quic.js,
    and docs — no dist/. So the default import target does not exist in the
    installed package.
  2. exports map only exposes ./quic. There is no "." export that
    resolves, so import 'midstreamer' is rejected with
    ERR_PACKAGE_PATH_NOT_EXPORTED even before the missing-file error.
  3. midstreamer/quic does load (loadQuicTransport, isQuicAvailable,
    isNative, delegating to agentic-flow's QUIC stack) — but on a plain host
    isQuicAvailable() === false (native transport absent), and the dependency
    tree pulled in is large (~580 packages / ~2 GB via agentic-flow@2.0.12),
    which is a lot for a temporal-compare consumer that never needs QUIC.
Impact

Downstream consumers cannot use the advertised default surface (temporal
sequence comparison / scheduling). Our workaround was to depend on the focused
Rust crate midstreamer-temporal-compare (crates.io) instead, which is clean
and small — but the npm package should still ship its own dist/.

Suggested fix
  • Ensure dist/ is built and included in files (or the pack allowlist) before
    publishing, and add a "." entry to exports that resolves to the built
    entry (with types).
  • Consider splitting the temporal-compare surface from the QUIC/agentic-flow
    transport so a consumer that only needs sequence comparison doesn't pull the
    full 2 GB transport tree (e.g. midstreamer/temporal subpath export, or a
    lighter default with QUIC behind an optional peer dep).
  • A CI npm pack + fresh-install smoke test (import 'midstreamer' in a temp
    dir) would catch this class of packaging regression.
Environment
  • midstreamer@0.3.1, Node 22.x, Linux.

---
_Verified against `midstreamer@0.3.1` on 2026-08-16: `npm view midstreamer exports` → `{ "./quic": "./quic.js", "./package.json": "./package.json" }` — no `"."` export, while `main`/`module` point at `dist/`._

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting package.json, its files or pack allowlist, main/module fields, and exports map, then run npm pack followed by the import probe in a fresh directory. Done means the published tarball contains the built dist/ entry, exposes a working "." export, and the smoke test imports midstreamer successfully; consider the suggested CI pack-and-install check separately.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
build-system, ci-cd, release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.