Repository navigation
feat(server): add the HTTP API and the client SDK - #121
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
force-pushed
the
feat/server-http
branch
2 times, most recently
from
November 22, 2026 16:40
e1efacb to
83a95db
Compare
PiquelChips
force-pushed
the
feat/server-http
branch
from
November 22, 2026 18:54
83a95db to
d0b5f66
Compare
`OriginService` only answered in-process. Agents, CI runners and other machines need to reach a repository over the network, and from any language. The HTTP API, under `/api/v1`, is a thin layer: each route translates a request into a service call on the repository it names, run on the blocking thread pool since calls do synchronous file system work, and renders a `ServiceError` as an `ApiError` with the matching status. This first part lists the server's repositories, fetches and puts records as packs, and lists targets and a target's log. `Repositories` holds the repositories a server hosts, by name. Every route is documented with utoipa. The server serves the OpenAPI document, `docs/openapi.json` keeps a copy for other languages, and a test fails while it's stale: `just openapi` rewrites it. `origin-client` is the Rust SDK, written by hand: each endpoint is one line of its `endpoints!` macro, over the `origin-shared` types the server uses, so the two cannot disagree on a contract, and no reqwest type is exposed. The HTTP tests drive every SDK method against a real server.
PiquelChips
force-pushed
the
feat/server-http
branch
from
November 22, 2026 19:20
d0b5f66 to
0686170
Compare
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.
OriginServiceanswers in-process only. Agents, CI runners and other machines need to reach a repository over the network, and from any language.HTTP API: each route only translates a request into a service call on the repository it names, on the blocking thread pool, and renders a
ServiceErroras anApiErrorwith the matching status. This first part lists the server's repositories, fetches and puts records as packs, and lists targets and a target's log.Repositoriesholds the repositories a server hosts, by name.OpenAPI: every route is documented with utoipa. The server serves the document,
docs/openapi.jsonkeeps a copy, and a test fails while it's stale (just openapirewrites it).SDK:
origin-clientis a hand-written SDK: each endpoint is one line of itsendpoints!macro, over theorigin-sharedtypes, and no reqwest type is exposed. The HTTP tests drive every SDK method against a real server.Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)