Repository navigation
feat: brainpod api - #27
Merged
Merged
Conversation
dmeijboom
approved these changes
Nov 25, 2026
Add a gh api-style passthrough for API endpoints without a first-class command. PATH must be relative to the configured endpoint (URLs, //, dot segments, backslashes, ?/# and control characters are rejected locally), so the API token never leaves the CLI. {pod} expands to the selected pod; -X defaults to GET, or POST with --input; -q adds query parameters. Responses print as JSON; event streams point to brainpod events --watch.
jeroenrinzema
force-pushed
the
feat/api-passthrough
branch
from
November 25, 2026 08:50
c854c6c to
1c7f1d0
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.
Summary
Adds
brainpod api, agh api-style passthrough. Agents and scripts can use it to reach endpoints that have no first-class command (onboarding, builds and build logs, secrets) without the API token ever leaving the CLI.https://,localhost:8080), a leading//,?/#(use-q), backslashes, control characters, and./..segments, including%2e. A path copied out of a repository therefore cannot send the token to another host.--inputis given (asghdoes). An explicit-Xwins.{pod}is replaced from--pod/BRAINPOD_POD/ config. The command errors clearly when no pod is selected; otherwise a pod is optional.brainpod events --watch.describe api: requirementsapiToken: true,pod: null; effectconditional-remote-write. The next steps say to prefer first-class commands and name/v1/openapi.jsonas the contract.Client::requestis now built on the newClient::send, so auth and error handling exist once.This is the escape hatch the agent skill (brainpodnl/skills) will use for the GitHub-first flow, until those endpoints get commands of their own.
Evidence
cargo test: 253 passed. That includes 11 path-validator tests, one per rejection plus the accepted forms and{pod}, and parse tests for method defaulting.cargo clippy --all-targets: no new warnings.Merge Danger
Door: two-way. It adds a command; existing commands only change in that
Client::requestnow delegates tosend.Blast Radius: small. Every JSON command goes through the refactored
request; the test suite covers its error and non-JSON paths.