Documentation
¶
Index ¶
- Variables
- func ArchiveMGDoneItems() (string, error)
- func AttachAgent(socketPath string) error
- func GetAgent(name string) (*agent.AgentInfo, error)
- func GetAgentOutput(name string) (string, error)
- func GetPlugins() ([]string, error)
- func GetProjects() ([]project.Project, error)
- func GetRefineryQueue() ([]refinery.MergeRequest, error)
- func GetRefineryStatus() (*refinery.Status, error)
- func GetSearchPlugin() (string, error)
- func HealthCheck() error
- func ListAgents() ([]agent.AgentInfo, error)
- func ListPrompts() ([]agent.PromptInfo, error)
- func NudgeAgent(name, message string, opts *NudgeOpts) error
- func NudgeOrMail(name, message string, opts *NudgeOpts) (fallback bool, err error)
- func RemoveProject(path string) error
- func RunWithHealthCheck[T ClientResp](run func() (T, error)) (T, error)
- func SendMGMail(to, from, subject, body string) error
- func SendMail(address, subject, body string) error
- func SpawnAgent(req agent.SpawnAPIRequest) (*agent.AgentInfo, error)
- func SpawnPolecat(req agent.SpawnPolecatAPIRequest) (*agent.AgentInfo, error)
- func StartAgent(name string) (*agent.AgentInfo, error)
- func StartServer() error
- func StopAgent(name string) error
- func StopServer() error
- func SubmitMerge(req refinery.SubmitRequest) (string, error)
- func Visit(path string) (*project.VisitResponse, error)
- type ClientResp
- type IndexedProject
- type NudgeOpts
- type PogoChunkMatch
- type PogoFileMatch
- type ProjectStatusResponse
- type SearchRequest
- type SearchResponse
- type SearchResults
Constants ¶
This section is empty.
Variables ¶
var ErrAgentNotRunning = fmt.Errorf("agent not running")
ErrAgentNotRunning is returned when the target agent is not registered with pogod.
Functions ¶
func ArchiveMGDoneItems ¶ added in v0.1.2
ArchiveMGDoneItems triggers macguffin to archive all done work items immediately (--days=0). Called by the refinery after a successful merge so the merged item moves from done/ to archive/ at its natural lifecycle endpoint rather than waiting for time-based cleanup.
func AttachAgent ¶
AttachAgent connects the current terminal to a running agent's PTY via its unix domain socket. Returns when the connection closes or the user sends the escape sequence (Ctrl-\).
func GetAgentOutput ¶
GetAgentOutput returns recent output from an agent.
func GetPlugins ¶
func GetProjects ¶
func GetRefineryQueue ¶
func GetRefineryQueue() ([]refinery.MergeRequest, error)
GetRefineryQueue returns all queued merge requests.
func GetRefineryStatus ¶
GetRefineryStatus returns the refinery status summary.
func GetSearchPlugin ¶
func HealthCheck ¶
func HealthCheck() error
func ListAgents ¶
ListAgents returns all running agents from pogod.
func ListPrompts ¶
func ListPrompts() ([]agent.PromptInfo, error)
ListPrompts returns all discovered prompt files from pogod.
func NudgeAgent ¶
NudgeAgent sends a message to an agent's PTY with the given options.
func NudgeOrMail ¶
NudgeOrMail tries to nudge an agent via PTY. If the agent is not running, it falls back to sending a macguffin mail message via the gt CLI.
func RemoveProject ¶ added in v0.1.1
RemoveProject removes a project from pogod by path.
func RunWithHealthCheck ¶
func RunWithHealthCheck[T ClientResp](run func() (T, error)) (T, error)
Run closure with health check
func SendMGMail ¶
SendMGMail sends a mail message via macguffin (mg mail send). Used by non-agent components like the refinery that need to deliver mail to agents reading via mg mail list.
func SendMail ¶
SendMail sends a mail message to the given address via gt mail send. The address is interpreted as a rig/role path (e.g. "mayor/", "pogo/polecats/chrome").
func SpawnAgent ¶
func SpawnAgent(req agent.SpawnAPIRequest) (*agent.AgentInfo, error)
SpawnAgent asks pogod to spawn a new agent.
func SpawnPolecat ¶
func SpawnPolecat(req agent.SpawnPolecatAPIRequest) (*agent.AgentInfo, error)
SpawnPolecat asks pogod to spawn a polecat from a template.
func StartAgent ¶
StartAgent asks pogod to start a crew agent by name. The prompt file is looked up from ~/.pogo/agents/crew/<name>.md.
func StartServer ¶
func StartServer() error
func StopServer ¶
func StopServer() error
func SubmitMerge ¶
func SubmitMerge(req refinery.SubmitRequest) (string, error)
SubmitMerge submits a branch to the refinery merge queue.
Types ¶
type ClientResp ¶
type ClientResp interface {
[]project.Project | *project.VisitResponse | *SearchResponse | []string | []ProjectStatusResponse
}
type IndexedProject ¶
type NudgeOpts ¶
type NudgeOpts struct {
Mode string // "wait-idle" or "immediate"
Timeout int // seconds, for wait-idle mode
}
NudgeOpts configures nudge delivery.
type PogoChunkMatch ¶
type PogoFileMatch ¶
type PogoFileMatch struct {
Path string `json:"path"`
Matches []PogoChunkMatch `json:"matches"`
}
type ProjectStatusResponse ¶
type ProjectStatusResponse struct {
Id int `json:"id"`
Path string `json:"path"`
Status string `json:"indexing_status"`
FileCount int `json:"file_count"`
}
func GetStatus ¶
func GetStatus() ([]ProjectStatusResponse, error)
type SearchRequest ¶
type SearchResponse ¶
type SearchResponse struct {
Index IndexedProject `json:"index"`
Results SearchResults `json:"results"`
Error string `json:"error"`
}
func Search ¶
func Search(query string, dir string) (*SearchResponse, error)
dir may be inside of a project path. First we have to look up the
func SearchAll ¶
func SearchAll(query string) ([]*SearchResponse, error)
SearchAll searches across all known projects, returning results for each.
type SearchResults ¶
type SearchResults struct {
Files []PogoFileMatch `json:"files"`
}