@veloxts/mcp 0.8.3 → 0.9.0

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/CHANGELOG.md +15 -10
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @veloxts/mcp
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat(router): add raw() response primitive for redirects, cookies, custom headers and .check() post-middleware authorization primitive
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [e1c32a2]
12
+ - Updated dependencies
13
+ - Updated dependencies [83c5da1]
14
+ - @veloxts/router@0.9.0
15
+ - @veloxts/cli@0.9.0
16
+ - @veloxts/validation@0.9.0
17
+
3
18
  ## 0.8.3
4
19
 
5
20
  ### Patch Changes
@@ -521,7 +536,6 @@
521
536
  - ### feat(auth): Unified Adapter-Only Architecture
522
537
 
523
538
  **New Features:**
524
-
525
539
  - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
526
540
  - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
527
541
  - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
@@ -529,24 +543,20 @@
529
543
  - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
530
544
 
531
545
  **Architecture Changes:**
532
-
533
546
  - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
534
547
  - Single code path for authentication (no more dual native/adapter modes)
535
548
  - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
536
549
 
537
550
  **Breaking Changes:**
538
-
539
551
  - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
540
552
  - Remove deprecated `session` field from `AuthConfig`
541
553
  - `User` interface no longer has index signature (extend via declaration merging)
542
554
 
543
555
  **Type Safety Improvements:**
544
-
545
556
  - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
546
557
  - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
547
558
 
548
559
  **Migration:**
549
-
550
560
  - Existing `authPlugin` usage remains backward-compatible
551
561
  - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
552
562
 
@@ -566,12 +576,10 @@
566
576
  Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
567
577
 
568
578
  ### Phase 1: Validation Helpers (`@veloxts/validation`)
569
-
570
579
  - Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
571
580
  - Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
572
581
 
573
582
  ### Phase 2: Template Deduplication (`@veloxts/auth`)
574
-
575
583
  - Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
576
584
  - Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
577
585
  - Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
@@ -579,20 +587,17 @@
579
587
  - Fix jwtManager singleton pattern in templates
580
588
 
581
589
  ### Phase 3: Router Helpers (`@veloxts/router`)
582
-
583
590
  - Add `createRouter()` returning `{ collections, router }` for DRY setup
584
591
  - Add `toRouter()` for router-only use cases
585
592
  - Update all router templates to use `createRouter()`
586
593
 
587
594
  ### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
588
-
589
595
  - Add `NarrowingGuard` interface with phantom `_narrows` type
590
596
  - Add `authenticatedNarrow` and `hasRoleNarrow()` guards
591
597
  - Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
592
598
  - Enables `ctx.user` to be non-null after guard passes
593
599
 
594
600
  ### Phase 5: Documentation (`@veloxts/router`)
595
-
596
601
  - Document `.rest()` override patterns
597
602
  - Document `createRouter()` helper usage
598
603
  - Document `guardNarrow()` experimental API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/mcp",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "description": "Model Context Protocol server for VeloxTS - expose project context to AI tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "@modelcontextprotocol/sdk": "1.29.0",
26
26
  "typescript": "5.9.3",
27
- "@veloxts/validation": "0.8.3",
28
- "@veloxts/cli": "0.8.3",
29
- "@veloxts/router": "0.8.3"
27
+ "@veloxts/router": "0.9.0",
28
+ "@veloxts/validation": "0.9.0",
29
+ "@veloxts/cli": "0.9.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "zod": "^4.3.0"