Adopt Roam API 2026-07-07 (envelope, auth errors, chat.message) - #46
Merged
Conversation
- Pin ROAM_API_VERSION to 2026-07-07 (common v1 webhook envelope).
- Unwrap {type,eventId,timestamp,apiVersion,data} while still accepting bare baseline payloads.
- Parse v0/v1 error bodies; treat token_revoked/invalid_token as permanent auth failures.
- Ignore chat.message edits/deletes for agent dispatch; surface structured RoamApiError.
robfig
marked this pull request as ready for review
July 17, 2026 00:24
robfig
added a commit
that referenced
this pull request
Jul 17, 2026
Bumps package.json (and lockfile) to 0.5.0. Since v0.4.3: - Pin ROAM_API_VERSION to 2026-07-07 and unwrap the common v1 webhook envelope - Parse v0/v1 error bodies; permanent fail on token_revoked/invalid_token - Ignore chat.message edits/deletes for agent dispatch (#46)
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.
What
Bring openclaw-roam onto the Roam API 2026-07-07 contract so it is ready for the next minor release.
Changes
ROAM_API_VERSIONfrom2026-06-01→2026-07-07(sendsRoam-Version/ webhook subscribeversion).{ type, eventId, timestamp, apiVersion, data }while still accepting bare baseline payloads.error+code) and v1 (ok:false, code inerror); treattoken_revoked/invalid_tokenas permanent auth failures (RoamApiError).Why
Server shipped dated versioning + the 2026-07-07 webhook envelope and structured error codes. Without this pin/parser, a credential created after those versions go live can deliver shapes the plugin cannot parse, or retry forever on revoked tokens.
Test
npm test(261 passed in local work)Release notes (next minor)
After merge: bump package version (minor), tag/publish. Suggested next version: 0.5.0.