MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / NewTaskWaitTool

Function NewTaskWaitTool

agent/agent_tool.go:339–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

337}
338
339func NewTaskWaitTool() coretools.Tool {
340 return newTaskTool("TaskWait", "Block without busy-polling until all specified direct child tasks reach a stable state, or until timeout_seconds elapses.", TaskWaitInput{}, func(ctx context.Context, execCtx coretools.ExecutionContext, input any) (string, error) {
341 rt, scope, err := runtimeAndScope(execCtx)
342 if err != "" {
343 return err, nil
344 }
345 in := derefTaskWait(input)
346 return jsonString(serializeTaskResult(rt.WaitForTasks(ctx, in.TaskIDs, scope, in.TimeoutSecond))), nil
347 })
348}
349
350func NewTaskStopTool() coretools.Tool {
351 return newTaskTool("TaskStop", "Stop one direct child task. Queued workers are killed immediately; running workers are cancelled and converge to killed.", TaskStopInput{}, func(_ context.Context, execCtx coretools.ExecutionContext, input any) (string, error) {

Calls 6

newTaskToolFunction · 0.85
runtimeAndScopeFunction · 0.85
derefTaskWaitFunction · 0.85
jsonStringFunction · 0.85
serializeTaskResultFunction · 0.85
WaitForTasksMethod · 0.80