feat: MCP publish_artifact accepts gate, tracking, and title#13
Merged
Conversation
publish_artifact only sent {html}, so every link published from a Claude
session was public, untracked, and untitled, even though /api/publish
already accepts a gate, tracking, and a title. The MCP path could not
reach the features that are the point of a Sentou link.
Thread title, requireEmail, verifyEmail, allowedDomains, expiresAt, and
track through the tool and the http client to the existing API body. No
options means the same open, untracked link as before. republish is
unchanged: it swaps in new HTML and leaves the gate as set. Adds tests
for options-forwarded and options-absent, and updates the README.
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.
Why
publish_artifactsent only{ html }, so every link published from a Claude session was public, untracked, and untitled, even though/api/publishalready accepts a gate, tracking, and a title. The flagship "publish from Claude" path could not reach the gating and tracking that are the whole point of a Sentou link. Someone who tried the MCP path first would conclude Sentou can't gate or track.What
publish_artifactnow takes the HTML plus optionaltitle,requireEmail,verifyEmail,allowedDomains,expiresAt, andtrack, threaded through the tool and the HTTP client into the existing/api/publishbody. Each is.describe()d in the tool schema so Claude knows what it does, and the returned text notes the gate and tracking that were applied.republishis unchanged. It swaps in new HTML on an existing link and leaves the gate as configured, which matches the API (republishing content should not silently change access rules).Updated the README's "Publishing from Claude" section to document the options.
Verification
npm run typecheckcleannpm run lintcleannpm test244/244 (added 2: options forwarded into the body, and onlyhtmlsent when no options given)npm run buildexit 0