1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// @generated from the MSP stable schema and protocol sources; do not edit by hand.
use crate::msp::method::turn::CommandStatus;
use serde::Deserialize;
use serde::Serialize;
/// `goal/set` params: set the session's goal objective.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GoalSetParams {
/// The target session.
pub session_id: String,
/// The idempotency handle (UUIDv7).
pub command_id: String,
/// The objective text; required, non-empty after Unicode-whitespace trim
/// (the trimmed text is the payload). Empty-after-trim is `-32602
/// invalidParams`.
pub objective: String,
}
/// `goal/edit` params: replace the current goal's objective. Same shape as
/// `goal/set`; the verbs differ in their `missing_goal` precondition, not their
/// payload.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GoalEditParams {
/// The target session.
pub session_id: String,
/// The idempotency handle (UUIDv7).
pub command_id: String,
/// The replacement objective; same trim/non-empty rule as `goal/set`.
pub objective: String,
}
/// `goal/clear` params. An `objective` here is an unknown field and rejects
/// `-32602 invalidParams` — the bare verbs carry exactly this pair.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GoalClearParams {
/// The target session.
pub session_id: String,
/// The idempotency handle (UUIDv7).
pub command_id: String,
}
/// `goal/pause` params; shape as `goal/clear`.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GoalPauseParams {
/// The target session.
pub session_id: String,
/// The idempotency handle (UUIDv7).
pub command_id: String,
}
/// `goal/resume` params; shape as `goal/clear`.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GoalResumeParams {
/// The target session.
pub session_id: String,
/// The idempotency handle (UUIDv7).
pub command_id: String,
}
/// The shared goal ack, admission-only: all five verbs answer this one shape,
/// differing only in when `turnId` is present.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
#[non_exhaustive]
pub struct GoalCommandResult {
/// Echoes the client's id.
pub command_id: String,
/// Admission status.
pub status: CommandStatus,
/// Present by exactly the four result cases: an idle wake carries the fresh
/// goal turn's id; a busy `set`/`edit`/`resume` carries the admission-time
/// active turn's id (a routing fact, not a delivery promise);
/// `pause`/`clear` never carry it; an idle admission whose resulting goal
/// is not unfinished parks the notification and carries none.
/// **Additive-optional**: absent means "no turn named", never fabricated.
#[serde(skip_serializing_if = "Option::is_none")]
pub turn_id: Option<String>,
}