62 lines
2.1 KiB
Go
62 lines
2.1 KiB
Go
package protocol
|
|
|
|
const (
|
|
RunPipeline = "run_pipeline"
|
|
RunStarted = "run_started"
|
|
ListRuns = "list_runs"
|
|
Runs = "runs"
|
|
GetRun = "get_run"
|
|
Run = "run"
|
|
CancelRun = "cancel_run"
|
|
)
|
|
|
|
type RunSummary struct {
|
|
ID int64 `json:"id"`
|
|
PipelineID int64 `json:"pipeline_id"`
|
|
Name string `json:"name"`
|
|
Version int `json:"version"`
|
|
ContentHash string `json:"content_hash"`
|
|
Status string `json:"status"`
|
|
Outcome string `json:"outcome"`
|
|
CurrentStage string `json:"current_stage"`
|
|
CreatedAt string `json:"created_at"`
|
|
FinishedAt string `json:"finished_at"`
|
|
Diagnostic string `json:"diagnostic"`
|
|
}
|
|
|
|
type RunStep struct {
|
|
Notifications []NotificationReceipt `json:"notifications,omitempty"`
|
|
Sequence int `json:"sequence"`
|
|
Stage string `json:"stage"`
|
|
Status string `json:"status"`
|
|
Outcome string `json:"outcome"`
|
|
Target string `json:"target"`
|
|
Input map[string]any `json:"input"`
|
|
Output map[string]any `json:"output"`
|
|
Diagnostic string `json:"diagnostic"`
|
|
SessionID string `json:"session_id"`
|
|
AgentActive bool `json:"agent_active"`
|
|
Transcript string `json:"transcript"`
|
|
StartedAt string `json:"started_at"`
|
|
FinishedAt string `json:"finished_at"`
|
|
}
|
|
|
|
type NotificationReceipt struct {
|
|
Destination string `json:"destination"`
|
|
Status string `json:"status"`
|
|
Filename string `json:"filename,omitempty"`
|
|
MessageID string `json:"message_id,omitempty"`
|
|
AttachmentURL string `json:"attachment_url,omitempty"`
|
|
Diagnostic string `json:"diagnostic,omitempty"`
|
|
}
|
|
|
|
type RunDetail struct {
|
|
RunSummary
|
|
Workspace string `json:"workspace"`
|
|
AllowTools bool `json:"allow_tools"`
|
|
WritePaths []string `json:"write_paths"`
|
|
Input map[string]any `json:"input"`
|
|
Output map[string]any `json:"output"`
|
|
Steps []RunStep `json:"steps"`
|
|
}
|