pub enum NativePurpose {
Analysis,
Setup,
ContextEnrichment,
}Expand description
The only product purposes that may opt into the native Sessions launch contract.
This enum is intentionally closed: a caller cannot use the launch artifact to select an arbitrary profile, agent, cwd, or command. The GenBI runtime chooses a purpose and vendor, then materializes the corresponding Warble profile in a server-owned scope.
Variants§
Implementations§
Source§impl NativePurpose
impl NativePurpose
pub fn parse(value: &str) -> Option<Self>
pub fn as_str(self) -> &'static str
pub fn codex_skill(self) -> &'static str
pub fn codex_description(self) -> &'static str
Sourcepub fn validate_profile(
self,
ir: &WarbleIr,
entry: &NativeEntry,
) -> Result<(), DispatchError>
pub fn validate_profile( self, ir: &WarbleIr, entry: &NativeEntry, ) -> Result<(), DispatchError>
The one initial interactive prompt for this closed native purpose.
This is deliberately data owned by the producer’s purpose enum, rather than a browser value or terminal write. Both vendor CLIs accept one positional prompt while staying interactive, so it is passed as a single argv element without invoking a shell. Checks the caller’s declared entry against the compiled IR.
This replaced an allowlist of profile names. The allowlist could only answer “is this the profile I was built expecting”, which says nothing about whether the thing about to be launched is safe to launch, and it tied this crate to one product’s vocabulary. The question worth asking is structural, and it is asked of every profile equally: does the declared verb name exactly one component here, and is that component something a native interactive session may materialize at all?
The caller therefore cannot widen what runs by naming a profile differently — only by naming a component that already satisfies these conditions.
Trait Implementations§
Source§impl Clone for NativePurpose
impl Clone for NativePurpose
impl Copy for NativePurpose
Source§impl Debug for NativePurpose
impl Debug for NativePurpose
impl Eq for NativePurpose
Source§impl PartialEq for NativePurpose
impl PartialEq for NativePurpose
impl StructuralPartialEq for NativePurpose
Auto Trait Implementations§
impl Freeze for NativePurpose
impl RefUnwindSafe for NativePurpose
impl Send for NativePurpose
impl Sync for NativePurpose
impl Unpin for NativePurpose
impl UnsafeUnpin for NativePurpose
impl UnwindSafe for NativePurpose
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.