Documentation
¶
Index ¶
- func CreateLogFile(path string) (*os.File, error)
- func IsActivityTimeout(err error) bool
- func NewActivityTimeoutError(timeout time.Duration) error
- func NotifyJobStart(emitHuman bool, job *job, ide string, model string, addDirs []string, ...)
- func RecordFailure(mu *sync.Mutex, list *[]FailInfo, f FailInfo)
- func ResolveTimeoutError(timeout time.Duration, errs ...error) error
- func RetryableSetupFailure(err error) bool
- func SessionErrorCode(err error) int
- func StartACPActivityWatchdog(ctx context.Context, monitor *activityMonitor, timeout time.Duration, ...) func()
- func StreamSessionUpdates(session agent.Session, handler *SessionUpdateHandler) error
- func SwapNewAgentClientForTest(fn func(context.Context, agent.ClientConfig) (agent.Client, error)) func()
- type ActivityTimeoutError
- type FailInfo
- type JobAttemptResult
- func BuildFailureResult(err error, exitCode int, j *job, index int, emitHuman bool) JobAttemptResult
- func ExecuteJobWithTimeout(ctx context.Context, cfg *config, j *job, cwd string, useUI bool, index int, ...) JobAttemptResult
- func ExecuteSessionAndResolve(ctx context.Context, timeout time.Duration, execution *SessionExecution, ...) JobAttemptResult
- func HandleSessionCancellation(cancelErr error, j *job, index int, emitHuman bool) JobAttemptResult
- func HandleSessionTimeout(timeoutErr error, j *job, index int, emitHuman bool, timeout time.Duration) JobAttemptResult
- type SessionExecution
- type SessionSetupRequest
- type SessionUpdateHandler
- func (h *SessionUpdateHandler) Done() <-chan struct{}
- func (h *SessionUpdateHandler) Err() error
- func (h *SessionUpdateHandler) HandleCompletion(err error) error
- func (h *SessionUpdateHandler) HandleUpdate(update model.SessionUpdate) error
- func (h *SessionUpdateHandler) Snapshot() SessionViewSnapshot
- type SessionUpdateHandlerConfig
- type SessionViewSnapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsActivityTimeout ¶
func NewActivityTimeoutError ¶
func NotifyJobStart ¶
func RetryableSetupFailure ¶
func SessionErrorCode ¶
func StreamSessionUpdates ¶
func StreamSessionUpdates(session agent.Session, handler *SessionUpdateHandler) error
Types ¶
type ActivityTimeoutError ¶
type ActivityTimeoutError = activityTimeoutError
type JobAttemptResult ¶
type JobAttemptResult = runshared.JobAttemptResult
func BuildFailureResult ¶
func BuildFailureResult(err error, exitCode int, j *job, index int, emitHuman bool) JobAttemptResult
func ExecuteJobWithTimeout ¶
func ExecuteSessionAndResolve ¶
func ExecuteSessionAndResolve( ctx context.Context, timeout time.Duration, execution *SessionExecution, j *job, index int, emitHuman bool, ) JobAttemptResult
func HandleSessionCancellation ¶
func HandleSessionCancellation( cancelErr error, j *job, index int, emitHuman bool, ) JobAttemptResult
func HandleSessionTimeout ¶
type SessionExecution ¶
type SessionExecution struct {
Client agent.Client
ReleaseClient func()
Session agent.Session
Handler *SessionUpdateHandler
OutFile *os.File
ErrFile *os.File
Logger *slog.Logger
}
func SetupSessionExecution ¶
func SetupSessionExecution(req SessionSetupRequest) (*SessionExecution, error)
func (*SessionExecution) Close ¶
func (s *SessionExecution) Close()
type SessionSetupRequest ¶
type SessionSetupRequest struct {
Context context.Context
Config *config
Job *job
CWD string
UseUI bool
StreamHumanOutput bool
Index int
RunJournal runtimeEventSubmitter
AggregateUsage *model.Usage
AggregateMu *sync.Mutex
Activity *activityMonitor
Logger *slog.Logger
TrackClient func(agent.Client) func()
}
type SessionUpdateHandler ¶
type SessionUpdateHandler struct {
// contains filtered or unexported fields
}
func NewSessionUpdateHandler ¶
func NewSessionUpdateHandler(cfg SessionUpdateHandlerConfig) *SessionUpdateHandler
func (*SessionUpdateHandler) Done ¶
func (h *SessionUpdateHandler) Done() <-chan struct{}
func (*SessionUpdateHandler) Err ¶
func (h *SessionUpdateHandler) Err() error
func (*SessionUpdateHandler) HandleCompletion ¶
func (h *SessionUpdateHandler) HandleCompletion(err error) error
func (*SessionUpdateHandler) HandleUpdate ¶
func (h *SessionUpdateHandler) HandleUpdate(update model.SessionUpdate) error
func (*SessionUpdateHandler) Snapshot ¶
func (h *SessionUpdateHandler) Snapshot() SessionViewSnapshot
type SessionUpdateHandlerConfig ¶
type SessionUpdateHandlerConfig struct {
Context context.Context
Index int
AgentID string
JobID string
SessionID string
Logger *slog.Logger
RunID string
OutWriter io.Writer
ErrWriter io.Writer
RunJournal runtimeEventSubmitter
RunManager model.RuntimeManager
JobUsage *model.Usage
AggregateUsage *model.Usage
AggregateMu *sync.Mutex
Activity *activityMonitor
ReusableAgent *reusableAgentExecution
}
type SessionViewSnapshot ¶
type SessionViewSnapshot = transcript.SessionViewSnapshot
Click to show internal directories.
Click to hide internal directories.