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

Function NewTaskStopTool

agent/agent_tool.go:350–363  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {
352 rt, scope, err := runtimeAndScope(execCtx)
353 if err != "" {
354 return err, nil
355 }
356 in := derefTaskStop(input)
357 result := rt.StopTask(in.TaskID, scope)
358 if text, ok := result.(string); ok {
359 return text, nil
360 }
361 return jsonString(serializeTaskResult(result)), nil
362 })
363}
364
365func NewSendMessageTool() coretools.Tool {
366 return newTaskTool("SendMessage", "Send a new prompt to an existing reusable worker. This only succeeds when the target worker is idle and ready for more work.", SendMessageInput{}, func(_ context.Context, execCtx coretools.ExecutionContext, input any) (string, error) {

Calls 6

newTaskToolFunction · 0.85
runtimeAndScopeFunction · 0.85
derefTaskStopFunction · 0.85
jsonStringFunction · 0.85
serializeTaskResultFunction · 0.85
StopTaskMethod · 0.80