muse_code_sdk/msp/view/monitor_inbox.rs
1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use crate::msp::view::SourceRange;
4use crate::msp::view::StreamRef;
5use serde::Deserialize;
6use serde::Serialize;
7
8/// `monitor/inboxItemAdmitted` params: one monitor inbox admission — the fold
9/// keys gate-off consumes.
10#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
11#[serde(rename_all = "camelCase")]
12#[non_exhaustive]
13pub struct MonitorInboxItemAdmittedParams {
14 /// The owning session.
15 pub session_id: String,
16 /// Opaque, strictly monotonic view cursor.
17 pub view_cursor: String,
18 /// The durable records this event folded from.
19 pub source_range: SourceRange,
20 /// The inbox item id (dedupe key).
21 pub item_id: String,
22 /// The owning monitor task id (per-task set key).
23 pub task_id: String,
24 /// Per-task event order key (with `line_index`).
25 pub event_index: u64,
26 /// Monitor event kind, snake_case, open vocabulary — clients
27 /// ignore unknown kinds.
28 pub event_kind: String,
29 /// Line order key; absent when the event has no line.
30 #[serde(default, skip_serializing_if = "Option::is_none")]
31 pub line_index: Option<u64>,
32 /// Whether the event carries displayable lines.
33 pub show_lines: bool,
34 /// The model-facing delivery text.
35 pub body: String,
36 /// The producer-recorded pre-augmentation content; absent on earlier
37 /// records.
38 #[serde(default, skip_serializing_if = "Option::is_none")]
39 pub display_body: Option<String>,
40 /// The notice-text summary.
41 pub summary: String,
42 /// Admission stamp (RFC3339); consumed by the pending sort.
43 pub queued_at: String,
44}
45
46/// `monitor/inboxItemDrained` params: one monitor inbox drain — a consumption
47/// marker with its recorded stamp.
48#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
49#[serde(rename_all = "camelCase")]
50#[non_exhaustive]
51pub struct MonitorInboxItemDrainedParams {
52 /// The owning session.
53 pub session_id: String,
54 /// Opaque, strictly monotonic view cursor.
55 pub view_cursor: String,
56 /// The durable records this event folded from.
57 pub source_range: SourceRange,
58 /// The drained inbox item id.
59 pub item_id: String,
60 /// The draining run stream (`StreamRef`), absent means the current
61 /// draining run.
62 #[serde(default, skip_serializing_if = "Option::is_none")]
63 pub drain_target_run_stream: Option<StreamRef>,
64 /// False is a local claim-only recall: no delivery row or recovery
65 /// consequence, but the drain still stamps the awaiting verdict.
66 pub delivery_visible: bool,
67 /// The drain record's recorded stamp (RFC3339), the drain-side
68 /// operand of drain-vs-void latest-wins.
69 pub drained_at: String,
70}
71
72/// `monitor/inboxItemVoided` params: one wake-missed void — count-only, no
73/// transcript row.
74#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
75#[serde(rename_all = "camelCase")]
76#[non_exhaustive]
77pub struct MonitorInboxItemVoidedParams {
78 /// The owning session.
79 pub session_id: String,
80 /// Opaque, strictly monotonic view cursor.
81 pub view_cursor: String,
82 /// The durable records this event folded from.
83 pub source_range: SourceRange,
84 /// The voided inbox item id.
85 pub item_id: String,
86 /// The anomaly's recorded stamp (RFC3339), the void-side operand
87 /// of drain-vs-void latest-wins.
88 pub voided_at: String,
89}