Documentation
¶
Index ¶
- Variables
- type Client
- func (c *Client) ArchiveTaskWorkflow(ctx context.Context, workspace string, slug string) (apicore.ArchiveResult, error)
- func (c *Client) CancelRun(ctx context.Context, runID string) error
- func (c *Client) DaemonStatus(ctx context.Context) (apicore.DaemonStatus, error)
- func (c *Client) DeleteWorkspace(ctx context.Context, ref string) error
- func (c *Client) FetchReview(ctx context.Context, workspace string, slug string, ...) (apicore.ReviewFetchResult, error)
- func (c *Client) GetLatestReview(ctx context.Context, workspace string, slug string) (apicore.ReviewSummary, error)
- func (c *Client) GetReviewRound(ctx context.Context, workspace string, slug string, round int) (apicore.ReviewRound, error)
- func (c *Client) GetRun(ctx context.Context, runID string) (apicore.Run, error)
- func (c *Client) GetRunSnapshot(ctx context.Context, runID string) (apicore.RunSnapshot, error)
- func (c *Client) GetRunTranscript(ctx context.Context, runID string) (apicore.RunTranscript, error)
- func (c *Client) GetWorkspace(ctx context.Context, ref string) (apicore.Workspace, error)
- func (c *Client) Health(ctx context.Context) (apicore.DaemonHealth, error)
- func (c *Client) ListReviewIssues(ctx context.Context, workspace string, slug string, round int) ([]apicore.ReviewIssue, error)
- func (c *Client) ListRunEvents(ctx context.Context, runID string, after apicore.StreamCursor, limit int) (apicore.RunEventPage, error)
- func (c *Client) ListRuns(ctx context.Context, opts RunListOptions) ([]apicore.Run, error)
- func (c *Client) ListTaskWorkflows(ctx context.Context, workspace string) ([]apicore.WorkflowSummary, error)
- func (c *Client) ListWorkspaces(ctx context.Context) ([]apicore.Workspace, error)
- func (c *Client) OpenRunStream(ctx context.Context, runID string, after apicore.StreamCursor) (RunStream, error)
- func (c *Client) RegisterWorkspace(ctx context.Context, path string, name string) (apicore.WorkspaceRegisterResult, error)
- func (c *Client) ResolveWorkspace(ctx context.Context, path string) (apicore.Workspace, error)
- func (c *Client) StartExecRun(ctx context.Context, req apicore.ExecRequest) (apicore.Run, error)
- func (c *Client) StartReviewRun(ctx context.Context, workspace string, slug string, round int, ...) (apicore.Run, error)
- func (c *Client) StartReviewWatch(ctx context.Context, workspace string, slug string, ...) (apicore.Run, error)
- func (c *Client) StartTaskRun(ctx context.Context, slug string, req apicore.TaskRunRequest) (apicore.Run, error)
- func (c *Client) StopDaemon(ctx context.Context, force bool) error
- func (c *Client) SyncWorkflow(ctx context.Context, req apicore.SyncRequest) (apicore.SyncResult, error)
- func (c *Client) Target() Target
- type RemoteError
- type RunListOptions
- type RunStream
- type RunStreamHeartbeat
- type RunStreamItem
- type RunStreamOverflow
- type RunStreamSnapshot
- type Target
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDaemonClientRequired reports that the receiver client was nil. ErrDaemonClientRequired = errors.New("daemon client is required") // ErrDaemonContextRequired reports that the caller did not provide a request context. ErrDaemonContextRequired = errors.New("daemon request context is required") // ErrWorkflowSlugRequired reports that a workflow slug argument was blank. ErrWorkflowSlugRequired = errors.New("workflow slug is required") // ErrRunIDRequired reports that a run identifier argument was blank. ErrRunIDRequired = errors.New("run id is required") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client issues daemon API requests over the daemon Unix domain socket.
func (*Client) ArchiveTaskWorkflow ¶
func (c *Client) ArchiveTaskWorkflow( ctx context.Context, workspace string, slug string, ) (apicore.ArchiveResult, error)
ArchiveTaskWorkflow archives one workflow through the daemon API.
func (*Client) DaemonStatus ¶
DaemonStatus loads the primary daemon status payload.
func (*Client) DeleteWorkspace ¶
DeleteWorkspace unregisters one workspace.
func (*Client) FetchReview ¶
func (c *Client) FetchReview( ctx context.Context, workspace string, slug string, req apicore.ReviewFetchRequest, ) (apicore.ReviewFetchResult, error)
FetchReview imports provider feedback into a daemon-backed review round.
func (*Client) GetLatestReview ¶
func (c *Client) GetLatestReview(ctx context.Context, workspace string, slug string) (apicore.ReviewSummary, error)
GetLatestReview loads the latest review summary for one workflow.
func (*Client) GetReviewRound ¶
func (c *Client) GetReviewRound( ctx context.Context, workspace string, slug string, round int, ) (apicore.ReviewRound, error)
GetReviewRound loads one daemon-backed review round summary.
func (*Client) GetRunSnapshot ¶
GetRunSnapshot loads the dense attach snapshot for one run.
func (*Client) GetRunTranscript ¶
GetRunTranscript loads the canonical structured transcript for one run.
func (*Client) GetWorkspace ¶
GetWorkspace loads one workspace by id or path key.
func (*Client) Health ¶
Health probes the daemon readiness endpoint. A 503 response with a valid health payload is treated as a successful probe result rather than a transport error.
func (*Client) ListReviewIssues ¶
func (c *Client) ListReviewIssues( ctx context.Context, workspace string, slug string, round int, ) ([]apicore.ReviewIssue, error)
ListReviewIssues loads the issue rows for one review round.
func (*Client) ListRunEvents ¶
func (c *Client) ListRunEvents( ctx context.Context, runID string, after apicore.StreamCursor, limit int, ) (apicore.RunEventPage, error)
ListRunEvents pages through persisted daemon-backed events for one run.
func (*Client) ListRuns ¶
ListRuns lists daemon-managed runs for the requested workspace and filters.
func (*Client) ListTaskWorkflows ¶
func (c *Client) ListTaskWorkflows(ctx context.Context, workspace string) ([]apicore.WorkflowSummary, error)
ListTaskWorkflows loads synced workflow summaries for one workspace.
func (*Client) ListWorkspaces ¶
ListWorkspaces loads registered workspaces.
func (*Client) OpenRunStream ¶
func (c *Client) OpenRunStream( ctx context.Context, runID string, after apicore.StreamCursor, ) (RunStream, error)
OpenRunStream opens the daemon SSE stream for one run after the supplied cursor.
func (*Client) RegisterWorkspace ¶
func (c *Client) RegisterWorkspace( ctx context.Context, path string, name string, ) (apicore.WorkspaceRegisterResult, error)
RegisterWorkspace registers one workspace explicitly.
func (*Client) ResolveWorkspace ¶
ResolveWorkspace resolves or lazily registers one workspace path.
func (*Client) StartExecRun ¶
StartExecRun starts one daemon-backed exec run.
func (*Client) StartReviewRun ¶
func (c *Client) StartReviewRun( ctx context.Context, workspace string, slug string, round int, req apicore.ReviewRunRequest, ) (apicore.Run, error)
StartReviewRun starts one daemon-backed review-fix run.
func (*Client) StartReviewWatch ¶
func (c *Client) StartReviewWatch( ctx context.Context, workspace string, slug string, req apicore.ReviewWatchRequest, ) (apicore.Run, error)
StartReviewWatch starts one daemon-owned review-watch parent run.
func (*Client) StartTaskRun ¶
func (c *Client) StartTaskRun( ctx context.Context, slug string, req apicore.TaskRunRequest, ) (apicore.Run, error)
StartTaskRun starts one daemon-backed task workflow run.
func (*Client) StopDaemon ¶
StopDaemon requests daemon shutdown.
func (*Client) SyncWorkflow ¶
func (c *Client) SyncWorkflow(ctx context.Context, req apicore.SyncRequest) (apicore.SyncResult, error)
SyncWorkflow runs explicit daemon-backed reconciliation.
type RemoteError ¶
type RemoteError struct {
StatusCode int
Envelope contract.TransportError
}
RemoteError captures the daemon's non-2xx transport error envelope.
func (*RemoteError) Error ¶
func (e *RemoteError) Error() string
type RunListOptions ¶
RunListOptions filters the daemon-backed run list query.
type RunStream ¶
type RunStream interface {
Items() <-chan RunStreamItem
Errors() <-chan error
Close() error
}
RunStream consumes daemon SSE frames until EOF, cancellation, or Close.
type RunStreamHeartbeat ¶
type RunStreamHeartbeat struct {
Cursor apicore.StreamCursor
Timestamp time.Time
}
RunStreamHeartbeat reports one idle heartbeat frame from the daemon stream.
type RunStreamItem ¶
type RunStreamItem struct {
Event *events.Event
Snapshot *RunStreamSnapshot
Heartbeat *RunStreamHeartbeat
Overflow *RunStreamOverflow
}
RunStreamItem is one parsed SSE delivery from the daemon.
type RunStreamOverflow ¶
type RunStreamOverflow struct {
Cursor apicore.StreamCursor
Reason string
Timestamp time.Time
}
RunStreamOverflow reports that the client must reconnect from the last acknowledged cursor.
type RunStreamSnapshot ¶
type RunStreamSnapshot struct {
Snapshot apicore.RunSnapshot
}
RunStreamSnapshot reports one snapshot frame from the daemon stream contract.