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