Documentation
¶
Overview ¶
Package devrunner runs configured coding agents in git worktrees over a peer-authenticated Unix socket. The runner must use a dedicated OS account. Only the opsgate server and trusted runner account may access the socket: socket peers can assert any caller identity using X-Opsgate-User. Coding agents and other untrusted processes must not have access to that socket.
Index ¶
Constants ¶
const ( // MaxPromptBytes bounds a task's requirement. MaxPromptBytes = 32 << 10 // MaxReadBytes bounds a log or diff response before JSON encoding. MaxReadBytes = 256 << 10 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Info ¶
type Info struct {
Projects []Project `json:"projects"`
Agents []string `json:"agents"`
Timeout time.Duration `json:"timeout"`
MaxConcurrent int `json:"max_concurrent"`
MaxTasks int `json:"max_tasks"`
MaxPromptBytes int `json:"max_prompt_bytes"`
}
Info is the runner's public policy and capacity.
type Log ¶
type Log struct {
Text string `json:"text"`
NextOffset int64 `json:"next_offset"`
Truncated bool `json:"truncated"`
}
Log is a bounded page; NextOffset addresses the next byte in the raw log.
type StartRequest ¶
type StartRequest struct {
Project string `json:"project"`
Agent string `json:"agent"`
Prompt string `json:"prompt"`
RequestedBy string `json:"requested_by"`
}
StartRequest selects configured names, never commands or paths.
type Task ¶
type Task struct {
ID string `json:"id"`
Project string `json:"project"`
Agent string `json:"agent"`
Branch string `json:"branch"`
BaseRef string `json:"base_ref"`
BaseCommit string `json:"base_commit,omitempty"`
RequestedBy string `json:"requested_by"`
State string `json:"state"`
Created time.Time `json:"created"`
Started time.Time `json:"started,omitempty"`
Finished time.Time `json:"finished,omitempty"`
Message string `json:"message,omitempty"`
Error string `json:"error,omitempty"`
// contains filtered or unexported fields
}
Task describes a queued or completed agent run.