@arcforge/err 2.0.103 → 2.0.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/map.ts +230 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcforge/err",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.105",
|
|
4
4
|
"description": "Structured Axon errors — the code map every user-facing failure is rendered from.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"deploy": "echo \"This package is published ONLY by apps/tui/scripts/release.ts, which pins workspace:* deps to concrete versions first. Publishing it directly ships an unresolvable dependency.\" && exit 1"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@arcforge/types": "2.0.
|
|
18
|
+
"@arcforge/types": "2.0.105"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/bun": "latest",
|
package/src/map.ts
CHANGED
|
@@ -210,7 +210,7 @@ export const errorMap = {
|
|
|
210
210
|
severity: "fatal",
|
|
211
211
|
},
|
|
212
212
|
|
|
213
|
-
// ── Project (build/project/
|
|
213
|
+
// ── Project (build/project/) ────────────────────────────────────────────
|
|
214
214
|
MODULE_SPECIFIER_INVALID: {
|
|
215
215
|
code: "AX-PROJECT-005",
|
|
216
216
|
title: "Invalid Module Specifier",
|
|
@@ -249,12 +249,19 @@ export const errorMap = {
|
|
|
249
249
|
severity: "fatal",
|
|
250
250
|
},
|
|
251
251
|
CORRUPT_JSON: {
|
|
252
|
-
code: "AX-PROJECT-
|
|
252
|
+
code: "AX-PROJECT-016",
|
|
253
253
|
title: "Corrupt JSON File",
|
|
254
254
|
description: "A stored JSON file failed to parse — it may have been hand-edited into an invalid state, or a write was interrupted mid-flight.",
|
|
255
255
|
source: "manifest",
|
|
256
256
|
severity: "fatal",
|
|
257
257
|
},
|
|
258
|
+
FILE_UNREADABLE: {
|
|
259
|
+
code: "AX-PROJECT-032",
|
|
260
|
+
title: "File Could Not Be Read",
|
|
261
|
+
description: "A file exists but could not be read — most often a permissions problem, a directory where a file was expected, or a disk error. Distinct from a missing file, which is an ordinary absent-surface state.",
|
|
262
|
+
source: "manifest",
|
|
263
|
+
severity: "fatal",
|
|
264
|
+
},
|
|
258
265
|
PROVIDER_NOT_CONNECTED: {
|
|
259
266
|
code: "AX-TUI-011",
|
|
260
267
|
title: "Provider Not Connected",
|
|
@@ -279,7 +286,7 @@ export const errorMap = {
|
|
|
279
286
|
|
|
280
287
|
// ── Project (build/project/*.ts) ────────────────────────────────────────
|
|
281
288
|
PROJECT_NOT_FOUND: {
|
|
282
|
-
code: "AX-PROJECT-
|
|
289
|
+
code: "AX-PROJECT-017",
|
|
283
290
|
title: "Project Not Found",
|
|
284
291
|
description: "No axon.config.ts, module.config.ts, cognet.config.ts, bench.config.ts, or prompt.config.ts was found at this path — it isn't a recognized project directory.",
|
|
285
292
|
source: "manifest",
|
|
@@ -293,7 +300,7 @@ export const errorMap = {
|
|
|
293
300
|
severity: "fatal",
|
|
294
301
|
},
|
|
295
302
|
PROJECT_EXISTS: {
|
|
296
|
-
code: "AX-PROJECT-
|
|
303
|
+
code: "AX-PROJECT-018",
|
|
297
304
|
title: "Project Already Exists",
|
|
298
305
|
description: "Scaffolding refused to overwrite a directory that already exists — remove it or pick a different name first.",
|
|
299
306
|
source: "manifest",
|
|
@@ -349,7 +356,7 @@ export const errorMap = {
|
|
|
349
356
|
severity: "fatal",
|
|
350
357
|
},
|
|
351
358
|
BUNDLE_MODULE_COLLISION: {
|
|
352
|
-
code: "AX-PROJECT-
|
|
359
|
+
code: "AX-PROJECT-019",
|
|
353
360
|
title: "Module Name Collision",
|
|
354
361
|
description: "A hard-imported source module's name collides with an already-installed registry module of the same name.",
|
|
355
362
|
source: "manifest",
|
|
@@ -363,14 +370,14 @@ export const errorMap = {
|
|
|
363
370
|
severity: "fatal",
|
|
364
371
|
},
|
|
365
372
|
BUNDLE_TAR_MISSING: {
|
|
366
|
-
code: "AX-PROJECT-
|
|
373
|
+
code: "AX-PROJECT-020",
|
|
367
374
|
title: "tar Not Found",
|
|
368
375
|
description: "Bundling shells out to the system's tar binary, which isn't on PATH — install Git for Windows or use WSL on that platform.",
|
|
369
376
|
source: "manifest",
|
|
370
377
|
severity: "fatal",
|
|
371
378
|
},
|
|
372
379
|
BUNDLE_TAR_FAILED: {
|
|
373
|
-
code: "AX-PROJECT-
|
|
380
|
+
code: "AX-PROJECT-021",
|
|
374
381
|
title: "tar Failed",
|
|
375
382
|
description: "The tar subprocess exited non-zero while building a bundle archive.",
|
|
376
383
|
source: "manifest",
|
|
@@ -923,7 +930,7 @@ export const errorMap = {
|
|
|
923
930
|
severity: "degraded",
|
|
924
931
|
},
|
|
925
932
|
|
|
926
|
-
// ── TUI (useAgents.ts / platform/build/
|
|
933
|
+
// ── TUI (useAgents.ts / platform/build/runtime / platform/store / platform/services/cloud) ──
|
|
927
934
|
NOT_BOOTED: {
|
|
928
935
|
code: "AX-TUI-001",
|
|
929
936
|
title: "No Agent Running",
|
|
@@ -1136,6 +1143,221 @@ export const errorMap = {
|
|
|
1136
1143
|
source: "runtime",
|
|
1137
1144
|
severity: "fatal",
|
|
1138
1145
|
},
|
|
1146
|
+
|
|
1147
|
+
// ── Registry retrieval (build/registry.ts) ──────────────────────────────
|
|
1148
|
+
CLONE_REF_REQUIRED: {
|
|
1149
|
+
code: "AX-PROJECT-022",
|
|
1150
|
+
title: "No Artifact Named",
|
|
1151
|
+
description: "`axon clone` was run without an artifact to clone. Name one, for example: axon clone @axon/arxiv",
|
|
1152
|
+
source: "cli",
|
|
1153
|
+
severity: "fatal",
|
|
1154
|
+
},
|
|
1155
|
+
FORK_REF_REQUIRED: {
|
|
1156
|
+
code: "AX-PROJECT-023",
|
|
1157
|
+
title: "No Artifact Named",
|
|
1158
|
+
description: "`axon fork` was run without an artifact to fork. Name one, for example: axon fork @axon/arxiv --as @you/arxiv",
|
|
1159
|
+
source: "cli",
|
|
1160
|
+
severity: "fatal",
|
|
1161
|
+
},
|
|
1162
|
+
FORK_NAME_REQUIRED: {
|
|
1163
|
+
code: "AX-PROJECT-024",
|
|
1164
|
+
title: "Fork Needs A New Name",
|
|
1165
|
+
description: "A fork is published under your own namespace, so it needs a name: pass --as <package-name>, for example: axon fork @axon/arxiv --as @you/arxiv",
|
|
1166
|
+
source: "cli",
|
|
1167
|
+
severity: "fatal",
|
|
1168
|
+
},
|
|
1169
|
+
CLONE_TARGET_EXISTS: {
|
|
1170
|
+
code: "AX-PROJECT-025",
|
|
1171
|
+
title: "Clone Target Not Empty",
|
|
1172
|
+
description: "The directory the artifact would be cloned into already has files in it. Clone into a new directory, or clear this one first.",
|
|
1173
|
+
source: "cli",
|
|
1174
|
+
severity: "fatal",
|
|
1175
|
+
},
|
|
1176
|
+
ARTIFACT_DOWNLOAD_FAILED: {
|
|
1177
|
+
code: "AX-PROJECT-026",
|
|
1178
|
+
title: "Artifact Download Failed",
|
|
1179
|
+
description: "The registry did not serve the artifact's source archive. The version may have been unpublished, or the network request failed.",
|
|
1180
|
+
source: "cli",
|
|
1181
|
+
severity: "fatal",
|
|
1182
|
+
},
|
|
1183
|
+
ARTIFACT_EXTRACT_FAILED: {
|
|
1184
|
+
code: "AX-PROJECT-027",
|
|
1185
|
+
title: "Artifact Extract Failed",
|
|
1186
|
+
description: "The downloaded archive could not be unpacked. It may be truncated, or `tar` is unavailable on this machine.",
|
|
1187
|
+
source: "cli",
|
|
1188
|
+
severity: "fatal",
|
|
1189
|
+
},
|
|
1190
|
+
|
|
1191
|
+
// ── Project frame (build/project/) ──────────────────────────────────────
|
|
1192
|
+
VERSION_INVALID: {
|
|
1193
|
+
code: "AX-PROJECT-028",
|
|
1194
|
+
title: "Invalid Version",
|
|
1195
|
+
description: "The project's package.json version is not valid semver, so the next version cannot be derived from it. Fix the version field by hand.",
|
|
1196
|
+
source: "cli",
|
|
1197
|
+
severity: "fatal",
|
|
1198
|
+
},
|
|
1199
|
+
FRAMEWORK_NOT_INSTALLED: {
|
|
1200
|
+
code: "AX-PROJECT-029",
|
|
1201
|
+
title: "Framework Packages Not Installed",
|
|
1202
|
+
description: "The generated type frame references @arcforge/types, @arcforge/engines and h3, none of which resolve from this project. Run `bun install` before `axon prepare`.",
|
|
1203
|
+
source: "cli",
|
|
1204
|
+
severity: "fatal",
|
|
1205
|
+
},
|
|
1206
|
+
CONFIG_EVALUATION_ESCAPED: {
|
|
1207
|
+
code: "AX-PROJECT-030",
|
|
1208
|
+
title: "defineAgent() Called Outside Config Evaluation",
|
|
1209
|
+
description: "defineAgent() ran outside the loader that evaluates axon.config.ts — it is a declaration helper, not a runtime function, and cannot be called from application code.",
|
|
1210
|
+
source: "cli",
|
|
1211
|
+
severity: "fatal",
|
|
1212
|
+
},
|
|
1213
|
+
PORT_UNAVAILABLE: {
|
|
1214
|
+
code: "AX-PROJECT-031",
|
|
1215
|
+
title: "No Free Port",
|
|
1216
|
+
description: "Every port in the range the agent scanned is already in use. Stop whatever is holding them, or start the agent on a different port.",
|
|
1217
|
+
source: "cli",
|
|
1218
|
+
severity: "fatal",
|
|
1219
|
+
},
|
|
1220
|
+
|
|
1221
|
+
// ── Subagents (build/agent/agents.ts) ───────────────────────────────────
|
|
1222
|
+
PARENT_INSTANCE_NOT_RUNNING: {
|
|
1223
|
+
code: "AX-RUNTIME-005",
|
|
1224
|
+
title: "Parent Agent Not Running",
|
|
1225
|
+
description: "A subagent was requested against a parent session that is no longer live — the parent shut down, crashed, or was never booted by this process.",
|
|
1226
|
+
source: "runtime",
|
|
1227
|
+
severity: "fatal",
|
|
1228
|
+
},
|
|
1229
|
+
SUBAGENT_DEPTH_EXCEEDED: {
|
|
1230
|
+
code: "AX-RUNTIME-006",
|
|
1231
|
+
title: "Subagent Depth Limit Reached",
|
|
1232
|
+
description: "An agent tried to spawn a subagent beyond the maximum nesting depth. The limit exists so a recursive delegation cannot spawn processes without bound.",
|
|
1233
|
+
source: "runtime",
|
|
1234
|
+
severity: "fatal",
|
|
1235
|
+
},
|
|
1236
|
+
SUBAGENT_CHILD_LIMIT_EXCEEDED: {
|
|
1237
|
+
code: "AX-RUNTIME-007",
|
|
1238
|
+
title: "Subagent Child Limit Reached",
|
|
1239
|
+
description: "One agent tried to hold more live children than the limit allows. Existing children must finish before more can be spawned.",
|
|
1240
|
+
source: "runtime",
|
|
1241
|
+
severity: "fatal",
|
|
1242
|
+
},
|
|
1243
|
+
SUBAGENT_DESCENDANT_LIMIT_EXCEEDED: {
|
|
1244
|
+
code: "AX-RUNTIME-008",
|
|
1245
|
+
title: "Subagent Descendant Limit Reached",
|
|
1246
|
+
description: "The whole subagent tree beneath one root exceeded its live-descendant budget. The limit bounds total concurrent processes, not just direct children.",
|
|
1247
|
+
source: "runtime",
|
|
1248
|
+
severity: "fatal",
|
|
1249
|
+
},
|
|
1250
|
+
SUBAGENT_REQUEST_INVALID: {
|
|
1251
|
+
code: "AX-RUNTIME-009",
|
|
1252
|
+
title: "Malformed Subagent Request",
|
|
1253
|
+
description: "A subagent request did not carry a usable prompt. It must be an object with `prompt` as a string or an array of strings.",
|
|
1254
|
+
source: "runtime",
|
|
1255
|
+
severity: "fatal",
|
|
1256
|
+
},
|
|
1257
|
+
INSTANCE_NOT_LOCAL: {
|
|
1258
|
+
code: "AX-RUNTIME-010",
|
|
1259
|
+
title: "Agent Instance Is Not Local",
|
|
1260
|
+
description: "An operation that only works against a locally booted agent was given a remote one. Subagent spawning and the managed base workspace both require a local process.",
|
|
1261
|
+
source: "runtime",
|
|
1262
|
+
severity: "fatal",
|
|
1263
|
+
},
|
|
1264
|
+
HOST_METHOD_UNKNOWN: {
|
|
1265
|
+
code: "AX-RUNTIME-011",
|
|
1266
|
+
title: "Unknown Host Method",
|
|
1267
|
+
description: "A booted agent called a host method this platform does not implement. The agent's framework version is likely newer than the CLI running it.",
|
|
1268
|
+
source: "runtime",
|
|
1269
|
+
severity: "fatal",
|
|
1270
|
+
},
|
|
1271
|
+
|
|
1272
|
+
// ── Self-update (update/) ───────────────────────────────────────────────
|
|
1273
|
+
UPDATE_CURRENT_VERSION_INVALID: {
|
|
1274
|
+
code: "AX-TUI-029",
|
|
1275
|
+
title: "Running Version Is Not Semver",
|
|
1276
|
+
description: "The version this app reports for itself is not valid semver, so it cannot be compared against the latest release.",
|
|
1277
|
+
source: "cli",
|
|
1278
|
+
severity: "fatal",
|
|
1279
|
+
},
|
|
1280
|
+
UPDATE_RELEASE_INVALID: {
|
|
1281
|
+
code: "AX-TUI-030",
|
|
1282
|
+
title: "Malformed Release Record",
|
|
1283
|
+
description: "The backend's release record did not describe a valid @arcforge/axon `latest` version, so there is nothing safe to update to.",
|
|
1284
|
+
source: "cli",
|
|
1285
|
+
severity: "fatal",
|
|
1286
|
+
},
|
|
1287
|
+
UPDATE_UNAVAILABLE_IN_DEVELOPMENT: {
|
|
1288
|
+
code: "AX-TUI-031",
|
|
1289
|
+
title: "Update Not Available Here",
|
|
1290
|
+
description: "Self-update needs the packaged update helper and a supervisor request path, neither of which exists in a source checkout. Update the installed app instead.",
|
|
1291
|
+
source: "cli",
|
|
1292
|
+
severity: "fatal",
|
|
1293
|
+
},
|
|
1294
|
+
UPDATE_SUPERVISOR_UNAVAILABLE: {
|
|
1295
|
+
code: "AX-TUI-032",
|
|
1296
|
+
title: "Update Supervisor Unavailable",
|
|
1297
|
+
description: "The running app has no supervisor request path, so it cannot hand an update off to be applied after exit.",
|
|
1298
|
+
source: "cli",
|
|
1299
|
+
severity: "fatal",
|
|
1300
|
+
},
|
|
1301
|
+
UPDATE_HELPER_ARGS_INVALID: {
|
|
1302
|
+
code: "AX-TUI-033",
|
|
1303
|
+
title: "Malformed Update Helper Arguments",
|
|
1304
|
+
description: "The update helper was invoked without the --from/--to/--bun/--axon/--state arguments it requires. It is spawned by the app, not run by hand.",
|
|
1305
|
+
source: "cli",
|
|
1306
|
+
severity: "fatal",
|
|
1307
|
+
},
|
|
1308
|
+
UPDATE_HELPER_VERSION_INVALID: {
|
|
1309
|
+
code: "AX-TUI-034",
|
|
1310
|
+
title: "Update Helper Given Bad Versions",
|
|
1311
|
+
description: "The update helper received a --from or --to value that is not valid semver, so it refused to install anything.",
|
|
1312
|
+
source: "cli",
|
|
1313
|
+
severity: "fatal",
|
|
1314
|
+
},
|
|
1315
|
+
|
|
1316
|
+
// ── Test runner (test/) ─────────────────────────────────────────────────
|
|
1317
|
+
TEST_FILES_NOT_FOUND: {
|
|
1318
|
+
code: "AX-TUI-035",
|
|
1319
|
+
title: "No Test Files Matched",
|
|
1320
|
+
description: "No files matched the requested test patterns, so there was nothing to run. Check the pattern, or the directory it was resolved against.",
|
|
1321
|
+
source: "cli",
|
|
1322
|
+
severity: "fatal",
|
|
1323
|
+
},
|
|
1324
|
+
// ── Ollama (services/ollama/) ───────────────────────────────────────────
|
|
1325
|
+
OLLAMA_UNAVAILABLE: {
|
|
1326
|
+
code: "AX-TUI-037",
|
|
1327
|
+
title: "Ollama Is Not Running",
|
|
1328
|
+
description: "No Ollama daemon answered on this machine. Start it with `ollama serve`, or install Ollama from https://ollama.com to run models locally.",
|
|
1329
|
+
source: "cli",
|
|
1330
|
+
severity: "fatal",
|
|
1331
|
+
},
|
|
1332
|
+
OLLAMA_REQUEST_FAILED: {
|
|
1333
|
+
code: "AX-TUI-038",
|
|
1334
|
+
title: "Ollama Request Failed",
|
|
1335
|
+
description: "The local Ollama daemon is running but refused a request — most often an unknown model name. The daemon's own message is included.",
|
|
1336
|
+
source: "cli",
|
|
1337
|
+
severity: "fatal",
|
|
1338
|
+
},
|
|
1339
|
+
OLLAMA_REGISTRY_UNREACHABLE: {
|
|
1340
|
+
code: "AX-TUI-039",
|
|
1341
|
+
title: "Ollama Registry Unreachable",
|
|
1342
|
+
description: "Could not reach the Ollama model registry to look a model up. Downloading needs a network connection; models already on disk still work offline.",
|
|
1343
|
+
source: "cli",
|
|
1344
|
+
severity: "fatal",
|
|
1345
|
+
},
|
|
1346
|
+
OLLAMA_PULL_FAILED: {
|
|
1347
|
+
code: "AX-TUI-040",
|
|
1348
|
+
title: "Model Download Failed",
|
|
1349
|
+
description: "Ollama could not finish downloading the model. The name may not exist in the registry, or the transfer was interrupted — a retry resumes from whatever was already fetched.",
|
|
1350
|
+
source: "cli",
|
|
1351
|
+
severity: "fatal",
|
|
1352
|
+
},
|
|
1353
|
+
|
|
1354
|
+
TEST_PRELOAD_MISSING: {
|
|
1355
|
+
code: "AX-TUI-036",
|
|
1356
|
+
title: "Test API Loaded Without Its Preload",
|
|
1357
|
+
description: "The instrumented test API was imported without the preload that installs it. Tests must run through `axon test`, which wires the preload.",
|
|
1358
|
+
source: "cli",
|
|
1359
|
+
severity: "fatal",
|
|
1360
|
+
},
|
|
1139
1361
|
} as const satisfies Record<string, AxonErrorMapEntry>
|
|
1140
1362
|
|
|
1141
1363
|
export type AxonErrorMap = typeof errorMap
|