Skip to main content

Module api_client

Module api_client 

Source

Structs§

AgentInstructionsResponse
Response shape for the policies/agent-instructions endpoint.
ApiClient
CheckPoliciesRequest
CheckPoliciesResponse
CheckResultItem
CiPolicyResult
CiVerifyRequest
CiVerifyResponse
CommitVerifyResult
DeviceAuthResponse
DeviceStatusResponse
MeResponse
ProjectDetail
Full detail for a project. Server sends more fields; only repos is consumed today.
ProjectListItem
One project in GET /api/v1/projects. Server sends more fields; only these two are consumed today.
ProjectRepoRef
A repo linked to a project (member of ProjectDetail::repos).
RegisterRepoRequest
RegisterRepoResponse
RemoteDetail
RemoteRepoRef
RepoListItem
ResolveRemoteResponse
SessionCheckData

Enums§

GetMeError
ResolveProjectOutcome
Outcome of ApiClient::resolve_project, distinguishing “no project” (404) from “ambiguous, multiple candidates” (409) — unlike resolve_remote, which only distinguishes found/not-found.

Functions§

resolve_client
Resolve project_root’s credentials (via resolve_credentials) into a ready ApiClient, or the standard “no server URL configured” error when none of the credential sources yield a server URL. Shared by every command that needs a client from a project root, so this resolve-then-construct shape has exactly one implementation.
resolve_credentials
Resolve server URL and auth token from multiple sources. Priority: env var > credentials file > project config.toml Returns (server_url, auth_token).