Skip to main content

muse_code_sdk/msp/error/
kind.rs

1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// A stable `error.data.kind` category: camelCase, the value clients branch on.
7/// Open: new kinds are added as their methods land, and a new `kind` is
8/// additive only because this domain is declared open.
9#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
10#[serde(rename_all = "camelCase")]
11#[non_exhaustive]
12pub enum ErrorKind {
13    /// Line was not valid JSON (`-32700`); `id` is `null`.
14    ParseError,
15    /// Valid JSON, invalid frame (`-32600`).
16    InvalidRequest,
17    /// Pre-handshake request other than `initialize` (`-32600` override).
18    NotInitialized,
19    /// Second `initialize` on one connection (`-32600` override).
20    AlreadyInitialized,
21    /// Unknown method (`-32601`).
22    MethodNotFound,
23    /// Malformed params (`-32602`).
24    InvalidParams,
25    /// Experimental method, field, or variant without the `experimentalApi`
26    /// opt-in.
27    ExperimentalRequired,
28    /// Unexpected server failure (`-32603`).
29    Internal,
30    /// One durable view event cannot fit the configured page-result budget
31    /// (`-32603` override); `sessionId`, `viewCursor`, and `limitBytes` name
32    /// the blocked range and budget.
33    PageEventTooLarge,
34    /// A bounded `item/readOutput` result cannot fit the configured result
35    /// budget even at zero progress (`-32603` override); `sessionId` and
36    /// `limitBytes` name the session and exceeded budget.
37    OutputResultTooLarge,
38    /// Ingress queue saturated (`-32001`); retry with backoff and jitter.
39    Overloaded,
40    /// Frame or params over the limit (`-32002`); `data.limitBytes` present.
41    InputTooLarge,
42    /// Capability-gated method without the grant (`-32010`);
43    /// `data.capability` names it.
44    CapabilityRequired,
45    /// Run, item, subscription, or cursor anchor missing (`-32011`); a
46    /// missing view-cursor anchor sets `data.reason: "missingAnchor"`.
47    NotFound,
48    /// Interrupt pre-empted the request (`-32013`); outcome on the view.
49    Interrupted,
50    /// Cancellation pre-empted the request (`-32014`); outcome on the view.
51    Cancelled,
52    /// `sessionId` resolves to no session on this host; `data.sessionId` names
53    /// the rejected id.
54    SessionNotFound,
55    /// The session writer lease is held by another host (`-32021`).
56    SessionInUse,
57    /// More than one canonical retained log matches the session (`-32022`).
58    SessionAmbiguous,
59    /// A fork cut names an unknown or non-terminal turn (`-32023`).
60    ForkBoundaryInvalid,
61    /// Session exists but is not loaded on this host; `data.sessionId` names
62    /// the unloaded session.
63    SessionNotLoaded,
64    /// The resolved store's own stream id is not the requested session: a moved
65    /// or renamed session directory whose log belongs to a different session.
66    /// `data.sessionId` names the requested session.
67    SessionStreamMismatch,
68    /// A `session/start` choice is wider than the host ceiling on at least one
69    /// axis; `data.axes` names every too-wide axis with its requested and
70    /// ceiling values and `data.retryable` is `false`. Experimental tier with
71    /// the socket limits surface.
72    LimitsAboveMax,
73    /// A worktree action names an untrusted repository; `data.path` names the
74    /// subject repo and `data.retryable` is `false`. Experimental tier with the
75    /// worktree surface.
76    WorkspaceNotTrusted,
77    /// An command id was replayed with a different payload (`-32030`).
78    CommandRejected,
79    /// The bounded command-admission queue is full (`-32031`).
80    Backpressured,
81    /// A skill selector names no skill in the session's current user-invocable
82    /// catalog; `data.sessionId` and `data.selector` name the rejected pair.
83    SkillNotFound,
84    /// Computer use is unavailable on this host: its gate was off when the host
85    /// launched, or the host is not macOS. The `computerUseSettings/*` methods
86    /// stay registered and answer this.
87    ComputerUseUnavailable,
88    /// A plugin verb names no configured marketplace; `data.sessionId` and
89    /// `data.name` name the rejected pair.
90    MarketplaceNotFound,
91    /// The install arm names no plugin in the named store; `data.sessionId`,
92    /// `data.marketplace`, and `data.name` name the rejected triple.
93    PluginNotFound,
94    /// Marketplace add over an already-configured name; the existing record is
95    /// untouched. `data.sessionId` and `data.name` name the rejected pair.
96    MarketplaceAlreadyExists,
97    /// The managed policy disables plugin mutation; nothing was touched.
98    /// `data.sessionId` names the acting session.
99    PluginMutationsDisabled,
100    /// A `video` input part names an upload id with no completed upload;
101    /// `data.sessionId` and `data.uploadId` name the rejected pair.
102    UploadNotFound,
103    /// The requested range predates the retained view; `data.earliestCursor`
104    /// names the oldest servable position when one exists. Recovery is
105    /// `session/resume` snapshot semantics.
106    ViewTruncated,
107    /// An `item/readOutput` ref exists but its bytes are not servable;
108    /// `data.availability` carries the durable `ToolOutputAvailability`,
109    /// read-time-derived (`"unsupported"`/`"accessFailed"`) when the durable
110    /// record still says `available`.
111    OutputUnavailable,
112    /// A requested installed boundary has been pruned.
113    BoundaryPruned,
114    /// The installed boundary cannot safely serve the requested read
115    /// (`-32042` override).
116    BoundaryUnusable,
117    /// No installed boundary exists for the requested read
118    /// (`-32042` override).
119    NoBoundary,
120    /// Approval id is unknown (`-32050`).
121    ApprovalNotFound,
122    /// Approval already has a durable terminal (`-32051`).
123    ApprovalAlreadyResolved,
124    /// Choice or feedback is invalid for this approval (`-32052`).
125    ApprovalChoiceInvalid,
126    /// Requirement token is not the current stage (`-32053`).
127    ApprovalRequirementStale,
128    /// A protected write has no live reviewer lease (`-32054`).
129    ApprovalReviewerUnavailable,
130    /// User-input prompt id is unknown (`-32055`).
131    UserInputNotFound,
132    /// User-input prompt already has a durable settlement (`-32056`).
133    UserInputAlreadySettled,
134    /// Structured answer or clarification is invalid (`-32057`).
135    UserInputAnswerInvalid,
136    /// A raw-log cursor position names no position of the requested stream;
137    /// `data.stream` and `data.after` name the rejected anchor. Experimental
138    /// tier.
139    MissingAnchor,
140    /// A raw-log anchor (or the origin) falls in a retention-pruned prefix;
141    /// `data.nextAvailable` carries the earliest readable position.
142    /// Experimental tier.
143    PrunedPrefix,
144    /// A raw-log anchor id exists in the session but belongs to a different
145    /// stream. Experimental tier.
146    WrongStream,
147    /// No such stream in the session. Experimental tier.
148    UnknownStream,
149    /// No such registered projection. Experimental tier.
150    UnknownProjection,
151    /// Admission id is unknown; `data.sessionId` and `data.admissionId` name
152    /// the rejected pair. Experimental tier.
153    AdmissionNotFound,
154    /// Decide after the durable terminal; `data.admissionId` plus the winning
155    /// `data.admissionResolution`, `data.retryable: false`. Experimental tier.
156    AdmissionAlreadyResolved,
157    /// Choice is not among the current `availableChoices`; `data.admissionId`
158    /// and `data.choiceId` name the rejected pair. Experimental tier.
159    AdmissionChoiceInvalid,
160    /// A value from a newer host. The rest of the message still decodes, but
161    /// the word is not kept, and encoding this variant fails. Never construct it.
162    #[serde(other, skip_serializing)]
163    Unrecognized,
164}