Documentation
¶
Index ¶
- type EpicCompleteRequest
- type EpicIDRequest
- type HTTPHandler
- func (h *HTTPHandler) EpicAppendLogs(c echo.Context) error
- func (h *HTTPHandler) EpicComplete(c echo.Context) error
- func (h *HTTPHandler) EpicHeartbeat(c echo.Context) error
- func (h *HTTPHandler) ListWorkers(c echo.Context) error
- func (h *HTTPHandler) Poll(c echo.Context) error
- func (h *HTTPHandler) Register(g *echo.Group)
- func (h *HTTPHandler) TaskAppendLogs(c echo.Context) error
- func (h *HTTPHandler) TaskComplete(c echo.Context) error
- func (h *HTTPHandler) TaskHeartbeat(c echo.Context) error
- type PollResponse
- type SessionLogRequest
- type TaskCompleteRequest
- type TaskIDRequest
- type TaskLogsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpicCompleteRequest ¶ added in v0.1.2
type EpicCompleteRequest struct {
ID string `param:"id" json:"-"`
Success bool `json:"success"`
Tasks []epic.ProposedTask `json:"tasks,omitempty"`
Error string `json:"error,omitempty"`
}
EpicCompleteRequest is the request for completing epic planning.
func (EpicCompleteRequest) Validate ¶ added in v0.1.2
func (r EpicCompleteRequest) Validate() error
type EpicIDRequest ¶ added in v0.1.2
type EpicIDRequest struct {
ID string `param:"id" json:"-"`
}
EpicIDRequest captures the :id path parameter for epic agent endpoints.
func (EpicIDRequest) Validate ¶ added in v0.1.2
func (r EpicIDRequest) Validate() error
type HTTPHandler ¶
type HTTPHandler struct {
// contains filtered or unexported fields
}
HTTPHandler handles agent-facing API requests.
func NewHTTPHandler ¶
func NewHTTPHandler(taskStore *task.Store, epicStore *epic.Store, repoStore *repo.Store, githubToken *githubtoken.Service, workerRegistry *workertracker.Registry) *HTTPHandler
NewHTTPHandler creates a new HTTPHandler.
func (*HTTPHandler) EpicAppendLogs ¶
func (h *HTTPHandler) EpicAppendLogs(c echo.Context) error
EpicAppendLogs handles POST /epics/:id/logs
func (*HTTPHandler) EpicComplete ¶ added in v0.1.2
func (h *HTTPHandler) EpicComplete(c echo.Context) error
EpicComplete handles POST /epics/:id/complete — agent reports planning result.
func (*HTTPHandler) EpicHeartbeat ¶
func (h *HTTPHandler) EpicHeartbeat(c echo.Context) error
EpicHeartbeat handles POST /epics/:id/heartbeat
func (*HTTPHandler) ListWorkers ¶
func (h *HTTPHandler) ListWorkers(c echo.Context) error
ListWorkers handles GET /workers
func (*HTTPHandler) Poll ¶
func (h *HTTPHandler) Poll(c echo.Context) error
Poll handles GET /poll — unified long-poll for available work.
func (*HTTPHandler) Register ¶
func (h *HTTPHandler) Register(g *echo.Group)
Register adds the agent endpoints to the provided Echo router group.
func (*HTTPHandler) TaskAppendLogs ¶
func (h *HTTPHandler) TaskAppendLogs(c echo.Context) error
TaskAppendLogs handles POST /tasks/:id/logs
func (*HTTPHandler) TaskComplete ¶
func (h *HTTPHandler) TaskComplete(c echo.Context) error
TaskComplete handles POST /tasks/:id/complete
func (*HTTPHandler) TaskHeartbeat ¶
func (h *HTTPHandler) TaskHeartbeat(c echo.Context) error
TaskHeartbeat handles POST /tasks/:id/heartbeat.
type PollResponse ¶
type PollResponse struct {
Type string `json:"type"` // "task" or "epic"
// Task fields (present when Type == "task")
Task *task.Task `json:"task,omitempty"`
// Epic fields (present when Type == "epic")
Epic *epic.Epic `json:"epic,omitempty"`
// Common fields
GitHubToken string `json:"github_token,omitempty"`
RepoFullName string `json:"repo_full_name"`
}
PollResponse is the discriminated union returned by the unified poll endpoint.
type SessionLogRequest ¶
SessionLogRequest is the request body for appending session log entries.
func (SessionLogRequest) Validate ¶ added in v0.1.2
func (r SessionLogRequest) Validate() error
type TaskCompleteRequest ¶ added in v0.1.2
type TaskCompleteRequest struct {
ID string `param:"id" json:"-"`
Success bool `json:"success"`
PullRequestURL string `json:"pull_request_url"`
PRNumber int `json:"pr_number"`
BranchName string `json:"branch_name"`
Error string `json:"error"`
AgentStatus string `json:"agent_status"`
CostUSD float64 `json:"cost_usd"`
PrereqFailed string `json:"prereq_failed"`
NoChanges bool `json:"no_changes"`
Retryable bool `json:"retryable"`
}
TaskCompleteRequest is the request for completing a task.
func (TaskCompleteRequest) Validate ¶ added in v0.1.2
func (r TaskCompleteRequest) Validate() error
type TaskIDRequest ¶ added in v0.1.2
type TaskIDRequest struct {
ID string `param:"id" json:"-"`
}
TaskIDRequest captures the :id path parameter for task agent endpoints.
func (TaskIDRequest) Validate ¶ added in v0.1.2
func (r TaskIDRequest) Validate() error
type TaskLogsRequest ¶ added in v0.1.2
type TaskLogsRequest struct {
ID string `param:"id" json:"-"`
Logs []string `json:"logs"`
Attempt int `json:"attempt"`
}
TaskLogsRequest is the request for appending task logs.
func (TaskLogsRequest) Validate ¶ added in v0.1.2
func (r TaskLogsRequest) Validate() error