@owlmeans/server-api 0.1.18-rc.46 → 0.1.18-rc.47

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/README.md CHANGED
@@ -10,7 +10,7 @@ only when composing a context without that package. WebSocket routes belong to
10
10
  ## Installation
11
11
 
12
12
  ```bash
13
- bun add @owlmeans/server-api@^0.1.18-rc.46
13
+ bun add @owlmeans/server-api@^0.1.18-rc.47
14
14
  ```
15
15
 
16
16
  ## Concepts
@@ -240,7 +240,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
240
240
  your project's skill store (`.agents/skills/`):
241
241
 
242
242
  ```sh
243
- npx @owlmeans/agent-skills@^0.1.18-rc.44
243
+ npx @owlmeans/agent-skills@^0.1.18-rc.45
244
244
  ```
245
245
 
246
246
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/server-api",
4
- "version": "0.1.18-rc.46",
5
- "generatedAt": "2026-09-30T09:41:02.819Z",
4
+ "version": "0.1.18-rc.47",
5
+ "generatedAt": "2026-10-01T23:27:48.718Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -7,7 +7,7 @@ user-invocable: false
7
7
 
8
8
  # @owlmeans/server-api
9
9
 
10
- **Install:** `bun add @owlmeans/server-api@^0.1.18-rc.46`
10
+ **Install:** `bun add @owlmeans/server-api@^0.1.18-rc.47`
11
11
 
12
12
  Make handlers from the protocol declaration so input and output types stay coupled to the shared
13
13
  contract:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/server-api",
3
- "version": "0.1.18-rc.46",
3
+ "version": "0.1.18-rc.47",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -33,15 +33,15 @@
33
33
  "@fastify/helmet": "^13.1.0",
34
34
  "@fastify/middie": "^9.0.2",
35
35
  "@fastify/multipart": "^9.0.1",
36
- "@owlmeans/api": "^0.1.18-rc.42",
37
- "@owlmeans/auth": "^0.1.18-rc.36",
38
- "@owlmeans/auth-common": "^0.1.18-rc.42",
36
+ "@owlmeans/api": "^0.1.18-rc.43",
37
+ "@owlmeans/auth": "^0.1.18-rc.37",
38
+ "@owlmeans/auth-common": "^0.1.18-rc.43",
39
39
  "@owlmeans/context": "^0.1.18-rc.32",
40
40
  "@owlmeans/error": "^0.1.18-rc.36",
41
- "@owlmeans/entrypoint": "^0.1.18-rc.37",
41
+ "@owlmeans/entrypoint": "^0.1.18-rc.38",
42
42
  "@owlmeans/route": "^0.1.18-rc.33",
43
- "@owlmeans/server-context": "^0.1.18-rc.38",
44
- "@owlmeans/server-entrypoint": "^0.1.18-rc.36",
43
+ "@owlmeans/server-context": "^0.1.18-rc.39",
44
+ "@owlmeans/server-entrypoint": "^0.1.18-rc.37",
45
45
  "ajv-errors": "^3.0.0",
46
46
  "fastify": "^5.0.0",
47
47
  "fastify-raw-body": "^5.0.0",
@@ -1,7 +1,7 @@
1
1
  import { afterAll, beforeAll, describe, expect, test } from 'bun:test'
2
2
  import Fastify from 'fastify'
3
3
  import type { FastifyInstance } from 'fastify'
4
- import { AuthForbidden, AuthorizationError } from '@owlmeans/auth'
4
+ import { AuthForbidden, AuthorizationError, AuthUnknown } from '@owlmeans/auth'
5
5
  import { ResilientError, SEPARATOR } from '@owlmeans/error'
6
6
  import { provideResponse } from '@owlmeans/entrypoint'
7
7
  import { errorExposure, errorStatus, handleError, INCIDENT_ID_HEADER } from '../src/utils/error.js'
@@ -254,6 +254,12 @@ describe('@owlmeans/server-api — handleError status', () => {
254
254
  }
255
255
  })
256
256
 
257
+ test('an unknown authentication method or identity answers 400, as thrown and after a marshal hop', async () => {
258
+ expect((await answer(new AuthUnknown('email-otp'))).status).toBe(400)
259
+ expect((await answer(ResilientError.marshal(new AuthUnknown('entity')))).status).toBe(400)
260
+ expect((await answer(new AuthUnknown(), '/execute')).status).toBe(400)
261
+ })
262
+
257
263
  test('honours an explicitly exposed 5xx without opening arbitrary server statuses', async () => {
258
264
  expect((await answer(new TemporarilyUnavailable())).status).toBe(503)
259
265
  const Unexposed = declaring('ServerApiSpecUnexposed503', 503)