pub struct StartSessionRequest {Show 17 fields
pub create_managed_worktree: Option<bool>,
pub at: Option<String>,
pub branch: Option<String>,
pub base: Option<String>,
pub subagents: Option<SubagentPolicy>,
pub review: Option<SessionReview>,
pub workspace_id: Option<String>,
pub profile_id: Option<String>,
pub target_id: Option<String>,
pub bundle_id: Option<String>,
pub project_directory: Option<PathBuf>,
pub title: Option<String>,
pub model: Option<String>,
pub effort: Option<String>,
pub prompt: Option<String>,
pub cpus: Option<u64>,
pub memory_bytes: Option<u64>,
}Expand description
Create a session and, optionally, send its first prompt. Served in M2.
profile_id and target_id may be omitted, and each resolves
independently: a caller may name a profile and take the saved default
target. When model is supplied without profile_id, the daemon considers
all configured, usable profiles and ranks them by quota, using the saved
default profile as the tie-breaking anchor. An omitted
identifier otherwise comes from the pair the user last saved with the
mj go workflow, which the first setup also becomes, so a caller that has
never read config.toml can create a session by naming neither. The
controller still receives two explicit identifiers, because a session
whose profile was implicit would be a session nobody can explain later.
Fields§
§create_managed_worktree: Option<bool>§at: Option<String>Full commit object ID to start the workspace at: an exact checkout of
the bundle’s primary repository, detached unless branch is given.
branch: Option<String>With at, the new branch created there; otherwise the existing branch
to check out in a new isolated workspace.
base: Option<String>Diff base, when it is not at. Without at, also the starting
revision for a raw managed worktree.
subagents: Option<SubagentPolicy>Omitted uses the selected profile’s subagent setting.
review: Option<SessionReview>Turn review for this session. Omitted follows [review].
workspace_id: Option<String>§profile_id: Option<String>Omitted follows the saved default, or anchors model-based profile
selection when model is supplied.
target_id: Option<String>Omitted follows the saved default. See the type’s own documentation.
bundle_id: Option<String>§project_directory: Option<PathBuf>§title: Option<String>§model: Option<String>§effort: Option<String>§prompt: Option<String>§cpus: Option<u64>Container CPU limit. Omitted takes the target’s default size, the one the viewer’s create form selects. Container targets only.
memory_bytes: Option<u64>Container memory limit in bytes, defaulted like cpus.
Trait Implementations§
Source§impl Clone for StartSessionRequest
impl Clone for StartSessionRequest
Source§impl Debug for StartSessionRequest
impl Debug for StartSessionRequest
Source§impl Default for StartSessionRequest
impl Default for StartSessionRequest
Source§impl<'de> Deserialize<'de> for StartSessionRequest
impl<'de> Deserialize<'de> for StartSessionRequest
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>,
Source§impl PartialEq for StartSessionRequest
impl PartialEq for StartSessionRequest
Source§impl Serialize for StartSessionRequest
impl Serialize for StartSessionRequest
impl StructuralPartialEq for StartSessionRequest
Auto Trait Implementations§
impl Freeze for StartSessionRequest
impl RefUnwindSafe for StartSessionRequest
impl Send for StartSessionRequest
impl Sync for StartSessionRequest
impl Unpin for StartSessionRequest
impl UnsafeUnpin for StartSessionRequest
impl UnwindSafe for StartSessionRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more