Documentation
¶
Overview ¶
Package backgroundjobs exposes the built-in background_jobs toolset.
Index ¶
Constants ¶
const ( // ToolNameRunBackgroundJob starts a shell command asynchronously. ToolNameRunBackgroundJob = "run_background_job" // ToolNameListBackgroundJobs lists known background jobs. ToolNameListBackgroundJobs = "list_background_jobs" // ToolNameViewBackgroundJob renders one background job's status and output. ToolNameViewBackgroundJob = "view_background_job" // ToolNameStopBackgroundJob stops a running background job. ToolNameStopBackgroundJob = "stop_background_job" // ToolNameWaitBackgroundJob waits for a background job to finish. ToolNameWaitBackgroundJob = "wait_background_job" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RunBackgroundJobArgs ¶
type RunBackgroundJobArgs struct {
Cmd string `json:"cmd" jsonschema:"Shell command to run in background"`
Cwd string `json:"cwd,omitempty" jsonschema:"Working directory (default \".\")"`
}
RunBackgroundJobArgs contains the parameters for run_background_job.
func (*RunBackgroundJobArgs) UnmarshalJSON ¶
func (a *RunBackgroundJobArgs) UnmarshalJSON(data []byte) error
UnmarshalJSON accepts both "cmd" (canonical) and "command" (common alias), mirroring the shell tool's command parameter.
type RunBackgroundJobRecallArgs ¶
type RunBackgroundJobRecallArgs struct {
Cmd string `json:"cmd" jsonschema:"Shell command to run in background"`
Cwd string `json:"cwd,omitempty" jsonschema:"Working directory (default \".\")"`
Recall bool `json:"recall,omitempty" jsonschema:"Ask to be recalled with a steering message when the background job finishes"`
}
RunBackgroundJobRecallArgs contains the parameters for run_background_job when recall is enabled.
func (*RunBackgroundJobRecallArgs) UnmarshalJSON ¶
func (a *RunBackgroundJobRecallArgs) UnmarshalJSON(data []byte) error
UnmarshalJSON accepts both "cmd" (canonical) and "command" (common alias), mirroring the shell tool's command parameter.
type StopBackgroundJobArgs ¶
type StopBackgroundJobArgs struct {
JobID string `json:"job_id" jsonschema:"Background job ID"`
}
StopBackgroundJobArgs contains the parameters for stop_background_job.
type ToolSet ¶
type ToolSet struct {
// contains filtered or unexported fields
}
ToolSet manages long-running shell commands.
func New ¶
func New(env []string, runConfig *config.RuntimeConfig) *ToolSet
New creates a background_jobs toolset with the supplied environment.
func (*ToolSet) Instructions ¶
type ViewBackgroundJobArgs ¶
type ViewBackgroundJobArgs struct {
JobID string `json:"job_id" jsonschema:"Background job ID"`
}
ViewBackgroundJobArgs contains the parameters for view_background_job.
type WaitBackgroundJobArgs ¶
type WaitBackgroundJobArgs struct {
JobID string `json:"job_id" jsonschema:"Background job ID"`
Timeout int `` /* 175-byte string literal not displayed */
}
WaitBackgroundJobArgs contains the parameters for wait_background_job.