@venizia/ignis-atlas 0.1.2-1 → 0.1.2-2

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.
@@ -33,6 +33,8 @@ The error response already filled its `message` (2026-10-11). A reader outside t
33
33
  ## Who is affected
34
34
 
35
35
  - **A queue, tracker or log that stores `error.message`.** Call `toFilledText()` where you hand the error over - see [Store the filled text](/extensions/helpers/error/#store-the-filled-text-where-a-plain-reader-shows-it).
36
+ - **A client that casts a response error to `ApplicationError`.** The cast object has no `toFilledText()`; calling it throws at run time. Use `fromError({ error }).toFilledText()`, or the response `message`, which the server already fills.
37
+ - **An object literal typed `ApplicationError`** - a test fixture, a mock - no longer compiles, because it lacks the method. Build it with `getError(...)`.
36
38
  - **Everyone else.** No change.
37
39
 
38
40
  **Files:** [`packages/inversion/src/modules/error/message-template.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/inversion/src/modules/error/message-template.ts), [`packages/inversion/src/modules/error/app-error.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/inversion/src/modules/error/app-error.ts), [`packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/kernel/src/base/middlewares/app-error/app-error.middleware.ts)
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: isApplicationError Checks the Whole Shape
3
+ description: "isApplicationError() now also requires normalized.text, so a plain Error that only carries a statusCode - an HTTP client's, an engine's - is no longer taken for an ApplicationError."
4
+ ---
5
+
6
+ # Changelog - 2026-10-15
7
+
8
+ ## isApplicationError checks the whole shape
9
+
10
+ <Badge type="danger" text="Bug Fix" /> <Badge type="warning" text="Behavior Change" />
11
+
12
+ **In one line.** A plain `Error` with a `statusCode` is no longer an `ApplicationError`.
13
+
14
+ ```typescript
15
+ const httpError = Object.assign(new Error('Request failed'), { statusCode: 502 });
16
+
17
+ isApplicationError(httpError); // false - it was true
18
+ isApplicationError(getError({ message: 'x', statusCode: 400 })); // true, as before
19
+ ```
20
+
21
+ ## What changed
22
+
23
+ `isApplicationError()` checked only `instanceof Error` and a numeric `statusCode`, yet narrowed the type to `ApplicationError`. Code after the guard then read `normalized` or called `toFilledText()` on an error that had neither, and crashed.
24
+
25
+ The guard now also requires `normalized` to be an object with a string `text`. It still tests shape, not class identity, so an `ApplicationError` from the other build copy (CJS against ESM) still matches.
26
+
27
+ Inside IGNIS this also fixes three paths that trusted the guard:
28
+ - A worker encoded such an error as an `ApplicationError` envelope with no `normalized`.
29
+ - The search connectors and the mail service rethrew it unwrapped, instead of sanitizing it as a 503 or 500.
30
+
31
+ ## Who is affected
32
+
33
+ - **Code that relied on a `statusCode`-only error passing the guard.** Build the error with `getError`, or check `statusCode` yourself.
34
+ - **An `ApplicationError` from a copy older than 0.2.2-0.** It still matches, but has no `toFilledText()`.
35
+ - **Everyone else.** No change.
36
+
37
+ **Files:** [`packages/inversion/src/modules/error/app-error.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/inversion/src/modules/error/app-error.ts)
@@ -17,6 +17,7 @@ This section tracks the history of significant changes, refactors, and updates t
17
17
 
18
18
  | Date | Title | Type |
19
19
  |------|-------|------|
20
+ | 2026-10-15 | [isApplicationError Checks the Whole Shape](./2026-10-15-is-application-error-shape) | Bug Fix, Behavior Change |
20
21
  | 2026-10-14 | [An Error Hands Out Its Filled Text](./2026-10-14-error-filled-text) | Enhancement |
21
22
  | 2026-10-14 | [TemporalHelper Runs in Every Browser and Speaks a Locale](./2026-10-14-temporal-browser-and-locale) | Feature |
22
23
  | 2026-10-11 | [Error Messages Fill Their Placeholders](./2026-10-11-error-message-placeholders) | Enhancement, Behavior Change |
@@ -13,6 +13,12 @@
13
13
  ],
