pub struct Processes { /* private fields */ }Implementations§
Source§impl Processes
impl Processes
pub async fn start( &self, request: ProcessStartRequest, scoped_effect_controller: ScopedEffectController<'_>, ) -> Result<ProcessRecord>
pub async fn list( &self, filter: &ProcessListFilter, ) -> Result<Vec<ObservedProcess>>
Sourcepub async fn list_granted_to(
&self,
session_scope: &SessionScope,
filter: &ProcessListFilter,
) -> Result<Vec<ObservedProcess>>
pub async fn list_granted_to( &self, session_scope: &SessionScope, filter: &ProcessListFilter, ) -> Result<Vec<ObservedProcess>>
List processes a session may address — the grant filter (ADR 0019).
This is the security lens (what a session is authorized to see), distinct
from list_originated_by. session.processes()
is thin sugar over this method pre-scoped to the session’s own grant.
Sourcepub async fn list_originated_by(
&self,
session_scope: &SessionScope,
filter: &ProcessListFilter,
) -> Result<Vec<ObservedProcess>>
pub async fn list_originated_by( &self, session_scope: &SessionScope, filter: &ProcessListFilter, ) -> Result<Vec<ObservedProcess>>
List processes a session originated — the provenance filter (ADR
0019). This is the lineage lens (what a session created), distinct from
list_granted_to: a process a session started
then transferred away still matches here, and one merely granted to it
does not.
pub async fn get(&self, process_id: &str) -> Result<Option<ObservedProcess>>
pub async fn events( &self, process_id: &str, after_sequence: u64, ) -> Result<Vec<ObservedProcessEvent>>
pub async fn await_output(&self, process_id: &str) -> Result<ProcessAwaitOutput>
pub async fn cancel( &self, process_id: &str, scoped_effect_controller: ScopedEffectController<'_>, ) -> Result<ProcessCancelSummary>
pub async fn signal( &self, process_id: &str, signal_name: impl Into<String>, signal_id: impl Into<String>, request: ProcessEventAppendRequest, scoped_effect_controller: ScopedEffectController<'_>, ) -> Result<ProcessEvent>
pub async fn session_snapshot( &self, session_id: impl Into<String>, ) -> Result<ProcessWorkSnapshot>
pub fn observer(&self) -> Result<ProcessWorkObserver>
Sourcepub async fn cancel_all(
&self,
scoped_effect_controller: ScopedEffectController<'_>,
) -> Result<Vec<ProcessCancelSummary>>
pub async fn cancel_all( &self, scoped_effect_controller: ScopedEffectController<'_>, ) -> Result<Vec<ProcessCancelSummary>>
Cancel every currently-running process. A host-wide lever; for a
session-scoped stop use SessionProcessAdmin::cancel_all.
Sourcepub async fn transfer(
&self,
from_scope: &SessionScope,
to_scope: &SessionScope,
process_ids: &[String],
) -> Result<()>
pub async fn transfer( &self, from_scope: &SessionScope, to_scope: &SessionScope, process_ids: &[String], ) -> Result<()>
Move handle grants for process_ids from one session scope to another.
Processes are global; this re-homes only the addressing grant, never the
process itself.
Sourcepub async fn prune(&self, cutoff_epoch_ms: u64) -> Result<ProcessPruneReport>
pub async fn prune(&self, cutoff_epoch_ms: u64) -> Result<ProcessPruneReport>
Host-scheduled retention lever (ADR 0017): physically delete terminal
process rows (and their events, grants, leases) older than
cutoff_epoch_ms, returning what was reclaimed. Non-terminal rows are
never touched. Choose a cutoff comfortably longer than any live await.
Sourcepub async fn request_abandon(
&self,
process_id: &str,
requested_by: impl Into<String>,
reason: Option<String>,
) -> Result<ObservedProcess>
pub async fn request_abandon( &self, process_id: &str, requested_by: impl Into<String>, reason: Option<String>, ) -> Result<ObservedProcess>
Record a durable, non-terminal Abandon Request on a process (ADR
0019): a third party’s authorization to accept uncertainty about an
owner. This never terminalizes anything itself — the recovery sweep
reconciles it into Abandoned only once the owner’s lease has lapsed;
the marker stays visible to observers while pending. Returns the process
as observed after the marker is written.