MCPcopy Create free account
hub / github.com/compozy/agh / taskManagerOptions

Function taskManagerOptions

internal/daemon/task_runtime.go:522–554  ·  view source on GitHub ↗
(
	store taskStore,
	bridge taskpkg.SessionExecutor,
	wakeNotifier taskpkg.WakeNotifier,
	events taskpkg.EventObserver,
	hooks *hooksNotifier,
	reviewRequests taskpkg.RunReviewRequestedObserver,
	recovery aghconfig.TaskRecoveryConfig,
	scheduler aghconfig.SchedulerConfig,
	blockRecurrenceLimit int,
)

Source from the content-addressed store, hash-verified

520}
521
522func taskManagerOptions(
523 store taskStore,
524 bridge taskpkg.SessionExecutor,
525 wakeNotifier taskpkg.WakeNotifier,
526 events taskpkg.EventObserver,
527 hooks *hooksNotifier,
528 reviewRequests taskpkg.RunReviewRequestedObserver,
529 recovery aghconfig.TaskRecoveryConfig,
530 scheduler aghconfig.SchedulerConfig,
531 blockRecurrenceLimit int,
532) []taskpkg.Option {
533 options := []taskpkg.Option{
534 taskpkg.WithStore(store),
535 taskpkg.WithSessionExecutor(bridge),
536 taskpkg.WithWakeNotifier(wakeNotifier),
537 taskpkg.WithEventObserver(events),
538 taskpkg.WithRunReviewRequestedObserver(reviewRequests),
539 taskpkg.WithNetworkChannelValidator(network.ValidateChannel),
540 taskpkg.WithCancelGracePeriod(defaultTaskCancelGrace),
541 taskpkg.WithForceRecoveryOptions(taskpkg.ForceRecoveryOptions{
542 AllowAgentForce: recovery.AllowAgentForce,
543 }),
544 taskpkg.WithStarvationAge(scheduler.MinQueuedAge),
545 taskpkg.WithBlockRecurrenceLimit(blockRecurrenceLimit),
546 }
547 if hooks != nil {
548 options = append(options, taskpkg.WithTaskRunHooks(hooks))
549 }
550 if reader, ok := store.(taskpkg.InspectStateReader); ok {
551 options = append(options, taskpkg.WithInspectStateReader(reader))
552 }
553 return options
554}
555
556func (r *taskRuntime) submitDetachedHarnessWork(
557 ctx context.Context,

Callers 1

bootTasksMethod · 0.85

Calls 1

appendFunction · 0.85

Tested by

no test coverage detected