14
14
  "releases": {
15
15
  "atlas": [
16
+ {
17
+ "version": "0.1.2-1",
18
+ "date": "2026-10-14",
19
+ "sha": "f1b874e2",
20
+ "order": 1635
21
+ },
16
22
  {
17
23
  "version": "0.1.2-0",
18
24
  "date": "2026-10-14",
@@ -821,6 +827,12 @@
821
827
  }
822
828
  ],
823
829
  "connectors": [
830
+ {
831
+ "version": "0.2.2-2",
832
+ "date": "2026-10-15",
833
+ "sha": "603e7e36",
834
+ "order": 1642
835
+ },
824
836
  {
825
837
  "version": "0.2.2-1",
826
838
  "date": "2026-10-14",
@@ -2025,6 +2037,12 @@
2025
2037
  }
2026
2038
  ],
2027
2039
  "core-server": [
2040
+ {
2041
+ "version": "0.2.2-2",
2042
+ "date": "2026-10-15",
2043
+ "sha": "0891916f",
2044
+ "order": 1644
2045
+ },
2028
2046
  {
2029
2047
  "version": "0.2.2-1",
2030
2048
  "date": "2026-10-14",
@@ -2405,6 +2423,12 @@
2405
2423
  }
2406
2424
  ],
2407
2425
  "core-worker": [
2426
+ {
2427
+ "version": "0.2.2-2",
2428
+ "date": "2026-10-15",
2429
+ "sha": "ea156f9f",
2430
+ "order": 1643
2431
+ },
2408
2432
  {
2409
2433
  "version": "0.2.2-1",
2410
2434
  "date": "2026-10-14",
@@ -3151,6 +3175,12 @@
3151
3175
  }
3152
3176
  ],
3153
3177
  "filter": [
3178
+ {
3179
+ "version": "0.2.2-1",
3180
+ "date": "2026-10-15",
3181
+ "sha": "fe28ce8d",
3182
+ "order": 1639
3183
+ },
3154
3184
  {
3155
3185
  "version": "0.2.2-0",
3156
3186
  "date": "2026-10-14",
@@ -3351,6 +3381,12 @@
3351
3381
  }
3352
3382
  ],
3353
3383
  "helpers": [
3384
+ {
3385
+ "version": "0.2.2-2",
3386
+ "date": "2026-10-15",
3387
+ "sha": "d3c49a54",
3388
+ "order": 1640
3389
+ },
3354
3390
  {
3355
3391
  "version": "0.2.2-1",
3356
3392
  "date": "2026-10-14",
@@ -4109,6 +4145,12 @@
4109
4145
  }
4110
4146
  ],
4111
4147
  "inversion": [
4148
+ {
4149
+ "version": "0.2.2-1",
4150
+ "date": "2026-10-15",
4151
+ "sha": "20176300",
4152
+ "order": 1638
4153
+ },
4112
4154
  {
4113
4155
  "version": "0.2.2-0",
4114
4156
  "date": "2026-10-14",
@@ -4465,6 +4507,12 @@
4465
4507
  }
4466
4508
  ],
4467
4509
  "kernel": [
4510
+ {
4511
+ "version": "0.2.2-2",
4512
+ "date": "2026-10-15",
4513
+ "sha": "30be1585",
4514
+ "order": 1641
4515
+ },
4468
4516
  {
4469
4517
  "version": "0.2.2-1",
4470
4518
  "date": "2026-10-14",
@@ -4822,6 +4870,17 @@
4822
4870
  ]
4823
4871
  },
4824
4872
  "changelogs": [
4873
+ {
4874
+ "id": "changelog:2026-10-15-is-application-error-shape",
4875
+ "file": "2026-10-15-is-application-error-shape.md",
4876
+ "date": "2026-10-15",
4877
+ "title": "isApplicationError Checks the Whole Shape",
4878
+ "packages": [
4879
+ "inversion"
4880
+ ],
4881
+ "kind": "Bug Fix",
4882
+ "order": 1637
4883
+ },
4825
4884
  {
4826
4885
  "id": "changelog:2026-10-14-temporal-browser-and-locale",
4827
4886
  "file": "2026-10-14-temporal-browser-and-locale.md",
@@ -9422,7 +9422,7 @@
9422
9422
  "specifier": "@venizia/ignis",
9423
9423
  "kind": "const",
9424
9424
  "file": "packages/inversion/src/modules/error/app-error.ts",
9425
- "line": 104,
9425
+ "line": 111,
9426
9426
  "signature": "isApplicationError: (error: unknown) => error is ApplicationError"
9427
9427
  },
9428
9428
  {
@@ -25853,7 +25853,7 @@
25853
25853
  "specifier": "@venizia/ignis-helpers",
25854
25854
  "kind": "const",
25855
25855
  "file": "packages/inversion/src/modules/error/app-error.ts",
25856
- "line": 104,
25856
+ "line": 111,
25857
25857
  "signature": "isApplicationError: (error: unknown) => error is ApplicationError"
25858
25858
  },
25859
25859
  {
@@ -28213,7 +28213,7 @@
28213
28213
  "specifier": "@venizia/ignis-helpers/core",
28214
28214
  "kind": "const",
28215
28215
  "file": "packages/inversion/src/modules/error/app-error.ts",
28216
- "line": 104,
28216
+ "line": 111,
28217
28217
  "signature": "isApplicationError: (error: unknown) => error is ApplicationError"
28218
28218
  },
28219
28219
  {
@@ -29863,7 +29863,7 @@
29863
29863
  "specifier": "@venizia/ignis-inversion",
29864
29864
  "kind": "type",
29865
29865
  "file": "packages/inversion/src/modules/error/app-error.ts",
29866
- "line": 108,
29866
+ "line": 126,
29867
29867
  "signature": "type TApplicationError = ApplicationError"
29868
29868
  },
29869
29869
  {
@@ -30223,7 +30223,7 @@
30223
30223
  "specifier": "@venizia/ignis-inversion",
30224
30224
  "kind": "const",
30225
30225
  "file": "packages/inversion/src/modules/error/app-error.ts",
30226
- "line": 104,
30226
+ "line": 111,
30227
30227
  "signature": "isApplicationError: (error: unknown) => error is ApplicationError"
30228
30228
  },
30229
30229
  {
@@ -67,7 +67,7 @@ The framework's `AppErrorMiddleware` catches `ApplicationError` instances and fo
67
67
  - **`error` is refused on the free-form branch (`error?: never`).** This makes `getError({ message, error: caughtError })` fail to compile, so the mistake is caught before runtime - use `cause` instead.
68
68
 
69
69
  > [!IMPORTANT]
70
- > **Use `isApplicationError()`, never `instanceof ApplicationError`.** There is one `ApplicationError` class, defined in `@venizia/ignis-inversion`. `helpers` re-exports it, so a browser app can raise and read the same errors the server does. But `instanceof` still fails across a package boundary: inversion ships dual CJS+ESM builds, so one source class has two runtime constructors. `isApplicationError()` tests shape, not identity, so it works everywhere.
70
+ > **Use `isApplicationError()`, never `instanceof ApplicationError`.** There is one `ApplicationError` class, defined in `@venizia/ignis-inversion`. `helpers` re-exports it, so a browser app can raise and read the same errors the server does. But `instanceof` still fails across a package boundary: inversion ships dual CJS+ESM builds, so one source class has two runtime constructors. `isApplicationError()` tests shape, not identity, so it works everywhere. The shape is an `Error` with a numeric `statusCode` and a `normalized` whose `text` is a string; a plain `Error` that only carries a `statusCode`, as an HTTP client's does, is not an `ApplicationError`.
71
71
 
72
72
  **Options shared by both forms**
73
73
 
@@ -333,6 +333,11 @@ const processor = async (job: Job) => {
333
333
 
334
334
  Fill only where you choose to. A filled text carries every arg value inline, outside the `args` map a log redacts by key. `MessageTemplate.render({ text, args })` is the same fill, and also returns the keys it found no arg for.
335
335
 
336
+ > [!WARNING]
337
+ > `toFilledText()` is a method, so it exists only on a real `ApplicationError`. An error body read from a response is a plain object: `(body as ApplicationError).toFilledText()` compiles, then throws `toFilledText is not a function`. Rebuild it first with `fromError({ error: body }).toFilledText()`, or fill the shape directly with `MessageTemplate.render({ text: body.normalized?.text ?? '', args: body.normalized?.args }).text`. A response `message` is already filled by the server, so a client rarely needs either.
338
+ >
339
+ > For the same reason, an object literal typed `ApplicationError` - a test fixture, a mock - no longer compiles. Build it with `getError(...)`.
340
+
336
341
  ### Consume the error response from a browser client
337
342
 
338
343
  The error layer lives in `@venizia/ignis-inversion`, not in helpers, precisely so a browser app can
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venizia/ignis-atlas",
3
- "version": "0.1.2-1",
3
+ "version": "0.1.2-2",
4
4
  "description": "MCP server for IGNIS: search and read the wiki, changelogs and knowledge bundle by section, with citations. Bun-only, zero-dependency transport.",
5
5
  "homepage": "https://ignis.venizia.ai",
6
6
  "repository": {
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@hono/zod-openapi": "^1.6.3",
63
- "@venizia/ignis-helpers": "^0.2.2-1",
63
+ "@venizia/ignis-helpers": "^0.2.2-2",
64
64
  "zod": "^4.5.4"
65
65
  },
66
66
  "devDependencies": {