Public declaration syntax from harness-sdk/src/onboarding.rs Original source SHA-256: f23c7ae259293d61356a93af2bb2d946dee9e2edd387a781d0fbf3f3c0117b61 Function bodies and constant values are omitted. This is not the complete implementation. Source line 16 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum OnboardingStep { /// Initial welcome screen (one-time intro copy + ToS confirm). Welcome, /// Theme picker. ChooseTheme, /// Model picker. ChooseModel, /// Workspace root confirmation (the cwd Codex / clausen will /// operate inside). ConfirmWorkspace, /// Onboarding finished. Done, } Source line 32 #[derive(Debug, Error, PartialEq, Eq)] pub enum OnboardingError { /// `advance` / `back` was called from a state that does not allow /// the requested transition (already at start / end). #[error("invalid transition from {from:?} via {action}")] InvalidTransition { /// State the flow was in. from: OnboardingStep, /// Attempted action ("advance", "back", "skip", …). action: &'static str, }, /// A required selection was missing when `advance` was called. #[error("step {step:?} requires a selection before advancing")] SelectionRequired { /// Step that needs a selection. step: OnboardingStep, }, } Source line 55 #[derive(Debug, Clone, Default, Serialize, Deserialize)] pub struct OnboardingSelection { /// Selected theme id (e.g. `"monochrome"`). `None` until the /// user activates a row in the theme picker. pub theme_id: Option, /// Selected model id (e.g. `"claude-opus-4-7"`). `None` until /// the user activates a row in the model picker. pub model_id: Option, /// Confirmed workspace root display string. `None` until /// confirmed. pub workspace_root: Option, /// Whether the user accepted the ToS / first-launch notice. pub welcome_accepted: bool } Source line 84 #[derive(Debug, Clone)] pub struct OnboardingFlow { } Source line 92 #[must_use] pub fn new() -> Self; Source line 103 #[must_use] pub fn from_selection(selection: OnboardingSelection) -> Self; Source line 112 #[must_use] pub fn step(&self) -> OnboardingStep; Source line 118 #[must_use] pub fn selection(&self) -> &OnboardingSelection; Source line 123 pub fn accept_welcome(&mut self); Source line 128 pub fn set_theme(&mut self, theme_id: impl Into); Source line 133 pub fn set_model(&mut self, model_id: impl Into); Source line 138 pub fn set_workspace(&mut self, workspace_root: impl Into); Source line 144 pub fn advance(&mut self) -> Result; Source line 182 pub fn back(&mut self) -> Result; Source line 201 pub fn skip(&mut self) -> Result; Source line 231 #[must_use] pub fn is_done(&self) -> bool;