@breadstone/archipel-mcp 0.0.36 → 0.0.37

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.
@@ -391,6 +391,26 @@ public async revokeSession(@Param('token') sessionToken: string): Promise<void>
391
391
 
392
392
  `AuthModule` automatically registers `LastActiveMiddleware` on all routes. It extracts the Bearer token and updates the session's `lastActive` timestamp asynchronously — no blocking, no failure propagation.
393
393
 
394
+ Both `LastActiveMiddleware` and `LimitRequestSizeMiddleware` can be controlled via the `middleware` option:
395
+
396
+ ```typescript
397
+ AuthModule.register({
398
+ authSubject: PrismaAuthSubjectAdapter,
399
+ mfaSubject: PrismaMfaSubjectAdapter,
400
+ sessionPersistence: PrismaSessionAdapter,
401
+ verificationSubject: PrismaVerificationAdapter,
402
+ middleware: {
403
+ lastActive: false, // disable last-active tracking
404
+ requestSizeLimit: 'users/signup', // custom path (default: 'auth/register')
405
+ },
406
+ }),
407
+ ```
408
+
409
+ | Option | Type | Default | Description |
410
+ | ------------------ | ----------------- | ----------------- | ---------------------------------------------------- |
411
+ | `lastActive` | `boolean` | `true` | Enable/disable `LastActiveMiddleware` on all routes |
412
+ | `requestSizeLimit` | `false \| string` | `'auth/register'` | Disable or set a custom path for size-limit middleware |
413
+
394
414
  ---
395
415
 
396
416
  ## Multi-Factor Authentication (MFA)
@@ -5,7 +5,7 @@ editUrl: false
5
5
  ---
6
6
  # Class: AuthModule
7
7
 
8
- Defined in: [libs/platform-authentication/src/AuthModule.ts:145](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L145)
8
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:167](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L167)
9
9
 
10
10
  The `AuthModule` handles JWT-based authentication,
11
11
  including token creation and validation.
@@ -39,7 +39,7 @@ new AuthModule(): AuthModule;
39
39
  configure(consumer): void;
40
40
  ```
41
41
 
42
- Defined in: [libs/platform-authentication/src/AuthModule.ts:265](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L265)
42
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:293](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L293)
43
43
 
44
44
  #### Parameters
45
45
 
@@ -59,7 +59,7 @@ Defined in: [libs/platform-authentication/src/AuthModule.ts:265](https://github.
59
59
  static register(options): DynamicModule;
60
60
  ```
61
61
 
62
- Defined in: [libs/platform-authentication/src/AuthModule.ts:155](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L155)
62
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:183](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L183)
63
63
 
64
64
  Registers the auth module with the provided port implementations.
65
65
 
@@ -0,0 +1,39 @@
1
+ ---
2
+ title: 'Interface: IAuthMiddlewareOptions'
3
+ generated: true
4
+ editUrl: false
5
+ ---
6
+ # Interface: IAuthMiddlewareOptions
7
+
8
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:133](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L133)
9
+
10
+ Configuration for the auth module's middleware registration.
11
+
12
+ ## Properties
13
+
14
+ ### lastActive?
15
+
16
+ ```ts
17
+ optional lastActive?: boolean;
18
+ ```
19
+
20
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:139](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L139)
21
+
22
+ Configuration for the last-active tracking middleware.
23
+ - `true` or `undefined`: enabled for all routes (default)
24
+ - `false`: disabled entirely
25
+
26
+ ***
27
+
28
+ ### requestSizeLimit?
29
+
30
+ ```ts
31
+ optional requestSizeLimit?: string | false;
32
+ ```
33
+
34
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:147](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L147)
35
+
36
+ Configuration for the request size limit middleware on the register endpoint.
37
+ - `undefined`: enabled with default path `'auth/register'`
38
+ - `false`: disabled entirely
39
+ - `string`: custom path for the register endpoint (relative, without global prefix)
@@ -5,7 +5,7 @@ editUrl: false
5
5
  ---
