Repository navigation
Conversation
artifact share get <artifact> shows who can open an artifact version's share link, the link, the version it shows, whether it was blocked, and whether the plan includes internal. artifact share set <artifact> --audience private|internal|public creates or changes the link and shares the version <artifact> names. <artifact> is a version id, a version token, or the address https://…/artifacts/<token>. spec/openapi.yaml takes the API's publication operations ahead of the daily sync. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spec/openapi.yaml now carries the publication operations exactly as the API defines them: the first get creates the share link, so url and publishedVersion are never null; a version that is not HTML or failed the content check answers 422; the body takes no other keys. Help and README say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The artifact publication endpoints take the new share_artifacts OAuth scope rather than form_setting, so auth login asks for it by default; a session from an older CLI has to log in again to use artifact share. spec/openapi.yaml follows the API: share_artifacts on both operations, 400 for an account access token, and an address only from Jinshuju. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only an HTML version whose file is still there can be shared, and not one the content check judged high risk. A version need not have passed the check first: sharing takes effect at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es it private --audience private sends no versionId, so the API keeps the version the link shows. Taking a share back to private from an older version's receipt no longer changes what a later public share shows. internal and public still share the version <artifact> names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…I now names them
GET and PUT /api/v1/artifacts/{id}/published_artifact replace .../publication,
which the API no longer serves. The operations are getPublishedArtifact and
updatePublishedArtifact and the schemas PublishedArtifact and
PublishedArtifactInput. spec/openapi.yaml also takes the API's latest
answer, with accountName and canUseArtifactUrl, and its paid-feature 402;
help and README say which plan features sharing needs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
warmwind
force-pushed
the
t17344-artifact-share
branch
from
October 23, 2026 12:44
929a3fd to
ea4e7b0
Compare
…1 now names them The published_artifact endpoints follow API v1's snake_case rule: artifact share set sends allowed_audience and version_id, and the answer carries allowed_audience, published_version, can_use_internal, account_name, can_use_artifact_url and the new preview_url. spec/openapi.yaml takes PublishedArtifact, PublishedArtifactInput and the path from goldendata line for line; help names the new keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
goldendata shipped the share API without preview_url: a preview link is now signed per version and lasts 24 hours, so the share no longer carries one. Only a banned version is refused, not one judged high risk, and an account the share toggle leaves out gets 403. Take the spec line for line from goldendata again and say the same in the command help. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The address check looked at the last two path segments only, so /not-an-artifact/artifacts/<token> and /artifacts//<token> went out as that token. The whole path has to be /artifacts/<token>, with or without a trailing slash; the host is still not checked. artifactVersion is no longer exported, as nothing outside the module uses it. The spec takes goldendata's share section again: refusals carry an error code (PublishedArtifactError), and account_name and can_use_artifact_url are required. 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.
Part of T17726 在 Jiri 对话里管理分享范围.
Jiri makes HTML artifacts in a conversation, and T17344 lets them be shared by a link. T17726 lets Jiri change who can open the link from inside the conversation, through this CLI in its sandbox.
What changes
jinshuju artifact share get <artifact>readsGET /artifacts/{id}/published_artifact: who can open the share link (allowed_audience), the link, the version it shows, whether it was blocked (banned), whether the plan includes share links (can_use_artifact_url) andinternal(can_use_internal), the accountinternallets in (account_name), and a link that always shows that version (preview_url).jinshuju artifact share set <artifact> --audience private|internal|publicsendsPUT /artifacts/{id}/published_artifactwith{ allowed_audience, version_id }. The link shows the version<artifact>names; to share another version, name that one.--audience privatesends noversion_id, so the link keeps the version it shows. There is no--versionflag, so the global--versionkeeps its meaning.<artifact>is a version id, a version token, or the addresshttps://…/artifacts/<token>. An address must end in/artifacts/<token>. Anything else, the jinapp.net share link included, exits 2 before a request is sent.spec/openapi.yamlgains the two operations and thePublishedArtifact/PublishedArtifactInputschemas (operationsgetPublishedArtifact/updatePublishedArtifact), line for line as goldendata's branch defines them, ahead of the daily sync. The firstgetcreates the link, sourlandpublished_versionare never null; a version that is not HTML or failed the content check answers 422 (exit 5).auth loginasks for the newshare_artifactsOAuth scope by default, which these endpoints need. A session from an older CLI has to log in again to useartifact share.Release order
API → CLI. Do not release this before the API serves
/api/v1/artifacts/{id}/published_artifactin production. Until then both commands answer 404, and the daily spec-sync PR drops the two operations and fails.The scope makes the order stricter: until goldendata serves
share_artifactsas an OAuth scope,auth loginfrom this CLI fails withinvalid_scopefor everyone, not only forartifact share. If thejinshuju_cli_publicOAuth application has its own scope list,share_artifactsmust be added to it too.Test plan
npm run checknode --testover commands, help, spec and spec-diff tests (266 pass)🤖 Generated with Claude Code