1use crate::CodeMeta;
13
14pub const ERR_AUBE_NO_LOCKFILE: &str = "ERR_AUBE_NO_LOCKFILE";
16pub const ERR_AUBE_LOCKFILE_PARSE: &str = "ERR_AUBE_LOCKFILE_PARSE";
17pub const ERR_AUBE_LOCKFILE_UNSUPPORTED_FORMAT: &str = "ERR_AUBE_LOCKFILE_UNSUPPORTED_FORMAT";
18pub const ERR_AUBE_RESOLUTION_SHAPE_MISMATCH: &str = "ERR_AUBE_RESOLUTION_SHAPE_MISMATCH";
19pub const ERR_AUBE_LOCKFILE_CONFIG_MISMATCH: &str = "ERR_AUBE_LOCKFILE_CONFIG_MISMATCH";
20pub const ERR_AUBE_UNSUPPORTED_NAMED_REGISTRY: &str = "ERR_AUBE_UNSUPPORTED_NAMED_REGISTRY";
21#[rustfmt::skip] pub const ERR_AUBE_UNSUPPORTED_PNPM_LOCKFILE_VERSION: &str = "ERR_AUBE_UNSUPPORTED_PNPM_LOCKFILE_VERSION";
22
23pub const ERR_AUBE_NO_MATCHING_VERSION: &str = "ERR_AUBE_NO_MATCHING_VERSION";
25pub const ERR_AUBE_NO_MATURE_MATCHING_VERSION: &str = "ERR_AUBE_NO_MATURE_MATCHING_VERSION";
26pub const ERR_AUBE_REGISTRY_ERROR: &str = "ERR_AUBE_REGISTRY_ERROR";
27pub const ERR_AUBE_UNKNOWN_CATALOG: &str = "ERR_AUBE_UNKNOWN_CATALOG";
28pub const ERR_AUBE_UNKNOWN_CATALOG_ENTRY: &str = "ERR_AUBE_UNKNOWN_CATALOG_ENTRY";
29pub const ERR_AUBE_BLOCKED_EXOTIC_SUBDEP: &str = "ERR_AUBE_BLOCKED_EXOTIC_SUBDEP";
30pub const ERR_AUBE_TRUST_DOWNGRADE: &str = "ERR_AUBE_TRUST_DOWNGRADE";
31pub const ERR_AUBE_TRUST_MISSING_TIME: &str = "ERR_AUBE_TRUST_MISSING_TIME";
32#[rustfmt::skip] pub const ERR_AUBE_TRUST_EXCLUDE_INVALID_VERSION_UNION: &str = "ERR_AUBE_TRUST_EXCLUDE_INVALID_VERSION_UNION";
36#[rustfmt::skip] pub const ERR_AUBE_TRUST_EXCLUDE_NAME_GLOB_WITH_VERSIONS: &str = "ERR_AUBE_TRUST_EXCLUDE_NAME_GLOB_WITH_VERSIONS";
37#[rustfmt::skip] pub const ERR_AUBE_EXOTIC_SUBDEP_EXCLUDE_HAS_VERSION: &str = "ERR_AUBE_EXOTIC_SUBDEP_EXCLUDE_HAS_VERSION";
38#[rustfmt::skip] pub const ERR_AUBE_EXOTIC_SUBDEP_EXCLUDE_INVALID_NAME: &str = "ERR_AUBE_EXOTIC_SUBDEP_EXCLUDE_INVALID_NAME";
39pub const ERR_AUBE_PEER_CONTEXT_NOT_CONVERGED: &str = "ERR_AUBE_PEER_CONTEXT_NOT_CONVERGED";
40
41pub const ERR_AUBE_PACKAGE_NOT_FOUND: &str = "ERR_AUBE_PACKAGE_NOT_FOUND";
43pub const ERR_AUBE_ACCESS_ENTITY_NOT_FOUND: &str = "ERR_AUBE_ACCESS_ENTITY_NOT_FOUND";
44pub const ERR_AUBE_VERSION_NOT_FOUND: &str = "ERR_AUBE_VERSION_NOT_FOUND";
45pub const ERR_AUBE_UNAUTHORIZED: &str = "ERR_AUBE_UNAUTHORIZED";
46pub const ERR_AUBE_OFFLINE: &str = "ERR_AUBE_OFFLINE";
47pub const ERR_AUBE_INVALID_PACKAGE_NAME: &str = "ERR_AUBE_INVALID_PACKAGE_NAME";
48pub const ERR_AUBE_REGISTRY_WRITE_REJECTED: &str = "ERR_AUBE_REGISTRY_WRITE_REJECTED";
49pub const ERR_AUBE_MALICIOUS_PACKAGE: &str = "ERR_AUBE_MALICIOUS_PACKAGE";
50pub const ERR_AUBE_SIMILAR_PACKAGE_NAME: &str = "ERR_AUBE_SIMILAR_PACKAGE_NAME";
51pub const ERR_AUBE_LOW_DOWNLOAD_PACKAGE: &str = "ERR_AUBE_LOW_DOWNLOAD_PACKAGE";
52pub const ERR_AUBE_NEW_PACKAGE_NAME: &str = "ERR_AUBE_NEW_PACKAGE_NAME";
53pub const ERR_AUBE_PACKAGE_AGE_CHECK_FAILED: &str = "ERR_AUBE_PACKAGE_AGE_CHECK_FAILED";
54pub const ERR_AUBE_ADVISORY_CHECK_FAILED: &str = "ERR_AUBE_ADVISORY_CHECK_FAILED";
55pub const ERR_AUBE_SECURITY_SCANNER_FATAL: &str = "ERR_AUBE_SECURITY_SCANNER_FATAL";
56pub const ERR_AUBE_SECURITY_SCANNER_FAILED: &str = "ERR_AUBE_SECURITY_SCANNER_FAILED";
57pub const ERR_AUBE_WEB_LOGIN_RESPONSE_TOO_LARGE: &str = "ERR_AUBE_WEB_LOGIN_RESPONSE_TOO_LARGE";
58
59pub const ERR_AUBE_TARBALL_INTEGRITY: &str = "ERR_AUBE_TARBALL_INTEGRITY";
61pub const ERR_AUBE_TARBALL_EXTRACT: &str = "ERR_AUBE_TARBALL_EXTRACT";
62pub const ERR_AUBE_PKG_CONTENT_MISMATCH: &str = "ERR_AUBE_PKG_CONTENT_MISMATCH";
63pub const ERR_AUBE_TARBALL_URL_MISMATCH: &str = "ERR_AUBE_TARBALL_URL_MISMATCH";
64pub const ERR_AUBE_NO_HOME: &str = "ERR_AUBE_NO_HOME";
65pub const ERR_AUBE_GIT_ERROR: &str = "ERR_AUBE_GIT_ERROR";
66pub const ERR_AUBE_STORE_INDEX_SCAN_FAILED: &str = "ERR_AUBE_STORE_INDEX_SCAN_FAILED";
67pub const ERR_AUBE_GVS_PRUNE_FAILED: &str = "ERR_AUBE_GVS_PRUNE_FAILED";
68pub const ERR_AUBE_STORE_PRUNE_LOCK_FAILED: &str = "ERR_AUBE_STORE_PRUNE_LOCK_FAILED";
69pub const ERR_AUBE_STORE_PRUNE_FAILED: &str = "ERR_AUBE_STORE_PRUNE_FAILED";
70
71pub const ERR_AUBE_LINK_FAILED: &str = "ERR_AUBE_LINK_FAILED";
73pub const ERR_AUBE_PATCH_FAILED: &str = "ERR_AUBE_PATCH_FAILED";
74pub const ERR_AUBE_MISSING_PACKAGE_INDEX: &str = "ERR_AUBE_MISSING_PACKAGE_INDEX";
75pub const ERR_AUBE_UNSAFE_INDEX_KEY: &str = "ERR_AUBE_UNSAFE_INDEX_KEY";
76pub const ERR_AUBE_UNSAFE_PACKAGE_NAME: &str = "ERR_AUBE_UNSAFE_PACKAGE_NAME";
77pub const ERR_AUBE_MISSING_STORE_FILE: &str = "ERR_AUBE_MISSING_STORE_FILE";
78pub const ERR_AUBE_UNSAFE_MODULES_DIR: &str = "ERR_AUBE_UNSAFE_MODULES_DIR";
79
80pub const ERR_AUBE_SCRIPT_SPAWN: &str = "ERR_AUBE_SCRIPT_SPAWN";
82pub const ERR_AUBE_SCRIPT_NON_ZERO_EXIT: &str = "ERR_AUBE_SCRIPT_NON_ZERO_EXIT";
83#[rustfmt::skip] pub const ERR_AUBE_BUILD_POLICY_UNSUPPORTED_VALUE: &str = "ERR_AUBE_BUILD_POLICY_UNSUPPORTED_VALUE";
84#[rustfmt::skip] pub const ERR_AUBE_BUILD_POLICY_INVALID_VERSION_UNION: &str = "ERR_AUBE_BUILD_POLICY_INVALID_VERSION_UNION";
85#[rustfmt::skip] pub const ERR_AUBE_BUILD_POLICY_WILDCARD_WITH_VERSION: &str = "ERR_AUBE_BUILD_POLICY_WILDCARD_WITH_VERSION";
86
87pub const ERR_AUBE_WORKSPACE_PARSE: &str = "ERR_AUBE_WORKSPACE_PARSE";
89pub const ERR_AUBE_FILTER_EMPTY: &str = "ERR_AUBE_FILTER_EMPTY";
90pub const ERR_AUBE_FILTER_GIT_IO: &str = "ERR_AUBE_FILTER_GIT_IO";
91pub const ERR_AUBE_FILTER_GIT_FAILED: &str = "ERR_AUBE_FILTER_GIT_FAILED";
92
93pub const ERR_AUBE_MANIFEST_PARSE: &str = "ERR_AUBE_MANIFEST_PARSE";
95pub const ERR_AUBE_MANIFEST_YAML_PARSE: &str = "ERR_AUBE_MANIFEST_YAML_PARSE";
96pub const ERR_AUBE_INVALID_PACKAGE_EXTENSION: &str = "ERR_AUBE_INVALID_PACKAGE_EXTENSION";
97
98pub const ERR_AUBE_UNSUPPORTED_ENGINE: &str = "ERR_AUBE_UNSUPPORTED_ENGINE";
100pub const ERR_AUBE_RECURSIVE_NOT_SUPPORTED: &str = "ERR_AUBE_RECURSIVE_NOT_SUPPORTED";
101pub const ERR_AUBE_UNKNOWN_COMMAND: &str = "ERR_AUBE_UNKNOWN_COMMAND";
102pub const ERR_AUBE_NPM_ONLY_COMMAND: &str = "ERR_AUBE_NPM_ONLY_COMMAND";
103pub const ERR_AUBE_COMPLETION_FAILED: &str = "ERR_AUBE_COMPLETION_FAILED";
104pub const ERR_AUBE_USAGE_SPEC_WRITE_FAILED: &str = "ERR_AUBE_USAGE_SPEC_WRITE_FAILED";
105pub const ERR_AUBE_REMOVE_PRIOR_INSTALL_DIR: &str = "ERR_AUBE_REMOVE_PRIOR_INSTALL_DIR";
106pub const ERR_AUBE_CONFIG_NESTED_AUBE_KEY: &str = "ERR_AUBE_CONFIG_NESTED_AUBE_KEY";
107pub const ERR_AUBE_CONFLICTING_BUILD_FLAGS: &str = "ERR_AUBE_CONFLICTING_BUILD_FLAGS";
108pub const ERR_AUBE_ACCESS_INVALID_ARGUMENT: &str = "ERR_AUBE_ACCESS_INVALID_ARGUMENT";
109pub const ERR_AUBE_PUBLISH_SOURCE_NOT_FOUND: &str = "ERR_AUBE_PUBLISH_SOURCE_NOT_FOUND";
110pub const ERR_AUBE_SHIM_CREATE_FAILED: &str = "ERR_AUBE_SHIM_CREATE_FAILED";
111pub const ERR_AUBE_SHIM_EXEC_FAILED: &str = "ERR_AUBE_SHIM_EXEC_FAILED";
112
113#[rustfmt::skip] pub const ERR_AUBE_RUNTIME_VERSION_UNSATISFIED: &str = "ERR_AUBE_RUNTIME_VERSION_UNSATISFIED";
115#[rustfmt::skip] pub const ERR_AUBE_RUNTIME_NO_MATCHING_VERSION: &str = "ERR_AUBE_RUNTIME_NO_MATCHING_VERSION";
116pub const ERR_AUBE_RUNTIME_DOWNLOAD_FAILED: &str = "ERR_AUBE_RUNTIME_DOWNLOAD_FAILED";
117#[rustfmt::skip] pub const ERR_AUBE_RUNTIME_CHECKSUM_MISMATCH: &str = "ERR_AUBE_RUNTIME_CHECKSUM_MISMATCH";
118pub const ERR_AUBE_RUNTIME_EXTRACT_FAILED: &str = "ERR_AUBE_RUNTIME_EXTRACT_FAILED";
119#[rustfmt::skip] pub const ERR_AUBE_RUNTIME_MISE_INSTALL_FAILED: &str = "ERR_AUBE_RUNTIME_MISE_INSTALL_FAILED";
120#[rustfmt::skip] pub const ERR_AUBE_RUNTIME_UNSUPPORTED_PLATFORM: &str = "ERR_AUBE_RUNTIME_UNSUPPORTED_PLATFORM";
121pub const ERR_AUBE_RUNTIME_IO: &str = "ERR_AUBE_RUNTIME_IO";
122#[rustfmt::skip] pub const ERR_AUBE_SELF_UPDATE_UNSUPPORTED_PLATFORM: &str = "ERR_AUBE_SELF_UPDATE_UNSUPPORTED_PLATFORM";
123
124pub const ERR_AUBE_INSTALL_CANCELLED: &str = "ERR_AUBE_INSTALL_CANCELLED";
126pub const ERR_AUBE_PATCHES_TRACKING_WRITE: &str = "ERR_AUBE_PATCHES_TRACKING_WRITE";
127pub const ERR_AUBE_UNSAFE_SHEBANG_INTERPRETER: &str = "ERR_AUBE_UNSAFE_SHEBANG_INTERPRETER";
128pub const ERR_AUBE_EMBED_INVALID_PROJECT: &str = "ERR_AUBE_EMBED_INVALID_PROJECT";
129pub const ERR_AUBE_EMBED_INSTALL_FAILED: &str = "ERR_AUBE_EMBED_INSTALL_FAILED";
130pub const ERR_AUBE_EMBED_INVALID_SETTING: &str = "ERR_AUBE_EMBED_INVALID_SETTING";
131pub const ERR_AUBE_EMBED_ALREADY_INITIALIZED: &str = "ERR_AUBE_EMBED_ALREADY_INITIALIZED";
132pub const ERR_AUBE_FFI_INVALID_ARGUMENT: &str = "ERR_AUBE_FFI_INVALID_ARGUMENT";
133pub const ERR_AUBE_FFI_UNKNOWN_HANDLE: &str = "ERR_AUBE_FFI_UNKNOWN_HANDLE";
134pub const ERR_AUBE_FFI_RUNTIME: &str = "ERR_AUBE_FFI_RUNTIME";
135pub const ERR_AUBE_FFI_PANIC: &str = "ERR_AUBE_FFI_PANIC";
136
137pub mod category {
141 pub const LOCKFILE: &str = "Lockfile";
142 pub const RESOLVER: &str = "Resolver";
143 pub const TARBALL_STORE: &str = "Tarball / store";
144 pub const REGISTRY_NETWORK: &str = "Registry / network";
145 pub const SCRIPTS: &str = "Scripts / build";
146 pub const LINKER: &str = "Linker";
147 pub const MANIFEST_WORKSPACE: &str = "Manifest / workspace";
148 pub const ENGINE_CLI: &str = "Engine / CLI";
149 pub const MISC_SAFETY: &str = "Misc / safety";
150 pub const SUPPLY_CHAIN: &str = "Supply chain (add-time)";
153}
154
155pub const ALL: &[CodeMeta] = &[
160 CodeMeta {
162 name: ERR_AUBE_NO_LOCKFILE,
163 category: category::LOCKFILE,
164 description: "An operation that required a lockfile (`--frozen-lockfile`, `aube fetch`, etc.) found none in the project.",
165 exit_code: Some(10),
166 },
167 CodeMeta {
168 name: ERR_AUBE_LOCKFILE_PARSE,
169 category: category::LOCKFILE,
170 description: "Lockfile is structurally invalid — version guard failed, YAML shape is wrong, or the contents couldn't be parsed.",
171 exit_code: Some(11),
172 },
173 CodeMeta {
174 name: ERR_AUBE_LOCKFILE_UNSUPPORTED_FORMAT,
175 category: category::LOCKFILE,
176 description: "Lockfile filename was recognized but its format isn't supported on this aube version.",
177 exit_code: Some(12),
178 },
179 CodeMeta {
180 name: ERR_AUBE_RESOLUTION_SHAPE_MISMATCH,
181 category: category::LOCKFILE,
182 description: "A registry-style lockfile dependency path is backed by a git, local directory, or direct tarball resolution.",
183 exit_code: Some(13),
184 },
185 CodeMeta {
186 name: ERR_AUBE_LOCKFILE_CONFIG_MISMATCH,
187 category: category::LOCKFILE,
188 description: "A frozen install found configuration, such as patch-file content, that no longer matches the lockfile.",
189 exit_code: Some(14),
190 },
191 CodeMeta {
192 name: ERR_AUBE_UNSUPPORTED_NAMED_REGISTRY,
193 category: category::LOCKFILE,
194 description: "A pnpm lockfile contains registry-qualified package identities that aube cannot safely resolve yet.",
195 exit_code: Some(15),
196 },
197 CodeMeta {
198 name: ERR_AUBE_UNSUPPORTED_PNPM_LOCKFILE_VERSION,
199 category: category::LOCKFILE,
200 description: "A pnpm lockfile aube cannot read: a `lockfileVersion` older than 9 (the pnpm 8.x and earlier formats), a malformed version, or a v9 header over a pre-v9 body.",
201 exit_code: Some(16),
202 },
203 CodeMeta {
205 name: ERR_AUBE_NO_MATCHING_VERSION,
206 category: category::RESOLVER,
207 description: "No published version of the named package satisfies the requested range.",
208 exit_code: Some(20),
209 },
210 CodeMeta {
211 name: ERR_AUBE_NO_MATURE_MATCHING_VERSION,
212 category: category::RESOLVER,
213 description: "A version satisfying the range exists but every candidate was younger than `minimumReleaseAge` and `minimumReleaseAgeStrict=true`.",
214 exit_code: Some(21),
215 },
216 CodeMeta {
217 name: ERR_AUBE_BLOCKED_EXOTIC_SUBDEP,
218 category: category::RESOLVER,
219 description: "Transitive dep used a `git:` / `file:` / `tarball` specifier and `blockExoticSubdeps=true`.",
220 exit_code: Some(22),
221 },
222 CodeMeta {
223 name: ERR_AUBE_TRUST_DOWNGRADE,
224 category: category::RESOLVER,
225 description: "Picked version dropped trust evidence the prior version had (`trustPolicy=no-downgrade`).",
226 exit_code: Some(23),
227 },
228 CodeMeta {
229 name: ERR_AUBE_TRUST_MISSING_TIME,
230 category: category::RESOLVER,
231 description: "Registry's packument has no `time` entry for the picked version (`trustPolicy=no-downgrade`).",
232 exit_code: Some(24),
233 },
234 CodeMeta {
235 name: ERR_AUBE_UNKNOWN_CATALOG,
236 category: category::RESOLVER,
237 description: "A `catalog:<name>` reference was used but the catalog isn't defined.",
238 exit_code: Some(25),
239 },
240 CodeMeta {
241 name: ERR_AUBE_UNKNOWN_CATALOG_ENTRY,
242 category: category::RESOLVER,
243 description: "The catalog exists but has no entry for the requested package.",
244 exit_code: Some(26),
245 },
246 CodeMeta {
247 name: ERR_AUBE_PEER_CONTEXT_NOT_CONVERGED,
248 category: category::RESOLVER,
249 description: "Peer-dependency resolution didn't converge after 16 passes — usually mutually-recursive peers.",
250 exit_code: Some(27),
251 },
252 CodeMeta {
253 name: ERR_AUBE_REGISTRY_ERROR,
254 category: category::RESOLVER,
255 description: "Generic registry error from inside the resolver.",
256 exit_code: None,
257 },
258 CodeMeta {
259 name: ERR_AUBE_TRUST_EXCLUDE_INVALID_VERSION_UNION,
260 category: category::RESOLVER,
261 description: "A `trustPolicyExclude` pattern had an invalid semver range.",
262 exit_code: None,
263 },
264 CodeMeta {
265 name: ERR_AUBE_TRUST_EXCLUDE_NAME_GLOB_WITH_VERSIONS,
266 category: category::RESOLVER,
267 description: "A `trustPolicyExclude` pattern combined a name glob with versions.",
268 exit_code: None,
269 },
270 CodeMeta {
271 name: ERR_AUBE_EXOTIC_SUBDEP_EXCLUDE_HAS_VERSION,
272 category: category::RESOLVER,
273 description: "A `blockExoticSubdepsExclude` entry carried a version selector, which cannot match an exotic dependency.",
274 exit_code: None,
275 },
276 CodeMeta {
277 name: ERR_AUBE_EXOTIC_SUBDEP_EXCLUDE_INVALID_NAME,
278 category: category::RESOLVER,
279 description: "A `blockExoticSubdepsExclude` entry was not a package name, so it could never match.",
280 exit_code: None,
281 },
282 CodeMeta {
284 name: ERR_AUBE_TARBALL_INTEGRITY,
285 category: category::TARBALL_STORE,
286 description: "Downloaded tarball's hash didn't match the lockfile's / packument's `dist.integrity`.",
287 exit_code: Some(30),
288 },
289 CodeMeta {
290 name: ERR_AUBE_TARBALL_EXTRACT,
291 category: category::TARBALL_STORE,
292 description: "Tarball couldn't be extracted (corrupt gzip, unexpected entry shape, etc.).",
293 exit_code: Some(31),
294 },
295 CodeMeta {
296 name: ERR_AUBE_PKG_CONTENT_MISMATCH,
297 category: category::TARBALL_STORE,
298 description: "Tarball's `package.json` declared a different `(name, version)` than the resolver expected (`strictStorePkgContentCheck=true`).",
299 exit_code: Some(32),
300 },
301 CodeMeta {
302 name: ERR_AUBE_GIT_ERROR,
303 category: category::TARBALL_STORE,
304 description: "Git operation failed during a `git:` dep prepare or checkout.",
305 exit_code: Some(33),
306 },
307 CodeMeta {
308 name: ERR_AUBE_TARBALL_URL_MISMATCH,
309 category: category::TARBALL_STORE,
310 description: "A registry lockfile entry's explicit tarball URL didn't match the registry metadata for that `(name, version)`.",
311 exit_code: Some(34),
312 },
313 CodeMeta {
314 name: ERR_AUBE_NO_HOME,
315 category: category::TARBALL_STORE,
316 description: "`HOME` (or platform equivalent) is unset, so aube can't locate its store.",
317 exit_code: None,
318 },
319 CodeMeta {
320 name: ERR_AUBE_STORE_INDEX_SCAN_FAILED,
321 category: category::TARBALL_STORE,
322 description: "A store maintenance command couldn't completely read or parse the cached package indexes.",
323 exit_code: None,
324 },
325 CodeMeta {
326 name: ERR_AUBE_GVS_PRUNE_FAILED,
327 category: category::TARBALL_STORE,
328 description: "The global virtual store project registry or prune walk failed.",
329 exit_code: None,
330 },
331 CodeMeta {
332 name: ERR_AUBE_STORE_PRUNE_LOCK_FAILED,
333 category: category::TARBALL_STORE,
334 description: "aube couldn't acquire the store-wide maintenance lock for pruning.",
335 exit_code: None,
336 },
337 CodeMeta {
338 name: ERR_AUBE_STORE_PRUNE_FAILED,
339 category: category::TARBALL_STORE,
340 description: "A planned content-store file couldn't be removed during pruning.",
341 exit_code: None,
342 },
343 CodeMeta {
345 name: ERR_AUBE_PACKAGE_NOT_FOUND,
346 category: category::REGISTRY_NETWORK,
347 description: "Registry returned 404 for the package name.",
348 exit_code: Some(40),
349 },
350 CodeMeta {
351 name: ERR_AUBE_ACCESS_ENTITY_NOT_FOUND,
352 category: category::REGISTRY_NETWORK,
353 description: "Registry returned 404 for an access user, organization, or team.",
354 exit_code: None,
355 },
356 CodeMeta {
357 name: ERR_AUBE_VERSION_NOT_FOUND,
358 category: category::REGISTRY_NETWORK,
359 description: "Package exists but the requested version doesn't.",
360 exit_code: Some(41),
361 },
362 CodeMeta {
363 name: ERR_AUBE_UNAUTHORIZED,
364 category: category::REGISTRY_NETWORK,
365 description: "Registry returned 401/403 — missing or invalid auth. Run `aube login`.",
366 exit_code: Some(42),
367 },
368 CodeMeta {
369 name: ERR_AUBE_WEB_LOGIN_RESPONSE_TOO_LARGE,
370 category: category::REGISTRY_NETWORK,
371 description: "The web-login token response exceeded the 64 KiB safety limit.",
372 exit_code: None,
373 },
374 CodeMeta {
375 name: ERR_AUBE_OFFLINE,
376 category: category::REGISTRY_NETWORK,
377 description: "Offline mode and the requested resource isn't in the local cache.",
378 exit_code: Some(43),
379 },
380 CodeMeta {
381 name: ERR_AUBE_INVALID_PACKAGE_NAME,
382 category: category::REGISTRY_NETWORK,
383 description: "A name doesn't match npm's grammar — rejected before any I/O so a hostile manifest can't turn a package name into an arbitrary filesystem path.",
384 exit_code: Some(44),
385 },
386 CodeMeta {
387 name: ERR_AUBE_REGISTRY_WRITE_REJECTED,
388 category: category::REGISTRY_NETWORK,
389 description: "Registry rejected a publish/deprecate/owner write with a non-2xx response.",
390 exit_code: Some(45),
391 },
392 CodeMeta {
393 name: ERR_AUBE_MALICIOUS_PACKAGE,
394 category: category::REGISTRY_NETWORK,
395 description: "`aube add` or an install's OSV advisory check (`advisoryCheck`, `advisoryCheckOnInstall`, `advisoryBloomCheck`) refused a package because OSV reports it as malicious (`MAL-*` advisory). Hard block — confirmed-malicious advisories aren't a judgement call.",
396 exit_code: Some(46),
397 },
398 CodeMeta {
399 name: ERR_AUBE_SIMILAR_PACKAGE_NAME,
400 category: category::SUPPLY_CHAIN,
401 description: "`aube add` refused a package whose name closely resembles a more popular npm package. This protects against typosquatting and slopsquatting.",
402 exit_code: None,
403 },
404 CodeMeta {
405 name: ERR_AUBE_LOW_DOWNLOAD_PACKAGE,
406 category: category::REGISTRY_NETWORK,
407 description: "`aube add` refused a package whose weekly downloads fall below `lowDownloadThreshold` in a non-interactive context (or when stdin is not a TTY). Pass `--allow-low-downloads` to bypass.",
408 exit_code: Some(47),
409 },
410 CodeMeta {
411 name: ERR_AUBE_NEW_PACKAGE_NAME,
412 category: category::SUPPLY_CHAIN,
413 description: "`aube add` refused a package name first published within `minimumPackageAge`. This protects against newly registered slopsquatting names.",
414 exit_code: None,
415 },
416 CodeMeta {
417 name: ERR_AUBE_PACKAGE_AGE_CHECK_FAILED,
418 category: category::SUPPLY_CHAIN,
419 description: "`aube add` couldn't verify a package name's registry creation time while `minimumPackageAge` was enabled, so the package-age gate failed closed.",
420 exit_code: None,
421 },
422 CodeMeta {
423 name: ERR_AUBE_ADVISORY_CHECK_FAILED,
424 category: category::REGISTRY_NETWORK,
425 description: "An OSV advisory check couldn't complete — the live API was unreachable, or the local mirror / bloom filter couldn't refresh — and the governing setting (`advisoryCheck`, `advisoryCheckOnInstall`, or `advisoryBloomCheck`) is `required`. Distinct from `ERR_AUBE_MALICIOUS_PACKAGE` so CI tooling can tell a network outage from a confirmed malicious advisory.",
426 exit_code: Some(49),
427 },
428 CodeMeta {
429 name: ERR_AUBE_SECURITY_SCANNER_FATAL,
430 category: category::SUPPLY_CHAIN,
431 description: "User-configured `securityScanner` returned a `fatal`-level advisory against a package the user is trying to add. Bun-style pluggable scanner contract; the scanner itself decides what counts as fatal.",
432 exit_code: Some(48),
433 },
434 CodeMeta {
435 name: ERR_AUBE_SECURITY_SCANNER_FAILED,
436 category: category::SUPPLY_CHAIN,
437 description: "User-configured `securityScanner` couldn't be spawned, exited non-zero, timed out, or emitted unparseable JSON. Fail-closed by design: a configured scanner that can't run is treated as a refusal, not a free pass. Set `securityScanner = \"\"` to disable the integration when bootstrapping or recovering from a broken scanner.",
438 exit_code: None,
439 },
440 CodeMeta {
442 name: ERR_AUBE_SCRIPT_NON_ZERO_EXIT,
443 category: category::SCRIPTS,
444 description: "A lifecycle script (`preinstall` / `install` / `postinstall` / a `package.json` script) exited non-zero.",
445 exit_code: Some(50),
446 },
447 CodeMeta {
448 name: ERR_AUBE_SCRIPT_SPAWN,
449 category: category::SCRIPTS,
450 description: "Couldn't spawn a script's interpreter (shell missing, jail setup failed, etc.).",
451 exit_code: Some(51),
452 },
453 CodeMeta {
454 name: ERR_AUBE_BUILD_POLICY_UNSUPPORTED_VALUE,
455 category: category::SCRIPTS,
456 description: "An entry in `allowBuilds` had a value that wasn't `true`/`false`.",
457 exit_code: None,
458 },
459 CodeMeta {
460 name: ERR_AUBE_BUILD_POLICY_INVALID_VERSION_UNION,
461 category: category::SCRIPTS,
462 description: "An `allowBuilds` pattern's version union was unparseable.",
463 exit_code: None,
464 },
465 CodeMeta {
466 name: ERR_AUBE_BUILD_POLICY_WILDCARD_WITH_VERSION,
467 category: category::SCRIPTS,
468 description: "An `allowBuilds` pattern combined a wildcard name with a version union.",
469 exit_code: None,
470 },
471 CodeMeta {
473 name: ERR_AUBE_PATCH_FAILED,
474 category: category::LINKER,
475 description: "Applying a `pnpm.patchedDependencies` patch failed.",
476 exit_code: Some(60),
477 },
478 CodeMeta {
479 name: ERR_AUBE_LINK_FAILED,
480 category: category::LINKER,
481 description: "Symlink / junction / hardlink couldn't be created — usually permissions or filesystem support.",
482 exit_code: Some(61),
483 },
484 CodeMeta {
485 name: ERR_AUBE_MISSING_PACKAGE_INDEX,
486 category: category::LINKER,
487 description: "A package could not be linked because its store index was unavailable and the package was not already materialized. Re-run the install; if it persists, report it at https://github.com/aubepkg/aube/discussions.",
488 exit_code: Some(62),
489 },
490 CodeMeta {
491 name: ERR_AUBE_MISSING_STORE_FILE,
492 category: category::LINKER,
493 description: "A package index references a CAS shard that doesn't exist on disk. Re-run install to re-fetch.",
494 exit_code: Some(63),
495 },
496 CodeMeta {
497 name: ERR_AUBE_UNSAFE_MODULES_DIR,
498 category: category::LINKER,
499 description: "The configured modules directory resolves to the project root or outside it, where linker cleanup could remove unrelated files.",
500 exit_code: Some(64),
501 },
502 CodeMeta {
504 name: ERR_AUBE_MANIFEST_PARSE,
505 category: category::MANIFEST_WORKSPACE,
506 description: "A `package.json` had a syntax error. The diagnostic points at the offending byte.",
507 exit_code: Some(70),
508 },
509 CodeMeta {
510 name: ERR_AUBE_WORKSPACE_PARSE,
511 category: category::MANIFEST_WORKSPACE,
512 description: "An `aube-workspace.yaml` / `pnpm-workspace.yaml` was structurally invalid.",
513 exit_code: Some(71),
514 },
515 CodeMeta {
516 name: ERR_AUBE_MANIFEST_YAML_PARSE,
517 category: category::MANIFEST_WORKSPACE,
518 description: "A workspace YAML helper file was structurally invalid (no source pointer available).",
519 exit_code: None,
520 },
521 CodeMeta {
522 name: ERR_AUBE_INVALID_PACKAGE_EXTENSION,
523 category: category::MANIFEST_WORKSPACE,
524 description: "A `packageExtensions` entry had an invalid object shape or non-string dependency range.",
525 exit_code: None,
526 },
527 CodeMeta {
528 name: ERR_AUBE_FILTER_EMPTY,
529 category: category::MANIFEST_WORKSPACE,
530 description: "`--filter` was passed an empty selector.",
531 exit_code: None,
532 },
533 CodeMeta {
534 name: ERR_AUBE_FILTER_GIT_IO,
535 category: category::MANIFEST_WORKSPACE,
536 description: "A `--filter ...[ref]` selector failed to spawn `git`.",
537 exit_code: None,
538 },
539 CodeMeta {
540 name: ERR_AUBE_FILTER_GIT_FAILED,
541 category: category::MANIFEST_WORKSPACE,
542 description: "The git subprocess for a `--filter ...[ref]` selector exited non-zero.",
543 exit_code: None,
544 },
545 CodeMeta {
547 name: ERR_AUBE_UNSUPPORTED_ENGINE,
548 category: category::ENGINE_CLI,
549 description: "One or more packages declared an `engines` constraint incompatible with the running Node/aube and `engine-strict=true`.",
550 exit_code: Some(80),
551 },
552 CodeMeta {
553 name: ERR_AUBE_UNKNOWN_COMMAND,
554 category: category::ENGINE_CLI,
555 description: "The named subcommand isn't a built-in aube command and isn't a script in the manifest.",
556 exit_code: Some(81),
557 },
558 CodeMeta {
559 name: ERR_AUBE_NPM_ONLY_COMMAND,
560 category: category::ENGINE_CLI,
561 description: "The user invoked an npm-only command (`whoami`, `token`, `owner`, `search`, `pkg`, `set-script`, `stage`) — aube doesn't implement these; run them with npm, or set `npmPath` to let aube delegate them.",
562 exit_code: Some(82),
563 },
564 CodeMeta {
565 name: ERR_AUBE_RECURSIVE_NOT_SUPPORTED,
566 category: category::ENGINE_CLI,
567 description: "A command was invoked under `--recursive` but doesn't support recursive execution.",
568 exit_code: None,
569 },
570 CodeMeta {
571 name: ERR_AUBE_COMPLETION_FAILED,
572 category: category::ENGINE_CLI,
573 description: "`aube completion` couldn't invoke `usage` to render the shell completions.",
574 exit_code: None,
575 },
576 CodeMeta {
577 name: ERR_AUBE_USAGE_SPEC_WRITE_FAILED,
578 category: category::ENGINE_CLI,
579 description: "`aube usage` couldn't write the CLI spec to stdout; the output would have been truncated.",
580 exit_code: None,
581 },
582 CodeMeta {
583 name: ERR_AUBE_REMOVE_PRIOR_INSTALL_DIR,
584 category: category::ENGINE_CLI,
585 description: "Couldn't clean up a prior global install dir before re-installing.",
586 exit_code: None,
587 },
588 CodeMeta {
589 name: ERR_AUBE_CONFIG_NESTED_AUBE_KEY,
590 category: category::ENGINE_CLI,
591 description: "`aube config set <prefix>.<sub> …` was used for a key whose prefix is an aube map setting (e.g. `allowBuilds.<pkg>`). Such nested writes would otherwise land in `.npmrc` where aube doesn't read them and npm warns/errors about the unknown key — set the map in workspace yaml or `package.json#aube.<prefix>` instead.",
592 exit_code: None,
593 },
594 CodeMeta {
595 name: ERR_AUBE_CONFLICTING_BUILD_FLAGS,
596 category: category::ENGINE_CLI,
597 description: "`aube add` was passed the same package name in both `--allow-build` and `--deny-build`.",
598 exit_code: None,
599 },
600 CodeMeta {
601 name: ERR_AUBE_ACCESS_INVALID_ARGUMENT,
602 category: category::ENGINE_CLI,
603 description: "`aube access` received an invalid access setting, permission level, team, or package argument.",
604 exit_code: None,
605 },
606 CodeMeta {
607 name: ERR_AUBE_PUBLISH_SOURCE_NOT_FOUND,
608 category: category::ENGINE_CLI,
609 description: "`aube publish` was given a package directory or tarball path that doesn't exist.",
610 exit_code: None,
611 },
612 CodeMeta {
613 name: ERR_AUBE_SHIM_CREATE_FAILED,
614 category: category::ENGINE_CLI,
615 description: "`aube activate <shell>` couldn't create or refresh an executable shim in aube's shim directory.",
616 exit_code: None,
617 },
618 CodeMeta {
619 name: ERR_AUBE_SHIM_EXEC_FAILED,
620 category: category::ENGINE_CLI,
621 description: "A runtime tool shim resolved its target but couldn't exec or spawn the selected tool.",
622 exit_code: None,
623 },
624 CodeMeta {
626 name: ERR_AUBE_RUNTIME_VERSION_UNSATISFIED,
627 category: category::ENGINE_CLI,
628 description: "The project requires a Node.js version that isn't available and policy forbids fetching it (`devEngines.runtime` with `onFail: \"error\"`, `runtimeOnFail=error`, or offline mode with nothing installed).",
629 exit_code: Some(83),
630 },
631 CodeMeta {
632 name: ERR_AUBE_RUNTIME_NO_MATCHING_VERSION,
633 category: category::ENGINE_CLI,
634 description: "No Node.js release in the dist index satisfies the requested version (bad range, unknown LTS codename, or no build for this platform).",
635 exit_code: Some(84),
636 },
637 CodeMeta {
638 name: ERR_AUBE_RUNTIME_DOWNLOAD_FAILED,
639 category: category::ENGINE_CLI,
640 description: "Fetching the Node.js dist index, checksum file, or release archive failed after retries.",
641 exit_code: Some(85),
642 },
643 CodeMeta {
644 name: ERR_AUBE_RUNTIME_CHECKSUM_MISMATCH,
645 category: category::ENGINE_CLI,
646 description: "A downloaded Node.js archive's SHA-256 didn't match the lockfile pin or `SHASUMS256.txt`. The archive is discarded and never retried automatically.",
647 exit_code: Some(86),
648 },
649 CodeMeta {
650 name: ERR_AUBE_RUNTIME_EXTRACT_FAILED,
651 category: category::ENGINE_CLI,
652 description: "A Node.js release archive was corrupt or contained unsafe entry paths.",
653 exit_code: Some(87),
654 },
655 CodeMeta {
656 name: ERR_AUBE_RUNTIME_MISE_INSTALL_FAILED,
657 category: category::ENGINE_CLI,
658 description: "Delegating a Node.js install to mise failed — `mise install node@<version>` exited non-zero or the install wasn't discoverable afterwards. Fatal only under `runtimeInstaller=mise`; `auto` falls back to aube's own download.",
659 exit_code: Some(88),
660 },
661 CodeMeta {
662 name: ERR_AUBE_RUNTIME_UNSUPPORTED_PLATFORM,
663 category: category::ENGINE_CLI,
664 description: "No official Node.js build exists for this OS/architecture/libc. Set `nodeDownloadMirrors` to a mirror that carries one, or install Node via mise/system.",
665 exit_code: Some(89),
666 },
667 CodeMeta {
668 name: ERR_AUBE_RUNTIME_IO,
669 category: category::ENGINE_CLI,
670 description: "A filesystem operation in the runtime store failed (lock acquisition, staging, or publishing an install). Not a download failure — the message names the failing path.",
671 exit_code: None,
672 },
673 CodeMeta {
674 name: ERR_AUBE_SELF_UPDATE_UNSUPPORTED_PLATFORM,
675 category: category::ENGINE_CLI,
676 description: "`aube self-update` has no published aube release archive for this OS/architecture (e.g. FreeBSD, Intel macOS). Install aube via your system package manager or mise. Distinct from `ERR_AUBE_RUNTIME_UNSUPPORTED_PLATFORM`, which is about the Node.js download.",
677 exit_code: None,
678 },
679 CodeMeta {
681 name: ERR_AUBE_INSTALL_CANCELLED,
682 category: category::MISC_SAFETY,
683 description: "An in-process install was cooperatively cancelled by its embedding host. Cancellation is observed at safe install boundaries so an in-flight filesystem phase is not abandoned mid-mutation.",
684 exit_code: None,
685 },
686 CodeMeta {
687 name: ERR_AUBE_UNSAFE_INDEX_KEY,
688 category: category::MISC_SAFETY,
689 description: "A package index key tried to escape its directory (path traversal defense in depth).",
690 exit_code: Some(90),
691 },
692 CodeMeta {
693 name: ERR_AUBE_UNSAFE_SHEBANG_INTERPRETER,
694 category: category::MISC_SAFETY,
695 description: "A `#!` shebang named an unsafe interpreter when generating a shim — substituted with `node` instead. Reported as an error, but install continues.",
696 exit_code: Some(91),
697 },
698 CodeMeta {
699 name: ERR_AUBE_EMBED_INVALID_PROJECT,
700 category: category::MISC_SAFETY,
701 description: "An in-process embedder was given a project directory that could not be created, inspected, or resolved.",
702 exit_code: None,
703 },
704 CodeMeta {
705 name: ERR_AUBE_EMBED_INSTALL_FAILED,
706 category: category::MISC_SAFETY,
707 description: "An in-process embedder could not initialize its host callback or received an install failure without a more specific stable code.",
708 exit_code: None,
709 },
710 CodeMeta {
711 name: ERR_AUBE_EMBED_INVALID_SETTING,
712 category: category::MISC_SAFETY,
713 description: "An in-process embedder passed a setting default whose name is not a canonical aube setting.",
714 exit_code: None,
715 },
716 CodeMeta {
717 name: ERR_AUBE_EMBED_ALREADY_INITIALIZED,
718 category: category::MISC_SAFETY,
719 description: "An in-process embedder tried to register setting defaults after the process already initialized its embedder profile.",
720 exit_code: None,
721 },
722 CodeMeta {
723 name: ERR_AUBE_FFI_INVALID_ARGUMENT,
724 category: category::MISC_SAFETY,
725 description: "A C ABI call received a null pointer, invalid UTF-8, malformed JSON, or an unsupported option value.",
726 exit_code: None,
727 },
728 CodeMeta {
729 name: ERR_AUBE_FFI_UNKNOWN_HANDLE,
730 category: category::MISC_SAFETY,
731 description: "A C ABI wait or cancellation call referenced an unknown or already-consumed operation handle.",
732 exit_code: None,
733 },
734 CodeMeta {
735 name: ERR_AUBE_FFI_RUNTIME,
736 category: category::MISC_SAFETY,
737 description: "The C ABI could not initialize or use its internal asynchronous runtime.",
738 exit_code: None,
739 },
740 CodeMeta {
741 name: ERR_AUBE_FFI_PANIC,
742 category: category::MISC_SAFETY,
743 description: "A panic was caught at the C ABI boundary before it could cross into the host process.",
744 exit_code: None,
745 },
746 CodeMeta {
747 name: ERR_AUBE_UNSAFE_PACKAGE_NAME,
748 category: category::MISC_SAFETY,
749 description: "A package/dependency alias would escape its `node_modules` slot if linked.",
750 exit_code: Some(92),
751 },
752 CodeMeta {
753 name: ERR_AUBE_PATCHES_TRACKING_WRITE,
754 category: category::MISC_SAFETY,
755 description: "Couldn't write `.aube-applied-patches.json` after applying patches. Non-fatal; next install may miss stale patched entries.",
756 exit_code: None,
757 },
758];