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