Documentation
¶
Overview ¶
Package opencode provides a client for interacting with the OpenCode server API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
SystemRole string `json:"systemRole,omitempty"`
}
Agent represents an agent available in OpenCode.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides methods to interact with the OpenCode server.
func (*Client) GetModels ¶
GetModels returns a list of model IDs formatted for the /v1/models endpoint. It combines agents and providers into opencode:* model identifiers.
func (*Client) ListAgents ¶
ListAgents fetches all available agents from OpenCode.
type HealthStatus ¶
type HealthStatus struct {
Status string `json:"status"`
Version string `json:"version,omitempty"`
}
HealthStatus represents the health check response.
Click to show internal directories.
Click to hide internal directories.