Repository navigation
Remove RelayClient.delete() and release 1.1.0 - #65
Merged
Merged
Conversation
ThruBox Server now gives every message a seq, its position in the
recipient's mailbox, and lets GET /api/messages/{address} take ?after and
?limit. Expose that in the SDK.
- Message gains an optional seq (undefined against older servers) and
the id docs no longer promise a UUID.
- receive(address, { after, limit }) passes the cursor and page size.
- poll(..., { after }) opts into cursor tracking: each poll fetches only
messages newer than the cursor, and the cursor advances only after the
callback returns or its promise resolves. A throwing or rejecting
callback gets the same messages again on the next poll, so a failed
save is retried rather than skipped. Without after, poll behaves as
before and passes the whole mailbox each time.
poll now awaits the callback before scheduling the next poll, so polls no
longer overlap, and a callback error is reported to onError instead of
silently ending the polling loop.
npm ci has failed on main since two dev dependency bumps landed, which also breaks the release workflow (it runs npm ci before npm publish): - @vitest/coverage-v8 5.x requires vitest 5, but vitest was still ^3.2. - typescript ^7.0.2 is outside typescript-eslint's peer range (>=4.8.4 <6.1.0). TypeScript 6.0 is in range, but tsup's declaration build sets baseUrl, which TypeScript 6 rejects as deprecated. Pin typescript to ~5.9.3, the version 1.0.2 was released with, and take the pending Dependabot bumps together so the tree resolves: vitest and @vitest/coverage-v8 5.0.5, eslint 10.12.0, typescript-eslint 8.71.2 and prettier 3.9.10. npm ci, tests, tsc and the tsup build all pass.
Adds mailbox cursor support (receive after/limit, poll({ after }) and
Message.seq). The changes are additive, so this is a minor release.
Release notes are written by hand in a GitHub draft release named vX.Y.Z. When VERSION changes, version-release.yml now publishes that draft, keeping its notes and appending GitHub's generated "What's Changed" list unless the draft already has one. It falls back to any draft, and with no draft at all it creates the release from the generated list instead of the old placeholder text. Release Drafter rewrote the draft on every push to main, which would overwrite hand-written notes, possibly in the same push that publishes them. It is kept but now runs only when started from the Actions tab. The v1.1.0 notes are in the existing draft release, renamed from the Release Drafter's v1.0.3 draft.
- poll(): an onError handler that throws no longer ends the polling loop; the exception is logged instead. - poll(): work out the next cursor before calling the callback, so a callback that modifies the array it is given cannot stall the cursor. - Tests for both, plus one checking that polling waits for a pending async callback and then continues from the advanced cursor. - version-release.yml: always append a freshly generated "What's Changed" list; a section already in the draft may be stale, so it is replaced rather than trusted. - release-drafter.yml: serialize manual runs with a concurrency group. - README: seq, cursors and duplicate-safe sends need ThruBox Server 1.0 or later; older servers ignore after/limit.
ThruBox Server is removing DELETE /api/messages/{id}: it did not check
who was asking, and reading a mailbox returns every message ID, so
anyone could delete any user's messages. Messages now leave the relay
only by expiring. No known app calls delete(); Chainvoice never has.
Removes delete(), its README section and Quick Start line, and its
test. The 404 error test now goes through receive() instead.
This removes a public method, so it is a breaking change for anyone
still calling delete().
4 of 6 tasks
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Reverts the VERSION, package.json and package-lock.json bump to 1.1.0 from this branch. The release is cut from AOSSIE-Org#65, so cursor support and the removal of delete() ship together as 1.1.0 and VERSION changes on main only once.
Adds mailbox cursor support (receive after/limit, poll({ after }) and
Message.seq) and removes delete(), which ThruBox Server 1.0 no longer
supports. Merging this pull request publishes 1.1.0.
4 of 6 tasks
Atharva0506
marked this pull request as ready for review
October 26, 2026 07:21
This was referenced Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addressed Issues:
No separate issue. This is the SDK side of AOSSIE-Org/ThruBox-Server#70, which removes
DELETE /api/messages/{id}from the server (security review Finding 1: anyone could delete any user's messages).Screenshots/Recordings:
N/A. Covered by tests; see below.
Additional Notes:
What changes:
RelayClient.delete(), its README section and its Quick Start line. The README now says messages stay on the relay until they expire.delete()test. The 404 error-path test now goes throughreceive(), so that coverage stays.dist/index.d.ts) no longer includedelete.Who is affected: no known app. Chainvoice has never called
delete()(I checked all 94 branches), and no other AOSSIE project uses the SDK yet.Release 1.1.0 (merging this PR publishes it):
VERSION,package.jsonandpackage-lock.jsonare bumped to 1.1.0 here, and only here. Support mailbox cursors and fix the release pipeline #63 leaves them at 1.0.2, soVERSIONchanges onmainonce andv1.1.0is tagged once.version-release.ymltagsv1.1.0, publishes the v1.1.0 draft release (cursor support, plus a "Removed:relay.delete()" section) and publishes@aossie-org/thrubox-client@1.1.0to npm.delete()is technically a breaking change. It is released as 1.1.0 by maintainer decision, because no known app calls it.All 30 tests pass,
tsc --noEmitis clean, a cleannpm ciworks and the build succeeds.npm run lintreports only the existingpreserve-caught-errorerror atsrc/client.ts:60, which is also onmain.AI usage: Claude Code (Claude Opus 5.5) helped with this change. I reviewed the diff and ran the tests locally.
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.