pub struct NativeSessionScope {
pub version: String,
pub kind: String,
pub scope_id: String,
pub cwd: PathBuf,
pub entry: NativeEntry,
pub bootstrap_root: Option<PathBuf>,
pub wren_runtime: Option<NativeWrenRuntime>,
pub binding: Option<NativeBinding>,
}Expand description
A server-derived launch scope. This is deliberately a small producer input rather than session state: GenBI creates and authorizes it, Warble verifies its shape/canonical cwd and carries its opaque binding identity into the launch artifact, and the future runtime owns comparing it to its live binding generation/revision before spawning.
Fields§
§version: String§kind: String§scope_id: String§cwd: PathBuf§entry: NativeEntryWhich component the session starts in, and the first thing it is told.
The caller declares this rather than the dispatcher inferring it: a profile can carry several materializable components (every shipped one does), so structure alone cannot choose an entry, and a built-in table of entry names would tie this crate to whichever product authored the profile. What the dispatcher still owns is the check that the declaration is true of the IR, and the authorship of the argv built from it.
bootstrap_root: Option<PathBuf>Setup alone carries this separately authorized project-creation root.
cwd remains the native materialization root and must equal --out.
wren_runtime: Option<NativeWrenRuntime>Optional to preserve the existing cross-vendor native scope contract. Native Codex materialization requires this exact server-resolved launcher and Python runtime closure; it is never derived from the browser, environment, or PATH by the dispatcher.
binding: Option<NativeBinding>Implementations§
Source§impl NativeSessionScope
impl NativeSessionScope
pub fn from_file(path: &Path) -> Result<Self, DispatchError>
Sourcepub fn codex_permission_profile(&self) -> Result<String, DispatchError>
pub fn codex_permission_profile(&self) -> Result<String, DispatchError>
Render the complete, server-selected Codex permission profile. It deliberately has no caller-selected filesystem, executable, PATH, browser, credential, or network input.
Sourcepub fn claude_setup_write_permissions(
&self,
) -> Result<[String; 2], DispatchError>
pub fn claude_setup_write_permissions( &self, ) -> Result<[String; 2], DispatchError>
Claude’s permission grammar carries the same server-selected Setup root as its only Edit/Write scope. The string is generated only after NativeSessionScope::validate has canonicalized the sealed descriptor.