6
6
  # Interface: IAuthModuleOptions
7
7
 
8
- Defined in: [libs/platform-authentication/src/AuthModule.ts:56](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L56)
8
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L49)
9
9
 
10
10
  Options for configuring the `AuthModule`.
11
11
 
@@ -17,7 +17,7 @@ Options for configuring the `AuthModule`.
17
17
  optional additionalConfigEntries?: readonly Omit<IConfigRegistryEntry<unknown>, "module">[];
18
18
  ```
19
19
 
20
- Defined in: [libs/platform-authentication/src/AuthModule.ts:96](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L96)
20
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:89](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L89)
21
21
 
22
22
  Optional additional configuration entries to register (e.g. provider-specific OAuth keys).
23
23
  Import them from the provider-specific sub-paths
@@ -31,7 +31,7 @@ Import them from the provider-specific sub-paths
31
31
  optional additionalProviders?: Provider[];
32
32
  ```
33
33
 
34
- Defined in: [libs/platform-authentication/src/AuthModule.ts:118](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L118)
34
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:111](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L111)
35
35
 
36
36
  Optional additional providers required by optional features (e.g. TOTP MFA).
37
37
  Import them from the provider-specific sub-paths
@@ -45,7 +45,7 @@ Import them from the provider-specific sub-paths
45
45
  authSubject: Type<AuthSubjectPort>;
46
46
  ```
47
47
 
48
- Defined in: [libs/platform-authentication/src/AuthModule.ts:60](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L60)
48
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:53](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L53)
49
49
 
50
50
  Implementation of the auth subject port (user lookup for JWT/Local/Anonymous connectors).
51
51
 
@@ -57,7 +57,7 @@ Implementation of the auth subject port (user lookup for JWT/Local/Anonymous con
57
57
  optional challengeStore?: Type<ChallengeStorePort>;
58
58
  ```
59
59
 
60
- Defined in: [libs/platform-authentication/src/AuthModule.ts:125](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L125)
60
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:118](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L118)
61
61
 
62
62
  Optional implementation of the challenge store port.
63
63
  Defaults to an in-memory store suitable for single-instance deployments.
@@ -71,7 +71,7 @@ For multi-instance deployments, provide a Redis-backed implementation.
71
71
  optional mfaChannels?: Type<any>[];
72
72
  ```
73
73
 
74
- Defined in: [libs/platform-authentication/src/AuthModule.ts:111](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L111)
74
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:104](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L104)
75
75
 
76
76
  Optional array of additional MFA channel types to register (e.g. `TotpMfaChannel`).
77
77
  Import them from the provider-specific sub-paths
@@ -87,19 +87,33 @@ Built-in channels (SMS, Email, Push) are always registered.
87
87
  mfaSubject: Type<MfaSubjectPort>;
88
88
  ```
89
89
 
90
- Defined in: [libs/platform-authentication/src/AuthModule.ts:65](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L65)
90
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:58](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L58)
91
91
 
92
92
  Implementation of the MFA subject port (MFA state persistence).
93
93
 
94
94
  ***
95
95
 
96
+ ### middleware?
97
+
98
+ ```ts
99
+ optional middleware?: IAuthMiddlewareOptions;
100
+ ```
101
+
102
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:125](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L125)
103
+
104
+ Optional middleware configuration.
105
+ Controls registration of `LastActiveMiddleware` and `LimitRequestSizeMiddleware`.
106
+ Both are enabled by default when omitted.
107
+
108
+ ***
109
+
96
110
  ### sessionPersistence
97
111
 
98
112
  ```ts
99
113
  sessionPersistence: Type<SessionPersistencePort>;
100
114
  ```
101
115
 
102
- Defined in: [libs/platform-authentication/src/AuthModule.ts:70](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L70)
116
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:63](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L63)
103
117
 
104
118
  Implementation of the session persistence port.
105
119
 
@@ -111,7 +125,7 @@ Implementation of the session persistence port.
111
125
  optional socialAuth?: Type<SocialAuthPort>;
