MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / stop_turn

Method stop_turn

atomic-cli/src/commands/agent/provenance_rpc.rs:851–876  ·  view source on GitHub ↗
(
        &self,
        session_id: &str,
        turn_number: u32,
        cause: JournalStopCause,
        resumable: bool,
        observed_at: i64,
    )

Source from the content-addressed store, hash-verified

849 }
850
851 fn stop_turn(
852 &self,
853 session_id: &str,
854 turn_number: u32,
855 cause: JournalStopCause,
856 resumable: bool,
857 observed_at: i64,
858 ) -> Result<Option<JournalTurnStatus>, String> {
859 let cause = match cause {
860 JournalStopCause::UserRequested => pb::StopCause::UserRequested,
861 JournalStopCause::LeaseExpired => pb::StopCause::LeaseExpired,
862 JournalStopCause::ProcessExited => pb::StopCause::ProcessExited,
863 JournalStopCause::HookFailure => pb::StopCause::HookFailure,
864 JournalStopCause::SystemShutdown => pb::StopCause::SystemShutdown,
865 JournalStopCause::Abandoned => pb::StopCause::Abandoned,
866 };
867 update_turn(
868 self,
869 session_id,
870 turn_number,
871 pb::TurnAction::Stop,
872 Some(cause),
873 Some(resumable),
874 observed_at,
875 )
876 }
877
878 fn resume_turn(
879 &self,

Callers 2

runMethod · 0.45
stop_lifecycle_turnsFunction · 0.45

Calls 2

update_turnFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected