Documentation
¶
Overview ¶
Package runner contains the bounded, provider-specific process adapter used by the headless E2 command. It deliberately has no shell or credential store.
Index ¶
Constants ¶
const ( CheckStatusPending = "pending" CheckStatusPassed = "passed" CheckStatusFailed = "failed" CheckStatusTimeout = "timed_out" )
const ( PermissionReadOnly = "read-only" PermissionWorktree = "workspace-write" StatusCompleted = "completed" StatusFailed = "failed" StatusTimedOut = "timed_out" StatusCancelled = "cancelled" StatusBlocked = "blocked" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckAnnotation ¶
type CheckEvidence ¶
type CheckEvidence struct {
PullRequest string
Status string
Checks []CheckRun
Failures []CheckFailureEvidence
Warnings []string
Digest string
}
func CollectCheckEvidence ¶
func CollectCheckEvidence(ctx context.Context, request CheckEvidenceRequest) (CheckEvidence, error)
CollectCheckEvidence is the trusted host-side GitHub adapter. It invokes only gh with fixed subcommands; providers never receive these credentials or raw GitHub output.
func WatchCheckEvidence ¶
func WatchCheckEvidence(ctx context.Context, request CheckEvidenceRequest) (CheckEvidence, error)
WatchCheckEvidence polls a PR until all checks are terminal or the bounded watch context expires. A pending check is never classified as a failure.
type CheckEvidenceRequest ¶
type CheckEvidenceRequest struct {
PullRequest string
Directory string
Timeout time.Duration
TailBytes int
PollInterval time.Duration
}
CheckEvidenceRequest identifies one already-created PR. PullRequest accepts a numeric PR number or a validated branch/ref understood by gh.
type CheckFailureEvidence ¶
type HarnessProcess ¶
type HarnessProcess struct {
// contains filtered or unexported fields
}
HarnessProcess owns one bounded provider process. Keeping the request on this value makes the spawn boundary explicit and gives future providers one lifecycle owner instead of one-off exec.Command call sites.
func NewHarnessProcess ¶
func NewHarnessProcess(request Request) HarnessProcess
type Request ¶
type Request struct {
ProjectID string
Provider Provider
Worktree string
Objective string
Model string
Permission string
Timeout time.Duration
TailBytes int
CLI modelcontrol.SignedCLI
Verifier modelcontrol.SignatureVerifier
}
type Result ¶
type Result struct {
Provider Provider `json:"provider"`
Status string `json:"status"`
ExitCode *int `json:"exit_code,omitempty"`
DurationMs int64 `json:"duration_ms"`
StdoutTail string `json:"stdout_tail"`
StderrTail string `json:"stderr_tail"`
Truncated bool `json:"truncated"`
BytesOut int64 `json:"bytes_out"`
Digest string `json:"digest"`
Reason string `json:"reason,omitempty"`
}