Repository navigation
Conversation
ttypic
force-pushed
the
message-patch
branch
from
November 24, 2026 11:08
0513c37 to
469337e
Compare
ttypic
force-pushed
the
message-patch
branch
from
November 24, 2026 13:45
469337e to
6ca1696
Compare
ttypic
force-pushed
the
message-patch
branch
from
November 24, 2026 13:54
6ca1696 to
4e49815
Compare
ttypic
force-pushed
the
message-patch
branch
from
November 25, 2026 12:55
4e49815 to
685962d
Compare
ttypic
marked this pull request as ready for review
November 25, 2026 12:56
Add a `MESSAGE_PATCH` message action, through which a message can change individual values inside an existing message's JSON `data` and individual fields of its `extras`, rather than replacing them wholesale as `MESSAGE_UPDATE` does. - `patchMessage()` is added to RSL15 and RTL32 alongside update, delete and append, sending the operations in the new TM2v `patches` field. - New MessagePatches types (MPA, MPD, MPH, MPU, MPP) describe the data, header, userClaim and privileged operations. MPD3/MPD4 define how operation data is encoded on send and left as JSON text on receive. - `Message.applyPatch` (TM9) lets users apply a received patch to their copy of the message. When the copy holds JSON as text, it edits the text the way Ably does, so the copy stays byte-for-byte identical to the stored message. - The protocol doc describes the `patches` field, which is delivered from protocol version 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ttypic
force-pushed
the
message-patch
branch
from
November 25, 2026 19:30
685962d to
80a6762
Compare
ttypic
force-pushed
the
message-patch
branch
from
November 26, 2026 13:58
80a6762 to
4c032a8
Compare
Cover `patchMessage()` over REST and realtime, the MessagePatches types and their encoding, and `Message.applyPatch`, and record them in the completion status matrix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ttypic
force-pushed
the
message-patch
branch
from
November 27, 2026 14:05
4c032a8 to
6d600a3
Compare
This branch was successfully deployed
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.
Adds a
MESSAGE_PATCHmessage action, which changes individual values inside an existing message's JSONdataand individual fields of itsextras. Until now a message could only be replaced wholesale (MESSAGE_UPDATE), or have a string or binary appended to the whole of itsdata(MESSAGE_APPEND).Example
A publisher streams an AI response into one message, then marks it complete:
Subscribers receive a
MESSAGE_PATCHfors1that carries just these operations. They apply it to the message they already have:What changed
Publishing (RSL15, RTL32):
patchMessage()is added next toupdateMessage,deleteMessageandappendMessage. It sends the operations in the newMessage.patchesfield (TM2v).Types (MPA, MPD, MPH, MPU, MPP):
MessagePatchesholds a list of data operations (set/append/remove, addressed by an RFC 6901 JSON Pointer), a list of header operations, anduserClaim/privilegedoperations, which only Ably sends.Encoding of operation values (MPD3, MPD4): this works differently from a message's
data:null, is sent as JSON text withencoding: json. Operation values are never encrypted.jsontransform is not reversed, so the value stays as JSON text.applyPatchcan then insert it verbatim, and the user can parse it into the type of the value it replaces.Message.applyPatch(TM9): a static function that returns a newMessageand does not change its input. It handles two forms ofdata:If any operation can't be applied, the whole patch fails with 40000/400.
Protocol:
protocol.mddocuments thepatchesfield, which Ably delivers from protocol version 7. The spec version goes to 6.5.0 and the protocol version to 7.Docs and tests: docstrings are in
api-docstrings.md. UTS test specs coverpatchMessageover REST and realtime, the patch types and their encoding, andapplyPatch.