Documentation
¶
Index ¶
- func DaemonString() string
- func NewRequest(ctx context.Context, method, url string, body io.Reader) (*http.Request, error)
- func OrchestratorType() string
- func ResetForTesting()
- func SetAgentType(at string)
- func SetAgentVersion(ver string)
- func SetHeaders(h http.Header)
- func SetOrchestratorType(ot string)
- func String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DaemonString ¶
func DaemonString() string
DaemonString returns the User-Agent for daemon requests. Format: "ox-daemon/0.17.0 (darwin; arm64)"
func NewRequest ¶
NewRequest creates an HTTP request with standard ox headers (User-Agent, X-Orchestrator). Prefer this over http.NewRequestWithContext + SetHeaders to ensure headers are never forgotten.
func OrchestratorType ¶
func OrchestratorType() string
OrchestratorType returns the detected orchestrator type (e.g. "conductor"). Returns empty string if no orchestrator is detected.
func SetAgentType ¶
func SetAgentType(at string)
SetAgentType records the detected coding agent environment (e.g. "claude-code", "cursor"). Thread-safe. First write wins; subsequent calls are no-ops.
func SetAgentVersion ¶
func SetAgentVersion(ver string)
SetAgentVersion records the coding agent version (e.g. "1.0.26"). Thread-safe. First write wins; subsequent calls are no-ops. Must be called after SetAgentType. Ignored if agent type is not set.
func SetHeaders ¶
SetHeaders sets User-Agent and X-Orchestrator headers on the request. Use this for SageOx API requests to include full telemetry context.
func SetOrchestratorType ¶
func SetOrchestratorType(ot string)
SetOrchestratorType records the detected orchestrator (e.g. "conductor", "openclaw"). Thread-safe. First write wins; subsequent calls are no-ops.
Types ¶
This section is empty.