pub struct LashSession { /* private fields */ }Implementations§
Source§impl LashSession
impl LashSession
pub async fn close(self) -> Result<()>
pub fn session_id(&self) -> String
pub fn policy_snapshot(&self) -> SessionPolicy
pub fn observe(&self) -> ObservableSession
pub fn parent_session_id(&self) -> Option<&str>
pub fn effect_host(&self) -> Arc<dyn EffectHost> ⓘ
pub fn turn(&self, input: TurnInput) -> TurnBuilder
pub fn queued_turn(&self) -> QueuedTurnBuilder
Sourcepub fn cancel_running_turns(&self) -> usize
pub fn cancel_running_turns(&self) -> usize
Cancel every turn currently executing through this opened session (including its clones) and report how many were signalled.
This is the affordance behind a UI “stop” control: hold a clone of the
session wherever the stop arrives and call this, instead of threading a
CancellationToken into every turn call
(TurnBuilder::cancel remains the
per-turn hook when you need one). A cancelled turn finishes with
TurnOutcome::Stopped(TurnStop::Cancelled) and commits like any other
turn; the session stays usable.
Scope: turns started from this LashSession instance and its clones.
A handle opened separately for the same session id has its own
registry and is not reached.
pub fn admin(&self) -> SessionAdmin
pub async fn configure(&self, patch: SessionConfigPatch) -> Result<()>
pub fn tools(&self) -> ToolAdmin
pub fn commands(&self) -> SessionCommandAdmin
pub fn triggers(&self) -> SessionTriggerAdmin
pub fn processes(&self) -> SessionProcessAdmin
pub fn plugin_actions(&self) -> PluginActions
pub fn enqueue(&self, input: TurnInput) -> EnqueueTurnBuilder<'_>
pub async fn queued_work(&self) -> Result<Vec<QueuedWorkBatch>>
pub async fn cancel_queued_work_batch( &self, batch_id: &str, ) -> Result<Option<QueuedWorkBatch>>
Sourcepub async fn await_queued_work_batch(&self, batch_id: &str) -> Result<()>
pub async fn await_queued_work_batch(&self, batch_id: &str) -> Result<()>
Resolve once batch_id is no longer pending in the queue store —
drained by whoever runs queued work (a queued-work runner, a durable
worker, or another handle’s queued_turn) or
cancelled. This is the enqueue-and-observe side of the queue: the
caller never claims the work itself.
Completion is read from the persistent queue store, so it observes
drains performed by other session handles and other processes alike.
There is no built-in deadline — nothing resolves if nothing drains the
queue, so bound it with tokio::time::timeout when the worker may be
unavailable. A batch id the store has never seen resolves immediately.
pub fn read_view(&self) -> SessionReadView
pub fn usage_report(&self) -> SessionUsageReport
pub async fn set_turn_phase_probe(&self, probe: Arc<dyn RuntimeTurnPhaseProbe>)
Trait Implementations§
Source§impl Clone for LashSession
impl Clone for LashSession
Source§fn clone(&self) -> LashSession
fn clone(&self) -> LashSession
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more