spec: media upload routes, attachments on post/comment writes — release v0.13.0 - #42
Merged
Conversation
…se v0.13.0
Re-sync from metalabel-dfos dd3f3f7 (#3286). Adds the media namespace
(POST /spaces/{space}/media, GET /spaces/{space}/media/{mediaId}),
attachments on createPost/editPost/createComment/editComment inputs,
attachments on PublicCommentOutput, and makes comment body optional.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rpq64ASTsKJ3xc2DVoQMjh
…/403/413/415/500 rows Re-sync from metalabel-dfos cc34e1e (#3289) on top of dd3f3f7. FeedSpaceRefOutput.id is now the space entity id with a new did field (wire-level change, same TS type). Every proof-bearing read declares 401/403/413, every validating read declares 400, 415 on every credential-gated path, 500 InternalError on all 43 operations. PublicMediaUploadOutput.media is now a $ref. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rpq64ASTsKJ3xc2DVoQMjh
…ription follows #3295 Regenerated from the platform checkout at f91497523 (main). The only compiled-document change since cc34e1e is the FeedSpaceRefOutput.id description: a private space now resolves on the credential-aware routes (posts, comments, media) for a live member with a covering credential or identity proof; the anonymous routes still need a public profile. No shape change. Platform #3291, #3294, #3296, #3297 moved nothing in the document. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RZp1dfTwdX8x3dVE4236Rk
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.
What
Re-sync of the platform contract from
metalabel-dfosatf91497523(main) — merged platform PRs since v0.12.0 that reach the document: #3286 (external API media upload routes, attachments on post/comment writes), #3289 (hoisted error rows,FeedSpaceRefOutputid/did split), and #3295 (a covering grant widens space addressability — description-only in the document, behavior change at runtime, see below). #3291, #3294, #3296, and #3297 also merged in the window and moved nothing in the compiled document. Bumps to v0.13.0.Generated from the local platform checkout at that SHA (merge truth). These platform changes are merged but not yet deployed; the snapshot describes them ahead of
api.dfos.com, per the README's pre-1.0 note.FeedSpaceRefOutput.idchanges meaning. It was the space's protocol DID (did:dfos:…). It is now the space's stable entity id (space_…), and a new requireddid: stringcarries the DID. The TypeScript type ofidis unchanged (string), so nothing fails to compile. What breaks at runtime:space.idas a DID (regex,did:dfos:prefix check, handing it to the protocol client) gets aspace_…id instead.space.idback as{space}on a space route keeps working. Both the entity id and the DID are accepted there.Migration: read
space.didwhere you need the DID. Pre-1.0 the repo rule keeps this a minor; the break is called out here and should be in the release notes.Runtime behavior change on private spaces (#3295, no shape change)
The document change is one description string on
FeedSpaceRefOutput.id. What a consumer notices is on the wire:GET /spaces/{space}, pages, topics, events, products, releases) still require a public profile. Unchanged.Everything else a consumer notices (additive)
medianamespace (41 → 43 operations).media.createUploadisPOST /spaces/{space}/media(201, input{ filename, contentType, size }, outputPublicMediaUploadOutput={ media: PublicOwnMediaOutput, upload: { url, method: 'PUT', headers: { 'Content-Type', 'Content-Disposition' }, expiresAt } }).media.getUploadisGET /spaces/{space}/media/{mediaId}returningPublicOwnMediaOutput.PublicOwnMediaOutputisPublicMediaOutputwithurloptional plusuploaded: boolean.PublicMediaUploadOutputwraps it (by$ref) with the presigned upload.attachments?: string[]added to the createPost / editPost / createComment / editComment request bodies.PublicCommentOutput.attachments: PublicMediaOutput[]added.bodyis now optional on create and edit (at least one of body/attachments server-side). Because every field on those two inputs is now optional, the wholerequestBodyis optional on those operations. Loosening only.InvalidRequest(400) andInternalError(500). Every proof-bearing read now declares 401/403/413, every validating read declares 400 (all butGET /protocol), 415 is declared on every credential-gated path, and 500 is declared on all 43 operations. These only add keys to each operation'sresponsesmap. No success shape, parameter, or security declaration changed.post_…(doc-only).Nothing else removed. Every pre-existing schema other than
FeedSpaceRefOutputis byte-identical apart from description prose.Version
Minor per the repo rule: additive type surface, pre-1.0. Tag
v0.13.0to release after merge.Checks
pnpm typecheck,pnpm test,pnpm buildgreen locally;pnpm generateleaves a clean diff.pnpm lintis clean on tracked files (its only local warning is the gitignored.claude/settings.local.json).🤖 Generated with Claude Code
https://claude.ai/code/session_01Rpq64ASTsKJ3xc2DVoQMjh
https://claude.ai/code/session_01RZp1dfTwdX8x3dVE4236Rk