112
126
  ```
113
127
 
114
- Defined in: [libs/platform-authentication/src/AuthModule.ts:81](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L81)
128
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:74](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L74)
115
129
 
116
130
  Optional implementation of the social auth port (OAuth connectors).
117
131
  When provided together with `socialConnectors`, the social auth flow is enabled.
@@ -124,7 +138,7 @@ When provided together with `socialConnectors`, the social auth flow is enabled.
124
138
  optional socialConnectors?: Type<any>[];
125
139
  ```
126
140
 
127
- Defined in: [libs/platform-authentication/src/AuthModule.ts:89](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L89)
141
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:82](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L82)
128
142
 
129
143
  Optional array of social connector types to register (e.g. `AppleConnector`, `GithubConnector`).
130
144
  Import them from the provider-specific sub-paths
@@ -139,7 +153,7 @@ Requires `socialAuth` to be set.
139
153
  optional tokenEnricher?: Type<TokenEnricherPort>;
140
154
  ```
141
155
 
142
- Defined in: [libs/platform-authentication/src/AuthModule.ts:102](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L102)
156
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:95](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L95)
143
157
 
144
158
  Optional implementation of the token enricher port.
145
159
  When provided, additional claims are added to JWT tokens.
@@ -152,6 +166,6 @@ When provided, additional claims are added to JWT tokens.
152
166
  verificationSubject: Type<VerificationSubjectPort>;
153
167
  ```
154
168
 
155
- Defined in: [libs/platform-authentication/src/AuthModule.ts:75](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L75)
169
+ Defined in: [libs/platform-authentication/src/AuthModule.ts:68](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-authentication/src/AuthModule.ts#L68)
156
170
 
157
171
  Implementation of the verification subject port (email/pin verification).
@@ -42,6 +42,7 @@ editUrl: false
42
42
 
43
43
  | Interface | Description |
44
44
  | ------ | ------ |
45
+ | [IAuthMiddlewareOptions](Interface.IAuthMiddlewareOptions) | Configuration for the auth module's middleware registration. |
45
46
  | [IAuthModuleOptions](Interface.IAuthModuleOptions) | Options for configuring the `AuthModule`. |
46
47
  | [IAuthSubject](Interface.IAuthSubject) | Generic authentication subject returned by the [AuthSubjectPort](Class.AuthSubjectPort). Represents any entity that can authenticate (user, service account, etc.). |
47
48
  | [IMfaChallengePayload](Interface.IMfaChallengePayload) | Represents the MFA challenge payload encoded in a challenge token. |
@@ -50,6 +50,14 @@ export class AppModule {}
50
50
  | `challengeStore` | `Type<ChallengeStorePort>` | No | MFA challenge state persistence. Defaults to in-memory. Use Redis for multi-instance deployments. |
51
51
  | `socialAuth` | `Type<SocialAuthPort>` | No | OAuth user creation/linking. When provided, GitHub/Google/Microsoft/Apple strategies are registered. |
52
52
  | `tokenEnricher` | `Type<TokenEnricherPort>` | No | Custom JWT claim injection. When provided, additional claims are merged into access tokens. |
53
+ | `middleware` | `IAuthMiddlewareOptions` | No | Controls registration of `LastActiveMiddleware` and `LimitRequestSizeMiddleware`. Both enabled by default. |
54
+
55
+ ### IAuthMiddlewareOptions
56
+
57
+ | Property | Type | Default | Description |
58
+ | ------------------ | ----------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------- |
59
+ | `lastActive` | `boolean` | `true` | Enables `LastActiveMiddleware` on all routes. Set to `false` to disable last-active session tracking entirely. |
60
+ | `requestSizeLimit` | `false \| string` | `'auth/register'` | Path for the `LimitRequestSizeMiddleware` (POST only). Set to `false` to disable, or provide a custom path string. |
53
61
 
54
62
  ### Environment Variables
55
63
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breadstone/archipel-mcp",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "MCP server providing Archipel platform knowledge - documentation, query patterns, and coding conventions - to AI development tools.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/main.js",