From 28d2751718e91601a6361788740b982a74e8f044 Mon Sep 17 00:00:00 2001 From: LukasParke Date: Fri, 14 Aug 2026 13:38:23 -0500 Subject: [PATCH] feat(agent): add ./reusable-stream subpath export ReusableReadableStream is importable from source and covered by unit tests, but the published package had no export-map entry for it, so downstream consumers (openrouter-web's stream-retention tests) had to patch the package to add one. Mirror the existing ./tool-event-broadcaster entry. Verified via scripts/verify-package-boundaries.mjs (packed tarball install) and a self-reference import resolving ReusableReadableStream. --- .changeset/reusable-stream-subpath-export.md | 5 +++++ packages/agent/package.json | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/reusable-stream-subpath-export.md diff --git a/.changeset/reusable-stream-subpath-export.md b/.changeset/reusable-stream-subpath-export.md new file mode 100644 index 0000000..63b8751 --- /dev/null +++ b/.changeset/reusable-stream-subpath-export.md @@ -0,0 +1,5 @@ +--- +"@openrouter/agent": patch +--- + +Add a `./reusable-stream` subpath export so consumers can import `ReusableReadableStream` directly (`@openrouter/agent/reusable-stream`) instead of going through the root barrel or patching the package. Mirrors the existing `./tool-event-broadcaster` entry; both replay classes are the units consumers need when asserting stream-retention behavior against the published package. diff --git a/packages/agent/package.json b/packages/agent/package.json index cd1908e..4e8c7ef 100644 --- a/packages/agent/package.json +++ b/packages/agent/package.json @@ -88,6 +88,10 @@ "types": "./esm/lib/tool-event-broadcaster.d.ts", "default": "./esm/lib/tool-event-broadcaster.js" }, + "./reusable-stream": { + "types": "./esm/lib/reusable-stream.d.ts", + "default": "./esm/lib/reusable-stream.js" + }, "./turn-context": { "types": "./esm/lib/turn-context.d.ts", "default": "./esm/lib/turn-context.js"