Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentLookup ¶
type AgentLookup interface {
Get(name string) interface{ CheckPolicy(toolName string) error }
List() []string
}
AgentLookup resolves an agent by name.
type AgentRunRequest ¶
AgentRunRequest is the body for POST /agent/run.
type AgentRunResponse ¶
type AgentRunResponse struct {
TaskID string `json:"task_id"`
State string `json:"state"`
Agent string `json:"agent,omitempty"`
}
AgentRunResponse is the response for POST /agent/run.
type Handler ¶
type Handler struct {
TaskAPI access.TaskSubmissionAPI
AgentManager AgentLookup
}
Handler provides ClawOS API: /agent/run, /tool/run.
func NewHandler ¶
func NewHandler(taskAPI access.TaskSubmissionAPI) *Handler
NewHandler returns a gateway handler.
func (*Handler) ServeAgentList ¶
func (h *Handler) ServeAgentList(w http.ResponseWriter, r *http.Request)
ServeAgentList handles GET /agent/list.
func (*Handler) ServeAgentRun ¶
func (h *Handler) ServeAgentRun(w http.ResponseWriter, r *http.Request)
ServeAgentRun handles POST /agent/run.
func (*Handler) ServeAgentStatus ¶
func (h *Handler) ServeAgentStatus(w http.ResponseWriter, r *http.Request)
ServeAgentStatus handles GET /agent/status?task_id=...
func (*Handler) ServeToolRun ¶
func (h *Handler) ServeToolRun(w http.ResponseWriter, r *http.Request)
ServeToolRun handles POST /tool/run.
type ToolRunRequest ¶
ToolRunRequest is the body for POST /tool/run.
Click to show internal directories.
Click to hide internal directories.