pub struct SpawnRequest {Show 15 fields
pub kind: Option<AgentKind>,
pub cwd: Option<String>,
pub label: Option<String>,
pub role: Option<Role>,
pub prompt: Option<String>,
pub worktree: bool,
pub transport: Transport,
pub permission: Option<PermissionPolicy>,
pub parent: Option<SessionId>,
pub model: Option<String>,
pub effort: Option<String>,
pub attachments: Vec<Attachment>,
pub inherit_from: Option<SessionId>,
pub args: Vec<String>,
pub budget_usd: Option<f64>,
}Expand description
建立 session 的請求。
Fields§
§kind: Option<AgentKind>None = 由 daemon 依 role/父 session/預設設定決定 (見 Config::resolve_kind)。
cwd: Option<String>工作目錄;None = daemon 的預設 (通常是 daemon 的 cwd)。
label: Option<String>§role: Option<Role>§prompt: Option<String>啟動後立刻送出的第一個 prompt。
worktree: bool是否建立 git worktree 並在其中工作。
transport: Transport§permission: Option<PermissionPolicy>統一權限政策。
parent: Option<SessionId>由哪個 session 產生 (人類產生則為 None)。
model: Option<String>指定 model;省略時依 config.toml 決定。
effort: Option<String>推理強度 (low/medium/high/xhigh/max);省略時依 config.toml。
attachments: Vec<Attachment>初始 prompt 的附件。
inherit_from: Option<SessionId>沿用該 session 的工作目錄、分支與 repo (交接用,不建立新 worktree)。
args: Vec<String>一次性額外命令列參數 (附加在設定檔的 args 之後)。
budget_usd: Option<f64>單一 session 的成本上限 (美元);省略時依 config.toml 決定。
Trait Implementations§
Source§impl Clone for SpawnRequest
impl Clone for SpawnRequest
Source§impl Debug for SpawnRequest
impl Debug for SpawnRequest
Source§impl<'de> Deserialize<'de> for SpawnRequest
impl<'de> Deserialize<'de> for SpawnRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for SpawnRequest
impl Freeze for SpawnRequestwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Attachment>: Freeze,
PhantomData<String>: Freeze,
impl Move for SpawnRequest
impl RefUnwindSafe for SpawnRequest
impl Send for SpawnRequestwhere
RawVecInner: Send,
impl Sync for SpawnRequestwhere
RawVecInner: Sync,
impl Unpin for SpawnRequest
impl UnsafeUnpin for SpawnRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Attachment>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for SpawnRequestwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more