@@ -19,6 +19,7 @@ var jobOutputDescription []byte
20type JobOutputParams struct {
20type JobOutputParams struct {
21 ShellID string `json:"shell_id" description:"The ID of the background shell to retrieve output from"`
21 ShellID string `json:"shell_id" description:"The ID of the background shell to retrieve output from"`
22+ Wait bool `json:"wait" description:"If true, block until the background shell completes before returning output"`
24type JobOutputResponseMetadata struct {
25type JobOutputResponseMetadata struct {
@@ -44,6 +45,10 @@ func NewJobOutputTool() fantasy.AgentTool {
44 return fantasy.NewTextErrorResponse(fmt.Sprintf("background shell not found: %s", params.ShellID)), nil
45 return fantasy.NewTextErrorResponse(fmt.Sprintf("background shell not found: %s", params.ShellID)), nil
49+ bgShell.WaitContext(ctx)
47 stdout, stderr, done, err := bgShell.GetOutput()
52 stdout, stderr, done, err := bgShell.GetOutput()
49 var outputParts []string
54 var outputParts []string