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 drive-taking verb refused because this daemon is draining on the
69    /// binary-change upgrade path; `data.paths` names the canonical socket to
70    /// retry against and `data.retryable` is `true`. Experimental tier with the
71    /// socket surface.
72    DaemonDraining,
73    /// The daemon's startup credential or catalog step is still running;
74    /// `data.retryable` is `true` and the message names the pending step.
75    /// Experimental tier with the socket daemon surface.
76    StartupPending,
77    /// A `session/start` choice is wider than the host ceiling on at least one
78    /// axis; `data.axes` names every too-wide axis with its requested and
79    /// ceiling values and `data.retryable` is `false`. Experimental tier with
80    /// the socket limits surface.
81    LimitsAboveMax,
82    /// A worktree action names an untrusted repository; `data.path` names the
83    /// subject repo and `data.retryable` is `false`. Experimental tier with the
84    /// worktree surface.
85    WorkspaceNotTrusted,
86    /// An command id was replayed with a different payload (`-32030`).
87    CommandRejected,
88    /// The bounded command-admission queue is full (`-32031`).
89    Backpressured,
90    /// A skill selector names no skill in the session's current user-invocable
91    /// catalog; `data.sessionId` and `data.selector` name the rejected pair.
92    SkillNotFound,
93    /// Computer use is unavailable on this host: its gate was off when the host
94    /// launched, or the host is not macOS. The `computerUseSettings/*` methods
95    /// stay registered and answer this.
96    ComputerUseUnavailable,
97    /// A plugin verb names no configured marketplace; `data.sessionId` and
98    /// `data.name` name the rejected pair.
99    MarketplaceNotFound,
100    /// The install arm names no plugin in the named store; `data.sessionId`,
101    /// `data.marketplace`, and `data.name` name the rejected triple.
102    PluginNotFound,
103    /// Marketplace add over an already-configured name; the existing record is
104    /// untouched. `data.sessionId` and `data.name` name the rejected pair.
105    MarketplaceAlreadyExists,
106    /// The managed policy disables plugin mutation; nothing was touched.
107    /// `data.sessionId` names the acting session.
108    PluginMutationsDisabled,
109    /// A `video` input part names an upload id with no completed upload;
110    /// `data.sessionId` and `data.uploadId` name the rejected pair.
111    UploadNotFound,
112    /// The requested range predates the retained view; `data.earliestCursor`
113    /// names the oldest servable position when one exists. Recovery is
114    /// `session/resume` snapshot semantics.
115    ViewTruncated,
116    /// An `item/readOutput` ref exists but its bytes are not servable;
117    /// `data.availability` carries the durable `ToolOutputAvailability`,
118    /// read-time-derived (`"unsupported"`/`"accessFailed"`) when the durable
119    /// record still says `available`.
120    OutputUnavailable,
121    /// A requested installed boundary has been pruned.
122    BoundaryPruned,
123    /// The installed boundary cannot safely serve the requested read
124    /// (`-32042` override).
125    BoundaryUnusable,
126    /// No installed boundary exists for the requested read
127    /// (`-32042` override).
128    NoBoundary,
129    /// Approval id is unknown (`-32050`).
130    ApprovalNotFound,
131    /// Approval already has a durable terminal (`-32051`).
132    ApprovalAlreadyResolved,
133    /// Choice or feedback is invalid for this approval (`-32052`).
134    ApprovalChoiceInvalid,
135    /// Requirement token is not the current stage (`-32053`).
136    ApprovalRequirementStale,
137    /// A protected write has no live reviewer lease (`-32054`).
138    ApprovalReviewerUnavailable,
139    /// User-input prompt id is unknown (`-32055`).
140    UserInputNotFound,
141    /// User-input prompt already has a durable settlement (`-32056`).
142    UserInputAlreadySettled,
143    /// Structured answer or clarification is invalid (`-32057`).
144    UserInputAnswerInvalid,
145    /// A `computerUseTakeover` decide arrived while the Computer Use lock
146    /// broker was unreachable, before the approval was marked resolving
147    /// (`-32058`); the approval stays pending.
148    ApprovalBrokerUnavailable,
149    /// A decide arrived after a `computerUseTakeover` approval was marked
150    /// resolving and before its terminal record (`-32059`).
151    ApprovalResolving,
152    /// A raw-log cursor position names no position of the requested stream;
153    /// `data.stream` and `data.after` name the rejected anchor. Experimental
154    /// tier.
155    MissingAnchor,
156    /// A raw-log anchor (or the origin) falls in a retention-pruned prefix;
157    /// `data.nextAvailable` carries the earliest readable position.
158    /// Experimental tier.
159    PrunedPrefix,
160    /// A raw-log anchor id exists in the session but belongs to a different
161    /// stream. Experimental tier.
162    WrongStream,
163    /// No such stream in the session. Experimental tier.
164    UnknownStream,
165    /// No such registered projection. Experimental tier.
166    UnknownProjection,
167    /// Admission id is unknown; `data.sessionId` and `data.admissionId` name
168    /// the rejected pair. Experimental tier.
169    AdmissionNotFound,
170    /// Decide after the durable terminal; `data.admissionId` plus the winning
171    /// `data.admissionResolution`, `data.retryable: false`. Experimental tier.
172    AdmissionAlreadyResolved,
173    /// Choice is not among the current `availableChoices`; `data.admissionId`
174    /// and `data.choiceId` name the rejected pair. Experimental tier.
175    AdmissionChoiceInvalid,
176    /// A `usage/refresh` inside the per-host window; `data.retryAfterMs` is the
177    /// time left, `data.retryable: true`. Experimental tier.
178    UsageRefreshRateLimited,
179    /// A `usage/refresh` on a host with no Meta-account login to mint with.
180    /// Experimental tier.
181    UsageRefreshUnavailable,
182    /// A `usage/refresh` whose mint failed; `data.failureKind` names the class.
183    /// Experimental tier.
184    UsageRefreshFailed,
185    /// A value from a newer host. The rest of the message still decodes, but
186    /// the word is not kept, and encoding this variant fails. Never construct it.
187    #[serde(other, skip_serializing)]
188    Unrecognized,
189}