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