algocline_core/execution/pause.rs
1//! Pause-related types for the `ExecutionService` layer.
2
3use serde::{Deserialize, Serialize};
4
5/// Information about a paused execution session.
6///
7/// Carried by [`crate::execution::ExecutionState::Paused`] and emitted in
8/// [`crate::execution::ProgressEvent::PauseRequested`].
9#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct PauseInfo {
11 /// Whether the pause expects a single response or a batch.
12 pub kind: PauseKind,
13 /// The pending LLM prompts that need responses.
14 pub prompts: Vec<PausePrompt>,
15 /// Unix timestamp (milliseconds) when the pause was recorded.
16 pub paused_at: i64,
17}
18
19/// Discriminant indicating whether a pause expects a single or batch response.
20#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
21#[serde(rename_all = "snake_case")]
22pub enum PauseKind {
23 /// Exactly one LLM response is expected.
24 Single,
25 /// Multiple LLM responses are expected (batch mode).
26 Batch,
27}
28
29/// A single pending LLM prompt within a paused session.
30#[derive(Debug, Clone, Serialize, Deserialize)]
31pub struct PausePrompt {
32 /// Stable identifier for this query within the session.
33 pub query_id: String,
34 /// The prompt text to send to the LLM.
35 pub prompt: String,
36}