feat(agentstudio): PR-01 β HTTP client foundation + Factory wiring#219
Draft
cmarguta-alg wants to merge 1 commit into
Draft
feat(agentstudio): PR-01 β HTTP client foundation + Factory wiring#219cmarguta-alg wants to merge 1 commit into
cmarguta-alg wants to merge 1 commit into
Conversation
Add api/agentstudio transport (ResolveHost, NewClient, error mapping) and client methods for the Agents API tag. Wire AgentStudioClient on cmdutil.Factory with profile/agent_studio_url and ALGOLIA_AGENT_STUDIO_URL precedence; inject build-time DefaultBaseURL via task build. User-facing algolia agents commands land in follow-up PRs β this slice is library + factory only. Co-authored-by: Cursor <cursoragent@cursor.com>
Up to standards βπ’ Issues
|
| Metric | Results |
|---|---|
| Complexity | 133 |
| Duplication | 8 |
TIP This summary will be updated as you push new changes.
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
api/agentstudio:NewClient,ResolveHost, structured error mapping (checkResponse/extractDetail/ sentinels), and typed client methods for the Agents REST tag (same surface asrag-openapi.jsonβGET/POST/PATCH/DELETE /1/agents/...).AgentStudioClient func() (*agentstudio.Client, error)oncmdutil.Factory(pkg/cmd/factory), withresolveAgentStudioBaseURLunit tests mirroring runtime precedence: profile/env override β ldflagagentstudio.DefaultBaseURLβ cluster-proxy fallback..env.exampledocuments the var.Out of scope (follow-up PRs)
Base branch
QA / Anya β Phase 1 vetting
Automated (required): `go test ./api/agentstudio/... ./pkg/cmd/factory/... -count=1`, `go test ./... -count=1`, `task lint`, `task build`.
Manual / exploratory
Sign-off: Reply in-thread when automated + chosen manual rows are done.
Test plan
Made with Cursor