@arcforge/err 2.0.121 → 2.0.123
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 +223 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcforge/err",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.123",
|
|
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.123"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/bun": "latest",
|
package/src/map.ts
CHANGED
|
@@ -385,8 +385,8 @@ export const errorMap = {
|
|
|
385
385
|
},
|
|
386
386
|
PUBLISH_UNSUPPORTED_KIND: {
|
|
387
387
|
code: "AX-PROJECT-009",
|
|
388
|
-
title: "This Project Kind Cannot Publish
|
|
389
|
-
description: "
|
|
388
|
+
title: "This Project Kind Cannot Publish",
|
|
389
|
+
description: "The registry accepts agents, modules, cognets, benches and prompts. Extensions are not accepted yet — the `registry_artifact_kind` enum needs the value first, and publishing before then would register under the wrong kind and claim the name in the shared namespace. A profile is never publishable: it holds one person's credentials, history and agents. See KINDS[kind].publishable.",
|
|
390
390
|
source: "manifest",
|
|
391
391
|
severity: "fatal",
|
|
392
392
|
},
|
|
@@ -440,14 +440,14 @@ export const errorMap = {
|
|
|
440
440
|
severity: "fatal",
|
|
441
441
|
},
|
|
442
442
|
DEPLOY_RUNTIME_FAILED: {
|
|
443
|
-
code: "AX-PROJECT-
|
|
443
|
+
code: "AX-PROJECT-035",
|
|
444
444
|
title: "Agent Failed To Start",
|
|
445
445
|
description: "Cloud infrastructure was provisioned, but the agent process failed during boot. The reported runtime diagnostic identifies the immediate cause.",
|
|
446
446
|
source: "runtime",
|
|
447
447
|
severity: "fatal",
|
|
448
448
|
},
|
|
449
449
|
DEPLOY_ENV_RESERVED: {
|
|
450
|
-
code: "AX-PROJECT-
|
|
450
|
+
code: "AX-PROJECT-036",
|
|
451
451
|
title: "Reserved Deployment Variable",
|
|
452
452
|
description: "The production .env file attempts to override a variable owned by the Axon runtime or Cloud Run.",
|
|
453
453
|
source: "manifest",
|
|
@@ -1336,7 +1336,7 @@ export const errorMap = {
|
|
|
1336
1336
|
severity: "fatal",
|
|
1337
1337
|
},
|
|
1338
1338
|
MODULE_SETUP_FAILED: {
|
|
1339
|
-
code: "AX-MODULE-
|
|
1339
|
+
code: "AX-MODULE-007",
|
|
1340
1340
|
title: "Module Setup Failed",
|
|
1341
1341
|
description: "A module's setup() threw during agent boot. Setup runs sequentially in blueprint order and a failure is total — no later module is wired, and the agent does not boot half-configured.",
|
|
1342
1342
|
source: "runtime",
|
|
@@ -1441,7 +1441,7 @@ export const errorMap = {
|
|
|
1441
1441
|
severity: "fatal",
|
|
1442
1442
|
},
|
|
1443
1443
|
PROMPT_NOT_INSTALLABLE: {
|
|
1444
|
-
code: "AX-PROJECT-
|
|
1444
|
+
code: "AX-PROJECT-037",
|
|
1445
1445
|
title: "Prompts Are Not Installed Into Agents",
|
|
1446
1446
|
description: "A prompt is content, not a capability: it resolves from the global cache and renders on demand, so every agent can already use it without declaring anything. Installing one into an agent would put content through the code path — an ABI check, a node_modules link, an agent reload — for something that needs none of it.",
|
|
1447
1447
|
source: "manifest",
|
|
@@ -1616,6 +1616,223 @@ export const errorMap = {
|
|
|
1616
1616
|
source: "cli",
|
|
1617
1617
|
severity: "fatal",
|
|
1618
1618
|
},
|
|
1619
|
+
|
|
1620
|
+
// ── Extensions ──────────────────────────────────────────────────────────
|
|
1621
|
+
//
|
|
1622
|
+
// The TUI config surface: a profile's main.ts and plugins/, and the
|
|
1623
|
+
// extensions it loads. Almost every entry here is `expected` and
|
|
1624
|
+
// `degraded`, and both flags are deliberate.
|
|
1625
|
+
//
|
|
1626
|
+
// EXPECTED, because this is code the USER wrote. A stack trace through our
|
|
1627
|
+
// loader tells someone to debug software they did not write; the file and
|
|
1628
|
+
// the reason are the entire actionable content.
|
|
1629
|
+
//
|
|
1630
|
+
// DEGRADED, because a broken config must never cost someone their
|
|
1631
|
+
// terminal. One bad file disables itself and everything else still loads —
|
|
1632
|
+
// a user whose plugin has a typo needs a working Axon to go fix it in.
|
|
1633
|
+
// The one FATAL entry is PROFILE_CONFIG_INVALID, and only because it is
|
|
1634
|
+
// thrown by the CLI verbs that edit that file, where continuing would mean
|
|
1635
|
+
// writing over a config we could not read.
|
|
1636
|
+
|
|
1637
|
+
PROFILE_CONFIG_INVALID: {
|
|
1638
|
+
code: "AX-EXT-001",
|
|
1639
|
+
title: "profile.config.ts Did Not Call defineProfile()",
|
|
1640
|
+
description: "A profile's config must default-export defineProfile({ ... }). Without it there is no extension list to read, so nothing can be installed, enabled or disabled. The rest of the profile — main.ts and plugins/ — still loads.",
|
|
1641
|
+
source: "tui",
|
|
1642
|
+
severity: "fatal",
|
|
1643
|
+
expected: true,
|
|
1644
|
+
},
|
|
1645
|
+
PROFILE_CONFIG_FAILED: {
|
|
1646
|
+
code: "AX-EXT-002",
|
|
1647
|
+
title: "profile.config.ts Failed to Load",
|
|
1648
|
+
description: "The file threw while being evaluated, so its extension list could not be read and no extensions were loaded. The profile's own main.ts and plugins/ are unaffected — a typo in an extension list must not cost you the config you already had working.",
|
|
1649
|
+
source: "tui",
|
|
1650
|
+
severity: "degraded",
|
|
1651
|
+
expected: true,
|
|
1652
|
+
},
|
|
1653
|
+
EXTENSION_ENTRY_INVALID: {
|
|
1654
|
+
code: "AX-EXT-003",
|
|
1655
|
+
title: "Malformed Extension Entry",
|
|
1656
|
+
description: "An entry in profile.config.ts's `extensions` array is neither a string nor an object with a `source`. Accepted forms are \"@scope/name\" for a registry extension and \"./extensions/name\" for a local one.",
|
|
1657
|
+
source: "tui",
|
|
1658
|
+
severity: "degraded",
|
|
1659
|
+
expected: true,
|
|
1660
|
+
},
|
|
1661
|
+
EXTENSION_NOT_FOUND: {
|
|
1662
|
+
code: "AX-EXT-004",
|
|
1663
|
+
title: "Extension Not Found",
|
|
1664
|
+
description: "An extension listed in profile.config.ts is not on disk. A local path may have moved or been deleted; a registry name may never have been installed. Everything else in the list still loads.",
|
|
1665
|
+
source: "tui",
|
|
1666
|
+
severity: "degraded",
|
|
1667
|
+
expected: true,
|
|
1668
|
+
},
|
|
1669
|
+
EXTENSION_INSTALL_FAILED: {
|
|
1670
|
+
code: "AX-EXT-005",
|
|
1671
|
+
title: "Extension Install Failed",
|
|
1672
|
+
description: "A registry extension could not be fetched or prepared — most often no network, or a name that does not exist in the registry. It is skipped for this session and retried on the next launch.",
|
|
1673
|
+
source: "tui",
|
|
1674
|
+
severity: "degraded",
|
|
1675
|
+
expected: true,
|
|
1676
|
+
},
|
|
1677
|
+
EXTENSION_NOT_AN_EXTENSION: {
|
|
1678
|
+
code: "AX-EXT-006",
|
|
1679
|
+
title: "Not an Extension",
|
|
1680
|
+
description: "The directory has no extension.config.ts, which is the file that marks a directory as an extension. A path pointing at an agent, a module, or an ordinary folder is not loadable as one.",
|
|
1681
|
+
source: "tui",
|
|
1682
|
+
severity: "degraded",
|
|
1683
|
+
expected: true,
|
|
1684
|
+
},
|
|
1685
|
+
EXTENSION_LOAD_FAILED: {
|
|
1686
|
+
code: "AX-EXT-007",
|
|
1687
|
+
title: "Extension Failed to Load",
|
|
1688
|
+
description: "An extension's main.ts threw while it was being loaded, so whatever it had not yet registered is missing. Its commands, keys and palettes are removed and the rest of your config loads normally.",
|
|
1689
|
+
source: "tui",
|
|
1690
|
+
severity: "degraded",
|
|
1691
|
+
expected: true,
|
|
1692
|
+
},
|
|
1693
|
+
PROFILE_MAIN_FAILED: {
|
|
1694
|
+
code: "AX-EXT-008",
|
|
1695
|
+
title: "main.ts Failed to Load",
|
|
1696
|
+
description: "Your profile's main.ts threw while being evaluated. Anything it registered before the error survives; everything after it did not run. Plugins and extensions still load.",
|
|
1697
|
+
source: "tui",
|
|
1698
|
+
severity: "degraded",
|
|
1699
|
+
expected: true,
|
|
1700
|
+
},
|
|
1701
|
+
PLUGIN_FAILED: {
|
|
1702
|
+
code: "AX-EXT-009",
|
|
1703
|
+
title: "Plugin Failed to Load",
|
|
1704
|
+
description: "A file in plugins/ threw while being imported, so its hooks were not registered. Other plugins in the same folder are unaffected — each file is loaded independently.",
|
|
1705
|
+
source: "tui",
|
|
1706
|
+
severity: "degraded",
|
|
1707
|
+
expected: true,
|
|
1708
|
+
},
|
|
1709
|
+
HOOK_FAILED: {
|
|
1710
|
+
code: "AX-EXT-010",
|
|
1711
|
+
title: "Lifecycle Hook Failed",
|
|
1712
|
+
description: "A tui.hook() handler threw while the event it listens for was firing. For a notification hook nothing else is affected; for a gating hook (tui:boot, tui:shutdown) the operation continues anyway rather than leaving the terminal stuck.",
|
|
1713
|
+
source: "tui",
|
|
1714
|
+
severity: "degraded",
|
|
1715
|
+
expected: true,
|
|
1716
|
+
},
|
|
1717
|
+
HOOK_TIMED_OUT: {
|
|
1718
|
+
code: "AX-EXT-011",
|
|
1719
|
+
title: "Hook Blocked Too Long",
|
|
1720
|
+
description: "A gating hook (tui:boot or tui:shutdown) did not finish within its budget, so the TUI continued without waiting. A config must never be able to hang the terminal silently — whatever the handler was doing may not have completed.",
|
|
1721
|
+
source: "tui",
|
|
1722
|
+
severity: "degraded",
|
|
1723
|
+
expected: true,
|
|
1724
|
+
},
|
|
1725
|
+
COMMAND_NOT_FOUND: {
|
|
1726
|
+
code: "AX-EXT-012",
|
|
1727
|
+
title: "No Such Command",
|
|
1728
|
+
description: "commands.run() was given a path that resolves to nothing in the command tree. The path must name a leaf, spelled exactly as it appears in the `:` palette.",
|
|
1729
|
+
source: "tui",
|
|
1730
|
+
severity: "fatal",
|
|
1731
|
+
expected: true,
|
|
1732
|
+
},
|
|
1733
|
+
PALETTE_NOT_FOUND: {
|
|
1734
|
+
code: "AX-EXT-013",
|
|
1735
|
+
title: "No Such Palette",
|
|
1736
|
+
description: "palette.open() was given a name no palette was registered under. Palettes are created with palette.create(name, ...) — a name is only openable once its registration has run.",
|
|
1737
|
+
source: "tui",
|
|
1738
|
+
severity: "fatal",
|
|
1739
|
+
expected: true,
|
|
1740
|
+
},
|
|
1741
|
+
PALETTE_NAME_TAKEN: {
|
|
1742
|
+
code: "AX-EXT-014",
|
|
1743
|
+
title: "Palette Name Already Registered",
|
|
1744
|
+
description: "Two palettes tried to claim the same name. Names are how palette.open() addresses one, so they have to be unique — silently replacing the first would make whichever loaded last win, invisibly.",
|
|
1745
|
+
source: "tui",
|
|
1746
|
+
severity: "degraded",
|
|
1747
|
+
expected: true,
|
|
1748
|
+
},
|
|
1749
|
+
PALETTE_ALREADY_OPEN: {
|
|
1750
|
+
code: "AX-EXT-015",
|
|
1751
|
+
title: "A Palette Is Already Open",
|
|
1752
|
+
description: "Something tried to open a palette, or ask a question, while the user was already navigating one. Stealing it mid-navigation would drop whatever they were doing, so the call fails instead — check palette.isOpen first.",
|
|
1753
|
+
source: "tui",
|
|
1754
|
+
severity: "degraded",
|
|
1755
|
+
expected: true,
|
|
1756
|
+
},
|
|
1757
|
+
KEY_CHORD_UNBOUND: {
|
|
1758
|
+
code: "AX-EXT-022",
|
|
1759
|
+
title: "No Such Key Binding",
|
|
1760
|
+
description: "keys.send() was given a chord nothing is bound to — neither a mode key nor a registered binding. Sending it would do nothing at all, which is indistinguishable from a binding that ran and had no effect.",
|
|
1761
|
+
source: "tui",
|
|
1762
|
+
severity: "fatal",
|
|
1763
|
+
expected: true,
|
|
1764
|
+
},
|
|
1765
|
+
AGENT_SPAWN_NO_INSTANCE: {
|
|
1766
|
+
code: "AX-EXT-023",
|
|
1767
|
+
title: "Agent Started but No Instance Appeared",
|
|
1768
|
+
description: "A spawn reported success without producing a focused instance, so there is no id to hand back. This is a fault in Axon rather than in your config — the agent may or may not be running.",
|
|
1769
|
+
source: "tui",
|
|
1770
|
+
severity: "fatal",
|
|
1771
|
+
},
|
|
1772
|
+
PROFILE_CONFIG_MISSING: {
|
|
1773
|
+
code: "AX-EXT-025",
|
|
1774
|
+
title: "No profile.config.ts",
|
|
1775
|
+
description: "The profile has no config file to record the extension in. It is normally created on first launch — starting Axon once will scaffold it.",
|
|
1776
|
+
source: "tui",
|
|
1777
|
+
severity: "fatal",
|
|
1778
|
+
expected: true,
|
|
1779
|
+
},
|
|
1780
|
+
PROFILE_CONFIG_UNEDITABLE: {
|
|
1781
|
+
code: "AX-EXT-026",
|
|
1782
|
+
title: "profile.config.ts Could Not Be Edited",
|
|
1783
|
+
description: "The `extensions` array could not be located, or editing it would have produced invalid TypeScript. Nothing was written — this file is yours, and a botched edit costs your whole TUI config. Add or remove the entry by hand.",
|
|
1784
|
+
source: "tui",
|
|
1785
|
+
severity: "fatal",
|
|
1786
|
+
expected: true,
|
|
1787
|
+
},
|
|
1788
|
+
COMMAND_PATH_TAKEN: {
|
|
1789
|
+
code: "AX-EXT-020",
|
|
1790
|
+
title: "Command Already Registered",
|
|
1791
|
+
description: "Two sources registered the same command path. The first one loaded keeps it — your own config beats any extension, and between extensions the one listed earlier in profile.config.ts wins. Rename one of them.",
|
|
1792
|
+
source: "tui",
|
|
1793
|
+
severity: "degraded",
|
|
1794
|
+
expected: true,
|
|
1795
|
+
},
|
|
1796
|
+
KEY_CHORD_TAKEN: {
|
|
1797
|
+
code: "AX-EXT-021",
|
|
1798
|
+
title: "Key Chord Already Bound",
|
|
1799
|
+
description: "Two sources bound the same key chord. The first one loaded keeps it. A silently shadowed binding is unbearable to debug in someone else's config, so the second registration fails instead of replacing it.",
|
|
1800
|
+
source: "tui",
|
|
1801
|
+
severity: "degraded",
|
|
1802
|
+
expected: true,
|
|
1803
|
+
},
|
|
1804
|
+
MODE_KEY_TAKEN: {
|
|
1805
|
+
code: "AX-EXT-016",
|
|
1806
|
+
title: "Mode Key Already Bound",
|
|
1807
|
+
description: "A palette asked for a mode key that is already in use — either by a built-in mode or by another extension. A silently shadowed key is unbearable to debug in someone else's config, so the registration fails loudly instead.",
|
|
1808
|
+
source: "tui",
|
|
1809
|
+
severity: "degraded",
|
|
1810
|
+
expected: true,
|
|
1811
|
+
},
|
|
1812
|
+
MODE_UNKNOWN: {
|
|
1813
|
+
code: "AX-EXT-017",
|
|
1814
|
+
title: "No Such Mode",
|
|
1815
|
+
description: "mode.set() was given a name that is neither a built-in mode nor a registered palette. Doing nothing would look identical to a mode that simply does not render, so this fails instead.",
|
|
1816
|
+
source: "tui",
|
|
1817
|
+
severity: "fatal",
|
|
1818
|
+
expected: true,
|
|
1819
|
+
},
|
|
1820
|
+
NO_FOCUSED_AGENT: {
|
|
1821
|
+
code: "AX-EXT-018",
|
|
1822
|
+
title: "No Agent Focused",
|
|
1823
|
+
description: "A verb that acts on the focused agent — send, stop, reboot — was called while nothing was running. Start one with agents.spawn(name) or tui.nav(name) first.",
|
|
1824
|
+
source: "tui",
|
|
1825
|
+
severity: "fatal",
|
|
1826
|
+
expected: true,
|
|
1827
|
+
},
|
|
1828
|
+
INSTANCE_NOT_RUNNING: {
|
|
1829
|
+
code: "AX-EXT-019",
|
|
1830
|
+
title: "Instance Not Running",
|
|
1831
|
+
description: "An instance id was given for a conversation that is not live — it may already have been stopped, or it belongs to an earlier session. agents.list() returns what is currently running.",
|
|
1832
|
+
source: "tui",
|
|
1833
|
+
severity: "fatal",
|
|
1834
|
+
expected: true,
|
|
1835
|
+
},
|
|
1619
1836
|
} as const satisfies Record<string, AxonErrorMapEntry>
|
|
1620
1837
|
|
|
1621
1838
|
export type AxonErrorMap = typeof errorMap
|