(context.Context)
| 594 | } |
| 595 | |
| 596 | func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error) { |
| 597 | return []tools.Tool{ |
| 598 | { |
| 599 | Name: ToolNameShell, |
| 600 | Category: "shell", |
| 601 | Description: `Executes the given shell command in the user's default shell.`, |
| 602 | Parameters: tools.MustSchemaFor[RunShellArgs](), |
| 603 | OutputSchema: tools.MustSchemaFor[string](), |
| 604 | Handler: tools.NewHandler(t.handler.RunShell), |
| 605 | Annotations: tools.ToolAnnotations{Title: "Shell"}, |
| 606 | AddDescriptionParameter: true, |
| 607 | }, |
| 608 | { |
| 609 | Name: ToolNameRunShellBackground, |
| 610 | Category: "shell", |
| 611 | Description: `Starts a shell command in the background and returns immediately with a job ID. Use this for long-running processes like servers, watches, or any command that should run while other tasks are performed.`, |
| 612 | Parameters: tools.MustSchemaFor[RunShellBackgroundArgs](), |
| 613 | OutputSchema: tools.MustSchemaFor[string](), |
| 614 | Handler: tools.NewHandler(t.handler.RunShellBackground), |
| 615 | Annotations: tools.ToolAnnotations{Title: "Background Job"}, |
| 616 | AddDescriptionParameter: true, |
| 617 | }, |
| 618 | { |
| 619 | Name: ToolNameListBackgroundJobs, |
| 620 | Category: "shell", |
| 621 | Description: `Lists all background jobs with their status, runtime, and other information.`, |
| 622 | OutputSchema: tools.MustSchemaFor[string](), |
| 623 | Handler: tools.NewHandler(t.handler.ListBackgroundJobs), |
| 624 | Annotations: tools.ToolAnnotations{Title: "List Background Jobs", ReadOnlyHint: true}, |
| 625 | AddDescriptionParameter: true, |
| 626 | }, |
| 627 | { |
| 628 | Name: ToolNameViewBackgroundJob, |
| 629 | Category: "shell", |
| 630 | Description: `Views the output and status of a specific background job by job ID.`, |
| 631 | Parameters: tools.MustSchemaFor[ViewBackgroundJobArgs](), |
| 632 | OutputSchema: tools.MustSchemaFor[string](), |
| 633 | Handler: tools.NewHandler(t.handler.ViewBackgroundJob), |
| 634 | Annotations: tools.ToolAnnotations{Title: "View Background Job Output", ReadOnlyHint: true}, |
| 635 | AddDescriptionParameter: true, |
| 636 | }, |
| 637 | { |
| 638 | Name: ToolNameStopBackgroundJob, |
| 639 | Category: "shell", |
| 640 | Description: `Stops a running background job by job ID. The process and all its child processes will be terminated.`, |
| 641 | Parameters: tools.MustSchemaFor[StopBackgroundJobArgs](), |
| 642 | OutputSchema: tools.MustSchemaFor[string](), |
| 643 | Handler: tools.NewHandler(t.handler.StopBackgroundJob), |
| 644 | Annotations: tools.ToolAnnotations{Title: "Stop Background Job"}, |
| 645 | AddDescriptionParameter: true, |
| 646 | }, |
| 647 | }, nil |
| 648 | } |
| 649 | |
| 650 | // SetElicitationHandler wires the runtime's elicitation handler into the shell |
| 651 | // toolset. It is used by the sudo askpass flow to prompt the user for their |
nothing calls this directly
no test coverage detected