Repository navigation
Let added recipients reply; report the server version in whoami - #24
Merged
Merged
Conversation
A recipient added to a message after it was sent is a participant of it only through the add-to batch that added them, and fmsg-webapi takes their reply only with that batch's sha256 as the parent. reply, create_draft (and so send_draft) sent the numeric id and were refused with "not a participant of this parent; added recipients must use their batch sha256". The parent reference now uses the caller's batch hash when they are on the parent only as an added recipient, and the numeric id otherwise or on a host that gives no batch hash. A reply to an earlier message in the thread, which an added recipient cannot read or reply to, is answered with an error naming the message they were added to, found in their recent inbox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
whoami gave the version only in its text, which hosts that show models just the structured result never pass on, and builds from source reported the stale package.json version 0.1.4. whoami now returns server_version, plus server_commit and server_build when recorded, and /healthz adds the commit. npm run build records the version (FMSG_MCP_VERSION, else the latest v-tag) and commit (FMSG_MCP_COMMIT, else git) in dist/build-info.json; the Docker image takes both as build arguments since its context has no git history. package.json now matches the last release, 1.2.3. whoami leaves the list of tools whose 0.2.5 closed output schema must still validate; new fields are optional, as for every other tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Added recipients can reply
A recipient added to a message after it was sent could not reply to it.
reply/create_draft(reply_to=…)failed with:fmsg-webapi accepts such a reply only when the parent is given as the sha256 of the add-to batch that added the caller. Each
add_tobatch already carries that hash. No tool used it.pidis that batch's hash.send_draftneeds no change because the draft already carries it. Senders and primary recipients still send the numeric id. So does a host that gives no batch hash, since such a host predates the rule.src/tools/parent.ts. The fake Web API now hashes messages and batches and enforces the same participant rule.whoami reports the version
The
whoamidescription promised the server version, but the version was only in the text. Hosts that show models only the structured result never pass the text on. Builds from source also reportedpackage.json's stale0.1.4.whoamiaddsserver_version, plusserver_commitandserver_build(git describe) when recorded./healthzaddscommit.npm run buildwritesdist/build-info.json. The version comes fromFMSG_MCP_VERSION, else the latestv*tag. The commit comes fromFMSG_MCP_COMMIT, else git. The Dockerfile takes both as build args, because its context has no.git.FMSG_MCP_COMMITalso works at run time.package.jsonandserver.jsonnow say 1.2.3.whoamileaves the test list of tools whose closed 0.2.5 output schema must still validate. A host still holding that 0.2.5 schema would reject the new fields.owneralready exceeds that schema for sub-addresses, and adding optional fields is the documented policy.Tests
test/added-recipients.test.ts: reply, create_draft → send_draft, replying higher up the thread (404 and 403), an unrelated message, numeric ids for sender and recipients, and a host without batch hashes.FMSG_MCP_COMMIT, the stdio binary reportingdist/build-info.json, and/healthz.npm run typecheck && npm run build && npm test: 262 passed. Docker build checked locally with podman: build info recorded,--versionprints 1.2.3.🤖 Generated with Claude Code