pub struct RunSpec { /* private fields */ }Expand description
One task’s worth of spawn request: basis::RunSpec’s per-run intent,
plus the workspace-level overrides a basis::Workspace normally fixes
once, and the facts a task that may run unattended, in another process,
additionally needs recorded.
Implementations§
Source§impl RunSpec
impl RunSpec
pub fn new(prompt: impl Into<String>) -> Self
pub fn with_provider(self, provider: impl Into<String>) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Sourcepub fn without_shell(self) -> Self
pub fn without_shell(self) -> Self
Refuses the task shell access — sugar over the workspace’s own
ShellAccess::from_flag.
pub fn with_system_prompt(self, system_prompt: SystemPrompt) -> Self
pub fn with_effort(self, effort: Effort) -> Self
Sourcepub fn with_approve(self, approve: Approve) -> Self
pub fn with_approve(self, approve: Approve) -> Self
Every consequential call this task’s turns make is put to this.
Sourcepub fn with_deadline(self, deadline: Duration) -> Self
pub fn with_deadline(self, deadline: Duration) -> Self
Gives up on the task after deadline, counted from spawn. Defaults to
DEFAULT_DEADLINE when never set — an unattended task always gets a
finite service bound.
pub fn with_tool_budget(self, tool_budget: usize) -> Self
pub fn with_token_budget(self, token_budget: u64) -> Self
Sourcepub fn detached(self) -> Self
pub fn detached(self) -> Self
Spawns outside the calling task’s ownership tree even when this
process is itself executing one — see crate::current_task. A
detached task inherits no scope: nothing cancels it downward, and
nothing waits for it before its would-be parent settles.
Sourcepub fn continuing(self, continuation: Continuation) -> Self
pub fn continuing(self, continuation: Continuation) -> Self
Picks up an existing conversation instead of opening a new one.