@arcforge/err 2.0.141 → 2.0.143

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/map.ts +63 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcforge/err",
3
- "version": "2.0.141",
3
+ "version": "2.0.143",
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.141"
18
+ "@arcforge/types": "2.0.143"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/bun": "latest",
package/src/map.ts CHANGED
@@ -864,6 +864,29 @@ export const errorMap = {
864
864
  source: "kernel",
865
865
  severity: "fatal",
866
866
  },
867
+ KNOWLEDGE_NOT_FOUND: {
868
+ code: "AX-KERNEL-011",
869
+ title: "Knowledge Entry Not Found",
870
+ description: "A cognet read a knowledge entry that does not exist. The knowledge store is not a cache — a brain reading something the catalogue advertised has hit a real inconsistency, so this is loud rather than an empty result.",
871
+ source: "kernel",
872
+ severity: "fatal",
873
+ expected: true,
874
+ },
875
+ KNOWLEDGE_READONLY: {
876
+ code: "AX-KERNEL-013",
877
+ title: "Knowledge Entry Is Read-Only",
878
+ description: "A cognet tried to write or remove knowledge contributed by a module. Module material lives inside its own package and the next install would destroy any change — so this fails loudly rather than succeeding and vanishing later. An agent's own data/knowledge/ is writable.",
879
+ source: "kernel",
880
+ severity: "fatal",
881
+ expected: true,
882
+ },
883
+ KNOWLEDGE_ESCAPE: {
884
+ code: "AX-KERNEL-012",
885
+ title: "Knowledge Path Escapes Store",
886
+ description: "A knowledge name resolved outside the store root. Names are identifiers, not paths — traversal is refused at the boundary rather than trusted not to happen.",
887
+ source: "kernel",
888
+ severity: "fatal",
889
+ },
867
890
  SCHEDULER_MODE_MISMATCH: {
868
891
  code: "AX-KERNEL-010",
869
892
  title: "Scheduler Mode Mismatch",
@@ -1882,6 +1905,46 @@ export const errorMap = {
1882
1905
  severity: "fatal",
1883
1906
  expected: true,
1884
1907
  },
1908
+ COMMAND_INVALID: {
1909
+ code: "AX-EXT-029",
1910
+ title: "Command Is Not Registerable",
1911
+ description: "A command was registered with no path, or with no `run` to call. Both are caught here rather than when someone presses Enter on it — a command that registers cleanly and then does nothing reads as a broken terminal instead of a config mistake, and gives no clue which file to open. Use `commands.register(path, fn)` or `commands.register(path, { run })`.",
1912
+ source: "tui",
1913
+ severity: "degraded",
1914
+ expected: true,
1915
+ },
1916
+ COMPONENT_NAME_TAKEN: {
1917
+ code: "AX-EXT-030",
1918
+ title: "Component Already Registered",
1919
+ description: "Two sources registered the same line component name. The first one loaded keeps it — your own config beats any extension. A silently shadowed component would render someone else's value under your name, so the second registration fails instead. Component names are `provider:name`; pick a prefix of your own.",
1920
+ source: "tui",
1921
+ severity: "degraded",
1922
+ expected: true,
1923
+ },
1924
+ COMPONENT_UNKNOWN: {
1925
+ code: "AX-EXT-031",
1926
+ title: "No Such Component",
1927
+ description: "A line named a component that is not registered. Caught when the line is created rather than when it paints, because a missing component renders as an empty gap — which reads as a layout bug instead of a typo, and gives no clue which name was wrong. components.list() returns everything available.",
1928
+ source: "tui",
1929
+ severity: "degraded",
1930
+ expected: true,
1931
+ },
1932
+ LINE_NAME_TAKEN: {
1933
+ code: "AX-EXT-032",
1934
+ title: "Line Already Registered",
1935
+ description: "Two sources registered the same line name. The first one loaded keeps it, the same rule commands and key chords follow.",
1936
+ source: "tui",
1937
+ severity: "degraded",
1938
+ expected: true,
1939
+ },
1940
+ LINE_UNKNOWN: {
1941
+ code: "AX-EXT-033",
1942
+ title: "No Such Line",
1943
+ description: "lines.set(), move(), show(), hide() or toggle() named a line that is not registered. Doing nothing would be indistinguishable from a line that registered and then rendered empty, so this fails instead. lines.list() returns what exists.",
1944
+ source: "tui",
1945
+ severity: "degraded",
1946
+ expected: true,
1947
+ },
1885
1948
  COMMAND_PATH_TAKEN: {
1886
1949
  code: "AX-EXT-020",
1887
1950
  title: "Command Already Registered",