@breadstone/archipel-mcp 0.0.45 → 0.0.46
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/data/guides/ai-text-generation.md +2 -2
- package/data/guides/authentication-and-authorization.md +2 -2
- package/data/guides/blob-storage.md +3 -3
- package/data/guides/caching.md +2 -2
- package/data/guides/database-setup.md +4 -4
- package/data/guides/email-delivery.md +6 -6
- package/data/guides/openapi-and-feature-discovery.md +1 -1
- package/data/guides/queue-infrastructure.md +4 -4
- package/data/guides/telemetry-and-observability.md +1 -1
- package/data/packages/platform-cryptography/api/Class.OtpService.md +6 -6
- package/data/packages/platform-cryptography/api/Variable.TOTP_EPOCH_TOLERANCE.md +1 -1
- package/data/packages/platform-feature-flags/index.md +103 -0
- package/package.json +1 -1
|
@@ -64,7 +64,7 @@ Register only the provider loaders you install. The root entry does not import p
|
|
|
64
64
|
|
|
65
65
|
All intelligence settings are read from environment variables via `ConfigService`. No direct `process.env` access is needed.
|
|
66
66
|
|
|
67
|
-
```
|
|
67
|
+
```dotenv
|
|
68
68
|
INTELLIGENCE_PROVIDER=openai
|
|
69
69
|
INTELLIGENCE_MODEL=gpt-4o-mini
|
|
70
70
|
INTELLIGENCE_API_KEY=sk-...
|
|
@@ -85,7 +85,7 @@ INTELLIGENCE_BASE_URL= # optional — override for custom endpoints
|
|
|
85
85
|
|
|
86
86
|
Each provider resolves its API key and base URL from dedicated environment variables when the generic `INTELLIGENCE_API_KEY` is not set:
|
|
87
87
|
|
|
88
|
-
```
|
|
88
|
+
```dotenv
|
|
89
89
|
# Provider-specific keys (optional — fallback from INTELLIGENCE_API_KEY)
|
|
90
90
|
OPENAI_API_KEY=sk-...
|
|
91
91
|
ANTHROPIC_API_KEY=sk-ant-...
|
|
@@ -475,7 +475,7 @@ If `mfaRequired` is `true`, the client receives a `challengeId` instead of an `a
|
|
|
475
475
|
|
|
476
476
|
### MFA Configuration
|
|
477
477
|
|
|
478
|
-
```
|
|
478
|
+
```dotenv
|
|
479
479
|
AUTH_MFA_ENCRYPTION_KEY=<32-byte-hex-key>
|
|
480
480
|
AUTH_MFA_CHALLENGE_EXPIRES_IN=5m
|
|
481
481
|
AUTH_MFA_MAX_ATTEMPTS=5
|
|
@@ -584,7 +584,7 @@ AuthModule.register({
|
|
|
584
584
|
|
|
585
585
|
### Step 4: Set Environment Variables
|
|
586
586
|
|
|
587
|
-
```
|
|
587
|
+
```dotenv
|
|
588
588
|
# Google
|
|
589
589
|
AUTH_GOOGLE_CLIENT_ID=your-client-id
|
|
590
590
|
AUTH_GOOGLE_CLIENT_SECRET=your-client-secret
|
|
@@ -54,7 +54,7 @@ Each provider reads its credentials from environment variables via the `ConfigMo
|
|
|
54
54
|
|
|
55
55
|
### AWS S3
|
|
56
56
|
|
|
57
|
-
```
|
|
57
|
+
```dotenv
|
|
58
58
|
BLOB_AWS_REGION=eu-central-1
|
|
59
59
|
BLOB_AWS_BUCKET=my-app-uploads
|
|
60
60
|
BLOB_AWS_ACCESS_KEY_ID=AKIA...
|
|
@@ -67,7 +67,7 @@ BLOB_AWS_SECRET_ACCESS_KEY=secret...
|
|
|
67
67
|
|
|
68
68
|
You can authenticate with either a **connection string** or **DefaultAzureCredential** (via managed identity):
|
|
69
69
|
|
|
70
|
-
```
|
|
70
|
+
```dotenv
|
|
71
71
|
# Option 1: Connection string
|
|
72
72
|
BLOB_AZURE_CONNECTION_STRING=DefaultEndpointsProtocol=https;AccountName=...
|
|
73
73
|
BLOB_AZURE_CONTAINER=uploads
|
|
@@ -83,7 +83,7 @@ When using `accountName` without a `connectionString`, the provider authenticate
|
|
|
83
83
|
|
|
84
84
|
### Vercel Blob
|
|
85
85
|
|
|
86
|
-
```
|
|
86
|
+
```dotenv
|
|
87
87
|
BLOB_VERCEL_TOKEN=your-vercel-blob-token
|
|
88
88
|
```
|
|
89
89
|
|
package/data/guides/caching.md
CHANGED
|
@@ -28,7 +28,7 @@ yarn add ioredis
|
|
|
28
28
|
|
|
29
29
|
### Core Variables
|
|
30
30
|
|
|
31
|
-
```
|
|
31
|
+
```dotenv
|
|
32
32
|
CACHE_DEFAULT_TTL_MS=60000
|
|
33
33
|
CACHE_MAX_ENTRIES=1000
|
|
34
34
|
CACHE_STALE_WHILE_REVALIDATE=false
|
|
@@ -38,7 +38,7 @@ All core variables are optional. When omitted, each cache instance uses the valu
|
|
|
38
38
|
|
|
39
39
|
### Redis Variables
|
|
40
40
|
|
|
41
|
-
```
|
|
41
|
+
```dotenv
|
|
42
42
|
REDIS_URL=redis://localhost:6379
|
|
43
43
|
REDIS_KEY_PREFIX=app:
|
|
44
44
|
REDIS_TTL_SECONDS=300
|
|
@@ -48,19 +48,19 @@ npx prisma init
|
|
|
48
48
|
|
|
49
49
|
`platform-database` ships its own config keys and a ready-made entries array. Set the relevant variables in your environment:
|
|
50
50
|
|
|
51
|
-
```
|
|
51
|
+
```dotenv
|
|
52
52
|
DATABASE_URL=postgresql://user:password@localhost:5432/mydb
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
For Prisma Accelerate (managed connection pooling), add the Accelerate URL from the Prisma Console:
|
|
56
56
|
|
|
57
|
-
```
|
|
57
|
+
```dotenv
|
|
58
58
|
DB_ACCELERATE_URL=prisma://accelerate.prisma-data.net/?api_key=your-accelerate-api-key
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Optional environment variables for Prisma Optimize (query analysis dashboard):
|
|
62
62
|
|
|
63
|
-
```
|
|
63
|
+
```dotenv
|
|
64
64
|
DB_OPTIMIZE=true
|
|
65
65
|
DB_OPTIMIZE_API_KEY=your-optimize-api-key
|
|
66
66
|
```
|
|
@@ -120,7 +120,7 @@ Accelerate provides connection pooling, global caching, and query optimization
|
|
|
120
120
|
|
|
121
121
|
Set `DB_ACCELERATE_URL` in your environment. The module reads it automatically via `ConfigService` — no code changes needed:
|
|
122
122
|
|
|
123
|
-
```
|
|
123
|
+
```dotenv
|
|
124
124
|
DB_ACCELERATE_URL=prisma://accelerate.prisma-data.net/?api_key=your-accelerate-api-key
|
|
125
125
|
```
|
|
126
126
|
|
|
@@ -96,7 +96,7 @@ This ensures that importing the core package does **not** pull in provider-speci
|
|
|
96
96
|
|
|
97
97
|
### Core Variables
|
|
98
98
|
|
|
99
|
-
```
|
|
99
|
+
```dotenv
|
|
100
100
|
MAIL_TEMPLATE_ENGINE_FORMAT=html
|
|
101
101
|
MAIL_SENDER_EMAIL=noreply@yourapp.com
|
|
102
102
|
```
|
|
@@ -109,7 +109,7 @@ The delivery strategy and template-fetch strategy are no longer configured via e
|
|
|
109
109
|
|
|
110
110
|
#### SMTP
|
|
111
111
|
|
|
112
|
-
```
|
|
112
|
+
```dotenv
|
|
113
113
|
MAIL_SMTP_HOST=smtp.example.com
|
|
114
114
|
MAIL_SMTP_PORT=587
|
|
115
115
|
MAIL_SMTP_USER=user@example.com
|
|
@@ -119,25 +119,25 @@ MAIL_SMTP_SECURE=true
|
|
|
119
119
|
|
|
120
120
|
#### Resend
|
|
121
121
|
|
|
122
|
-
```
|
|
122
|
+
```dotenv
|
|
123
123
|
MAIL_RESEND_API_KEY=re_...
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
#### Postmark
|
|
127
127
|
|
|
128
|
-
```
|
|
128
|
+
```dotenv
|
|
129
129
|
MAIL_POSTMARK_API_KEY=...
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
#### SendGrid
|
|
133
133
|
|
|
134
|
-
```
|
|
134
|
+
```dotenv
|
|
135
135
|
MAIL_SENDGRID_API_KEY=SG...
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
#### Mailgun
|
|
139
139
|
|
|
140
|
-
```
|
|
140
|
+
```dotenv
|
|
141
141
|
MAIL_MAILGUN_API_KEY=key-...
|
|
142
142
|
MAIL_MAILGUN_DOMAIN=mg.yourapp.com
|
|
143
143
|
```
|
|
@@ -40,7 +40,7 @@ yarn add @vercel/queue
|
|
|
40
40
|
|
|
41
41
|
### Core Variables
|
|
42
42
|
|
|
43
|
-
```
|
|
43
|
+
```dotenv
|
|
44
44
|
QUEUE_MAX_JOBS=10000
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -48,7 +48,7 @@ QUEUE_MAX_JOBS=10000
|
|
|
48
48
|
|
|
49
49
|
### BullMQ Variables
|
|
50
50
|
|
|
51
|
-
```
|
|
51
|
+
```dotenv
|
|
52
52
|
BULLMQ_REDIS_URL=redis://localhost:6379
|
|
53
53
|
BULLMQ_PREFIX=myapp:
|
|
54
54
|
```
|
|
@@ -57,7 +57,7 @@ BULLMQ_PREFIX=myapp:
|
|
|
57
57
|
|
|
58
58
|
### Azure Service Bus Variables
|
|
59
59
|
|
|
60
|
-
```
|
|
60
|
+
```dotenv
|
|
61
61
|
AZURE_CONNECTION_STRING=Endpoint=sb://my-namespace.servicebus.windows.net/;SharedAccessKeyName=...;SharedAccessKey=...
|
|
62
62
|
AZURE_RECEIVE_WAIT_MS=5000
|
|
63
63
|
```
|
|
@@ -66,7 +66,7 @@ AZURE_RECEIVE_WAIT_MS=5000
|
|
|
66
66
|
|
|
67
67
|
### Vercel Queues Variables
|
|
68
68
|
|
|
69
|
-
```
|
|
69
|
+
```dotenv
|
|
70
70
|
VERCEL_QUEUE_REGION=iad1
|
|
71
71
|
VERCEL_QUEUE_CONSUMER_GROUP=my-consumer
|
|
72
72
|
VERCEL_QUEUE_TOKEN=
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: OtpService
|
|
7
7
|
|
|
8
|
-
Defined in: [otp/OtpService.ts:
|
|
8
|
+
Defined in: [otp/OtpService.ts:42](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L42)
|
|
9
9
|
|
|
10
10
|
OTP service implementation backed by otplib v13.
|
|
11
11
|
|
|
@@ -25,7 +25,7 @@ the library version.
|
|
|
25
25
|
new OtpService(options?): OtpService;
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Defined in: [otp/OtpService.ts:
|
|
28
|
+
Defined in: [otp/OtpService.ts:57](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L57)
|
|
29
29
|
|
|
30
30
|
Initializes a new instance of the `OtpService` class.
|
|
31
31
|
|
|
@@ -47,7 +47,7 @@ Initializes a new instance of the `OtpService` class.
|
|
|
47
47
|
generateSecret(): string;
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
Defined in: [otp/OtpService.ts:
|
|
50
|
+
Defined in: [otp/OtpService.ts:66](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L66)
|
|
51
51
|
|
|
52
52
|
Generates a cryptographically random secret suitable for TOTP.
|
|
53
53
|
|
|
@@ -69,7 +69,7 @@ The generated secret string.
|
|
|
69
69
|
generateUri(options): string;
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Defined in: [otp/OtpService.ts:
|
|
72
|
+
Defined in: [otp/OtpService.ts:71](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L71)
|
|
73
73
|
|
|
74
74
|
Generates an `otpauth://` URI for QR code enrollment.
|
|
75
75
|
|
|
@@ -97,7 +97,7 @@ The formatted `otpauth://` URI.
|
|
|
97
97
|
verify(token, secret): boolean;
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
Defined in: [otp/OtpService.ts:
|
|
100
|
+
Defined in: [otp/OtpService.ts:83](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L83)
|
|
101
101
|
|
|
102
102
|
Verifies a TOTP token against the given secret.
|
|
103
103
|
|
|
@@ -132,7 +132,7 @@ verifyHotp(
|
|
|
132
132
|
counter): Promise<boolean>;
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
Defined in: [otp/OtpService.ts:
|
|
135
|
+
Defined in: [otp/OtpService.ts:96](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L96)
|
|
136
136
|
|
|
137
137
|
Verifies an HOTP (counter-based) token against the given secret and counter.
|
|
138
138
|
|
|
@@ -9,7 +9,7 @@ editUrl: false
|
|
|
9
9
|
const TOTP_EPOCH_TOLERANCE: 30 = 30;
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Defined in: [otp/OtpService.ts:
|
|
12
|
+
Defined in: [otp/OtpService.ts:30](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-cryptography/src/otp/OtpService.ts#L30)
|
|
13
13
|
|
|
14
14
|
Default TOTP verification tolerance expressed in **seconds** (otplib v13 `epochTolerance`).
|
|
15
15
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: platform-feature-flags
|
|
3
|
+
description: Provider-agnostic feature flag infrastructure for NestJS with support for Azure App Configuration and Vercel Edge Config.
|
|
4
|
+
order: 3
|
|
5
|
+
tags: [feature-flags, azure, vercel, edge-config, configuration]
|
|
6
|
+
package: '@breadstone/archipel-platform-feature-flags'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# platform-feature-flags
|
|
10
|
+
|
|
11
|
+
Provider-agnostic feature flag infrastructure for NestJS with support for Azure App Configuration and Vercel Edge Config.
|
|
12
|
+
|
|
13
|
+
**Package:** `@breadstone/archipel-platform-feature-flags`
|
|
14
|
+
|
|
15
|
+
<InstallTabs />
|
|
16
|
+
|
|
17
|
+
## Provider Subpaths
|
|
18
|
+
|
|
19
|
+
Import only the providers you need:
|
|
20
|
+
|
|
21
|
+
| Provider | Subpath | SDK |
|
|
22
|
+
| ----------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
|
|
23
|
+
| Azure App Configuration | `@breadstone/archipel-platform-feature-flags/azure` | `@azure/app-configuration-provider` + `@microsoft/feature-management` |
|
|
24
|
+
| Vercel Edge Config | `@breadstone/archipel-platform-feature-flags/vercel` | `@vercel/edge-config` |
|
|
25
|
+
|
|
26
|
+
## Quick Start
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
import { Module } from '@nestjs/common';
|
|
30
|
+
import { FeatureFlagsModule } from '@breadstone/archipel-platform-feature-flags';
|
|
31
|
+
import { AzureFeatureFlagsClient, AZURE_FEATURE_FLAGS_CONFIG_ENTRIES } from '@breadstone/archipel-platform-feature-flags/azure';
|
|
32
|
+
|
|
33
|
+
@Module({
|
|
34
|
+
imports: [
|
|
35
|
+
FeatureFlagsModule.register({
|
|
36
|
+
client: AzureFeatureFlagsClient,
|
|
37
|
+
configEntries: AZURE_FEATURE_FLAGS_CONFIG_ENTRIES,
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
40
|
+
})
|
|
41
|
+
export class AppModule {}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Environment Variables
|
|
45
|
+
|
|
46
|
+
### Azure App Configuration
|
|
47
|
+
|
|
48
|
+
| Variable | Required | Description |
|
|
49
|
+
| --------------------------------------- | -------- | ------------------------------------------------ |
|
|
50
|
+
| `AZURE_APP_CONFIGURATION_CONNECTION_STRING` | Yes | Connection string for Azure App Configuration |
|
|
51
|
+
| `AZURE_FEATURE_FLAGS_LABEL` | No | Label filter for feature flags (e.g., `prod`) |
|
|
52
|
+
|
|
53
|
+
### Vercel Edge Config
|
|
54
|
+
|
|
55
|
+
| Variable | Required | Description |
|
|
56
|
+
| ----------------------- | -------- | ------------------------------------ |
|
|
57
|
+
| `EDGE_CONFIG` | Yes | Vercel Edge Config connection string |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Checking Feature Flags
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
import { Injectable } from '@nestjs/common';
|
|
65
|
+
import { FeatureFlagsService } from '@breadstone/archipel-platform-feature-flags';
|
|
66
|
+
|
|
67
|
+
@Injectable()
|
|
68
|
+
export class MyService {
|
|
69
|
+
public constructor(private readonly _featureFlags: FeatureFlagsService) {}
|
|
70
|
+
|
|
71
|
+
public async doSomething(): Promise<void> {
|
|
72
|
+
const isEnabled = await this._featureFlags.isEnabled('my-feature');
|
|
73
|
+
|
|
74
|
+
if (isEnabled) {
|
|
75
|
+
// Feature is enabled
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Architecture
|
|
84
|
+
|
|
85
|
+
```mermaid
|
|
86
|
+
flowchart TB
|
|
87
|
+
subgraph FeatureFlagsModule
|
|
88
|
+
Service[FeatureFlagsService]
|
|
89
|
+
Port[FeatureFlagsClientPort]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
subgraph Providers
|
|
93
|
+
Azure[AzureFeatureFlagsClient]
|
|
94
|
+
Vercel[VercelFeatureFlagsClient]
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
Service --> Port
|
|
98
|
+
Port -.-> Azure
|
|
99
|
+
Port -.-> Vercel
|
|
100
|
+
|
|
101
|
+
Azure --> AzureSDK[@azure/app-configuration-provider]
|
|
102
|
+
Vercel --> VercelSDK[@vercel/edge-config]
|
|
103
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@breadstone/archipel-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
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",
|