Skip to content

Commit d99f82a

Browse files
gregbergeclaude
andauthored
docs(media): a media's visibility now follows its project's (#368)
The server infers the default from the project — public project, public media; private project, team-only — so the CLI flag, the SDK option and the upload skill no longer describe it as the most private option the plan allows. `packages/api-client/src/schema.ts` is generated from the deployed OpenAPI document, so it picks up the new wording on the next `build-schema-types` run after the API ships. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 180580e commit d99f82a

4 files changed

Lines changed: 17 additions & 4 deletions

File tree

‎packages/cli/src/commands/media/upload.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function registerMediaUpload(media: Command) {
6161
.addOption(
6262
new Option(
6363
"--visibility <visibility>",
64-
"Who can open the share page. Defaults to the most private option your plan allows",
64+
"Who can open the share page. Defaults to your project's visibility in Argos: public for a public project, team for a private one",
6565
).choices(["team", "public"]),
6666
)
6767
.addOption(

‎packages/core/mocks/handlers/createMedia.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ function buildMedia(body: CreateMediaRequestBody, status: string) {
3636
sizeBytes: body.size,
3737
width: null,
3838
height: null,
39+
// The real server infers this from the project when the caller sends
40+
// nothing; there is no project here, so the mock stands in with the private
41+
// answer. Tests that care about the choice assert on `createMediaRequests`.
3942
visibility: body.visibility ?? "team",
4043
status,
4144
expiresAt: null,

‎packages/core/src/media.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ export interface UploadMediaParameters {
106106

107107
/**
108108
* Who can open the share page. `team` requires an Argos session; `public` only
109-
* requires the URL. Defaults to the most private option the plan allows.
109+
* requires the URL.
110+
*
111+
* Leave it out — the usual case — and the media takes the visibility of its
112+
* project in Argos: `public` for a public project, `team` for a private one.
113+
* `team` requires a paid plan.
110114
*/
111115
visibility?: MediaVisibility;
112116

‎skills/argos-upload/SKILL.md‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,14 @@ EXIF — including GPS, if the camera recorded it — does not reach Argos. With
198198
## Visibility, and what it does not cover
199199

200200
`--visibility` controls the **share page** — `team` requires an Argos session,
201-
`public` does not. It defaults to the most private option the plan allows: `team`
202-
on Pro, and `public` on the free plan, which cannot do `team` at all.
201+
`public` does not. It defaults to the **project's** visibility in Argos: `public`
202+
for a public project, `team` for a private one. So the usual upload needs no flag
203+
at all. `team` is Pro-only; on the free plan every share page is public, and asking
204+
for `team` is rejected rather than silently downgraded.
205+
206+
Re-uploading does not revisit this. A media keeps the visibility it was created
207+
with unless a later upload passes `--visibility` explicitly, so a screenshot
208+
deliberately kept team-only stays that way.
203209

204210
It does **not** protect the file: media files are always reachable at an
205211
unguessable CDN URL, because GitHub fetches embedded images server-side with no

0 commit comments

Comments
 (0)